summaryrefslogtreecommitdiff
path: root/modules/scinotes
diff options
context:
space:
mode:
authorShashank2017-05-29 12:40:26 +0530
committerShashank2017-05-29 12:40:26 +0530
commit0345245e860375a32c9a437c4a9d9cae807134e9 (patch)
treead51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/scinotes
downloadscilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip
CMSCOPE changed
Diffstat (limited to 'modules/scinotes')
-rwxr-xr-xmodules/scinotes/.libs/libsciscinotes-algo.abin0 -> 388348 bytes
l---------modules/scinotes/.libs/libsciscinotes-algo.la1
l---------modules/scinotes/.libs/libsciscinotes-disable.la1
-rwxr-xr-xmodules/scinotes/.libs/libsciscinotes-disable.lai41
l---------modules/scinotes/.libs/libsciscinotes-disable.so1
l---------modules/scinotes/.libs/libsciscinotes-disable.so.51
-rwxr-xr-xmodules/scinotes/.libs/libsciscinotes-disable.so.5.5.2bin0 -> 9680 bytes
l---------modules/scinotes/.libs/libsciscinotes.la1
-rwxr-xr-xmodules/scinotes/.libs/libsciscinotes.lai41
l---------modules/scinotes/.libs/libsciscinotes.so1
l---------modules/scinotes/.libs/libsciscinotes.so.51
-rwxr-xr-xmodules/scinotes/.libs/libsciscinotes.so.5.5.2bin0 -> 291888 bytes
-rwxr-xr-xmodules/scinotes/Makefile1524
-rwxr-xr-xmodules/scinotes/Makefile.am108
-rwxr-xr-xmodules/scinotes/Makefile.in1524
-rwxr-xr-xmodules/scinotes/build.xml20
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/CommentManager.classbin0 -> 2354 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/CompoundUndoManager.classbin0 -> 3832 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/EditorComponent.classbin0 -> 1551 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner$FunctionInfo.classbin0 -> 667 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner.classbin0 -> 10331 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/HelpOnTypingManager.classbin0 -> 5358 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/IndentManager.classbin0 -> 3378 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/IndentScanner.classbin0 -> 12474 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseClickedAdapter.classbin0 -> 313 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseOverAdapter.classbin0 -> 307 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter.classbin0 -> 581 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordEvent.classbin0 -> 1432 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordListener.classbin0 -> 315 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$InsideLinePainter.classbin0 -> 2676 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$MouseOverMatcher.classbin0 -> 945 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$Parameters.classbin0 -> 525 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$ScilabKeywordsPainter.classbin0 -> 1823 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager.classbin0 -> 5797 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$1.classbin0 -> 215 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$MatchingPositions.classbin0 -> 791 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner.classbin0 -> 19855 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$1.classbin0 -> 343 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$10.classbin0 -> 903 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$2.classbin0 -> 1486 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$3.classbin0 -> 701 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$4.classbin0 -> 584 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$5.classbin0 -> 652 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$6.classbin0 -> 773 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$7.classbin0 -> 496 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$8.classbin0 -> 776 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$9.classbin0 -> 1250 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$ActionOnDocument.classbin0 -> 314 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes.classbin0 -> 43084 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave$1.classbin0 -> 730 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave.classbin0 -> 6940 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret$SciNotesNavigationFilter.classbin0 -> 2954 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret.classbin0 -> 5003 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration$Conf.classbin0 -> 1449 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration.classbin0 -> 839 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesGUI.classbin0 -> 10667 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesLineNumberPanel.classbin0 -> 8374 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$1.classbin0 -> 589 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Autosave.classbin0 -> 1143 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Display.classbin0 -> 2750 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Header.classbin0 -> 2100 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Preferences.classbin0 -> 1805 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions.classbin0 -> 2893 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontDecoration.classbin0 -> 1612 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontInfo.classbin0 -> 1115 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext.classbin0 -> 6490 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$1.classbin0 -> 1363 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$2.classbin0 -> 1364 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$Anchor.classbin0 -> 597 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$ScilabLeafElement.classbin0 -> 3696 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument.classbin0 -> 13522 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocumentReader.classbin0 -> 1666 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit$DocString.classbin0 -> 336 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit.classbin0 -> 6179 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$1.classbin0 -> 1461 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$10.classbin0 -> 938 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$2.classbin0 -> 3416 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$3.classbin0 -> 2233 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$4.classbin0 -> 998 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$5.classbin0 -> 676 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$6.classbin0 -> 1376 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$7.classbin0 -> 1411 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$8.classbin0 -> 2461 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$9.classbin0 -> 1340 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane.classbin0 -> 29672 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywords.classbin0 -> 463 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywordsJNI.classbin0 -> 1095 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer$ScilabTokens.classbin0 -> 817 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer.classbin0 -> 23934 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexerConstants.classbin0 -> 4066 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabPlainView.classbin0 -> 7641 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabView.classbin0 -> 8041 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$1.classbin0 -> 1808 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$2.classbin0 -> 1050 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$3.classbin0 -> 796 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$4.classbin0 -> 989 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$BackgroundSearch.classbin0 -> 1767 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Iconable.classbin0 -> 232 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Line.classbin0 -> 2611 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$MatchingPositions.classbin0 -> 5128 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager.classbin0 -> 7816 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager$Tabulation.classbin0 -> 811 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager.classbin0 -> 4275 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/TrailingWhiteManager.classbin0 -> 1655 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/AboutAction.classbin0 -> 793 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction$1.classbin0 -> 1041 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.classbin0 -> 1640 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction$1.classbin0 -> 1038 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.classbin0 -> 1636 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.classbin0 -> 925 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction$1.classbin0 -> 1418 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction.classbin0 -> 3131 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAction.classbin0 -> 1515 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllAction.classbin0 -> 1533 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllButThisAction.classbin0 -> 1595 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CodeNavigatorAction.classbin0 -> 1056 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CommentAction.classbin0 -> 1574 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLSelection.classbin0 -> 1920 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLTransferHandler.classbin0 -> 1875 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.classbin0 -> 2027 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.classbin0 -> 988 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction$1.classbin0 -> 1284 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.classbin0 -> 1539 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CutAction.classbin0 -> 2234 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultAction.classbin0 -> 2400 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$1.classbin0 -> 731 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$2.classbin0 -> 749 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction.classbin0 -> 2571 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DeleteAction.classbin0 -> 1515 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction$1.classbin0 -> 687 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.classbin0 -> 3284 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$1.classbin0 -> 681 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$2.classbin0 -> 876 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction.classbin0 -> 10297 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction$1.classbin0 -> 685 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction.classbin0 -> 3493 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction$1.classbin0 -> 1360 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.classbin0 -> 2596 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.classbin0 -> 3993 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExitAction.classbin0 -> 945 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$1.classbin0 -> 1652 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$2.classbin0 -> 826 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction.classbin0 -> 6318 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$1.classbin0 -> 564 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$10.classbin0 -> 611 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$11.classbin0 -> 1038 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$12.classbin0 -> 1272 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$13.classbin0 -> 5023 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$14.classbin0 -> 592 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$15.classbin0 -> 766 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$16.classbin0 -> 793 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$17.classbin0 -> 1211 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$18.classbin0 -> 766 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$19.classbin0 -> 744 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$2.classbin0 -> 864 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$20.classbin0 -> 596 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$21.classbin0 -> 1180 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$22.classbin0 -> 858 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$3.classbin0 -> 860 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$4.classbin0 -> 865 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$5.classbin0 -> 868 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6$1.classbin0 -> 1816 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6.classbin0 -> 1805 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$7.classbin0 -> 765 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$8.classbin0 -> 765 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$9.classbin0 -> 598 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$MyListener.classbin0 -> 1722 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction.classbin0 -> 21441 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindNextAction.classbin0 -> 2180 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindPreviousAction.classbin0 -> 2192 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GeneralSettingsAction.classbin0 -> 1042 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction$1.classbin0 -> 1644 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.classbin0 -> 3731 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.classbin0 -> 1340 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.classbin0 -> 1348 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpAction.classbin0 -> 1115 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction$1.classbin0 -> 2088 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.classbin0 -> 2819 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.classbin0 -> 1145 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$1.classbin0 -> 1212 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$2.classbin0 -> 1294 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton$1.classbin0 -> 1181 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton.classbin0 -> 1306 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons$1.classbin0 -> 2592 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons.classbin0 -> 1422 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField.classbin0 -> 5482 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction.classbin0 -> 3423 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction$1.classbin0 -> 1008 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction.classbin0 -> 1855 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/InsertOverwriteAction.classbin0 -> 1184 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineBeautifierAction.classbin0 -> 2084 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$1.classbin0 -> 929 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$2.classbin0 -> 553 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction.classbin0 -> 3436 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.classbin0 -> 3918 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NewAction.classbin0 -> 1492 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextParagraphAction.classbin0 -> 2270 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextTabAction.classbin0 -> 1091 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenAction.classbin0 -> 2883 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction$1.classbin0 -> 887 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction.classbin0 -> 2812 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$1.classbin0 -> 781 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$2.classbin0 -> 1217 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$3.classbin0 -> 1733 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$4.classbin0 -> 1047 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.classbin0 -> 7587 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.classbin0 -> 859 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction$1.classbin0 -> 1499 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction.classbin0 -> 2003 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction$1.classbin0 -> 1131 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction.classbin0 -> 1595 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PageSetupAction.classbin0 -> 1296 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteAction.classbin0 -> 2838 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteColumnAction.classbin0 -> 4159 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousParagraphAction.classbin0 -> 714 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousTabAction.classbin0 -> 1033 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintAction.classbin0 -> 1676 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintPreviewAction.classbin0 -> 1753 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RecentFileAction.classbin0 -> 3433 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RedoAction.classbin0 -> 1099 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$1.classbin0 -> 907 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$2.classbin0 -> 562 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$AddDirectoryAction.classbin0 -> 2168 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$RmDirectoryAction.classbin0 -> 1294 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.classbin0 -> 2706 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ReloadAction.classbin0 -> 1142 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveAnchorAction.classbin0 -> 1885 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction$1.classbin0 -> 857 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.classbin0 -> 1932 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.classbin0 -> 2517 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$1.classbin0 -> 1882 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$2.classbin0 -> 1609 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNode.classbin0 -> 768 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor$1.classbin0 -> 950 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor.classbin0 -> 2480 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeRenderer.classbin0 -> 2642 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$FilesVector.classbin0 -> 1158 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.classbin0 -> 8631 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAction.classbin0 -> 2044 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAllAction.classbin0 -> 1911 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.classbin0 -> 1850 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.classbin0 -> 924 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAsAction.classbin0 -> 2012 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction$1.classbin0 -> 887 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction.classbin0 -> 1998 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$1.classbin0 -> 850 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionConfiguration.classbin0 -> 3648 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionManager.classbin0 -> 2737 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesInputParsingManager.classbin0 -> 3511 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.classbin0 -> 2617 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchFilesAction.classbin0 -> 655 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$1.classbin0 -> 603 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$10.classbin0 -> 1942 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$11.classbin0 -> 667 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$12.classbin0 -> 630 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$13.classbin0 -> 1729 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$14.classbin0 -> 631 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$15.classbin0 -> 651 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$16.classbin0 -> 833 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$17.classbin0 -> 1047 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$18.classbin0 -> 651 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$19.classbin0 -> 833 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$2.classbin0 -> 666 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$20.classbin0 -> 1047 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$21.classbin0 -> 833 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$22.classbin0 -> 2091 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$3.classbin0 -> 896 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$4.classbin0 -> 882 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$5.classbin0 -> 877 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$6.classbin0 -> 878 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$7.classbin0 -> 878 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$8.classbin0 -> 886 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$9.classbin0 -> 879 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.classbin0 -> 14634 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectAllAction.classbin0 -> 1377 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction$1.classbin0 -> 1750 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction.classbin0 -> 2873 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.classbin0 -> 676 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$1.classbin0 -> 704 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$2.classbin0 -> 979 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$3.classbin0 -> 951 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction.classbin0 -> 4619 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetColorsAction.classbin0 -> 775 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetFontAction.classbin0 -> 772 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$1.classbin0 -> 1379 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$2.classbin0 -> 833 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction.classbin0 -> 2556 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/TabifyAction.classbin0 -> 1957 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToLowerCaseAction.classbin0 -> 1405 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToUpperCaseAction.classbin0 -> 1405 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnCommentAction.classbin0 -> 1557 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnTabifyAction.classbin0 -> 1992 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UndoAction.classbin0 -> 1099 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/style/FilterManager.classbin0 -> 212 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$1.classbin0 -> 1391 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$2.classbin0 -> 874 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.classbin0 -> 1912 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.classbin0 -> 1626 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$1.classbin0 -> 1378 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$2.classbin0 -> 769 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab.classbin0 -> 1673 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.classbin0 -> 1341 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$1.classbin0 -> 1377 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$2.classbin0 -> 856 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.classbin0 -> 1900 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.classbin0 -> 1624 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/CodeExporter.classbin0 -> 4872 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.classbin0 -> 20051 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/DropFilesListener.classbin0 -> 4782 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/FOCodeConverter.classbin0 -> 4424 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/HTMLCodeConverter.classbin0 -> 5073 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$1.classbin0 -> 659 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$10.classbin0 -> 659 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$2.classbin0 -> 624 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$3.classbin0 -> 1181 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$4.classbin0 -> 931 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$5.classbin0 -> 873 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$6.classbin0 -> 823 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$7.classbin0 -> 907 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$8.classbin0 -> 907 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$9.classbin0 -> 658 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$NavigatorFocusTraversalPolicy.classbin0 -> 1139 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow.classbin0 -> 20221 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SaveFile.classbin0 -> 5411 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.classbin0 -> 3998 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents$1.classbin0 -> 977 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents.classbin0 -> 1260 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesMessages.classbin0 -> 16774 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane$ScilabVerticalScrollBar.classbin0 -> 2220 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane.classbin0 -> 1182 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$1.classbin0 -> 708 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$2.classbin0 -> 1059 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$3.classbin0 -> 656 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$4.classbin0 -> 1355 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$5.classbin0 -> 1283 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton$1.classbin0 -> 1126 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton.classbin0 -> 1316 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton.classbin0 -> 2242 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane.classbin0 -> 10238 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$1.classbin0 -> 796 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$2.classbin0 -> 1427 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$3.classbin0 -> 1369 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$4.classbin0 -> 1108 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$5.classbin0 -> 1556 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$6.classbin0 -> 955 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch$1.classbin0 -> 1413 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch.classbin0 -> 2588 bytes
-rwxr-xr-xmodules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile.classbin0 -> 13881 bytes
-rwxr-xr-xmodules/scinotes/etc/XConfiguration-scinotes.xml27
-rwxr-xr-xmodules/scinotes/etc/XConfiguration-scinotes.xsl563
-rwxr-xr-xmodules/scinotes/etc/keysConfiguration.xml80
-rwxr-xr-xmodules/scinotes/etc/scinotes.quit8
-rwxr-xr-xmodules/scinotes/etc/scinotes.start10
-rwxr-xr-xmodules/scinotes/etc/scinotesConfiguration.xml43
-rwxr-xr-xmodules/scinotes/etc/scinotesGUIConfiguration.xml200
-rwxr-xr-xmodules/scinotes/help/en_US/addchapter.sce11
-rwxr-xr-xmodules/scinotes/help/en_US/edit_error.xml67
-rwxr-xr-xmodules/scinotes/help/en_US/editor.xml50
-rwxr-xr-xmodules/scinotes/help/en_US/scinotes.xml586
-rwxr-xr-xmodules/scinotes/help/fr_FR/addchapter.sce11
-rwxr-xr-xmodules/scinotes/help/ja_JP/addchapter.sce11
-rwxr-xr-xmodules/scinotes/help/ja_JP/edit_error.xml70
-rwxr-xr-xmodules/scinotes/help/ja_JP/editor.xml38
-rwxr-xr-xmodules/scinotes/help/ja_JP/scinotes.xml575
-rwxr-xr-xmodules/scinotes/help/pt_BR/addchapter.sce11
-rwxr-xr-xmodules/scinotes/help/ru_RU/addchapter.sce11
-rwxr-xr-xmodules/scinotes/includes/callscinotes.h29
-rwxr-xr-xmodules/scinotes/includes/dynlib_scinotes.h28
-rwxr-xr-xmodules/scinotes/includes/gw_scinotes.h23
-rwxr-xr-xmodules/scinotes/jar/org.scilab.modules.scinotes.jarbin0 -> 449669 bytes
-rwxr-xr-xmodules/scinotes/libsciscinotes-algo.la41
-rwxr-xr-xmodules/scinotes/libsciscinotes-disable.la41
-rwxr-xr-xmodules/scinotes/libsciscinotes.la41
-rwxr-xr-xmodules/scinotes/license.txt11
-rwxr-xr-xmodules/scinotes/locales/ca_ES.po1136
-rwxr-xr-xmodules/scinotes/locales/cs_CZ.po1136
-rwxr-xr-xmodules/scinotes/locales/de_DE.po1137
-rwxr-xr-xmodules/scinotes/locales/es_ES.po1141
-rwxr-xr-xmodules/scinotes/locales/fr_FR.po1196
-rwxr-xr-xmodules/scinotes/locales/it_IT.po1143
-rwxr-xr-xmodules/scinotes/locales/ja_JP.po1131
-rwxr-xr-xmodules/scinotes/locales/pl_PL.po1138
-rwxr-xr-xmodules/scinotes/locales/pt_BR.po1137
-rwxr-xr-xmodules/scinotes/locales/ru_RU.po1145
-rwxr-xr-xmodules/scinotes/locales/scinotes.pot1925
-rwxr-xr-xmodules/scinotes/locales/uk_UA.po1158
-rwxr-xr-xmodules/scinotes/locales/zh_CN.po1131
-rwxr-xr-xmodules/scinotes/locales/zh_TW.po1129
-rwxr-xr-xmodules/scinotes/macros/buildmacros.bat11
-rwxr-xr-xmodules/scinotes/macros/buildmacros.sce16
-rwxr-xr-xmodules/scinotes/macros/cleanmacros.bat13
-rwxr-xr-xmodules/scinotes/macros/edit_error.binbin0 -> 3052 bytes
-rwxr-xr-xmodules/scinotes/macros/edit_error.sci35
-rwxr-xr-xmodules/scinotes/macros/editor.binbin0 -> 5792 bytes
-rwxr-xr-xmodules/scinotes/macros/editor.sci67
-rwxr-xr-xmodules/scinotes/macros/libbin0 -> 316 bytes
-rwxr-xr-xmodules/scinotes/macros/names2
-rwxr-xr-xmodules/scinotes/sci_gateway/c/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/sci_gateway/c/.deps/libsciscinotes_la-gw_scinotes.Plo305
-rwxr-xr-xmodules/scinotes/sci_gateway/c/.dirstamp0
-rwxr-xr-xmodules/scinotes/sci_gateway/c/.libs/libsciscinotes_la-gw_scinotes.obin0 -> 8272 bytes
-rwxr-xr-xmodules/scinotes/sci_gateway/c/gw_scinotes.c56
-rwxr-xr-xmodules/scinotes/sci_gateway/c/libsciscinotes_la-gw_scinotes.lo12
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo513
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_scinotes.Plo525
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.dirstamp0
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_closeSciNotesFromScilab.obin0 -> 102560 bytes
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_scinotes.obin0 -> 134008 bytes
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo12
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo12
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp58
-rwxr-xr-xmodules/scinotes/sci_gateway/cpp/sci_scinotes.cpp383
-rwxr-xr-xmodules/scinotes/sci_gateway/scinotes_gateway.xml27
-rwxr-xr-xmodules/scinotes/scinotes.iss48
-rwxr-xr-xmodules/scinotes/src/c/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/c/.deps/libsciscinotes_algo_la-ScilabKeywords.Plo112
-rwxr-xr-xmodules/scinotes/src/c/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/c/.libs/libsciscinotes_algo_la-ScilabKeywords.obin0 -> 6584 bytes
-rwxr-xr-xmodules/scinotes/src/c/DllmainSCINOTES.c33
-rwxr-xr-xmodules/scinotes/src/c/ScilabKeywords.c70
-rwxr-xr-xmodules/scinotes/src/c/ScilabKeywords.h42
-rwxr-xr-xmodules/scinotes/src/c/core_Import.def15
-rwxr-xr-xmodules/scinotes/src/c/libsciscinotes_algo_la-ScilabKeywords.lo12
-rwxr-xr-xmodules/scinotes/src/c/scinotes.rc96
-rwxr-xr-xmodules/scinotes/src/c/scinotes.vcxproj264
-rwxr-xr-xmodules/scinotes/src/c/scinotes.vcxproj.filters90
-rwxr-xr-xmodules/scinotes/src/cpp/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/cpp/.deps/libsciscinotes_algo_la-callscinotes.Plo379
-rwxr-xr-xmodules/scinotes/src/cpp/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/cpp/.libs/libsciscinotes_algo_la-callscinotes.obin0 -> 35360 bytes
-rwxr-xr-xmodules/scinotes/src/cpp/callscinotes.cpp137
-rwxr-xr-xmodules/scinotes/src/cpp/libsciscinotes_algo_la-callscinotes.lo12
-rwxr-xr-xmodules/scinotes/src/java/jflex/function.jflex258
-rwxr-xr-xmodules/scinotes/src/java/jflex/indentation.jflex196
-rwxr-xr-xmodules/scinotes/src/java/jflex/matchingblock.jflex286
-rwxr-xr-xmodules/scinotes/src/java/jflex/scilab.jflex557
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/CommentManager.java160
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/CompoundUndoManager.java238
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/EditorComponent.java108
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/FunctionScanner.java1524
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/HelpOnTypingManager.java249
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/IndentManager.java246
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/IndentScanner.java1925
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/KeywordAdapter.java69
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/KeywordEvent.java90
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/KeywordListener.java43
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockManager.java522
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockScanner.java2085
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotes.java2641
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesAutosave.java213
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesCaret.java293
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesConfiguration.java74
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesGUI.java385
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesLineNumberPanel.java473
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesOptions.java297
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabContext.java425
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocument.java1118
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocumentReader.java122
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorKit.java302
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorPane.java1758
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywords.java36
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywordsJNI.java46
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java1633
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java380
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabPlainView.java469
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/ScilabView.java500
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/SearchManager.java825
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/TabManager.java304
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/TrailingWhiteManager.java91
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/AboutAction.java58
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.java68
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.java68
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.java54
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CapitalizeAction.java138
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAction.java66
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllAction.java70
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllButThisAction.java77
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CodeNavigatorAction.java68
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CommentAction.java81
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.java215
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.java60
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.java71
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/CutAction.java85
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultAction.java123
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultCheckAction.java149
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/DeleteAction.java66
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.java124
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/EncodingAction.java386
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/EndOfLineAction.java199
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java99
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java116
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExitAction.java67
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExportAction.java232
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindAction.java1320
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindNextAction.java102
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindPreviousAction.java102
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/GeneralSettingsAction.java66
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.java138
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.java61
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.java61
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpAction.java71
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.java116
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.java54
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/IncrementalSearchAction.java392
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/IndentAction.java100
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/InsertOverwriteAction.java62
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineBeautifierAction.java81
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineNumbersAction.java141
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.java136
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/NewAction.java70
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextParagraphAction.java98
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextTabAction.java60
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenAction.java116
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenFileInAction.java115
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.java343
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.java53
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenURLAction.java83
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/OverwriteAction.java67
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PageSetupAction.java74
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteAction.java91
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteColumnAction.java138
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousParagraphAction.java48
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousTabAction.java56
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintAction.java77
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintPreviewAction.java81
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RecentFileAction.java126
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RedoAction.java68
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.java214
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ReloadAction.java55
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveAnchorAction.java65
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.java93
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.java123
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.java577
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAction.java75
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAllAction.java70
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.java82
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.java60
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAsAction.java89
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveFileInAction.java102
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java516
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchFilesAction.java47
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java719
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectAllAction.java59
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockAction.java114
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.java47
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetAnchorAction.java173
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetColorsAction.java54
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetFontAction.java54
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/SplitAction.java141
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/TabifyAction.java97
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToLowerCaseAction.java67
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToUpperCaseAction.java67
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnCommentAction.java79
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnTabifyAction.java96
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/actions/UndoAction.java68
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/style/FilterManager.java9
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.java86
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.java92
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTab.java88
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.java90
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.java86
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.java92
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java158
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.java1558
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/DropFilesListener.java218
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/FOCodeConverter.java148
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/HTMLCodeConverter.java281
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/NavigatorWindow.java930
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/SaveFile.java231
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.java151
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesContents.java80
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java346
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabScrollPane.java130
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabTabbedPane.java506
-rwxr-xr-xmodules/scinotes/src/java/org/scilab/modules/scinotes/utils/SearchFile.java632
-rwxr-xr-xmodules/scinotes/src/jni/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/jni/.deps/libsciscinotes_algo_la-SciNotes.Plo341
-rwxr-xr-xmodules/scinotes/src/jni/.deps/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo134
-rwxr-xr-xmodules/scinotes/src/jni/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/jni/.libs/libsciscinotes_algo_la-SciNotes.obin0 -> 306752 bytes
-rwxr-xr-xmodules/scinotes/src/jni/.libs/libsciscinotes_algo_la-ScilabKeywords_wrap.obin0 -> 37472 bytes
-rwxr-xr-xmodules/scinotes/src/jni/SciNotes.cpp313
-rwxr-xr-xmodules/scinotes/src/jni/SciNotes.giws.xml18
-rwxr-xr-xmodules/scinotes/src/jni/SciNotes.hxx191
-rwxr-xr-xmodules/scinotes/src/jni/ScilabKeywords.i108
-rwxr-xr-xmodules/scinotes/src/jni/ScilabKeywords_wrap.c303
-rwxr-xr-xmodules/scinotes/src/jni/libsciscinotes_algo_la-SciNotes.lo12
-rwxr-xr-xmodules/scinotes/src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo12
-rwxr-xr-xmodules/scinotes/src/noscinotes/.deps/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/noscinotes/.deps/libsciscinotes_disable_la-noscinotes.Plo57
-rwxr-xr-xmodules/scinotes/src/noscinotes/.dirstamp0
-rwxr-xr-xmodules/scinotes/src/noscinotes/.libs/libsciscinotes_disable_la-noscinotes.obin0 -> 4536 bytes
-rwxr-xr-xmodules/scinotes/src/noscinotes/libsciscinotes_disable_la-noscinotes.lo12
-rwxr-xr-xmodules/scinotes/src/noscinotes/noscinotes.c30
-rwxr-xr-xmodules/scinotes/src/noscinotes/noscinotes.h19
-rwxr-xr-xmodules/scinotes/tests/benchmarks/is_binary_file.tst12
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_10354.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_10868.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_11048.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_11423.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_12439.dia.ref18
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_12439.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4054.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4054_testfile.sce132
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4399.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4780.tst34
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4859.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4861.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4862.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4863.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4864.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4867.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4868.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4869.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4870.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4871.tst30
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4872.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4873.tst31
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4874.tst31
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4875.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4876.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4877.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4878.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4879.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4880.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4881.tst30
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4883.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4884.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4885.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4887.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4888.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4891.tst33
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4892.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4894.tst35
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4895.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4903.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4911.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4955.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4989.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4991.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4995.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_4998.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5000.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5001.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5002.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5003.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5004.tst34
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5006.tst37
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5007.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5013.tst33
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5075.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5083.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5086.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5103.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5128.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5130.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5131.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5137.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5140.tst56
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5172.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5189.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5210.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5220.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5224.tst38
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5269.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5270.tst30
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5290.tst36
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5308.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5317.tst30
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5319.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5327.tst37
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5355.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5386.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5404.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5459.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5460.tst32
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5465.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5482.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5497.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5516.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5519.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5532.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5649.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_5707.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7276.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7352.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7376.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7421.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7477.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7491.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7546.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7550.tst27
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7557.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7558.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7564.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7595.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7623.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7673.tst19
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7676.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7677.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7678.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7682.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7718.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7719.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7722.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7731.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7762.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7764.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7806.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7830.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_7842.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8024.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8027.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8056.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8085.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8135.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8166.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8227.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8229.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8230.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8277.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8304.tst19
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8309.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8359.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8368.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8465.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8627.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8697.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8714.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8715.tst28
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8764.tst41
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_8885.tst26
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9012.tst20
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9060.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9129.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9132.tst25
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9171.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9183.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9186.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9189.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9301.tst29
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9348.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9358.tst24
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9480.tst21
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9505.tst23
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/bug_9854.tst22
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/scinotes_intend_test.sci11
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/scinotes_linux_eol.sci10
-rwxr-xr-xmodules/scinotes/tests/nonreg_tests/scinotes_macosx_eol.sci1
-rwxr-xr-xmodules/scinotes/tests/unit_tests/Actions.dia.ref49
-rwxr-xr-xmodules/scinotes/tests/unit_tests/Actions.tst35
-rwxr-xr-xmodules/scinotes/tests/unit_tests/CompletionOnMlist.tst19
-rwxr-xr-xmodules/scinotes/tests/unit_tests/CopyAsHTML.tst17
-rwxr-xr-xmodules/scinotes/tests/unit_tests/LaTeXPreview.tst18
755 files changed, 70040 insertions, 0 deletions
diff --git a/modules/scinotes/.libs/libsciscinotes-algo.a b/modules/scinotes/.libs/libsciscinotes-algo.a
new file mode 100755
index 000000000..2480144f3
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-algo.a
Binary files differ
diff --git a/modules/scinotes/.libs/libsciscinotes-algo.la b/modules/scinotes/.libs/libsciscinotes-algo.la
new file mode 120000
index 000000000..d48cb9f02
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-algo.la
@@ -0,0 +1 @@
+../libsciscinotes-algo.la \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes-disable.la b/modules/scinotes/.libs/libsciscinotes-disable.la
new file mode 120000
index 000000000..38ae6bccc
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-disable.la
@@ -0,0 +1 @@
+../libsciscinotes-disable.la \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes-disable.lai b/modules/scinotes/.libs/libsciscinotes-disable.lai
new file mode 100755
index 000000000..31e5a9c5a
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-disable.lai
@@ -0,0 +1,41 @@
+# libsciscinotes-disable.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsciscinotes-disable.so.5'
+
+# Names of this library.
+library_names='libsciscinotes-disable.so.5.5.2 libsciscinotes-disable.so.5 libsciscinotes-disable.so'
+
+# The name of the static archive.
+old_library=''
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciscinotes-disable.
+current=10
+age=5
+revision=2
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib/scilab'
diff --git a/modules/scinotes/.libs/libsciscinotes-disable.so b/modules/scinotes/.libs/libsciscinotes-disable.so
new file mode 120000
index 000000000..184ba9037
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-disable.so
@@ -0,0 +1 @@
+libsciscinotes-disable.so.5.5.2 \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes-disable.so.5 b/modules/scinotes/.libs/libsciscinotes-disable.so.5
new file mode 120000
index 000000000..184ba9037
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-disable.so.5
@@ -0,0 +1 @@
+libsciscinotes-disable.so.5.5.2 \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes-disable.so.5.5.2 b/modules/scinotes/.libs/libsciscinotes-disable.so.5.5.2
new file mode 100755
index 000000000..1c8a814f4
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes-disable.so.5.5.2
Binary files differ
diff --git a/modules/scinotes/.libs/libsciscinotes.la b/modules/scinotes/.libs/libsciscinotes.la
new file mode 120000
index 000000000..0506385c7
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes.la
@@ -0,0 +1 @@
+../libsciscinotes.la \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes.lai b/modules/scinotes/.libs/libsciscinotes.lai
new file mode 100755
index 000000000..1432b4b10
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes.lai
@@ -0,0 +1,41 @@
+# libsciscinotes.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsciscinotes.so.5'
+
+# Names of this library.
+library_names='libsciscinotes.so.5.5.2 libsciscinotes.so.5 libsciscinotes.so'
+
+# The name of the static archive.
+old_library=''
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciscinotes.
+current=10
+age=5
+revision=2
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib/scilab'
diff --git a/modules/scinotes/.libs/libsciscinotes.so b/modules/scinotes/.libs/libsciscinotes.so
new file mode 120000
index 000000000..2d79e9053
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes.so
@@ -0,0 +1 @@
+libsciscinotes.so.5.5.2 \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes.so.5 b/modules/scinotes/.libs/libsciscinotes.so.5
new file mode 120000
index 000000000..2d79e9053
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes.so.5
@@ -0,0 +1 @@
+libsciscinotes.so.5.5.2 \ No newline at end of file
diff --git a/modules/scinotes/.libs/libsciscinotes.so.5.5.2 b/modules/scinotes/.libs/libsciscinotes.so.5.5.2
new file mode 100755
index 000000000..29260b745
--- /dev/null
+++ b/modules/scinotes/.libs/libsciscinotes.so.5.5.2
Binary files differ
diff --git a/modules/scinotes/Makefile b/modules/scinotes/Makefile
new file mode 100755
index 000000000..83d63abd0
--- /dev/null
+++ b/modules/scinotes/Makefile
@@ -0,0 +1,1524 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# modules/scinotes/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2009-2010 - DIGITEO
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/scilab
+pkgincludedir = $(includedir)/scilab
+pkglibdir = $(libdir)/scilab
+pkglibexecdir = $(libexecdir)/scilab
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+am__append_1 = libsciscinotes.la
+#am__append_2 = giws
+#am__append_3 = swig
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp
+am__append_4 = java
+subdir = modules/scinotes
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_etcdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_rootdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libsciscinotes_algo_la_LIBADD =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = src/c/libsciscinotes_algo_la-ScilabKeywords.lo
+am__objects_2 = src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo
+am__objects_3 = src/jni/libsciscinotes_algo_la-SciNotes.lo \
+ src/cpp/libsciscinotes_algo_la-callscinotes.lo
+am_libsciscinotes_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3)
+libsciscinotes_algo_la_OBJECTS = $(am_libsciscinotes_algo_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_libsciscinotes_algo_la_rpath =
+libsciscinotes_disable_la_LIBADD =
+am__objects_4 = \
+ src/noscinotes/libsciscinotes_disable_la-noscinotes.lo
+am_libsciscinotes_disable_la_OBJECTS = $(am__objects_4)
+libsciscinotes_disable_la_OBJECTS = \
+ $(am_libsciscinotes_disable_la_OBJECTS)
+am__DEPENDENCIES_1 =
+libsciscinotes_la_DEPENDENCIES = libsciscinotes-algo.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__objects_5 = sci_gateway/c/libsciscinotes_la-gw_scinotes.lo
+am__objects_6 = sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo \
+ sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo
+am_libsciscinotes_la_OBJECTS = $(am__objects_5) $(am__objects_6)
+libsciscinotes_la_OBJECTS = $(am_libsciscinotes_la_OBJECTS)
+libsciscinotes_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libsciscinotes_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+am_libsciscinotes_la_rpath = -rpath $(pkglibdir)
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I. -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libsciscinotes_algo_la_SOURCES) \
+ $(libsciscinotes_disable_la_SOURCES) \
+ $(libsciscinotes_la_SOURCES)
+DIST_SOURCES = $(libsciscinotes_algo_la_SOURCES) \
+ $(libsciscinotes_disable_la_SOURCES) \
+ $(libsciscinotes_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libsciscinotes_la_etc_DATA) $(libsciscinotes_la_root_DATA) \
+ $(libsciscinotes_la_sci_gateway_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14
+ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ
+ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+ANT = /usr/bin/ant
+ANTLR = /usr/share/java/antlr.jar
+AR = ar
+ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack
+ASM3 = /usr/share/java/asm3-3.3.2.jar
+AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf
+AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader
+AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14
+AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar
+AWK = mawk
+BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar
+BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas
+CC = gcc
+CCACHE =
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKSTYLE =
+COBERTURA = /usr/share/java/cobertura.jar
+COMMONS_BEANUTILS =
+COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar
+COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar
+CPP = gcc -E
+CPPFLAGS =
+CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config
+CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz
+CURL_VERSION = libcurl 7.19.7
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEMOTOOLS_ENABLE = yes
+DEPDIR = .deps
+DLLTOOL = false
+DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/
+DOXYGEN_BIN =
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3
+FFTW_ENABLE = yes
+FGREP = /bin/grep -F
+FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar
+FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath
+FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar
+FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar
+FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar
+FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar
+FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar
+FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar
+GENHTML =
+GETTEXT_MACRO_VERSION = 0.19
+GIWS_BIN =
+GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar
+GMSGFMT = /usr/bin/msgfmt
+GMSGFMT_015 = /usr/bin/msgfmt
+GRAPHICS_ENABLE = yes
+GREP = /bin/grep
+GUI_ENABLE = yes
+HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl
+HELP_ENABLE = yes
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTLLIBS =
+INTL_MACOSX_LIBS =
+JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar
+JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
+JAVAC_DEBUG = off
+JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc
+JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah
+JAVASCI_ENABLE = yes
+JAVA_ENABLE = yes
+JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java
+JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64
+JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux
+JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm
+JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb
+JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar
+JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar
+JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar
+JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar
+JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar
+JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar
+JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar
+JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar
+JUNIT4 = /usr/share/java/junit4.jar
+LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack
+LCOV =
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = -Wl,--no-as-needed
+LIBICONV = -liconv
+LIBINTL =
+LIBM = -lm
+LIBOBJS =
+LIBS = -lpthread -ldl -lcurses -lm
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LOGGING_LEVEL = SEVERE
+LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar
+LTLIBICONV = -liconv
+LTLIBINTL =
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo
+MANIFEST_TOOL = :
+MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+MATIO_ENABLE = yes
+MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5
+MKDIR_P = /bin/mkdir -p
+MPI_ENABLE = no
+MSGCAT = /usr/bin/msgcat
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_015 = /usr/bin/msgfmt
+MSGMERGE = /usr/bin/msgmerge
+NM = nm
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OCAMLC = ocamlc
+OCAMLDEP = ocamldep
+OCAMLLEX = ocamllex
+OCAMLOPT = ocamlopt
+OCAMLYACC = ocamlyacc
+OPENMPI_CC =
+OPENMPI_CFLAGS =
+OPENMPI_CXX =
+OPENMPI_CXXFLAGS =
+OPENMPI_LIBS =
+OPENMP_CFLAGS = -fopenmp
+OPENMP_CXXFLAGS = -fopenmp
+OPENMP_ENABLE = yes
+OPENMP_LIBS = -lgomp -lstdc++
+OTOOL =
+OTOOL64 =
+PACKAGE = scilab
+PACKAGE_BUGREPORT = http://bugzilla.scilab.org/
+PACKAGE_NAME = Scilab
+PACKAGE_STRING = Scilab 5
+PACKAGE_TARNAME = scilab
+PACKAGE_URL =
+PACKAGE_VERSION = 5
+PATH_SEPARATOR = :
+PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config
+PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre
+PCRE_VERSION = 8.35
+PKG_CONFIG = /usr/bin/pkg-config
+POSUB = po
+POW_LIB =
+PYTHON =
+RANLIB = ranlib
+RELOCATABLE = no
+RT_LIB = -lrt
+SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar
+SCILAB_BINARY_VERSION = 5.5.2
+SCILAB_LIBRARY_VERSION = 5:5:2
+SCILAB_VERSION_MAINTENANCE = 2
+SCILAB_VERSION_MAJOR = 5
+SCILAB_VERSION_MINOR = 5
+SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar
+SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar
+SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector
+SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector
+SCI_FFLAGS = -DNDEBUG -m64 -fPIC
+SCI_LDFLAGS =
+SED = /bin/sed
+SET_MAKE =
+SET_RELOCATABLE =
+SHELL = /bin/bash
+SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar
+SPLINT = no
+STRIP = strip
+SWIG_BIN =
+SWIG_JAVA =
+SWIG_RUNTIME_LIBS_DIR =
+SWIG_SCILAB =
+TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl
+TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include
+UMFPACK_ENABLE = yes
+UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd
+USE_NLS = yes
+VERSION = 5
+WITH_OCAML =
+WITH_TKSCI = yes
+XCOS_ENABLE = yes
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_015 = /usr/bin/xgettext
+XGETTEXT_EXTRA_OPTIONS =
+XMKMF =
+XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar
+XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar
+XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config
+XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2
+XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl
+XML_VERSION = 2.9.1
+X_CFLAGS =
+X_EXTRA_LIBS =
+X_LIBS =
+X_PRE_LIBS =
+abs_builddir = /home/shashank/scilab-master_5.5.2/modules/scinotes
+abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/scinotes
+abs_top_builddir = /home/shashank/scilab-master_5.5.2
+abs_top_srcdir = /home/shashank/scilab-master_5.5.2
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN =
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+cxx_present = yes
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+
+#### Target ######
+modulename = scinotes
+
+#### scinotes : Conf files ####
+libsciscinotes_la_rootdir = $(mydatadir)
+libsciscinotes_la_root_DATA = license.txt
+
+#### scinotes : init scripts & configuration files ####
+libsciscinotes_la_etcdir = $(mydatadir)/etc
+libsciscinotes_la_etc_DATA = \
+ etc/scinotesConfiguration.xml \
+ etc/keysConfiguration.xml \
+ etc/scinotesGUIConfiguration.xml \
+ etc/scinotes.quit \
+ etc/scinotes.start \
+ etc/XConfiguration-scinotes.xml \
+ etc/XConfiguration-scinotes.xsl
+
+SCINOTES_JNI_SOURCES = src/jni/ScilabKeywords_wrap.c
+SCINOTES_C_SOURCES = src/c/ScilabKeywords.c
+SCINOTES_CXX_SOURCES = src/jni/SciNotes.cpp \
+ src/cpp/callscinotes.cpp
+
+GATEWAY_C_SOURCES = sci_gateway/c/gw_scinotes.c
+GATEWAY_CXX_SOURCES = sci_gateway/cpp/sci_scinotes.cpp \
+sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+
+libsciscinotes_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/cpp/ \
+ -I$(srcdir)/src/c/ \
+ -I$(srcdir)/src/jni/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/commons/src/jni/ \
+ -I$(top_srcdir)/modules/core/includes/ \
+ -I$(top_srcdir)/modules/fileio/includes/ \
+ -I$(top_srcdir)/modules/functions/includes/ \
+ -I$(top_srcdir)/modules/jvm/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(JAVA_JNI_INCLUDE) \
+ $(AM_CPPFLAGS)
+
+
+# Without the scinotes module
+libsciscinotes_disable_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+SCINOTES_DISABLE_C_SOURCES = src/noscinotes/noscinotes.c
+libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES)
+pkglib_LTLIBRARIES = libsciscinotes-disable.la $(am__append_1)
+noinst_LTLIBRARIES = libsciscinotes-algo.la
+libsciscinotes_la_LDFLAGS = $(AM_LDFLAGS)
+libsciscinotes_algo_la_SOURCES = $(SCINOTES_C_SOURCES) $(SCINOTES_JNI_SOURCES) $(SCINOTES_CXX_SOURCES)
+libsciscinotes_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_CXX_SOURCES)
+libsciscinotes_algo_la_CPPFLAGS = $(libsciscinotes_la_CPPFLAGS)
+
+# For the code check (splint)
+CHECK_SRC = $(SCINOTES_C_SOURCES) $(GATEWAY_C_SOURCES)
+INCLUDE_FLAGS = $(libsciscinotes_la_CPPFLAGS)
+GIWS_WRAPPERS = src/jni/SciNotes.giws.xml
+SWIG_WRAPPERS = src/jni/ScilabKeywords.i
+BUILT_SOURCES = $(am__append_2) $(am__append_3)
+libsciscinotes_la_LIBADD = libsciscinotes-algo.la $(X_LIBS) $(X_EXTRA_LIBS)
+
+#### scinotes : gateway declaration ####
+libsciscinotes_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciscinotes_la_sci_gateway_DATA = sci_gateway/scinotes_gateway.xml
+USEANT = 1
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_4)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/scinotes/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/scinotes/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/c/$(am__dirstamp):
+ @$(MKDIR_P) src/c
+ @: > src/c/$(am__dirstamp)
+src/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/c/$(DEPDIR)
+ @: > src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libsciscinotes_algo_la-ScilabKeywords.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/jni/$(am__dirstamp):
+ @$(MKDIR_P) src/jni
+ @: > src/jni/$(am__dirstamp)
+src/jni/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/jni/$(DEPDIR)
+ @: > src/jni/$(DEPDIR)/$(am__dirstamp)
+src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo: \
+ src/jni/$(am__dirstamp) src/jni/$(DEPDIR)/$(am__dirstamp)
+src/jni/libsciscinotes_algo_la-SciNotes.lo: src/jni/$(am__dirstamp) \
+ src/jni/$(DEPDIR)/$(am__dirstamp)
+src/cpp/$(am__dirstamp):
+ @$(MKDIR_P) src/cpp
+ @: > src/cpp/$(am__dirstamp)
+src/cpp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/cpp/$(DEPDIR)
+ @: > src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libsciscinotes_algo_la-callscinotes.lo: \
+ src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes-algo.la: $(libsciscinotes_algo_la_OBJECTS) $(libsciscinotes_algo_la_DEPENDENCIES) $(EXTRA_libsciscinotes_algo_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(am_libsciscinotes_algo_la_rpath) $(libsciscinotes_algo_la_OBJECTS) $(libsciscinotes_algo_la_LIBADD) $(LIBS)
+src/noscinotes/$(am__dirstamp):
+ @$(MKDIR_P) src/noscinotes
+ @: > src/noscinotes/$(am__dirstamp)
+src/noscinotes/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/noscinotes/$(DEPDIR)
+ @: > src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+src/noscinotes/libsciscinotes_disable_la-noscinotes.lo: \
+ src/noscinotes/$(am__dirstamp) \
+ src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes-disable.la: $(libsciscinotes_disable_la_OBJECTS) $(libsciscinotes_disable_la_DEPENDENCIES) $(EXTRA_libsciscinotes_disable_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) -rpath $(pkglibdir) $(libsciscinotes_disable_la_OBJECTS) $(libsciscinotes_disable_la_LIBADD) $(LIBS)
+sci_gateway/c/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/c
+ @: > sci_gateway/c/$(am__dirstamp)
+sci_gateway/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/c/$(DEPDIR)
+ @: > sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/c/libsciscinotes_la-gw_scinotes.lo: \
+ sci_gateway/c/$(am__dirstamp) \
+ sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/cpp
+ @: > sci_gateway/cpp/$(am__dirstamp)
+sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/cpp/$(DEPDIR)
+ @: > sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes.la: $(libsciscinotes_la_OBJECTS) $(libsciscinotes_la_DEPENDENCIES) $(EXTRA_libsciscinotes_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libsciscinotes_la_LINK) $(am_libsciscinotes_la_rpath) $(libsciscinotes_la_OBJECTS) $(libsciscinotes_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f sci_gateway/c/*.$(OBJEXT)
+ -rm -f sci_gateway/c/*.lo
+ -rm -f sci_gateway/cpp/*.$(OBJEXT)
+ -rm -f sci_gateway/cpp/*.lo
+ -rm -f src/c/*.$(OBJEXT)
+ -rm -f src/c/*.lo
+ -rm -f src/cpp/*.$(OBJEXT)
+ -rm -f src/cpp/*.lo
+ -rm -f src/jni/*.$(OBJEXT)
+ -rm -f src/jni/*.lo
+ -rm -f src/noscinotes/*.$(OBJEXT)
+ -rm -f src/noscinotes/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Plo
+include sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo
+include sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo
+include src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Plo
+include src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Plo
+include src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Plo
+include src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo
+include src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo
+
+.c.o:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
+# $(AM_V_CC)source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $<
+
+src/c/libsciscinotes_algo_la-ScilabKeywords.lo: src/c/ScilabKeywords.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciscinotes_algo_la-ScilabKeywords.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Tpo -c -o src/c/libsciscinotes_algo_la-ScilabKeywords.lo `test -f 'src/c/ScilabKeywords.c' || echo '$(srcdir)/'`src/c/ScilabKeywords.c
+ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Tpo src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Plo
+# $(AM_V_CC)source='src/c/ScilabKeywords.c' object='src/c/libsciscinotes_algo_la-ScilabKeywords.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libsciscinotes_algo_la-ScilabKeywords.lo `test -f 'src/c/ScilabKeywords.c' || echo '$(srcdir)/'`src/c/ScilabKeywords.c
+
+src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo: src/jni/ScilabKeywords_wrap.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo -MD -MP -MF src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Tpo -c -o src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo `test -f 'src/jni/ScilabKeywords_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabKeywords_wrap.c
+ $(AM_V_at)$(am__mv) src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Tpo src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo
+# $(AM_V_CC)source='src/jni/ScilabKeywords_wrap.c' object='src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo `test -f 'src/jni/ScilabKeywords_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabKeywords_wrap.c
+
+src/noscinotes/libsciscinotes_disable_la-noscinotes.lo: src/noscinotes/noscinotes.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/noscinotes/libsciscinotes_disable_la-noscinotes.lo -MD -MP -MF src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo -c -o src/noscinotes/libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+ $(AM_V_at)$(am__mv) src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo
+# $(AM_V_CC)source='src/noscinotes/noscinotes.c' object='src/noscinotes/libsciscinotes_disable_la-noscinotes.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/noscinotes/libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+
+sci_gateway/c/libsciscinotes_la-gw_scinotes.lo: sci_gateway/c/gw_scinotes.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscinotes_la-gw_scinotes.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Tpo -c -o sci_gateway/c/libsciscinotes_la-gw_scinotes.lo `test -f 'sci_gateway/c/gw_scinotes.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scinotes.c
+ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Tpo sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Plo
+# $(AM_V_CC)source='sci_gateway/c/gw_scinotes.c' object='sci_gateway/c/libsciscinotes_la-gw_scinotes.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscinotes_la-gw_scinotes.lo `test -f 'sci_gateway/c/gw_scinotes.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scinotes.c
+
+.cpp.o:
+ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CXX)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Po
+# $(AM_V_CXX)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
+# $(AM_V_CXX)source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+src/jni/libsciscinotes_algo_la-SciNotes.lo: src/jni/SciNotes.cpp
+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/jni/libsciscinotes_algo_la-SciNotes.lo -MD -MP -MF src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Tpo -c -o src/jni/libsciscinotes_algo_la-SciNotes.lo `test -f 'src/jni/SciNotes.cpp' || echo '$(srcdir)/'`src/jni/SciNotes.cpp
+ $(AM_V_at)$(am__mv) src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Tpo src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Plo
+# $(AM_V_CXX)source='src/jni/SciNotes.cpp' object='src/jni/libsciscinotes_algo_la-SciNotes.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/jni/libsciscinotes_algo_la-SciNotes.lo `test -f 'src/jni/SciNotes.cpp' || echo '$(srcdir)/'`src/jni/SciNotes.cpp
+
+src/cpp/libsciscinotes_algo_la-callscinotes.lo: src/cpp/callscinotes.cpp
+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciscinotes_algo_la-callscinotes.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Tpo -c -o src/cpp/libsciscinotes_algo_la-callscinotes.lo `test -f 'src/cpp/callscinotes.cpp' || echo '$(srcdir)/'`src/cpp/callscinotes.cpp
+ $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Tpo src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Plo
+# $(AM_V_CXX)source='src/cpp/callscinotes.cpp' object='src/cpp/libsciscinotes_algo_la-callscinotes.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciscinotes_algo_la-callscinotes.lo `test -f 'src/cpp/callscinotes.cpp' || echo '$(srcdir)/'`src/cpp/callscinotes.cpp
+
+sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo: sci_gateway/cpp/sci_scinotes.cpp
+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo -c -o sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo `test -f 'sci_gateway/cpp/sci_scinotes.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scinotes.cpp
+ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo
+# $(AM_V_CXX)source='sci_gateway/cpp/sci_scinotes.cpp' object='sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo `test -f 'sci_gateway/cpp/sci_scinotes.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scinotes.cpp
+
+sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo: sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Tpo -c -o sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo `test -f 'sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo
+# $(AM_V_CXX)source='sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' object='sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo `test -f 'sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf sci_gateway/c/.libs sci_gateway/c/_libs
+ -rm -rf sci_gateway/cpp/.libs sci_gateway/cpp/_libs
+ -rm -rf src/c/.libs src/c/_libs
+ -rm -rf src/cpp/.libs src/cpp/_libs
+ -rm -rf src/jni/.libs src/jni/_libs
+ -rm -rf src/noscinotes/.libs src/noscinotes/_libs
+install-libsciscinotes_la_etcDATA: $(libsciscinotes_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_etc_DATA)'; test -n "$(libsciscinotes_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_etc_DATA)'; test -n "$(libsciscinotes_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsciscinotes_la_rootDATA: $(libsciscinotes_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_root_DATA)'; test -n "$(libsciscinotes_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_root_DATA)'; test -n "$(libsciscinotes_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libsciscinotes_la_sci_gatewayDATA: $(libsciscinotes_la_sci_gateway_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_sci_gateway_DATA)'; test -n "$(libsciscinotes_la_sci_gatewaydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_sci_gatewayDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_sci_gateway_DATA)'; test -n "$(libsciscinotes_la_sci_gatewaydir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libsciscinotes_la_etcdir)" "$(DESTDIR)$(libsciscinotes_la_rootdir)" "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sci_gateway/c/$(am__dirstamp)
+ -rm -f sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sci_gateway/cpp/$(am__dirstamp)
+ -rm -f src/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/c/$(am__dirstamp)
+ -rm -f src/cpp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/cpp/$(am__dirstamp)
+ -rm -f src/jni/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/jni/$(am__dirstamp)
+ -rm -f src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/noscinotes/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR) src/jni/$(DEPDIR) src/noscinotes/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-libsciscinotes_la_etcDATA \
+ install-libsciscinotes_la_rootDATA \
+ install-libsciscinotes_la_sci_gatewayDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR) src/jni/$(DEPDIR) src/noscinotes/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsciscinotes_la_etcDATA \
+ uninstall-libsciscinotes_la_rootDATA \
+ uninstall-libsciscinotes_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libsciscinotes_la_etcDATA \
+ install-libsciscinotes_la_rootDATA \
+ install-libsciscinotes_la_sci_gatewayDATA install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am \
+ uninstall-libsciscinotes_la_etcDATA \
+ uninstall-libsciscinotes_la_rootDATA \
+ uninstall-libsciscinotes_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT); \
+ fi
+
+clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) clean; \
+ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#swig: $(SWIG_WRAPPERS)
+# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+# if test -n "$(SWIG_WRAPPERS)"; then \
+# for file in $(SWIG_WRAPPERS) ; do \
+# echo "Swig process of $$file (Java) ..."; \
+# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+#swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+# @SWIG_OUTDIR=src/swig/; \
+# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+# for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+# echo "Swig process of $$file (Scilab) ..."; \
+# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+# done; \
+# fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+#giws: $(GIWS_WRAPPERS)
+# @GIWS_OUTPUTDIR=src/jni/; \
+# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+# if test -n "$(GIWS_WRAPPERS)"; then \
+# for file in $(GIWS_WRAPPERS) ; do \
+# echo "GIWS process of $$file ..."; \
+# if test -z "$(GIWS_OPTIONS)"; then \
+# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# else \
+# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+# fi \
+# done; \
+# fi
+
+#giws-exception:
+# @GIWS_OUTPUTDIR=src/jni/;\
+# echo "GIWS: Generation of exception class ..."; \
+# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+ @echo "-------- Install of XML sources of help files --------"; \
+ for lang in $(ALL_LINGUAS); do \
+ if test -d $(srcdir)/help/$$lang; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+ done ; \
+ fi; \
+ fi; \
+ done; \
+ @echo "-------- Install of MathML sources --------"; \
+ if test -d $(srcdir)/help/mml/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+ done ; \
+ fi; \
+ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+clean-local: clean-java
+#clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/scinotes/Makefile.am b/modules/scinotes/Makefile.am
new file mode 100755
index 000000000..ca3c2e3bd
--- /dev/null
+++ b/modules/scinotes/Makefile.am
@@ -0,0 +1,108 @@
+#
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2009-2010 - DIGITEO
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+#### Target ######
+modulename=scinotes
+
+
+#### scinotes : Conf files ####
+libsciscinotes_la_rootdir = $(mydatadir)
+libsciscinotes_la_root_DATA = license.txt
+
+
+#### scinotes : init scripts & configuration files ####
+libsciscinotes_la_etcdir = $(mydatadir)/etc
+libsciscinotes_la_etc_DATA = \
+ etc/scinotesConfiguration.xml \
+ etc/keysConfiguration.xml \
+ etc/scinotesGUIConfiguration.xml \
+ etc/scinotes.quit \
+ etc/scinotes.start \
+ etc/XConfiguration-scinotes.xml \
+ etc/XConfiguration-scinotes.xsl
+
+SCINOTES_JNI_SOURCES = src/jni/ScilabKeywords_wrap.c
+
+SCINOTES_C_SOURCES = src/c/ScilabKeywords.c
+
+SCINOTES_CXX_SOURCES = src/jni/SciNotes.cpp \
+ src/cpp/callscinotes.cpp
+
+GATEWAY_C_SOURCES = sci_gateway/c/gw_scinotes.c
+
+GATEWAY_CXX_SOURCES = sci_gateway/cpp/sci_scinotes.cpp \
+sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+
+libsciscinotes_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/cpp/ \
+ -I$(srcdir)/src/c/ \
+ -I$(srcdir)/src/jni/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/commons/src/jni/ \
+ -I$(top_srcdir)/modules/core/includes/ \
+ -I$(top_srcdir)/modules/fileio/includes/ \
+ -I$(top_srcdir)/modules/functions/includes/ \
+ -I$(top_srcdir)/modules/jvm/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(JAVA_JNI_INCLUDE) \
+ $(AM_CPPFLAGS)
+
+# Without the scinotes module
+libsciscinotes_disable_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+SCINOTES_DISABLE_C_SOURCES = src/noscinotes/noscinotes.c
+libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES)
+
+pkglib_LTLIBRARIES = libsciscinotes-disable.la
+
+if GUI
+ pkglib_LTLIBRARIES += libsciscinotes.la
+ noinst_LTLIBRARIES = libsciscinotes-algo.la
+endif
+
+libsciscinotes_la_LDFLAGS = $(AM_LDFLAGS)
+
+libsciscinotes_algo_la_SOURCES = $(SCINOTES_C_SOURCES) $(SCINOTES_JNI_SOURCES) $(SCINOTES_CXX_SOURCES)
+libsciscinotes_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_CXX_SOURCES)
+libsciscinotes_algo_la_CPPFLAGS = $(libsciscinotes_la_CPPFLAGS)
+
+# For the code check (splint)
+CHECK_SRC= $(SCINOTES_C_SOURCES) $(GATEWAY_C_SOURCES)
+INCLUDE_FLAGS = $(libsciscinotes_la_CPPFLAGS)
+
+GIWS_WRAPPERS = src/jni/SciNotes.giws.xml
+SWIG_WRAPPERS = src/jni/ScilabKeywords.i
+
+BUILT_SOURCES=
+if GIWS
+BUILT_SOURCES+=giws
+endif
+if SWIG
+BUILT_SOURCES+=swig
+endif
+
+libsciscinotes_la_LIBADD = libsciscinotes-algo.la $(X_LIBS) $(X_EXTRA_LIBS)
+
+#### scinotes : gateway declaration ####
+libsciscinotes_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciscinotes_la_sci_gateway_DATA = sci_gateway/scinotes_gateway.xml
+
+if GUI
+if BUILD_HELP
+ USEANT=1
+endif
+endif
+
+include $(top_srcdir)/Makefile.incl.am
diff --git a/modules/scinotes/Makefile.in b/modules/scinotes/Makefile.in
new file mode 100755
index 000000000..410c42c26
--- /dev/null
+++ b/modules/scinotes/Makefile.in
@@ -0,0 +1,1524 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2009-2010 - DIGITEO
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+#
+# This file must be used under the terms of the CeCILL.
+# This source file is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at
+# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+#
+
+##########
+### Makefile included stuff
+### Target, variable, suffixes which are supposed to be useful in every makefile.am
+##########
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@GUI_TRUE@am__append_1 = libsciscinotes.la
+@GIWS_TRUE@am__append_2 = giws
+@SWIG_TRUE@am__append_3 = swig
+DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/depcomp
+@NEED_JAVA_TRUE@am__append_4 = java
+subdir = modules/scinotes
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
+ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \
+ $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \
+ $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+ $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+ $(top_srcdir)/m4/intel_compiler.m4 \
+ $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \
+ $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \
+ $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+ $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+ $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_etcdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_rootdir)" \
+ "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)"
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libsciscinotes_algo_la_LIBADD =
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = src/c/libsciscinotes_algo_la-ScilabKeywords.lo
+am__objects_2 = src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo
+am__objects_3 = src/jni/libsciscinotes_algo_la-SciNotes.lo \
+ src/cpp/libsciscinotes_algo_la-callscinotes.lo
+am_libsciscinotes_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3)
+libsciscinotes_algo_la_OBJECTS = $(am_libsciscinotes_algo_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+@GUI_TRUE@am_libsciscinotes_algo_la_rpath =
+libsciscinotes_disable_la_LIBADD =
+am__objects_4 = \
+ src/noscinotes/libsciscinotes_disable_la-noscinotes.lo
+am_libsciscinotes_disable_la_OBJECTS = $(am__objects_4)
+libsciscinotes_disable_la_OBJECTS = \
+ $(am_libsciscinotes_disable_la_OBJECTS)
+am__DEPENDENCIES_1 =
+libsciscinotes_la_DEPENDENCIES = libsciscinotes-algo.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__objects_5 = sci_gateway/c/libsciscinotes_la-gw_scinotes.lo
+am__objects_6 = sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo \
+ sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo
+am_libsciscinotes_la_OBJECTS = $(am__objects_5) $(am__objects_6)
+libsciscinotes_la_OBJECTS = $(am_libsciscinotes_la_OBJECTS)
+libsciscinotes_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libsciscinotes_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+@GUI_TRUE@am_libsciscinotes_la_rpath = -rpath $(pkglibdir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libsciscinotes_algo_la_SOURCES) \
+ $(libsciscinotes_disable_la_SOURCES) \
+ $(libsciscinotes_la_SOURCES)
+DIST_SOURCES = $(libsciscinotes_algo_la_SOURCES) \
+ $(libsciscinotes_disable_la_SOURCES) \
+ $(libsciscinotes_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(libsciscinotes_la_etc_DATA) $(libsciscinotes_la_root_DATA) \
+ $(libsciscinotes_la_sci_gateway_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANT = @ANT@
+ANTLR = @ANTLR@
+AR = @AR@
+ARPACK_LIBS = @ARPACK_LIBS@
+ASM3 = @ASM3@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
+AWK = @AWK@
+BATIK = @BATIK@
+BLAS_LIBS = @BLAS_LIBS@
+CC = @CC@
+CCACHE = @CCACHE@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKSTYLE = @CHECKSTYLE@
+COBERTURA = @COBERTURA@
+COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
+COMMONS_IO = @COMMONS_IO@
+COMMONS_LOGGING = @COMMONS_LOGGING@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CURL_VERSION = @CURL_VERSION@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCBOOK_ROOT = @DOCBOOK_ROOT@
+DOXYGEN_BIN = @DOXYGEN_BIN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECJ = @ECJ@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTW3_LIB = @FFTW3_LIB@
+FFTW_ENABLE = @FFTW_ENABLE@
+FGREP = @FGREP@
+FLEXDOCK = @FLEXDOCK@
+FLIBS = @FLIBS@
+FOP = @FOP@
+FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@
+FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@
+FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@
+FREEHEP_IO = @FREEHEP_IO@
+FREEHEP_UTIL = @FREEHEP_UTIL@
+GENHTML = @GENHTML@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GIWS_BIN = @GIWS_BIN@
+GLUEGEN2_RT = @GLUEGEN2_RT@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
+GREP = @GREP@
+GUI_ENABLE = @GUI_ENABLE@
+HDF5_CFLAGS = @HDF5_CFLAGS@
+HDF5_LIBS = @HDF5_LIBS@
+HELP_ENABLE = @HELP_ENABLE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVAC_DEBUG = @JAVAC_DEBUG@
+JAVADOC = @JAVADOC@
+JAVAH = @JAVAH@
+JAVASCI_ENABLE = @JAVASCI_ENABLE@
+JAVA_ENABLE = @JAVA_ENABLE@
+JAVA_G = @JAVA_G@
+JAVA_HOME = @JAVA_HOME@
+JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
+JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
+JDB = @JDB@
+JEUCLID_CORE = @JEUCLID_CORE@
+JGRAPHX = @JGRAPHX@
+JHALL = @JHALL@
+JLATEXMATH = @JLATEXMATH@
+JLATEXMATH_FOP = @JLATEXMATH_FOP@
+JOGL2 = @JOGL2@
+JROSETTA_API = @JROSETTA_API@
+JROSETTA_ENGINE = @JROSETTA_ENGINE@
+JUNIT4 = @JUNIT4@
+LAPACK_LIBS = @LAPACK_LIBS@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOGGING_LEVEL = @LOGGING_LEVEL@
+LOOKS = @LOOKS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MATIO_CFLAGS = @MATIO_CFLAGS@
+MATIO_ENABLE = @MATIO_ENABLE@
+MATIO_LIBS = @MATIO_LIBS@
+MKDIR_P = @MKDIR_P@
+MPI_ENABLE = @MPI_ENABLE@
+MSGCAT = @MSGCAT@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OCAMLC = @OCAMLC@
+OCAMLDEP = @OCAMLDEP@
+OCAMLLEX = @OCAMLLEX@
+OCAMLOPT = @OCAMLOPT@
+OCAMLYACC = @OCAMLYACC@
+OPENMPI_CC = @OPENMPI_CC@
+OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
+OPENMPI_CXX = @OPENMPI_CXX@
+OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@
+OPENMPI_LIBS = @OPENMPI_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_ENABLE = @OPENMP_ENABLE@
+OPENMP_LIBS = @OPENMP_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CFLAGS = @PCRE_CFLAGS@
+PCRE_CONFIG = @PCRE_CONFIG@
+PCRE_LIBS = @PCRE_LIBS@
+PCRE_VERSION = @PCRE_VERSION@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+RANLIB = @RANLIB@
+RELOCATABLE = @RELOCATABLE@
+RT_LIB = @RT_LIB@
+SAXON = @SAXON@
+SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@
+SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
+SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@
+SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@
+SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@
+SCIRENDERER = @SCIRENDERER@
+SCIRENDERER_CP = @SCIRENDERER_CP@
+SCI_CFLAGS = @SCI_CFLAGS@
+SCI_CXXFLAGS = @SCI_CXXFLAGS@
+SCI_FFLAGS = @SCI_FFLAGS@
+SCI_LDFLAGS = @SCI_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SET_RELOCATABLE = @SET_RELOCATABLE@
+SHELL = @SHELL@
+SKINLF = @SKINLF@
+SPLINT = @SPLINT@
+STRIP = @STRIP@
+SWIG_BIN = @SWIG_BIN@
+SWIG_JAVA = @SWIG_JAVA@
+SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
+SWIG_SCILAB = @SWIG_SCILAB@
+TCLTK_LIBS = @TCLTK_LIBS@
+TCL_INC_PATH = @TCL_INC_PATH@
+TK_INC_PATH = @TK_INC_PATH@
+UMFPACK_CFLAGS = @UMFPACK_CFLAGS@
+UMFPACK_ENABLE = @UMFPACK_ENABLE@
+UMFPACK_LIB = @UMFPACK_LIB@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WITH_OCAML = @WITH_OCAML@
+WITH_TKSCI = @WITH_TKSCI@
+XCOS_ENABLE = @XCOS_ENABLE@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
+XML_APIS_EXT = @XML_APIS_EXT@
+XML_CONFIG = @XML_CONFIG@
+XML_FLAGS = @XML_FLAGS@
+XML_LIBS = @XML_LIBS@
+XML_VERSION = @XML_VERSION@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cxx_present = @cxx_present@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#### Target ######
+modulename = scinotes
+
+#### scinotes : Conf files ####
+libsciscinotes_la_rootdir = $(mydatadir)
+libsciscinotes_la_root_DATA = license.txt
+
+#### scinotes : init scripts & configuration files ####
+libsciscinotes_la_etcdir = $(mydatadir)/etc
+libsciscinotes_la_etc_DATA = \
+ etc/scinotesConfiguration.xml \
+ etc/keysConfiguration.xml \
+ etc/scinotesGUIConfiguration.xml \
+ etc/scinotes.quit \
+ etc/scinotes.start \
+ etc/XConfiguration-scinotes.xml \
+ etc/XConfiguration-scinotes.xsl
+
+SCINOTES_JNI_SOURCES = src/jni/ScilabKeywords_wrap.c
+SCINOTES_C_SOURCES = src/c/ScilabKeywords.c
+SCINOTES_CXX_SOURCES = src/jni/SciNotes.cpp \
+ src/cpp/callscinotes.cpp
+
+GATEWAY_C_SOURCES = sci_gateway/c/gw_scinotes.c
+GATEWAY_CXX_SOURCES = sci_gateway/cpp/sci_scinotes.cpp \
+sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+
+libsciscinotes_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/cpp/ \
+ -I$(srcdir)/src/c/ \
+ -I$(srcdir)/src/jni/ \
+ -I$(top_srcdir)/modules/api_scilab/includes/ \
+ -I$(top_srcdir)/modules/commons/src/jni/ \
+ -I$(top_srcdir)/modules/core/includes/ \
+ -I$(top_srcdir)/modules/fileio/includes/ \
+ -I$(top_srcdir)/modules/functions/includes/ \
+ -I$(top_srcdir)/modules/jvm/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(JAVA_JNI_INCLUDE) \
+ $(AM_CPPFLAGS)
+
+
+# Without the scinotes module
+libsciscinotes_disable_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/localization/includes/ \
+ -I$(top_srcdir)/modules/output_stream/includes/ \
+ $(AM_CPPFLAGS)
+
+SCINOTES_DISABLE_C_SOURCES = src/noscinotes/noscinotes.c
+libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES)
+pkglib_LTLIBRARIES = libsciscinotes-disable.la $(am__append_1)
+@GUI_TRUE@noinst_LTLIBRARIES = libsciscinotes-algo.la
+libsciscinotes_la_LDFLAGS = $(AM_LDFLAGS)
+libsciscinotes_algo_la_SOURCES = $(SCINOTES_C_SOURCES) $(SCINOTES_JNI_SOURCES) $(SCINOTES_CXX_SOURCES)
+libsciscinotes_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_CXX_SOURCES)
+libsciscinotes_algo_la_CPPFLAGS = $(libsciscinotes_la_CPPFLAGS)
+
+# For the code check (splint)
+CHECK_SRC = $(SCINOTES_C_SOURCES) $(GATEWAY_C_SOURCES)
+INCLUDE_FLAGS = $(libsciscinotes_la_CPPFLAGS)
+GIWS_WRAPPERS = src/jni/SciNotes.giws.xml
+SWIG_WRAPPERS = src/jni/ScilabKeywords.i
+BUILT_SOURCES = $(am__append_2) $(am__append_3)
+libsciscinotes_la_LIBADD = libsciscinotes-algo.la $(X_LIBS) $(X_EXTRA_LIBS)
+
+#### scinotes : gateway declaration ####
+libsciscinotes_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+libsciscinotes_la_sci_gateway_DATA = sci_gateway/scinotes_gateway.xml
+@BUILD_HELP_TRUE@@GUI_TRUE@USEANT = 1
+
+# Where all the Scilab stuff is installed (macros, help, ...)
+mydatadir = $(pkgdatadir)/modules/$(modulename)
+
+# Set AM_* SCI detected settings
+AM_CPPFLAGS = $(SCI_CPPFLAGS)
+AM_CFLAGS = $(SCI_CFLAGS)
+AM_CXXFLAGS = $(SCI_CXXFLAGS)
+# append includes to AM_FFLAGS to manage fortran includes
+AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/
+
+# Tag shared libraries with the Scilab version
+AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION)
+
+# splint options
+SPLINT_OPTIONS = -weak -booltype BOOL
+
+########################### JAVA ######################################
+#### We are delegating java compilation to ant... Thanks to that
+#### the procedure will be the same with Microsoft Windows (C)
+#### and Linux/Unix
+#######################################################################
+TARGETS_ALL = $(am__append_4)
+
+################ MACROS ######################
+# Rule to build a macro
+# NOT USED AT THE MOMENT
+SUFFIXES = .sci
+
+########### INSTALL DOCUMENTATION ###################
+
+# Install documentation files into the right target
+# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+# automake needs the html files to be present which is not the case when
+# we are building Scilab
+
+# Where it should be installed
+pkgdocdir = $(mydatadir)
+
+# What is the mask of the help source
+DOCMASKXML = *.xml
+
+# What is the mask of the MathML sources
+DOCMASKMML = *.mml
+
+########### INSTALL DATA ###################
+# Install macros, help & demos
+# Where it should be installed
+pkgmacrosdir = $(mydatadir)
+# Which directory we process
+MACRODIRS = macros/
+# Mask of the Scilab sources macros
+MACROMASK = *.sci
+# Mask of the Scilab executable sources macros
+MACROBUILDMASK = *.sce
+# Mask of the Scilab compiled macros
+MACROBINMASK = *.bin
+# List of the standard directory for tests
+TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java
+# Where the demos should be installed
+pkgdemosdir = $(mydatadir)
+# List of the standard directory for demos
+DEMOS_DIR = demos
+# List of the standard directory for examples
+EXAMPLES_DIR = examples
+# Where to export JAVA archives (.jar)
+JARDIR = jar/
+# JAR files mask
+JARMASK = *.jar
+# Chapter file
+HELP_CHAPTERDIR = help/
+HELP_CHAPTERFILE = addchapter.sce
+HELP_CHAPTERLANG = en_US fr_FR pt_BR
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .sci .bin .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/scinotes/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign modules/scinotes/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/Makefile.incl.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+src/c/$(am__dirstamp):
+ @$(MKDIR_P) src/c
+ @: > src/c/$(am__dirstamp)
+src/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/c/$(DEPDIR)
+ @: > src/c/$(DEPDIR)/$(am__dirstamp)
+src/c/libsciscinotes_algo_la-ScilabKeywords.lo: src/c/$(am__dirstamp) \
+ src/c/$(DEPDIR)/$(am__dirstamp)
+src/jni/$(am__dirstamp):
+ @$(MKDIR_P) src/jni
+ @: > src/jni/$(am__dirstamp)
+src/jni/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/jni/$(DEPDIR)
+ @: > src/jni/$(DEPDIR)/$(am__dirstamp)
+src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo: \
+ src/jni/$(am__dirstamp) src/jni/$(DEPDIR)/$(am__dirstamp)
+src/jni/libsciscinotes_algo_la-SciNotes.lo: src/jni/$(am__dirstamp) \
+ src/jni/$(DEPDIR)/$(am__dirstamp)
+src/cpp/$(am__dirstamp):
+ @$(MKDIR_P) src/cpp
+ @: > src/cpp/$(am__dirstamp)
+src/cpp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/cpp/$(DEPDIR)
+ @: > src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libsciscinotes_algo_la-callscinotes.lo: \
+ src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes-algo.la: $(libsciscinotes_algo_la_OBJECTS) $(libsciscinotes_algo_la_DEPENDENCIES) $(EXTRA_libsciscinotes_algo_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(am_libsciscinotes_algo_la_rpath) $(libsciscinotes_algo_la_OBJECTS) $(libsciscinotes_algo_la_LIBADD) $(LIBS)
+src/noscinotes/$(am__dirstamp):
+ @$(MKDIR_P) src/noscinotes
+ @: > src/noscinotes/$(am__dirstamp)
+src/noscinotes/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/noscinotes/$(DEPDIR)
+ @: > src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+src/noscinotes/libsciscinotes_disable_la-noscinotes.lo: \
+ src/noscinotes/$(am__dirstamp) \
+ src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes-disable.la: $(libsciscinotes_disable_la_OBJECTS) $(libsciscinotes_disable_la_DEPENDENCIES) $(EXTRA_libsciscinotes_disable_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) -rpath $(pkglibdir) $(libsciscinotes_disable_la_OBJECTS) $(libsciscinotes_disable_la_LIBADD) $(LIBS)
+sci_gateway/c/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/c
+ @: > sci_gateway/c/$(am__dirstamp)
+sci_gateway/c/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/c/$(DEPDIR)
+ @: > sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/c/libsciscinotes_la-gw_scinotes.lo: \
+ sci_gateway/c/$(am__dirstamp) \
+ sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/cpp
+ @: > sci_gateway/cpp/$(am__dirstamp)
+sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sci_gateway/cpp/$(DEPDIR)
+ @: > sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+
+libsciscinotes.la: $(libsciscinotes_la_OBJECTS) $(libsciscinotes_la_DEPENDENCIES) $(EXTRA_libsciscinotes_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libsciscinotes_la_LINK) $(am_libsciscinotes_la_rpath) $(libsciscinotes_la_OBJECTS) $(libsciscinotes_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f sci_gateway/c/*.$(OBJEXT)
+ -rm -f sci_gateway/c/*.lo
+ -rm -f sci_gateway/cpp/*.$(OBJEXT)
+ -rm -f sci_gateway/cpp/*.lo
+ -rm -f src/c/*.$(OBJEXT)
+ -rm -f src/c/*.lo
+ -rm -f src/cpp/*.$(OBJEXT)
+ -rm -f src/cpp/*.lo
+ -rm -f src/jni/*.$(OBJEXT)
+ -rm -f src/jni/*.lo
+ -rm -f src/noscinotes/*.$(OBJEXT)
+ -rm -f src/noscinotes/*.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+src/c/libsciscinotes_algo_la-ScilabKeywords.lo: src/c/ScilabKeywords.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciscinotes_algo_la-ScilabKeywords.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Tpo -c -o src/c/libsciscinotes_algo_la-ScilabKeywords.lo `test -f 'src/c/ScilabKeywords.c' || echo '$(srcdir)/'`src/c/ScilabKeywords.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Tpo src/c/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/ScilabKeywords.c' object='src/c/libsciscinotes_algo_la-ScilabKeywords.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libsciscinotes_algo_la-ScilabKeywords.lo `test -f 'src/c/ScilabKeywords.c' || echo '$(srcdir)/'`src/c/ScilabKeywords.c
+
+src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo: src/jni/ScilabKeywords_wrap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo -MD -MP -MF src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Tpo -c -o src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo `test -f 'src/jni/ScilabKeywords_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabKeywords_wrap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Tpo src/jni/$(DEPDIR)/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/jni/ScilabKeywords_wrap.c' object='src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo `test -f 'src/jni/ScilabKeywords_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabKeywords_wrap.c
+
+src/noscinotes/libsciscinotes_disable_la-noscinotes.lo: src/noscinotes/noscinotes.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/noscinotes/libsciscinotes_disable_la-noscinotes.lo -MD -MP -MF src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo -c -o src/noscinotes/libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo src/noscinotes/$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/noscinotes/noscinotes.c' object='src/noscinotes/libsciscinotes_disable_la-noscinotes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/noscinotes/libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+
+sci_gateway/c/libsciscinotes_la-gw_scinotes.lo: sci_gateway/c/gw_scinotes.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscinotes_la-gw_scinotes.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Tpo -c -o sci_gateway/c/libsciscinotes_la-gw_scinotes.lo `test -f 'sci_gateway/c/gw_scinotes.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scinotes.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Tpo sci_gateway/c/$(DEPDIR)/libsciscinotes_la-gw_scinotes.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/gw_scinotes.c' object='sci_gateway/c/libsciscinotes_la-gw_scinotes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscinotes_la-gw_scinotes.lo `test -f 'sci_gateway/c/gw_scinotes.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scinotes.c
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+src/jni/libsciscinotes_algo_la-SciNotes.lo: src/jni/SciNotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/jni/libsciscinotes_algo_la-SciNotes.lo -MD -MP -MF src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Tpo -c -o src/jni/libsciscinotes_algo_la-SciNotes.lo `test -f 'src/jni/SciNotes.cpp' || echo '$(srcdir)/'`src/jni/SciNotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Tpo src/jni/$(DEPDIR)/libsciscinotes_algo_la-SciNotes.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/jni/SciNotes.cpp' object='src/jni/libsciscinotes_algo_la-SciNotes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/jni/libsciscinotes_algo_la-SciNotes.lo `test -f 'src/jni/SciNotes.cpp' || echo '$(srcdir)/'`src/jni/SciNotes.cpp
+
+src/cpp/libsciscinotes_algo_la-callscinotes.lo: src/cpp/callscinotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciscinotes_algo_la-callscinotes.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Tpo -c -o src/cpp/libsciscinotes_algo_la-callscinotes.lo `test -f 'src/cpp/callscinotes.cpp' || echo '$(srcdir)/'`src/cpp/callscinotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Tpo src/cpp/$(DEPDIR)/libsciscinotes_algo_la-callscinotes.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/cpp/callscinotes.cpp' object='src/cpp/libsciscinotes_algo_la-callscinotes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciscinotes_algo_la-callscinotes.lo `test -f 'src/cpp/callscinotes.cpp' || echo '$(srcdir)/'`src/cpp/callscinotes.cpp
+
+sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo: sci_gateway/cpp/sci_scinotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo -c -o sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo `test -f 'sci_gateway/cpp/sci_scinotes.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scinotes.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_scinotes.cpp' object='sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo `test -f 'sci_gateway/cpp/sci_scinotes.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scinotes.cpp
+
+sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo: sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Tpo -c -o sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo `test -f 'sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' object='sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo `test -f 'sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf sci_gateway/c/.libs sci_gateway/c/_libs
+ -rm -rf sci_gateway/cpp/.libs sci_gateway/cpp/_libs
+ -rm -rf src/c/.libs src/c/_libs
+ -rm -rf src/cpp/.libs src/cpp/_libs
+ -rm -rf src/jni/.libs src/jni/_libs
+ -rm -rf src/noscinotes/.libs src/noscinotes/_libs
+install-libsciscinotes_la_etcDATA: $(libsciscinotes_la_etc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_etc_DATA)'; test -n "$(libsciscinotes_la_etcdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_etcdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_etcdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_etcdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_etcdir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_etcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_etc_DATA)'; test -n "$(libsciscinotes_la_etcdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_etcdir)'; $(am__uninstall_files_from_dir)
+install-libsciscinotes_la_rootDATA: $(libsciscinotes_la_root_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_root_DATA)'; test -n "$(libsciscinotes_la_rootdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_rootdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_rootdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_rootdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_rootdir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_rootDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_root_DATA)'; test -n "$(libsciscinotes_la_rootdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_rootdir)'; $(am__uninstall_files_from_dir)
+install-libsciscinotes_la_sci_gatewayDATA: $(libsciscinotes_la_sci_gateway_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(libsciscinotes_la_sci_gateway_DATA)'; test -n "$(libsciscinotes_la_sci_gatewaydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)" || exit $$?; \
+ done
+
+uninstall-libsciscinotes_la_sci_gatewayDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libsciscinotes_la_sci_gateway_DATA)'; test -n "$(libsciscinotes_la_sci_gatewaydir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libsciscinotes_la_etcdir)" "$(DESTDIR)$(libsciscinotes_la_rootdir)" "$(DESTDIR)$(libsciscinotes_la_sci_gatewaydir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sci_gateway/c/$(am__dirstamp)
+ -rm -f sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sci_gateway/cpp/$(am__dirstamp)
+ -rm -f src/c/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/c/$(am__dirstamp)
+ -rm -f src/cpp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/cpp/$(am__dirstamp)
+ -rm -f src/jni/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/jni/$(am__dirstamp)
+ -rm -f src/noscinotes/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/noscinotes/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR) src/jni/$(DEPDIR) src/noscinotes/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-libsciscinotes_la_etcDATA \
+ install-libsciscinotes_la_rootDATA \
+ install-libsciscinotes_la_sci_gatewayDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am: install-html-local
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR) src/jni/$(DEPDIR) src/noscinotes/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libsciscinotes_la_etcDATA \
+ uninstall-libsciscinotes_la_rootDATA \
+ uninstall-libsciscinotes_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \
+ check-local clean clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-html-local install-info \
+ install-info-am install-libsciscinotes_la_etcDATA \
+ install-libsciscinotes_la_rootDATA \
+ install-libsciscinotes_la_sci_gatewayDATA install-man \
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am \
+ uninstall-libsciscinotes_la_etcDATA \
+ uninstall-libsciscinotes_la_rootDATA \
+ uninstall-libsciscinotes_la_sci_gatewayDATA \
+ uninstall-pkglibLTLIBRARIES
+
+
+# This target enables tests for Scilab
+check-local: $(top_builddir)/scilab-bin test
+ if test -d $(mydatadir)/tests; then \
+ @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \
+ fi
+check-code:
+ if test -f build.xml; then \
+ $(ANT) checkstyle; \
+ fi
+ if test -x "$(SPLINT)"; then \
+ $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+ fi
+@NEED_JAVA_TRUE@java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT); \
+@NEED_JAVA_TRUE@ fi
+
+@NEED_JAVA_TRUE@clean-java:
+# Some configurations needs to export JAVA_HOME in the current env
+@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
+@NEED_JAVA_TRUE@ $(ANT) clean; \
+@NEED_JAVA_TRUE@ fi;
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
+@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS)
+@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \
+@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \
+@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \
+@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \
+@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \
+@SWIG_TRUE@ done; \
+@SWIG_TRUE@ fi
+
+# If the user request for the SWIG generation of the wrappers Java => C/C++
+# We call the target swig-build on the variable SWIG_WRAPPERS
+
+@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \
+@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \
+@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \
+@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
+@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
+@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \
+@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ else \
+@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \
+@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \
+@GIWS_TRUE@ fi \
+@GIWS_TRUE@ done; \
+@GIWS_TRUE@ fi
+
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR
+
+macros:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been built"; \
+ else \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+ fi)
+
+# Removes the macros
+clean-macros:
+# Removes macros (*.bin generated from .sci)
+ @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+ rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+ done
+
+test:
+# More tests could be added here
+ @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ if test -f build.xml -a $$USEANT -eq 1; then \
+ $(ANT) test; \
+ fi
+
+all-local: $(TARGETS_ALL)
+
+.sci.bin:
+ -@( if test ! -x $(top_builddir)/scilab-bin; then \
+ echo "Error : Cannot build $< : Scilab has not been build"; \
+ else \
+ echo "Creating $@"; \
+ $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+ fi )
+
+install-html-local:
+
+install-data-local-local:
+# Mainly for javasci
+ @if test -d $(srcdir)/javadoc; then \
+ cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \
+ fi
+# If the user wants the help sources to be installed
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
+@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ done; \
+@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
+@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
+@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+@INSTALL_HELP_XML_TRUE@ done ; \
+@INSTALL_HELP_XML_TRUE@ fi; \
+@INSTALL_HELP_XML_TRUE@ fi
+install-data-local:
+# Install the tests
+ @echo "-------- Install tests (if any) --------"; \
+ for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the help chapter
+ @echo "-------- Install the help chapter (if any) --------"; \
+ for lang in $(HELP_CHAPTERLANG); do \
+ HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+ if test -f $$HELPFILE; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+ echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+ fi; \
+ done
+# Install the demos & examples
+ @echo "-------- Install demos & examples (if any) --------"; \
+ for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+ if test -d $(srcdir)/$$dir/; then \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+ for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+ if test -d "$(srcdir)/$$dir/$$file"; then \
+ echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+ $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+ else \
+ echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+ fi \
+ done; \
+ fi; \
+ done
+# Install the macros
+ @echo "-------- Install macros (if any) --------"; \
+ for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+ $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+ if test -d $(srcdir)/$$dir/; then \
+ FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+ if test -n "$(MACROSSPECIALEXT)"; then \
+ specialExtDir=""; \
+ for specialExt in $(MACROSSPECIALEXT); do \
+ specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+ done; \
+ FILELIST="$$FILELIST $$specialExtDir"; \
+ fi; \
+ for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+ done; \
+ fi; \
+ done
+# Install java files (.jar)
+ @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+ echo "-------- Install jar files --------"; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+ for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+ done ; \
+ fi
+
+########### CLEAN ###################
+# Clean help (generated automatically by Scilab)
+# It used to clean the macro (clean-macros) but this was causing
+# make clean && make to fail Scilab startup
+@NEED_JAVA_TRUE@clean-local: clean-java
+@NEED_JAVA_FALSE@clean-local:
+
+distclean-local:
+ rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+
+.PHONY: macros java swig giws
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/modules/scinotes/build.xml b/modules/scinotes/build.xml
new file mode 100755
index 000000000..07d372119
--- /dev/null
+++ b/modules/scinotes/build.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<project name="scinotes" default="jar">
+ <import file="../../build.incl.xml"/>
+ <property name="library.name" value="${library.scinotes.name}"/>
+ <property name="library.title" value="Text editor for Scilab"/>
+ <description>
+ Build the Scilab scinotes module
+ </description>
+</project>
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/CommentManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/CommentManager.class
new file mode 100755
index 000000000..d906653fc
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/CommentManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/CompoundUndoManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/CompoundUndoManager.class
new file mode 100755
index 000000000..20281e39c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/CompoundUndoManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/EditorComponent.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/EditorComponent.class
new file mode 100755
index 000000000..1814076f0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/EditorComponent.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner$FunctionInfo.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner$FunctionInfo.class
new file mode 100755
index 000000000..924934d92
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner$FunctionInfo.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner.class
new file mode 100755
index 000000000..a8686e28a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/FunctionScanner.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/HelpOnTypingManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/HelpOnTypingManager.class
new file mode 100755
index 000000000..8d6036d1a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/HelpOnTypingManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentManager.class
new file mode 100755
index 000000000..99bf19ace
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentScanner.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentScanner.class
new file mode 100755
index 000000000..2b9196d5f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/IndentScanner.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseClickedAdapter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseClickedAdapter.class
new file mode 100755
index 000000000..107b61c95
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseClickedAdapter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseOverAdapter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseOverAdapter.class
new file mode 100755
index 000000000..2ddf9f9ad
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter$MouseOverAdapter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter.class
new file mode 100755
index 000000000..c0ed0353e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordAdapter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordEvent.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordEvent.class
new file mode 100755
index 000000000..93516b6ae
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordEvent.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordListener.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordListener.class
new file mode 100755
index 000000000..ba0acd331
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/KeywordListener.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$InsideLinePainter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$InsideLinePainter.class
new file mode 100755
index 000000000..0d918e38c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$InsideLinePainter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$MouseOverMatcher.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$MouseOverMatcher.class
new file mode 100755
index 000000000..a78e5ffae
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$MouseOverMatcher.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$Parameters.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$Parameters.class
new file mode 100755
index 000000000..6b80e7231
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$Parameters.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$ScilabKeywordsPainter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$ScilabKeywordsPainter.class
new file mode 100755
index 000000000..6a1cfd081
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager$ScilabKeywordsPainter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager.class
new file mode 100755
index 000000000..28bd79fc9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$1.class
new file mode 100755
index 000000000..4f0883b2e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$MatchingPositions.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$MatchingPositions.class
new file mode 100755
index 000000000..f3d7fa3f2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner$MatchingPositions.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner.class
new file mode 100755
index 000000000..0988476aa
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/MatchingBlockScanner.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$1.class
new file mode 100755
index 000000000..b0126eaa8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$10.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$10.class
new file mode 100755
index 000000000..c6993f879
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$10.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$2.class
new file mode 100755
index 000000000..6485af03c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$3.class
new file mode 100755
index 000000000..0e953ab62
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$4.class
new file mode 100755
index 000000000..cf12be277
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$5.class
new file mode 100755
index 000000000..fad3dff11
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$6.class
new file mode 100755
index 000000000..19378eb95
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$7.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$7.class
new file mode 100755
index 000000000..3d9d96a0d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$7.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$8.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$8.class
new file mode 100755
index 000000000..22202ecbd
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$8.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$9.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$9.class
new file mode 100755
index 000000000..911e724c2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$9.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$ActionOnDocument.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$ActionOnDocument.class
new file mode 100755
index 000000000..5af3db409
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes$ActionOnDocument.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes.class
new file mode 100755
index 000000000..2b2a48b02
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotes.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave$1.class
new file mode 100755
index 000000000..95c2c766b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave.class
new file mode 100755
index 000000000..fa76285ac
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesAutosave.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret$SciNotesNavigationFilter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret$SciNotesNavigationFilter.class
new file mode 100755
index 000000000..1016c3341
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret$SciNotesNavigationFilter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret.class
new file mode 100755
index 000000000..882d404c4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesCaret.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration$Conf.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration$Conf.class
new file mode 100755
index 000000000..17eeb6ba7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration$Conf.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration.class
new file mode 100755
index 000000000..220d66752
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesConfiguration.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesGUI.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesGUI.class
new file mode 100755
index 000000000..cad825dba
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesGUI.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesLineNumberPanel.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesLineNumberPanel.class
new file mode 100755
index 000000000..ec1bc7351
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesLineNumberPanel.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$1.class
new file mode 100755
index 000000000..84407704b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Autosave.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Autosave.class
new file mode 100755
index 000000000..713ea5ce9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Autosave.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Display.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Display.class
new file mode 100755
index 000000000..97962457f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Display.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Header.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Header.class
new file mode 100755
index 000000000..70f3f25e7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Header.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Preferences.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Preferences.class
new file mode 100755
index 000000000..d847f2ff1
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions$Preferences.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions.class
new file mode 100755
index 000000000..d9313d8fe
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SciNotesOptions.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontDecoration.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontDecoration.class
new file mode 100755
index 000000000..962b672e6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontDecoration.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontInfo.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontInfo.class
new file mode 100755
index 000000000..9ecf9f207
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext$FontInfo.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext.class
new file mode 100755
index 000000000..524ebb1a8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabContext.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$1.class
new file mode 100755
index 000000000..80ec3525f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$2.class
new file mode 100755
index 000000000..bd75a0bae
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$Anchor.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$Anchor.class
new file mode 100755
index 000000000..29dd1c506
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$Anchor.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$ScilabLeafElement.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$ScilabLeafElement.class
new file mode 100755
index 000000000..dac47f9f8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument$ScilabLeafElement.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument.class
new file mode 100755
index 000000000..8df2d8767
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocument.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocumentReader.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocumentReader.class
new file mode 100755
index 000000000..7145662ef
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabDocumentReader.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit$DocString.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit$DocString.class
new file mode 100755
index 000000000..7cbc571da
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit$DocString.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit.class
new file mode 100755
index 000000000..b4dd223c8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorKit.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$1.class
new file mode 100755
index 000000000..92be4057d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$10.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$10.class
new file mode 100755
index 000000000..c5aee8d52
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$10.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$2.class
new file mode 100755
index 000000000..f45879629
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$3.class
new file mode 100755
index 000000000..0a92ef7eb
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$4.class
new file mode 100755
index 000000000..f92d0d569
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$5.class
new file mode 100755
index 000000000..e4e9747de
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$6.class
new file mode 100755
index 000000000..c42b20523
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$7.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$7.class
new file mode 100755
index 000000000..b8bd23b58
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$7.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$8.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$8.class
new file mode 100755
index 000000000..b46ce8d59
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$8.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$9.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$9.class
new file mode 100755
index 000000000..a0b1bfc39
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane$9.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane.class
new file mode 100755
index 000000000..08562c9ad
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabEditorPane.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywords.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywords.class
new file mode 100755
index 000000000..41891c7e7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywords.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywordsJNI.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywordsJNI.class
new file mode 100755
index 000000000..e4fbc6002
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabKeywordsJNI.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer$ScilabTokens.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer$ScilabTokens.class
new file mode 100755
index 000000000..d63c18851
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer$ScilabTokens.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer.class
new file mode 100755
index 000000000..baa5fb95f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexer.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexerConstants.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexerConstants.class
new file mode 100755
index 000000000..75e6eda5a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabLexerConstants.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabPlainView.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabPlainView.class
new file mode 100755
index 000000000..9cecd2cb7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabPlainView.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabView.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabView.class
new file mode 100755
index 000000000..6715d1b6e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/ScilabView.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$1.class
new file mode 100755
index 000000000..665427a3e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$2.class
new file mode 100755
index 000000000..e6ba6d9e7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$3.class
new file mode 100755
index 000000000..a919a55ac
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$4.class
new file mode 100755
index 000000000..65a6caf35
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$BackgroundSearch.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$BackgroundSearch.class
new file mode 100755
index 000000000..ca7963950
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$BackgroundSearch.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Iconable.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Iconable.class
new file mode 100755
index 000000000..033e576af
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Iconable.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Line.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Line.class
new file mode 100755
index 000000000..bea5aebc2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$Line.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$MatchingPositions.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$MatchingPositions.class
new file mode 100755
index 000000000..a3f5db2e8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager$MatchingPositions.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager.class
new file mode 100755
index 000000000..c0e78d151
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/SearchManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager$Tabulation.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager$Tabulation.class
new file mode 100755
index 000000000..bc9d6c2c5
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager$Tabulation.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager.class
new file mode 100755
index 000000000..5836e12d3
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TabManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/TrailingWhiteManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TrailingWhiteManager.class
new file mode 100755
index 000000000..b5e82da96
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/TrailingWhiteManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/AboutAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/AboutAction.class
new file mode 100755
index 000000000..3d8a146c0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/AboutAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction$1.class
new file mode 100755
index 000000000..c92880720
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.class
new file mode 100755
index 000000000..feb4d906b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction$1.class
new file mode 100755
index 000000000..5cec8e853
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.class
new file mode 100755
index 000000000..9caa9d1a5
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.class
new file mode 100755
index 000000000..244d8fe1d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction$1.class
new file mode 100755
index 000000000..145282e6a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction.class
new file mode 100755
index 000000000..317332a3d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CapitalizeAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAction.class
new file mode 100755
index 000000000..b873cce34
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllAction.class
new file mode 100755
index 000000000..8e69df7ce
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllButThisAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllButThisAction.class
new file mode 100755
index 000000000..e8ff13cc8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CloseAllButThisAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CodeNavigatorAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CodeNavigatorAction.class
new file mode 100755
index 000000000..cca569da3
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CodeNavigatorAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CommentAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CommentAction.class
new file mode 100755
index 000000000..acc044a71
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CommentAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLSelection.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLSelection.class
new file mode 100755
index 000000000..eb4ac02d7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLSelection.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLTransferHandler.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLTransferHandler.class
new file mode 100755
index 000000000..2da9dd3e4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction$HTMLTransferHandler.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.class
new file mode 100755
index 000000000..630241997
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.class
new file mode 100755
index 000000000..6fdcd63e4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction$1.class
new file mode 100755
index 000000000..4424dd863
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.class
new file mode 100755
index 000000000..01025e53e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CutAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CutAction.class
new file mode 100755
index 000000000..cf1ca70ad
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/CutAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultAction.class
new file mode 100755
index 000000000..6167e41a4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$1.class
new file mode 100755
index 000000000..f7137a615
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$2.class
new file mode 100755
index 000000000..2e9049cd6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction.class
new file mode 100755
index 000000000..821d1fee8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DefaultCheckAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DeleteAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DeleteAction.class
new file mode 100755
index 000000000..67bdac250
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DeleteAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction$1.class
new file mode 100755
index 000000000..454a780ee
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.class
new file mode 100755
index 000000000..f51f2803c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$1.class
new file mode 100755
index 000000000..ae7414270
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$2.class
new file mode 100755
index 000000000..3229c3d8b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction.class
new file mode 100755
index 000000000..8567eb57d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EncodingAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction$1.class
new file mode 100755
index 000000000..94db8bf31
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction.class
new file mode 100755
index 000000000..e8262dc54
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EndOfLineAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction$1.class
new file mode 100755
index 000000000..089980b1d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.class
new file mode 100755
index 000000000..38c4d2a7f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.class
new file mode 100755
index 000000000..c936ff938
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExitAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExitAction.class
new file mode 100755
index 000000000..5fcf03dc1
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExitAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$1.class
new file mode 100755
index 000000000..69c9afff4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$2.class
new file mode 100755
index 000000000..782231625
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction.class
new file mode 100755
index 000000000..f4e405c89
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ExportAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$1.class
new file mode 100755
index 000000000..f6ea58e90
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$10.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$10.class
new file mode 100755
index 000000000..86a5ffcf9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$10.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$11.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$11.class
new file mode 100755
index 000000000..e3dcf1ab9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$11.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$12.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$12.class
new file mode 100755
index 000000000..031d38211
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$12.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$13.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$13.class
new file mode 100755
index 000000000..3e2a9ce91
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$13.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$14.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$14.class
new file mode 100755
index 000000000..696cf24ad
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$14.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$15.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$15.class
new file mode 100755
index 000000000..9859ab029
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$15.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$16.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$16.class
new file mode 100755
index 000000000..736f08371
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$16.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$17.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$17.class
new file mode 100755
index 000000000..d3981bb55
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$17.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$18.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$18.class
new file mode 100755
index 000000000..63c005045
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$18.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$19.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$19.class
new file mode 100755
index 000000000..f98000eae
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$19.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$2.class
new file mode 100755
index 000000000..a04823a10
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$20.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$20.class
new file mode 100755
index 000000000..44005e042
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$20.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$21.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$21.class
new file mode 100755
index 000000000..414d0912e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$21.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$22.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$22.class
new file mode 100755
index 000000000..e6194577c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$22.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$3.class
new file mode 100755
index 000000000..382fe8d74
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$4.class
new file mode 100755
index 000000000..0456df700
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$5.class
new file mode 100755
index 000000000..1110b5315
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6$1.class
new file mode 100755
index 000000000..1ad70b17c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6.class
new file mode 100755
index 000000000..e2a223479
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$7.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$7.class
new file mode 100755
index 000000000..6169fdc9b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$7.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$8.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$8.class
new file mode 100755
index 000000000..11283528b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$8.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$9.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$9.class
new file mode 100755
index 000000000..3e5055566
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$9.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$MyListener.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$MyListener.class
new file mode 100755
index 000000000..7d4fb1003
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction$MyListener.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction.class
new file mode 100755
index 000000000..9882956af
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindNextAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindNextAction.class
new file mode 100755
index 000000000..6d33ca3fb
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindNextAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindPreviousAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindPreviousAction.class
new file mode 100755
index 000000000..271969b33
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/FindPreviousAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GeneralSettingsAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GeneralSettingsAction.class
new file mode 100755
index 000000000..1d6bcc041
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GeneralSettingsAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction$1.class
new file mode 100755
index 000000000..64108f57c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.class
new file mode 100755
index 000000000..bcb1b9008
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.class
new file mode 100755
index 000000000..e1394b816
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.class
new file mode 100755
index 000000000..a00d5631b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpAction.class
new file mode 100755
index 000000000..fa424a90f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction$1.class
new file mode 100755
index 000000000..fd48abd66
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.class
new file mode 100755
index 000000000..2b994bfed
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.class
new file mode 100755
index 000000000..f5536df4e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$1.class
new file mode 100755
index 000000000..5ca206e72
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$2.class
new file mode 100755
index 000000000..fc01d9c40
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton$1.class
new file mode 100755
index 000000000..641c1338c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton.class
new file mode 100755
index 000000000..86f67cd12
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$CloseButton.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons$1.class
new file mode 100755
index 000000000..eb568379b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons.class
new file mode 100755
index 000000000..4e5f1d3c0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField$TopBotButtons.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField.class
new file mode 100755
index 000000000..49657fa7a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction$SearchField.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction.class
new file mode 100755
index 000000000..f9bafcc38
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IncrementalSearchAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction$1.class
new file mode 100755
index 000000000..bb39a7447
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction.class
new file mode 100755
index 000000000..45ab93e7d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/IndentAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/InsertOverwriteAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/InsertOverwriteAction.class
new file mode 100755
index 000000000..bc0dc0b90
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/InsertOverwriteAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineBeautifierAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineBeautifierAction.class
new file mode 100755
index 000000000..20cbc7b13
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineBeautifierAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$1.class
new file mode 100755
index 000000000..26b818a4d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$2.class
new file mode 100755
index 000000000..176698c2e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction.class
new file mode 100755
index 000000000..be80d1c88
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LineNumbersAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.class
new file mode 100755
index 000000000..8ead4bb4a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NewAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NewAction.class
new file mode 100755
index 000000000..6521cb73a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NewAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextParagraphAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextParagraphAction.class
new file mode 100755
index 000000000..700a566ca
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextParagraphAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextTabAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextTabAction.class
new file mode 100755
index 000000000..e54745137
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/NextTabAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenAction.class
new file mode 100755
index 000000000..7db755de6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction$1.class
new file mode 100755
index 000000000..d9b2eee44
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction.class
new file mode 100755
index 000000000..ffa7f2ef8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenFileInAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$1.class
new file mode 100755
index 000000000..aa2c35bed
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$2.class
new file mode 100755
index 000000000..6816a471d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$3.class
new file mode 100755
index 000000000..d5494b316
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$4.class
new file mode 100755
index 000000000..10a855b14
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.class
new file mode 100755
index 000000000..f5d491962
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.class
new file mode 100755
index 000000000..4d8f9fc5c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction$1.class
new file mode 100755
index 000000000..8fe65ef43
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction.class
new file mode 100755
index 000000000..09752cfa2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OpenURLAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction$1.class
new file mode 100755
index 000000000..da8813505
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction.class
new file mode 100755
index 000000000..f1dff2c76
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/OverwriteAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PageSetupAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PageSetupAction.class
new file mode 100755
index 000000000..e85d1a7b4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PageSetupAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteAction.class
new file mode 100755
index 000000000..6af36dc2a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteColumnAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteColumnAction.class
new file mode 100755
index 000000000..aa72862d0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PasteColumnAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousParagraphAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousParagraphAction.class
new file mode 100755
index 000000000..43afce5dd
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousParagraphAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousTabAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousTabAction.class
new file mode 100755
index 000000000..c20092cd9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PreviousTabAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintAction.class
new file mode 100755
index 000000000..84895d5cc
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintPreviewAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintPreviewAction.class
new file mode 100755
index 000000000..4b8aedef4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/PrintPreviewAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RecentFileAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RecentFileAction.class
new file mode 100755
index 000000000..88cc7b236
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RecentFileAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RedoAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RedoAction.class
new file mode 100755
index 000000000..a5bf7cc26
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RedoAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$1.class
new file mode 100755
index 000000000..9cb7c1c0b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$2.class
new file mode 100755
index 000000000..36e9206a2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$AddDirectoryAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$AddDirectoryAction.class
new file mode 100755
index 000000000..01c6aa677
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$AddDirectoryAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$RmDirectoryAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$RmDirectoryAction.class
new file mode 100755
index 000000000..62af92807
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction$RmDirectoryAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.class
new file mode 100755
index 000000000..cffb6009b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ReloadAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ReloadAction.class
new file mode 100755
index 000000000..4141b7f15
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ReloadAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveAnchorAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveAnchorAction.class
new file mode 100755
index 000000000..84864a197
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveAnchorAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction$1.class
new file mode 100755
index 000000000..111c65ff8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.class
new file mode 100755
index 000000000..781b2250b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.class
new file mode 100755
index 000000000..2d9de5a68
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$1.class
new file mode 100755
index 000000000..dc44c8e78
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$2.class
new file mode 100755
index 000000000..5ccca496d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNode.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNode.class
new file mode 100755
index 000000000..ce1a83d58
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNode.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor$1.class
new file mode 100755
index 000000000..1cb529a8a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor.class
new file mode 100755
index 000000000..47d48bc74
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeEditor.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeRenderer.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeRenderer.class
new file mode 100755
index 000000000..fd0c0eb44
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$CheckBoxNodeRenderer.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$FilesVector.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$FilesVector.class
new file mode 100755
index 000000000..b76578dff
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction$FilesVector.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.class
new file mode 100755
index 000000000..49715c201
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAction.class
new file mode 100755
index 000000000..0dc13d672
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAllAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAllAction.class
new file mode 100755
index 000000000..87c5bfa46
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAllAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.class
new file mode 100755
index 000000000..03782307c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.class
new file mode 100755
index 000000000..e642f50ab
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAsAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAsAction.class
new file mode 100755
index 000000000..07cc7db94
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveAsAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction$1.class
new file mode 100755
index 000000000..8c9c3289e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction.class
new file mode 100755
index 000000000..7d60ac7a4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SaveFileInAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$1.class
new file mode 100755
index 000000000..b6e4727f2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionConfiguration.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionConfiguration.class
new file mode 100755
index 000000000..e963c68bd
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionConfiguration.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionManager.class
new file mode 100755
index 000000000..c34605137
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesCompletionManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesInputParsingManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesInputParsingManager.class
new file mode 100755
index 000000000..d0fa9c31a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction$SciNotesInputParsingManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.class
new file mode 100755
index 000000000..da2e272ea
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchFilesAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchFilesAction.class
new file mode 100755
index 000000000..5f7833e23
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchFilesAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$1.class
new file mode 100755
index 000000000..a7499c0c8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$10.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$10.class
new file mode 100755
index 000000000..d9774092d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$10.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$11.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$11.class
new file mode 100755
index 000000000..304fe4d29
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$11.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$12.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$12.class
new file mode 100755
index 000000000..e41ccfeed
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$12.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$13.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$13.class
new file mode 100755
index 000000000..86f46212f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$13.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$14.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$14.class
new file mode 100755
index 000000000..869106e4f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$14.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$15.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$15.class
new file mode 100755
index 000000000..42925f4f2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$15.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$16.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$16.class
new file mode 100755
index 000000000..c8506a228
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$16.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$17.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$17.class
new file mode 100755
index 000000000..78584e97f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$17.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$18.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$18.class
new file mode 100755
index 000000000..8ee2c24a0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$18.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$19.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$19.class
new file mode 100755
index 000000000..85af82df0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$19.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$2.class
new file mode 100755
index 000000000..293637740
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$20.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$20.class
new file mode 100755
index 000000000..5b10ff3c6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$20.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$21.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$21.class
new file mode 100755
index 000000000..79a833bdb
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$21.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$22.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$22.class
new file mode 100755
index 000000000..b46422ab9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$22.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$3.class
new file mode 100755
index 000000000..7cdd1bb29
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$4.class
new file mode 100755
index 000000000..0f4cbca98
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$5.class
new file mode 100755
index 000000000..c79a52902
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$6.class
new file mode 100755
index 000000000..40ef4eb86
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$7.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$7.class
new file mode 100755
index 000000000..15932ff13
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$7.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$8.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$8.class
new file mode 100755
index 000000000..f6381a33b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$8.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$9.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$9.class
new file mode 100755
index 000000000..fb077f9a9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction$9.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.class
new file mode 100755
index 000000000..6d710d566
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectAllAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectAllAction.class
new file mode 100755
index 000000000..2d57a5dec
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectAllAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction$1.class
new file mode 100755
index 000000000..867d0b531
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction.class
new file mode 100755
index 000000000..defccc2a6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.class
new file mode 100755
index 000000000..3a5c333e9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$1.class
new file mode 100755
index 000000000..1513d60aa
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$2.class
new file mode 100755
index 000000000..96bc3d67a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$3.class
new file mode 100755
index 000000000..16cf07cb3
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction.class
new file mode 100755
index 000000000..470f07168
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetAnchorAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetColorsAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetColorsAction.class
new file mode 100755
index 000000000..41bbdb70b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetColorsAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetFontAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetFontAction.class
new file mode 100755
index 000000000..a6b212ee0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SetFontAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$1.class
new file mode 100755
index 000000000..399eecd76
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$2.class
new file mode 100755
index 000000000..5b92e064b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction.class
new file mode 100755
index 000000000..5b8027f25
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/SplitAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/TabifyAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/TabifyAction.class
new file mode 100755
index 000000000..9b873cfc0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/TabifyAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToLowerCaseAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToLowerCaseAction.class
new file mode 100755
index 000000000..5a6bc3c68
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToLowerCaseAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToUpperCaseAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToUpperCaseAction.class
new file mode 100755
index 000000000..903b1c8e4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/ToUpperCaseAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnCommentAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnCommentAction.class
new file mode 100755
index 000000000..f2d403942
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnCommentAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnTabifyAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnTabifyAction.class
new file mode 100755
index 000000000..9da48cfb3
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UnTabifyAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UndoAction.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UndoAction.class
new file mode 100755
index 000000000..ce3ed670c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/actions/UndoAction.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/style/FilterManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/style/FilterManager.class
new file mode 100755
index 000000000..97d7a0439
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/style/FilterManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$1.class
new file mode 100755
index 000000000..48d79e1c7
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$2.class
new file mode 100755
index 000000000..0a955e801
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.class
new file mode 100755
index 000000000..8a792c24d
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.class
new file mode 100755
index 000000000..fb2274e8e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$1.class
new file mode 100755
index 000000000..3a18a6aae
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$2.class
new file mode 100755
index 000000000..399f6c7a8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab.class
new file mode 100755
index 000000000..7b31027a3
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTab.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.class
new file mode 100755
index 000000000..a209ed90c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$1.class
new file mode 100755
index 000000000..b2bfe3642
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$2.class
new file mode 100755
index 000000000..8f1da59ac
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.class
new file mode 100755
index 000000000..d1b896f1e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.class
new file mode 100755
index 000000000..b426ab7f9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/CodeExporter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/CodeExporter.class
new file mode 100755
index 000000000..13e151686
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/CodeExporter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.class
new file mode 100755
index 000000000..6ecc105e4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/DropFilesListener.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/DropFilesListener.class
new file mode 100755
index 000000000..fb22f81a5
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/DropFilesListener.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/FOCodeConverter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/FOCodeConverter.class
new file mode 100755
index 000000000..ae81b26dd
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/FOCodeConverter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/HTMLCodeConverter.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/HTMLCodeConverter.class
new file mode 100755
index 000000000..a4ef72e87
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/HTMLCodeConverter.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$1.class
new file mode 100755
index 000000000..6d39fd914
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$10.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$10.class
new file mode 100755
index 000000000..913c8a7cf
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$10.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$2.class
new file mode 100755
index 000000000..ffaeba1b6
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$3.class
new file mode 100755
index 000000000..12cca325f
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$4.class
new file mode 100755
index 000000000..afd2de37e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$5.class
new file mode 100755
index 000000000..f186cfba0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$6.class
new file mode 100755
index 000000000..c78ed775b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$7.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$7.class
new file mode 100755
index 000000000..e4a663983
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$7.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$8.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$8.class
new file mode 100755
index 000000000..e665ac515
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$8.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$9.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$9.class
new file mode 100755
index 000000000..80a554a26
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$9.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$NavigatorFocusTraversalPolicy.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$NavigatorFocusTraversalPolicy.class
new file mode 100755
index 000000000..fc886a9b1
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow$NavigatorFocusTraversalPolicy.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow.class
new file mode 100755
index 000000000..7581f4c24
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/NavigatorWindow.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SaveFile.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SaveFile.class
new file mode 100755
index 000000000..9913de2e4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SaveFile.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.class
new file mode 100755
index 000000000..047e205bf
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents$1.class
new file mode 100755
index 000000000..ba8606b61
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents.class
new file mode 100755
index 000000000..040894076
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesContents.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesMessages.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesMessages.class
new file mode 100755
index 000000000..ba34982f4
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SciNotesMessages.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane$ScilabVerticalScrollBar.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane$ScilabVerticalScrollBar.class
new file mode 100755
index 000000000..894487c7c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane$ScilabVerticalScrollBar.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane.class
new file mode 100755
index 000000000..1faed1d60
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabScrollPane.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$1.class
new file mode 100755
index 000000000..67aef20e0
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$2.class
new file mode 100755
index 000000000..69fa7691c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$3.class
new file mode 100755
index 000000000..ffe058217
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$4.class
new file mode 100755
index 000000000..96a77ae45
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$5.class
new file mode 100755
index 000000000..4aa63c1b2
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton$1.class
new file mode 100755
index 000000000..c58bd8aa8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton.class
new file mode 100755
index 000000000..fc7b5cf9c
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton$CloseButton.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton.class
new file mode 100755
index 000000000..e17227d37
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane$CloseTabButton.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane.class
new file mode 100755
index 000000000..5f5368158
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/ScilabTabbedPane.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$1.class
new file mode 100755
index 000000000..398a2a9f8
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$2.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$2.class
new file mode 100755
index 000000000..155eb5182
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$2.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$3.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$3.class
new file mode 100755
index 000000000..fb1f2ff3b
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$3.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$4.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$4.class
new file mode 100755
index 000000000..0d5135c5e
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$4.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$5.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$5.class
new file mode 100755
index 000000000..bef1cac16
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$5.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$6.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$6.class
new file mode 100755
index 000000000..a840278cb
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$6.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch$1.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch$1.class
new file mode 100755
index 000000000..dbcd671ef
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch$1.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch.class
new file mode 100755
index 000000000..12fd23ae9
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile$MyBackgroundSearch.class
Binary files differ
diff --git a/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile.class b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile.class
new file mode 100755
index 000000000..8bee3eb1a
--- /dev/null
+++ b/modules/scinotes/build/classes/org/scilab/modules/scinotes/utils/SearchFile.class
Binary files differ
diff --git a/modules/scinotes/etc/XConfiguration-scinotes.xml b/modules/scinotes/etc/XConfiguration-scinotes.xml
new file mode 100755
index 000000000..7fe953acb
--- /dev/null
+++ b/modules/scinotes/etc/XConfiguration-scinotes.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<scinotes title="Scinotes">
+ <body>
+ <scinotes-preferences restart-reopen="true" add-line-termination="true" number-of-recently-open="5" encoding="utf-8" eol="" scinotes="true" cmd="" macro="" external-cmd="true" complete-at-eol="false"/>
+ </body>
+ <display title="_(Display)">
+ <body>
+ <scinotes-display highlight-current-line="false" current-line-color="#FACADE" show-line-numbers="true" wrap-lines="true" keywords-colorization="true" highlight-brackets="true" brackets-color="#E40087" brackets-highlightment="Framed" brackets-onmouseover="true" highlight-keywords="true" keywords-color="#FFF3D2" keywords-highlightment="Filled" keywords-onmouseover="true" whereami="true" tab-size="4" tab-representation="chevrons" use-spaces="true" indent-size="4" automatic-indent="true" auto-complete-openers="true" auto-complete-keywords="true" background-color="#FFFFFF" caret-color="#000000"/>
+ </body>
+ </display>
+ <header title="_(Header)">
+ <body>
+ <scinotes-header enable="false"><![CDATA[// Copyright (C) {$current-year} - Corporation - Author
+//
+// About your license if you have any
+//
+// Date of creation: {$current-date}
+//
+]]></scinotes-header>
+ </body>
+ </header>
+ <autosave title="_(Autosave)">
+ <body>
+ <scinotes-autosave enable="true" save-every="5" automatic-delete="true" append-filename="true" append-with="~" replace-with="tmp" source-flag="true" single-directory=""/>
+ </body>
+ </autosave>
+</scinotes>
diff --git a/modules/scinotes/etc/XConfiguration-scinotes.xsl b/modules/scinotes/etc/XConfiguration-scinotes.xsl
new file mode 100755
index 000000000..500ad45e3
--- /dev/null
+++ b/modules/scinotes/etc/XConfiguration-scinotes.xsl
@@ -0,0 +1,563 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<xsl:stylesheet version ="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="scinotes-preferences">
+ <Title text="_(Editor)">
+ <VBox>
+ <HBox>
+ <Checkbox checked="{@scinotes}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Use Scinotes)">
+ <actionPerformed choose="scinotes">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ <Glue/>
+ </HBox>
+
+ <xsl:variable name="enable">
+ <xsl:choose>
+ <xsl:when test="@scinotes='true'">
+ <xsl:text>false</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>true</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <Grid>
+ <Radiobutton value="{@external-cmd}" expected-value="true" listener="ActionListener" text="_(External editor: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{$enable}">
+ <actionPerformed choose="external-cmd">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+ <FileSelector gridx="2" gridy="1" weightx="1" anchor="above_baseline"
+ listener="EntryListener"
+ href="{@cmd}"
+ dir-selection="false"
+ check-entry="false">
+ <xsl:attribute name="enable">
+ <xsl:if test="@scinotes='false' and @external-cmd='true'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <entryChanged choose="cmd">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </FileSelector>
+ <Label gridx="2" gridy="2" text="_((Don't forget to quote path containing white spaces))">
+ <xsl:attribute name="enable">
+ <xsl:if test="@scinotes='false' and @external-cmd='true'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </Label>
+ <Panel height="5" gridx="1" gridy="3">
+ <VSpace height="5"/>
+ </Panel>
+ <Radiobutton value="{@external-cmd}" expected-value="false" listener="ActionListener" text="_(Scilab command: )" gridx="1" gridy="4" fill="none" weightx="0" anchor="west" enable="{$enable}">
+ <actionPerformed choose="external-cmd">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+ <Entry gridx="2" gridy="4" weightx="1" anchor="above_baseline"
+ listener="EntryListener"
+ text="{@macro}">
+ <xsl:attribute name="enable">
+ <xsl:if test="@scinotes='false' and @external-cmd='false'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <entryChanged choose="macro">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </Entry>
+ </Grid>
+ </VBox>
+ </Title>
+ <VSpace height="10"/>
+ <Title text="_(Scinotes General settings)">
+ <Grid>
+ <Panel gridx="1" gridy="1" gridwidth="3">
+ <xsl:call-template name="BooleanCheckBox">
+ <xsl:with-param name="attr-name" select="'restart-reopen'"/>
+ <xsl:with-param name="text" select="'_(Restore previous session on start-up)'"/>
+ </xsl:call-template>
+ </Panel>
+
+ <Panel gridx="1" gridy="2" gridwidth="3">
+ <xsl:call-template name="BooleanCheckBox">
+ <xsl:with-param name="attr-name" select="'add-line-termination'"/>
+ <xsl:with-param name="text" select="'_(Add carriage return at the end of the file.)'"/>
+ </xsl:call-template>
+ </Panel>
+
+ <Label gridx="1" gridy="3" weightx="0" text="_(Number of recently opened files to display: )"/>
+ <Panel gridx="2" gridy="3" gridheight="2" fill="both"/>
+ <NumericalSpinner gridx="3"
+ gridy="3"
+ weightx="0"
+ min-value = "0"
+ increment = "1"
+ length = "4"
+ listener = "ActionListener"
+ value = "{@number-of-recently-open}">
+ <actionPerformed choose="number-of-recently-open">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </NumericalSpinner>
+
+ <Label gridx="1" gridy="4" weightx="0" text="_(Default file encoding: )"/>
+
+ <Panel gridx="3" gridy="4">
+ <xsl:call-template name="Select">
+ <xsl:with-param name="among">
+ <option encoding="utf-8"/>
+ <option encoding="iso-8859-1"/>
+ <option encoding="windows-1252"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </Panel>
+
+ <Label gridx="1" gridy="5" weightx="0" text="_(Default End-Of-Line: )"/>
+
+ <Select gridx="3" gridy="5" listener="ActionListener">
+ <actionPerformed choose="eol">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ <xsl:variable name="eol">
+ <xsl:choose>
+ <xsl:when test="@eol=''">
+ <xsl:choose>
+ <xsl:when test="$OS='Windows'">
+ <xsl:text>Windows (CR+LF)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Unix (LF)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@eol"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <option value="Unix (LF)">
+ <xsl:if test="$eol='Unix (LF)'">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ <option value="Windows (CR+LF)">
+ <xsl:if test="$eol='Windows (CR+LF)'">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ </Select>
+ </Grid>
+ </Title>
+ <VSpace height="10"/>
+ <Title text="_(Completion)">
+ <Checkbox checked="{@complete-at-eol}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Auto-complete brackets when cursor is at the end of a line)">
+ <actionPerformed choose="complete-at-eol">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ </Title>
+ </xsl:template>
+
+
+ <xsl:template match="scinotes-display">
+ <Title text="_(General display options)">
+ <Grid>
+ <Checkbox checked="{@highlight-current-line}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight current line: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="highlight-current-line">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ <Panel gridx="2" gridy="1" weightx="1"/>
+ <Panel gridx="3" gridy="1" weightx="1"/>
+ <Color color="{@current-line-color}" listener="ActionListener" gridx="4" gridy="1" weightx="0" enable="{@highlight-current-line}">
+ <actionPerformed choose="current-line-color">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Color>
+
+ <Checkbox checked="{@show-line-numbers}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Show line numbers: )" gridx="1" gridy="2" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="show-line-numbers">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Radiobutton value="{@whereami}" expected-value="true" listener="ActionListener" text="_(Local numbering)" gridx="2" gridy="2" fill="none" weightx="0" anchor="west" enable="{@show-line-numbers}">
+ <actionPerformed choose="whereami">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Radiobutton value="{@whereami}" expected-value="false" listener="ActionListener" text="_(Normal)" gridx="3" gridy="2" gridwidth="2" fill="none" weightx="0" anchor="west" enable="{@show-line-numbers}">
+ <actionPerformed choose="whereami">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Checkbox checked="{@wrap-lines}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Wrap lines)" gridx="1" gridy="3" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="wrap-lines">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Label text="_(Background color: )" gridx="1" gridy="4" weightx="0"/>
+ <Color color="{@background-color}" listener="ActionListener" gridx="2" gridy="4" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="background-color">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Color>
+
+ <Label text="_(Cursor color: )" gridx="3" gridy="4" weightx="0"/>
+ <Color color="{@caret-color}" listener="ActionListener" gridx="4" gridy="4" weightx="0" fill="none" anchor="east">
+ <actionPerformed choose="caret-color">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Color>
+ </Grid>
+ </Title>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Keywords)">
+ <Grid>
+ <Checkbox checked="{@keywords-colorization}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable keywords colorization)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="keywords-colorization">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Panel gridx="2" gridy="1" weightx="1"/>
+ <Link gridx="3" gridy="1" weightx="0" listener="MouseListener" text="_(Set syntax Colors)" enable="{@keywords-colorization}">
+ <mouseClicked set="path" value="colors" context="/" enable="{@keywords-colorization}"/>
+ </Link>
+ <Checkbox checked="{@highlight-brackets}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight corresponding brackets)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="highlight-brackets">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ <Grid gridx="1" gridy="3" gridwidth="3" ipadx="10">
+ <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-brackets}"/>
+ <Color color="{@brackets-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-brackets}">
+ <actionPerformed choose="brackets-color">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Color>
+ <Panel gridx="3" gridy="1" weightx="1"/>
+ <Checkbox checked="{@brackets-onmouseover}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight on mouse over)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west" enable="{@highlight-brackets}">
+ <actionPerformed choose="brackets-onmouseover">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ <Panel gridx="5" gridy="1" weightx="1"/>
+ <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-brackets}"/>
+ <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-brackets}">
+ <xsl:variable name="bh" select="@brackets-highlightment"/>
+ <actionPerformed choose="brackets-highlightment">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ <option value="_(Filled)" key="Filled">
+ <xsl:if test="'Filled'=$bh">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ <option value="_(Framed)" key="Framed">
+ <xsl:if test="'Framed'=$bh">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ <option value="_(Underlined)" key="Underlined">
+ <xsl:if test="'Underlined'=$bh">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ </Select>
+ </Grid>
+
+ <Checkbox checked="{@highlight-keywords}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight corresponding keywords (e.g. if ... end))" gridx="1" gridy="4" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="highlight-keywords">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Grid gridx="1" gridy="5" gridwidth="3" ipadx="10">
+ <Label gridx="1" gridy="1" weightx="0" text="_(Color: )" enable="{@highlight-keywords}"/>
+ <Color color="{@keywords-color}" listener="ActionListener" gridx="2" gridy="1" weightx="0" enable="{@highlight-keywords}">
+ <actionPerformed choose="keywords-color">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Color>
+ <Panel gridx="3" gridy="1" weightx="1"/>
+ <Checkbox checked="{@keywords-onmouseover}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Highlight on mouse over)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west" enable="{@highlight-keywords}">
+ <actionPerformed choose="keywords-onmouseover">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ <Panel gridx="5" gridy="1" weightx="1"/>
+ <Label gridx="6" gridy="1" weightx="0" text="_(Style: )" enable="{@highlight-keywords}"/>
+ <Select gridx="7" gridy="1" listener="ActionListener" enable="{@highlight-keywords}">
+ <xsl:variable name="kh" select="@keywords-highlightment"/>
+ <actionPerformed choose="keywords-highlightment">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ <option value="_(Filled)" key="Filled">
+ <xsl:if test="'Filled'=$kh">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ <option value="_(Framed)" key="Framed">
+ <xsl:if test="'Framed'=$kh">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ </option>
+ </Select>
+ </Grid>
+ </Grid>
+ </Title>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Tabulation and Indentation)">
+ <Grid>
+ <Label text="_(Tabulation size: )" gridx="1" gridy="1" weightx="0"/>
+ <NumericalSpinner gridx="2"
+ gridy="1"
+ weightx="0"
+ min-value = "0"
+ increment = "1"
+ length = "3"
+ listener = "ActionListener"
+ value = "{@tab-size}">
+ <actionPerformed choose="tab-size">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </NumericalSpinner>
+
+ <Panel gridx="3" gridy="1" weightx="1"/>
+
+ <Checkbox checked="{@use-spaces}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Use space)" gridx="4" gridy="1" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="use-spaces">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <xsl:variable name="enable">
+ <xsl:choose>
+ <xsl:when test="@use-spaces='true'">
+ <xsl:text>false</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>true</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <Label text="_(Representation: )" gridx="1" gridy="2" weightx="0" enable="{$enable}"/>
+
+ <Radiobutton value="{@tab-representation}" expected-value="chevrons" listener="ActionListener" text="_(Chevrons)" gridx="2" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
+ <actionPerformed choose="tab-representation">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Radiobutton value="{@tab-representation}" expected-value="hrule" listener="ActionListener" text="_(Horizontal rule)" gridx="3" gridy="2" fill="none" weightx="0" anchor="center" enable="{$enable}">
+ <actionPerformed choose="tab-representation">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Radiobutton value="{@tab-representation}" expected-value="vrule" listener="ActionListener" text="_(Vertical rule)" gridx="4" gridy="2" fill="none" weightx="0" anchor="west" enable="{$enable}">
+ <actionPerformed choose="tab-representation">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Checkbox checked="{@automatic-indent}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable auto indentation)" gridx="1" gridy="3" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="automatic-indent">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Label gridy="4" text="_(Indent size: )" enable="{@automatic-indent}"/>
+
+ <NumericalSpinner gridx="2"
+ gridy="4"
+ weightx="0"
+ min-value = "0"
+ increment = "1"
+ length = "3"
+ enable="{@automatic-indent}"
+ listener = "ActionListener"
+ value = "{@indent-size}">
+ <actionPerformed choose="indent-size">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </NumericalSpinner>
+ </Grid>
+ </Title>
+ </xsl:template>
+
+
+
+ <xsl:template match="scinotes-autosave">
+ <Checkbox checked="{@enable}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Enable autosave in Scinotes)">
+ <actionPerformed choose="enable">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Save options)">
+ <Grid>
+ <Label gridx="1" gridy="1" weightx="0" anchor="west" text="_(Save every )" enable="{@enable}"/>
+ <NumericalSpinner gridx="2"
+ gridy="1"
+ weightx="0"
+ min-value = "1"
+ increment = "1"
+ length = "4"
+ listener = "ActionListener"
+ enable = "{@enable}"
+ value = "{@save-every}">
+ <actionPerformed choose="save-every">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </NumericalSpinner>
+
+ <Label gridx="3" gridy="1" weightx="0" anchor="west" text="_( minutes )" enable="{@enable}"/>
+
+ <Panel gridx="4" gridy="1" gridheight="1" fill="both"/>
+ </Grid>
+ </Title>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Close options)">
+ <Checkbox checked="{@automatic-delete}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Delete automatically saved files)" enable="{@enable}">
+
+ <actionPerformed choose="automatic-delete">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+ </Title>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Filename)">
+ <Grid>
+ <Radiobutton value="{@append-filename}" expected-value="true" listener="ActionListener" text="_(Append filename with: )" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{@enable}">
+ <actionPerformed choose="append-filename">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+ <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
+ <Entry gridx="3" gridy="1" weightx="1" anchor="above_baseline"
+ listener="EntryListener"
+ text="{@append-with}">
+ <xsl:attribute name="enable">
+ <xsl:if test="@enable='true' and @append-filename='true'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <entryChanged choose="append-with">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </Entry>
+ <Label gridx="3" gridy="2" text="_((%date can be used to be replaced by the current date))">
+ <xsl:attribute name="enable">
+ <xsl:if test="@enable='true' and @append-filename='true'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </Label>
+
+ <Radiobutton value="{@append-filename}" expected-value="false" listener="ActionListener" text="_(Replace extension with: )" gridx="1" gridy="3" fill="none" weightx="0" anchor="west" enable="{@enable}">
+ <actionPerformed choose="append-filename">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Entry gridx="3" gridy="3" weightx="1" anchor="above_baseline"
+ listener="EntryListener"
+ text="{@replace-with}">
+ <xsl:attribute name="enable">
+ <xsl:if test="@enable='true' and @append-filename='false'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <entryChanged choose="replace-with">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </Entry>
+ </Grid>
+ </Title>
+
+ <VSpace height="10"/>
+
+ <Title text="_(Location)">
+ <Grid>
+ <Radiobutton value="{@source-flag}" expected-value="true" listener="ActionListener" text="_(Source file directory)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west" enable="{@enable}">
+ <actionPerformed choose="source-flag">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Radiobutton value="{@source-flag}" expected-value="false" listener="ActionListener" text="_(Single directory)" gridx="1" gridy="2" fill="none" weightx="0" anchor="west" enable="{@enable}">
+ <actionPerformed choose="source-flag">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Radiobutton>
+
+ <Panel gridx="2" gridy="2" gridheight="1" fill="both"/>
+
+ <FileSelector gridx="3" gridy="2" href="{@single-directory}" mask="*"
+ desc="_(Choose an autosave directory)"
+ dir-selection = "true"
+ check-entry = "false"
+ listener="EntryListener">
+ <xsl:attribute name="enable">
+ <xsl:if test="@enable='true' and @source-flag='false'">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <entryChanged choose="single-directory">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </FileSelector>
+ </Grid>
+ </Title>
+ </xsl:template>
+
+ <xsl:template match="scinotes-header">
+ <Title text="_(Default header)">
+ <Grid>
+ <Checkbox checked="{@enable}" selected-value="true" unselected-value="false" listener="ActionListener" text="_(Add a default header to new file)" gridx="1" gridy="1" fill="none" weightx="0" anchor="west">
+ <actionPerformed choose="enable">
+ <xsl:call-template name="context"/>
+ </actionPerformed>
+ </Checkbox>
+
+ <Panel gridx="2" gridy="1" gridheight="1" fill="both"/>
+
+ <TextArea gridx="1" gridy="2" weightx="1" gridwidth="2" weighty="0" anchor="west"
+ editable="true"
+ rows="15"
+ scroll="true"
+ listener="EntryListener"
+ enable="{@enable}">
+ <xsl:attribute name="text">
+ <xsl:value-of select="string(child::node()[1])" disable-output-escaping="yes"/>
+ </xsl:attribute>
+ <entryChanged choose-child="1">
+ <xsl:call-template name="context"/>
+ </entryChanged>
+ </TextArea>
+ </Grid>
+ </Title>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/modules/scinotes/etc/keysConfiguration.xml b/modules/scinotes/etc/keysConfiguration.xml
new file mode 100755
index 000000000..ef190f8a7
--- /dev/null
+++ b/modules/scinotes/etc/keysConfiguration.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+ <comment>
+ Map between action and keys
+ If no path is given, org.scilab.modules.scinotes.actions will be chosen
+ </comment>
+
+ <entry key="ActivateHelpOnTypingForOpenersAction">OSSCKEY H</entry>
+ <entry key="ActivateHelpOnTypingForKeywordsAction">OSSCKEY shift H</entry>
+ <entry key="GenerateHelpFromFunctionAction">OSSCKEY shift G</entry>
+ <entry key="TabifyAction">TAB</entry>
+ <entry key="UnTabifyAction">shift TAB</entry>
+ <entry key="IndentAction">OSSCKEY I</entry>
+ <entry key="CommentAction">OSSCKEY D</entry>
+ <entry key="UnCommentAction">OSSCKEY shift D</entry>
+ <entry key="RemoveTrailingWhiteAction">OSSCKEY shift W</entry>
+ <entry key="SelectAllAction">OSSCKEY A</entry>
+ <entry key="SelectBlockAction">OSSCKEY B</entry>
+ <entry key="OpenTabInNewWindowAction">OSSCKEY shift T</entry>
+ <entry key="CCloseTabInNewWindowAction">OSSCKEY shift X</entry>
+
+ <entry key="CopyAsHTMLAction">OSSCKEY C</entry>
+ <entry key="CutAction">OSSCKEY X</entry>
+ <entry key="PasteAction">OSSCKEY V</entry>
+ <entry key="PasteColumnAction">OSSCKEY shift V</entry>
+ <entry key="RepeatSelectionOnColumnAction">OSSCKEY shift Z</entry>
+ <entry key="UndoAction">OSSCKEY Z</entry>
+ <entry key="RedoAction">OSSCKEY Y</entry>
+
+ <entry key="CopyAsHTMLWithLineNumberAction">OSSCKEY shift C</entry>
+
+ <entry key="NewAction">OSSCKEY N</entry>
+ <entry key="OpenAction">OSSCKEY O</entry>
+ <entry key="OpenURLAction">OSSCKEY U</entry>
+ <entry key="OpenSourceFileOnKeywordAction">OSSCKEY shift O</entry>
+ <entry key="SaveAction">OSSCKEY S</entry>
+ <entry key="SaveAsAction">OSSCKEY shift S</entry>
+ <entry key="ReloadAction">OSSCKEY shift R</entry>
+ <entry key="PrintPreviewAction">OSSCKEY shift P</entry>
+ <entry key="PrintAction">OSSCKEY P</entry>
+ <entry key="CloseAction">OSSCKEY W</entry>
+ <entry key="ExitAction">OSSCKEY Q</entry>
+
+ <entry key="ToLowerCaseAction">OSSCKEY J</entry>
+ <entry key="ToUpperCaseAction">OSSCKEY shift J</entry>
+ <entry key="CapitalizeAction">OSSCKEY shift A</entry>
+ <entry key="HelpOnKeywordAction">OSSCKEY F1</entry>
+
+ <entry key="LoadIntoScilabAction">OSSCKEY L</entry>
+ <entry key="ExecuteFileIntoScilabAction">OSSCKEY shift E</entry>
+ <entry key="EvaluateSelectionAction">OSSCKEY E</entry>
+ <entry key="SaveAndExecuteFileAction">F5</entry>
+ <entry key="SaveAndExecuteAllFilesAction">OSSCKEY F5</entry>
+
+ <entry key="FindAction">OSSCKEY F</entry>
+ <entry key="FindNextAction">OSSCKEY K</entry>
+ <entry key="FindPreviousAction">OSSCKEY shift K</entry>
+ <entry key="IncrementalSearchAction">F3</entry>
+ <entry key="SetAnchorAction">OSSCKEY M</entry>
+ <entry key="RemoveAnchorAction">OSSCKEY shift M</entry>
+ <entry key="GotoNextAnchorAction">OSSCKEY shift LESS</entry>
+ <entry key="GotoPreviousAnchorAction">OSSCKEY LESS</entry>
+ <entry key="CodeNavigatorAction">OSSCKEY G</entry>
+ <entry key="SearchWordInFilesAction">OSSCKEY shift F</entry>
+ <entry key="SearchFilesAction">OSSCKEY shift B</entry>
+
+ <entry key="SciNotesCompletionAction">OSSCKEY SPACE</entry>
+
+ <entry key="HelpAction">F1</entry>
+ <entry key="AboutAction">shift F1</entry>
+
+ <entry key="NextTabAction">OSSCKEY PAGE_DOWN</entry>
+ <entry key="PreviousTabAction">OSSCKEY PAGE_UP</entry>
+
+ <entry key="DeleteAction">DELETE</entry>
+
+ <entry key="NextParagraphAction">OSSCKEY DOWN</entry>
+ <entry key="PreviousParagraphAction">OSSCKEY UP</entry>
+</properties>
diff --git a/modules/scinotes/etc/scinotes.quit b/modules/scinotes/etc/scinotes.quit
new file mode 100755
index 000000000..3d86897a1
--- /dev/null
+++ b/modules/scinotes/etc/scinotes.quit
@@ -0,0 +1,8 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
diff --git a/modules/scinotes/etc/scinotes.start b/modules/scinotes/etc/scinotes.start
new file mode 100755
index 000000000..c0ba603d7
--- /dev/null
+++ b/modules/scinotes/etc/scinotes.start
@@ -0,0 +1,10 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009-2010 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+load(SCI+"/modules/scinotes/macros/lib");
diff --git a/modules/scinotes/etc/scinotesConfiguration.xml b/modules/scinotes/etc/scinotesConfiguration.xml
new file mode 100755
index 000000000..4ab8126a6
--- /dev/null
+++ b/modules/scinotes/etc/scinotesConfiguration.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - INRIA - Allan SIMON
+ * Copyright (C) 2010 - 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+
+<Setting version="0.42">
+
+ <!-- SCINOTES configuration -->
+ <Profile name="scinotes">
+
+ <!-- colors to use in the left panel to indicate you're a in a function (color1)
+ or in a inner function (color2) (only available in whereami mode)-->
+ <AlternColors color1="#f6bff6" color2="#f665f6"/>
+
+ <!-- Restore the open files from the last session -->
+ <RestoreFiles value="true"/>
+
+ <!-- Paper format Section
+ The default unit is the postscript point (1/72 inch) -->
+ <PaperFormat MarginBottom="58.0" MarginLeft="57.0" MarginRight="57.0" MarginTop="57.0" height="794.0" width="613.0"/>
+
+ <!-- Favorite Directories Section -->
+ <favoriteDirectories>
+ </favoriteDirectories>
+
+ <!-- Recent Opened Files Section -->
+ <recentFiles>
+ </recentFiles>
+
+ <!-- Currently Open Files Section -->
+ <openFiles>
+ </openFiles>
+ </Profile>
+</Setting>
diff --git a/modules/scinotes/etc/scinotesGUIConfiguration.xml b/modules/scinotes/etc/scinotesGUIConfiguration.xml
new file mode 100755
index 000000000..a3341143b
--- /dev/null
+++ b/modules/scinotes/etc/scinotesGUIConfiguration.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<Configuration>
+
+ <MenuBar>
+ <menu label="File" mnemonic="F">
+ <menuitem action="scinotes-new" label="New"/>
+ <menuitem action="scinotes-open" label="Open"/>
+ <menuitem action="scinotes-recent" label="Open recent"/>
+ <separator/>
+ <menuitem action="scinotes-register-favorite-dir" label="Working directories;Add a directory;Remove last directory"/>
+ <menuitem action="scinotes-open-file-in" label="Open file in ..."/>
+ <menuitem action="scinotes-save-file-in" label="Save file in ..."/>
+ <separator/>
+ <menuitem action="scinotes-reload" label="Reload"/>
+ <menuitem action="scinotes-restore-startup" label="Restore opened files on start-up"/>
+ <menuitem action="scinotes-open-source" label="Open function source file"/>
+ <menuitem action="scinotes-open-url" label="Open URL"/>
+ <separator/>
+ <menuitem action="scinotes-save" label="Save"/>
+ <menuitem action="scinotes-save-as" label="Save as"/>
+ <menuitem action="scinotes-save-all" label="Save All"/>
+ <menuitem action="scinotes-overwrite" label="Overwrite"/>
+ <separator/>
+ <menuitem action="scinotes-export" label="Export"/>
+ <separator/>
+ <menuitem action="scinotes-page-setup" label="Page Setup"/>
+ <menuitem action="scinotes-print-preview" label="Print Preview"/>
+ <menuitem action="scinotes-print" label="Print"/>
+ <separator/>
+ <menuitem action="scinotes-close" label="Close"/>
+ <menuitem action="scinotes-close-all" label="Close All"/>
+ <menuitem action="scinotes-close-all-but" label="Close All But This"/>
+ <separator/>
+ <menuitem action="scinotes-exit" label="Exit Scinotes"/>
+ </menu>
+
+ <menu label="Edit" mnemonic="E">
+ <menuitem action="scinotes-undo" label="Undo"/>
+ <menuitem action="scinotes-redo" label="Redo"/>
+ <separator/>
+ <menuitem action="scinotes-cut" label="Cut"/>
+ <menuitem action="scinotes-copy" label="Copy"/>
+ <menuitem action="scinotes-copy-with-lines" label="Copy as HTML with line number"/>
+ <menuitem action="scinotes-paste" label="Paste"/>
+ <menuitem action="scinotes-delete" label="Delete"/>
+ <separator/>
+ <menu label="Columns actions">
+ <menuitem action="scinotes-paste-column" label="Paste Column"/>
+ <menuitem action="scinotes-repeat-column" label="Repeat on the Column"/>
+ </menu>
+ <separator/>
+ <menuitem action="scinotes-select-all" label="Select All"/>
+ <menuitem action="scinotes-select-block" label="Select current block"/>
+ <separator/>
+ <menu label="Search" mnemonic="H">
+ <menuitem action="scinotes-find" label="Find/Replace"/>
+ <menuitem action="scinotes-find-next" label="Find Next"/>
+ <menuitem action="scinotes-find-previous" label="Find Previous"/>
+ <menuitem action="scinotes-incremental-search" label="Incremental Search"/>
+ <separator/>
+ <menuitem action="scinotes-search-files" label="Find files"/>
+ <menuitem action="scinotes-word-file" label="Find word in files"/>
+ <separator/>
+ <menuitem action="scinotes-set-anchor" label="Set anchor"/>
+ <menuitem action="scinotes-next-anchor" label="Go to next anchor"/>
+ <menuitem action="scinotes-previous-anchor" label="Go to previous anchor"/>
+ <menuitem action="scinotes-remove-anchor" label="Remove anchor"/>
+ <separator/>
+ <menuitem action="scinotes-code-navigator" label="Code Navigator"/>
+ </menu>
+
+ </menu>
+
+ <menu label="Format" mnemonic="P">
+ <menuitem action="scinotes-tabify" label="Shift Right"/>
+ <menuitem action="scinotes-untabify" label="Shift Left"/>
+ <separator/>
+ <menuitem action="scinotes-indent" label="Correct Indentation"/>
+ <menuitem action="scinotes-remove-whites" label="Remove trailing spaces"/>
+ <menuitem action="scinotes-help-prototype" label="Generate comments for help_from_sci"/>
+ <separator/>
+ <menuitem action="scinotes-comment" label="Comment Selection"/>
+ <menuitem action="scinotes-uncomment" label="Uncomment Selection"/>
+ <separator/>
+ <menu label="Change the case">
+ <menuitem action="scinotes-tolowercase" label="Make Selection Lowercase"/>
+ <menuitem action="scinotes-touppercase" label="Make Selection Uppercase"/>
+ <menuitem action="scinotes-capitalize" label="Capitalize Selection;Capitalize character"/>
+ </menu>
+ <separator/>
+ <menuitem action="scinotes-double-quote" label="Single to double quote strings"/>
+ </menu>
+
+ <menu label="Options">
+ <menuitem action="scinotes-encoding" label="Current file encoding"/>
+ <menuitem action="scinotes-eof" label="Line Endings"/>
+ <separator/>
+ <menu label="Preferences">
+ <menuitem action="scinotes-set-font" label="Set font"/>
+ <menuitem action="scinotes-set-colors" label="Set colors"/>
+ <menuitem action="scinotes-general-settings" label="Scinotes General settings"/>
+ </menu>
+ <separator/>
+ <menu label="Auto-completion on">
+ <menuitem action="scinotes-autocomplete-openers" label="(, [, ..."/>
+ <menuitem action="scinotes-autocomplete-keyword" label="if, function, ..."/>
+ </menu>
+ <menuitem action="scinotes-line-numbering" label="Line numbering;Off;Normal;Local numbering"/>
+ <!--menuitem action="HighlightCurrentLineAction" label="Highlight current line"/>
+ <menuitem action="AutoIndentAction" label="Enable Auto Reformat"/>
+ <separator/>
+ <menuitem action="SuppressCommentsAction" label="Suppress comments when executing selection"/-->
+ </menu>
+
+ <menu label="Window" mnemonic="N">
+ <menuitem action="scinotes-clone-current" label="Copy tab in new window"/>
+ <menuitem action="scinotes-export-current" label="Detach tab in new window"/>
+ <separator/>
+ <menuitem action="scinotes-selection-new-tab" label="Copy selection in a new tab"/>
+ <separator/>
+ <menuitem action="scinotes-split" label="Split View;Off;Split in two columns;Split in two rows"/>
+ </menu>
+
+ <menu label="Execute" mnemonic="X">
+ <menuitem action="scinotes-execute-scilab" label="... file with no echo"/>
+ <menuitem action="scinotes-load-scilab" label="... file with echo"/>
+ <menuitem action="scinotes-evaluate-selection" label="... the selection with echo;... until the caret, with echo"/>
+ <separator/>
+ <menuitem action="scinotes-save-execute" label="Save and execute"/>
+ <menuitem action="scinotes-save-execute-all" label="Save and execute all files"/>
+ </menu>
+
+ <menu label="?">
+ <menuitem action="scinotes-help" label="Scinotes help"/>
+ <menuitem action="scinotes-help-keyword" label="Help on ;Help on selection"/>
+ <menuitem action="scinotes-about" label="About"/>
+ </menu>
+ </MenuBar>
+
+ <RightClickMenu>
+ <menuitem action="scinotes-evaluate-selection" label="Evaluate Selection with echo;Evaluate until the caret, with echo"/>
+ <separator/>
+ <menuitem action="scinotes-help-keyword-popup" label="Help on ;Help on selection"/>
+ <separator/>
+ <menuitem action="scinotes-selection-new-tab" label="Copy selection in a new tab"/>
+ <menuitem action="scinotes-completion" label="Complete"/>
+ <separator/>
+ <menuitem action="scinotes-select-all" label="Select All"/>
+ <menuitem action="scinotes-select-block" label="Select current block"/>
+ <menuitem action="scinotes-copy" label="Copy"/>
+ <menuitem action="scinotes-cut" label="Cut"/>
+ <menuitem action="scinotes-paste" label="Paste"/>
+ <menuitem action="scinotes-paste-column" label="Paste Column"/>
+ <separator/>
+ <menuitem action="scinotes-indent" label="Correct Indentation"/>
+
+ <separator/>
+ <menuitem action="scinotes-copy-with-lines" label="Copy as HTML with line number"/>
+ <separator/>
+ <menuitem action="scinotes-open-source" label="Open function source file"/>
+ <menuitem action="scinotes-open-url" label="Open URL"/>
+ </RightClickMenu>
+
+ <ToolBar>
+ <button action="scinotes-new" tooltip="New" icon="document-new"/>
+ <button action="scinotes-open" tooltip="Open" icon="document-open"/>
+
+ <!-- The second token of the button OpenFileInAction is the full path of the directory
+ where to open files.
+ The shortcuts SCI or MODULES can be used (not in path but alone) -->
+ <button action="scinotes-open-file-in" tooltip="Open in ;MODULES" icon="document-open-sci"/>
+
+ <separator/>
+ <button action="scinotes-save" tooltip="Save" icon="media-floppy"/>
+ <button action="scinotes-save-as" tooltip="Save as" icon="document-save-as"/>
+ <separator/>
+ <button action="scinotes-print" tooltip="Print" icon="document-print"/>
+ <separator/>
+ <button action="scinotes-undo" tooltip="Undo" icon="edit-undo"/>
+ <button action="scinotes-redo" tooltip="Redo" icon="edit-redo"/>
+ <separator/>
+ <button action="scinotes-cut" tooltip="Cut" icon="edit-cut"/>
+ <button action="scinotes-copy" tooltip="Copy" icon="edit-copy"/>
+ <button action="scinotes-paste" tooltip="Paste" icon="edit-paste"/>
+ <separator/>
+ <button action="scinotes-find" tooltip="Find/Replace" icon="edit-find-replace"/>
+ <button action="scinotes-incremental-search" tooltip="Incremental Search" icon="go-bottom"/>
+ <button action="scinotes-code-navigator" tooltip="Code Navigator" icon="code-navigator"/>
+ <separator/>
+ <button action="scinotes-execute-scilab" tooltip="Execute" icon="media-playback-start"/>
+ <button action="scinotes-save-execute" tooltip="Save and execute" icon="save-and-execute"/>
+ <button action="scinotes-save-execute-all" tooltip="Save and execute all" icon="execute-all"/>
+ <separator/>
+ <button action="scinotes-general-settings" tooltip="Scinotes General settings" icon="preferences-system"/>
+ <separator/>
+ <button action="scinotes-help" tooltip="Scinotes help" icon="help-browser"/>
+ </ToolBar>
+
+</Configuration>
diff --git a/modules/scinotes/help/en_US/addchapter.sce b/modules/scinotes/help/en_US/addchapter.sce
new file mode 100755
index 000000000..a5372d257
--- /dev/null
+++ b/modules/scinotes/help/en_US/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Text editor (Scinotes)",SCI+"/modules/scinotes/help/en_US",%T);
+
diff --git a/modules/scinotes/help/en_US/edit_error.xml b/modules/scinotes/help/en_US/edit_error.xml
new file mode 100755
index 000000000..2778f424b
--- /dev/null
+++ b/modules/scinotes/help/en_US/edit_error.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="edit_error">
+ <refnamediv>
+ <refname>edit_error</refname>
+ <refpurpose>opens in scilab editor the source of the last recorded error</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>answ = edit_error(clearerror)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>clearerror</term>
+ <listitem>
+ <para>boolean - if true the error condition is cleared, if false it is kept (as in
+ <link linkend="lasterror">lasterror</link>)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>answ</term>
+ <listitem>
+ <para>a string stating which source file is open (or why no file was open)
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>
+ This function opens in scilab editor the source of the function which caused the last recorded
+ error.
+ </para>
+ <!-- , and highlights the offending line -->
+ <para>
+ This function works only for functions which are defined in libraries, i.e.
+ not for internal functions, nor with functions defined online, nor loaded with
+ individual <link linkend="exec">exec</link> or <link linkend="getd">getd</link>. This is since Scilab presently
+ retains only the path to libraries and not to individual function sources.
+ </para>
+ <para>
+ Correspondance between the function name foo and function filename foo.sci
+ is tacitly assumed.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+acosh abc
+edit_error
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="lasterror">lasterror</link>
+ </member>
+ <member>
+ <link linkend="errclear">errclear</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/scinotes/help/en_US/editor.xml b/modules/scinotes/help/en_US/editor.xml
new file mode 100755
index 000000000..2ee1d6484
--- /dev/null
+++ b/modules/scinotes/help/en_US/editor.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="editor" xml:lang="en">
+ <refnamediv>
+ <refname>editor</refname>
+ <refpurpose>Call the text editor as defined in the preferences</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>
+ editor(...)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+ <para>
+ An external text editor can be used with Scilab. This has to be configured in the <link linkend="preferences">preferences</link> menu.
+ </para>
+ <para>By default, Scinotes is the preferred editor.
+ </para>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+// editor without parameters
+editor();
+
+// editor with a file name
+editor('SCI/modules/time/macros/datenum.sci');
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="scinotes">scinotes</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/scinotes/help/en_US/scinotes.xml b/modules/scinotes/help/en_US/scinotes.xml
new file mode 100755
index 000000000..2357e6016
--- /dev/null
+++ b/modules/scinotes/help/en_US/scinotes.xml
@@ -0,0 +1,586 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="scinotes" xml:lang="en">
+ <refnamediv>
+ <refname>scinotes</refname>
+ <refpurpose>Scinotes: Embedded Scilab text editor</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>
+ scinotes()
+ scinotes(file)
+ scinotes([file1, file2])
+ scinotes(file, line_number)
+ scinotes(file, line_number, macro_name)
+ scinotes([file1, file2], [line_number1, line_number2])
+ scinotes(file, 'readonly')
+ scinotes(file, ['indent','trailing','quote'])
+ scinotes([file1, file2], 'readonly')
+ scinotes([file1, file2], ['indent','trailing','quote'])
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Arguments</title>
+ <variablelist>
+ <varlistentry>
+ <term>file</term>
+ <listitem>
+ <para>a string, the file to be opened.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>[file1, file2]</term>
+ <listitem>
+ <para>a matrix of string, files to be opened.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>line_number</term>
+ <listitem>
+ <para>An integer, the number of the line to be highlighted at the
+ opening of the file.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>macro_name</term>
+ <listitem>
+ <para>a string, the line number would be relative to the definition of the function macro_name</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>[line_number1, line_number2]</term>
+ <listitem>
+ <para>a matrix of integer, each opened file will have its corresponding
+ line highlighted.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Description</title>
+ <para>
+ <literal>Scinotes</literal> is an embedded Scilab text editor.
+ </para>
+ <para>It can be started with a fresh text buffer pressing the "Editor"
+ button on top of the main Scilab window, or from Scilab command line with
+ the instruction <literal>editor()</literal>, or it can open specific files
+ if invoked with any of the calling sequences above (whithout any
+ parameters, it opens editor with a blank file).
+ </para>
+ <para>The same invocation adds further files to an already opened
+ Editor.
+ </para>
+ <para>With the option 'readonly', files are opened in read-only mode so
+ they cannot be modified.
+ </para>
+
+ <para>With the options 'indent', 'quote' or 'trailing', the editor will not be opened and the file(s) will be treated consequently to the actions. The actions are the following:
+ <itemizedlist>
+ <listitem>
+ <para>
+ The action 'indent' will indent correctly the file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The action 'trailing' will remove the trailing white spaces.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The action 'quote' will replace all simple quoted strings by double quoted ones.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ One or several actions can be used at the same time, e.g. 'trailing' or ['indent','quote'].
+ </para>
+
+ <para>Keyboard shortcuts are defined for most possible editing actions and
+ reported by the menu entries.
+ </para>
+ <para/>
+ <para>Scinotes can be started in the following ways :</para>
+ <itemizedlist>
+ <listitem>
+ <para>By the menu Applications. Choose Applications =&gt;
+ Editor
+ </para>
+ </listitem>
+ <listitem>
+ <para>From the command line:</para>
+ <itemizedlist>
+ <listitem>
+ <para>scinotes()</para>
+ </listitem>
+ <listitem>
+ <para>scinotes(file)</para>
+ </listitem>
+ <listitem>
+ <para>scinotes([file1, file2])</para>
+ </listitem>
+ <listitem>
+ <para>scinotes(file, line_number)</para>
+ </listitem>
+ <listitem>
+ <para>scinotes([file1, file2], [line_number1, line_number2])</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Menus and Shortcuts</title>
+ <itemizedlist>
+ <listitem>
+ <para>Menu File</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>New...</td>
+ <td>&lt;CTRL-N&gt;</td>
+ <td>
+ <para>Open a new file</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Open...</td>
+ <td>&lt;CTRL-O&gt;</td>
+ <td>
+ <para>Open an existing file</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Recent Files</td>
+ <td/>
+ <td>
+ <para>Display files recently opened</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Save</td>
+ <td>&lt;CTRL-S&gt;</td>
+ <td>
+ <para>Save a file</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Save as...</td>
+ <td>&lt;CTRL-MAJ-S&gt;</td>
+ <td>
+ <para>Save a file as</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Page Setup</td>
+ <td/>
+ <td>
+ <para>Setup page for printing</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Print Preview</td>
+ <td>&lt;CTRL-MAJ-P&gt;</td>
+ <td>
+ <para>Open a print preview window</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Print...</td>
+ <td>&lt;CTRL-P&gt;</td>
+ <td>
+ <para>Print a file</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Close</td>
+ <td>&lt;CTRL-W&gt;</td>
+ <td>
+ <para>Close a file</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Quit</td>
+ <td>&lt;CTRL-Q&gt;</td>
+ <td>
+ <para>Close Editor</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>Menu Edit</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Undo</td>
+ <td>&lt;CTRL-Z&gt;</td>
+ <td>
+ <para>Undo action</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Redo</td>
+ <td>&lt;CTRL-Y&gt;</td>
+ <td>
+ <para>Redo action</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Cut</td>
+ <td>&lt;CTRL-X&gt;</td>
+ <td>
+ <para>Cut the selection</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Copy</td>
+ <td>&lt;CTRL-C&gt;</td>
+ <td>
+ <para>Copy the selection</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Paste</td>
+ <td>&lt;CTRL-V&gt;</td>
+ <td>
+ <para>Paste the selection</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Select All</td>
+ <td>&lt;CTRL-A&gt;</td>
+ <td>
+ <para>Select the entire document</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Delete</td>
+ <td/>
+ <td>
+ <para>Delete the selection</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Comment Selection</td>
+ <td>&lt;CTRL-D&gt;</td>
+ <td>
+ <para>Comment selected lines</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Uncomment Selection</td>
+ <td>&lt;CTRL-MAJ-D&gt;</td>
+ <td>
+ <para>Uncomment selected lines</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Tabify Selection</td>
+ <td>&lt;TAB&gt;</td>
+ <td>
+ <para>Tabify selected lines</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Untabify Selection</td>
+ <td>&lt;MAJ-TAB&gt;</td>
+ <td>
+ <para>Untabify selected lines</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Indent</td>
+ <td>&lt;CTRL-I&gt;</td>
+ <td>
+ <para>Indent selected lines</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>Menu Search</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Find/Replace</td>
+ <td>&lt;CTRL-F&gt;</td>
+ <td>
+ <para>Find and/or Replace an element</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Goto line</td>
+ <td>&lt;CTRL-G&gt;</td>
+ <td>
+ <para>Goto line</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>Menu View</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Show/Hide Toolbar</td>
+ <td/>
+ <td>
+ <para>Option to show or hide the toolbar</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Highlight current line</td>
+ <td>&lt;CTRL-J&gt;</td>
+ <td>
+ <para>Highlight the current line</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Line Numbers</td>
+ <td>&lt;CTRL-B&gt;</td>
+ <td>
+ <para>Display document's line numbers</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Set Colors...</td>
+ <td/>
+ <td>
+ <para>Color settings for documents</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Set Fonts...</td>
+ <td/>
+ <td>
+ <para>Font settings for documents</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Reset default font</td>
+ <td/>
+ <td>
+ <para>Reset default font settings for documents</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>Menu Document</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Syntax Type</td>
+ <td/>
+ <td>
+ <para>Syntax type settings (default type is Scilab)</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Encoding</td>
+ <td/>
+ <td>
+ <para>Encoding settings (default type is UTF-8
+ Encoding)
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>Colorize</td>
+ <td/>
+ <td>
+ <para>Colorize the document</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Auto Indent</td>
+ <td/>
+ <td>
+ <para>Activate the automatic indentation</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>Menu Execute</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>Command</para>
+ </td>
+ <td>
+ <para>Shortcut</para>
+ </td>
+ <td>
+ <para>Description</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Load Into Scilab</td>
+ <td>&lt;CTRL-L&gt;</td>
+ <td>
+ <para>Load the entire document into the Scilab console</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Evaluate Selection</td>
+ <td/>
+ <td>
+ <para>Load the selection into the Scilab console</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Execute Into Scilab</td>
+ <td>&lt;CTRL-E&gt;</td>
+ <td>
+ <para>If the file exist, execute the content of the file</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>Remarks</title>
+ <variablelist>
+ <varlistentry>
+ <term>Document :</term>
+ <listitem>
+ <para>The default text colorization is the Scilab's syntax
+ colorization.
+ </para>
+ <para>
+ The <literal>auto-indent</literal> mode indent a line
+ according to Scilab's syntax (after a return action).
+ </para>
+ <para/>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+// editor without parameters
+scinotes();
+
+// editor with a file name
+scinotes('SCI/modules/time/macros/datenum.sci');
+
+// editor with a matrix of files name
+scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci']);
+
+// editor with a file name and the line number to highlight
+scinotes('SCI/modules/time/macros/datenum.sci', 5);
+
+// editor with a file name and the line number to highlight
+scinotes('SCI/modules/time/macros/datenum.sci', 8, 'datenum');
+
+// editor with a matrix of files name and the corresponding matrix of lines to highlight
+// the files name matrix and the lines to highlight matrix should have the same size
+scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci'], [5,10]);
+ ]]></programlisting>
+ Indent some Scilab code
+ <programlisting role="example"><![CDATA[
+
+
+f=TMPDIR + "/file_to_correct.sci";
+mputl(["a=''abcdef'' ";
+ "if a==1";
+ " b=1+""abcdef'' ";
+ " c=2";
+ " d=3 ";
+ " if ";
+ "a=''abcdef""""""";
+ " end";
+ " end "], f);
+
+scinotes(f, ["indent" "trailing" "quote"]);
+
+// Show the results
+mgetl(f)
+
+ ]]></programlisting>
+ </refsection>
+ <refsection>
+ <title>History</title>
+ <revhistory>
+ <revision>
+ <revnumber>5.4.1</revnumber>
+ <revremark>['indent','trailing','quote'] options added.</revremark>
+ </revision>
+ </revhistory>
+ </refsection>
+
+</refentry>
diff --git a/modules/scinotes/help/fr_FR/addchapter.sce b/modules/scinotes/help/fr_FR/addchapter.sce
new file mode 100755
index 000000000..8a4b7351e
--- /dev/null
+++ b/modules/scinotes/help/fr_FR/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Editeur de texte (Scinotes)",SCI+"/modules/scinotes/help/fr_FR",%T);
+
diff --git a/modules/scinotes/help/ja_JP/addchapter.sce b/modules/scinotes/help/ja_JP/addchapter.sce
new file mode 100755
index 000000000..f95e1d866
--- /dev/null
+++ b/modules/scinotes/help/ja_JP/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("scilab editor",SCI+"/modules/scinotes/help/ja_JP",%T);
+
diff --git a/modules/scinotes/help/ja_JP/edit_error.xml b/modules/scinotes/help/ja_JP/edit_error.xml
new file mode 100755
index 000000000..cf20bd9e4
--- /dev/null
+++ b/modules/scinotes/help/ja_JP/edit_error.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="edit_error">
+ <refnamediv>
+ <refname>edit_error</refname>
+ <refpurpose>直近に記録されたエラーのソースをscilabエディタで開く</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>呼び出し手順</title>
+ <synopsis>answ = edit_error(clearerror)</synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>引数</title>
+ <variablelist>
+ <varlistentry>
+ <term>clearerror</term>
+ <listitem>
+ <para>論理値 - エラー条件がクリアされた場合は true,
+ エラー条件が維持された場合はfalse
+ (<link linkend="lasterror">lasterror</link>と同様)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>answ</term>
+ <listitem>
+ <para>
+ どのソースファイルが開かれているか(またはなぜファイルが開かれていないか)
+ を示す文字列
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>説明</title>
+ <para>
+ この関数は直近に記録されたエラーを発生した関数のソースをscilabエディタで開きます.
+ </para>
+ <!-- , and highlights the offending line -->
+ <para>
+ この関数はライブラリで定義された関数でのみ動作します.
+ よって,内部関数,オンラインで定義された関数,
+ <link linkend="exec">exec</link> または <link linkend="getd">getd</link>で個別に
+ 読み込まれた関数では動作しません.
+ これは,Scilabは現在ライブラリのパスのみを保持し,個別の関数ソースへのパスを
+ 保持していないためです.
+ </para>
+ <para>
+ 関数名fooと関数ファイル名foo.sciが一致することが仮定されます.
+ </para>
+ </refsection>
+ <refsection>
+ <title>例</title>
+ <programlisting role="example"><![CDATA[
+acosh abc
+edit_error
+ ]]></programlisting>
+ </refsection>
+ <refsection role="see also">
+ <title>参照</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="lasterror">lasterror</link>
+ </member>
+ <member>
+ <link linkend="errclear">errclear</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/scinotes/help/ja_JP/editor.xml b/modules/scinotes/help/ja_JP/editor.xml
new file mode 100755
index 000000000..2cdb5bdff
--- /dev/null
+++ b/modules/scinotes/help/ja_JP/editor.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="editor" xml:lang="ja">
+ <refnamediv>
+ <refname>editor</refname>
+ <refpurpose>設定で定義されたテキストエディタをコールする</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>呼び出し手順</title>
+ <synopsis>
+ editor(...)
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>説明</title>
+ <para>
+ Scilabで使用できる外部テキストエディタ.
+ </para>
+ </refsection>
+ <refsection role="see also">
+ <title>参照</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="scinotes">scinotes</link>
+ </member>
+ </simplelist>
+ </refsection>
+</refentry>
diff --git a/modules/scinotes/help/ja_JP/scinotes.xml b/modules/scinotes/help/ja_JP/scinotes.xml
new file mode 100755
index 000000000..2e39432d6
--- /dev/null
+++ b/modules/scinotes/help/ja_JP/scinotes.xml
@@ -0,0 +1,575 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="scinotes" xml:lang="ja">
+ <refnamediv>
+ <refname>scinotes</refname>
+ <refpurpose>Scinotes: Scilab組込みテキストエディタ</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <title>呼び出し手順</title>
+ <synopsis>
+ scinotes()
+ scinotes(file)
+ scinotes([file1, file2])
+ scinotes(file, line_number)
+ scinotes(file, line_number, macro_name)
+ scinotes([file1, file2], [line_number1, line_number2])
+ scinotes(file, 'readonly')
+ scinotes(file, ['indent','trailing','quote'])
+ scinotes([file1, file2], 'readonly')
+ scinotes([file1, file2], ['indent','trailing','quote'])
+ </synopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>引数</title>
+ <variablelist>
+ <varlistentry>
+ <term>file</term>
+ <listitem>
+ <para>文字列, 開こうとするファイル.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>[file1, file2]</term>
+ <listitem>
+ <para>文字列の行列, 開こうとするファイル.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>line_number</term>
+ <listitem>
+ <para>整数, ファイルを開く際にハイライト表示する行の番号.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>macro_name</term>
+ <listitem>
+ <para>文字列, 関数 macro_nameの定義位置に相対的な行番号</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <varlistentry>
+ <term>[line_number1, line_number2]</term>
+ <listitem>
+ <para>整数の行列, 各開かれたファイルでハイライト表示される行.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>説明</title>
+ <para>
+ <literal>Scinotes</literal> は,組込みScilabテキストエディタです.
+ </para>
+ <para>
+ Scilabメインウィンドウの最上部の"Editor"ボタンを押すか,
+ Scilabコマンドラインで<literal>editor()</literal>を入力する
+ ことにより,新規テキストバッファを開始することができます.
+ 上記以外の呼び出し手順で起動された場合,特定のファイルを開くことができます
+ (パラメータを指定しない場合,空のファイルをエディタで開きます).
+ </para>
+ <para>
+ 重ねて起動すると,既に開かれたエディタにファイルが追加されます.
+ </para>
+ <para>
+ オプション'readonly'を指定すると, ファイルは読込モードで開かれ,修正できません.
+ </para>
+ <para>
+ オプション 'indent', 'quote' または 'trailing'を指定すると,
+ エディタはオープンせずに,ファイルが指定した処理を行います.
+ 以下の処理が定義されています:
+ <itemizedlist>
+ <listitem>
+ <para>
+ 'indent'処理はファイルを正しくインデントします.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 'trailing'処理は末尾の空白文字を削除します.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 'quote'処理はシングルクォートで括られた文字列を全てダブルクオートで置換します.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ 1つまたは複数の処理を同時に行うことができます.
+ 例: 'trailing' または ['indent','quote'].
+ </para>
+ <para>
+ ほとんど全ての編集動作についてキーボードショートカットが定義されており,
+ メニューのエントリで知ることができます.
+ </para>
+ <para/>
+ <para>Scinotes は以下のどれかの方法で起動できます :</para>
+ <itemizedlist>
+ <listitem>
+ <para>アプリケーションメニューから. アプリケーション =&gt;
+ Editor を選択してください.
+ </para>
+ </listitem>
+ <listitem>
+ <para>コマンドラインから:</para>
+ <itemizedlist>
+ <listitem>
+ <para>scinotes()</para>
+ </listitem>
+ <listitem>
+ <para>scinotes(file)</para>
+ </listitem>
+ <listitem>
+ <para>scinotes([file1, file2])</para>
+ </listitem>
+ <listitem>
+ <para>scinotes(file, line_number)</para>
+ </listitem>
+ <listitem>
+ <para>scinotes([file1, file2], [line_number1, line_number2])</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>メニューとショートカット</title>
+ <itemizedlist>
+ <listitem>
+ <para>メニューファイル</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>新規...</td>
+ <td>&lt;CTRL-N&gt;</td>
+ <td>
+ <para>ファイルを新たに開く</para>
+ </td>
+ </tr>
+ <tr>
+ <td>開く...</td>
+ <td>&lt;CTRL-O&gt;</td>
+ <td>
+ <para>既存のファイルを開く</para>
+ </td>
+ </tr>
+ <tr>
+ <td>最近のファイル</td>
+ <td/>
+ <td>
+ <para>最近開かれたファイルを表示</para>
+ </td>
+ </tr>
+ <tr>
+ <td>保存</td>
+ <td>&lt;CTRL-S&gt;</td>
+ <td>
+ <para>ファイルを保存する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>名前を指定して保存...</td>
+ <td>&lt;CTRL-MAJ-S&gt;</td>
+ <td>
+ <para>名前を指定してファイルを保存する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>ページ設定</td>
+ <td/>
+ <td>
+ <para>印刷用にページを設定する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>印刷プレビュー</td>
+ <td>&lt;CTRL-MAJ-P&gt;</td>
+ <td>
+ <para>プレビューウィンドウを開く</para>
+ </td>
+ </tr>
+ <tr>
+ <td>印刷...</td>
+ <td>&lt;CTRL-P&gt;</td>
+ <td>
+ <para>ファイルを印刷する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>閉じる</td>
+ <td>&lt;CTRL-W&gt;</td>
+ <td>
+ <para>ファイルを閉じる</para>
+ </td>
+ </tr>
+ <tr>
+ <td>終了</td>
+ <td>&lt;CTRL-Q&gt;</td>
+ <td>
+ <para>エディタを終了する</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>編集メニュー</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>取り消す</td>
+ <td>&lt;CTRL-Z&gt;</td>
+ <td>
+ <para>操作を取り消す</para>
+ </td>
+ </tr>
+ <tr>
+ <td>やり直す</td>
+ <td>&lt;CTRL-Y&gt;</td>
+ <td>
+ <para>操作をやり直す</para>
+ </td>
+ </tr>
+ <tr>
+ <td>切り取る</td>
+ <td>&lt;CTRL-X&gt;</td>
+ <td>
+ <para>選択部を切り取る</para>
+ </td>
+ </tr>
+ <tr>
+ <td>コピー</td>
+ <td>&lt;CTRL-C&gt;</td>
+ <td>
+ <para>選択部をコピーする</para>
+ </td>
+ </tr>
+ <tr>
+ <td>貼付け</td>
+ <td>&lt;CTRL-V&gt;</td>
+ <td>
+ <para>選択部を貼り付ける</para>
+ </td>
+ </tr>
+ <tr>
+ <td>全て選択</td>
+ <td>&lt;CTRL-A&gt;</td>
+ <td>
+ <para>文書全体を選択する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>削除</td>
+ <td/>
+ <td>
+ <para>選択部を削除する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>選択部をコメントアウトする</td>
+ <td>&lt;CTRL-D&gt;</td>
+ <td>
+ <para>選択された行をコメントアウトする</para>
+ </td>
+ </tr>
+ <tr>
+ <td>選択部をコメントから外す</td>
+ <td>&lt;CTRL-MAJ-D&gt;</td>
+ <td>
+ <para>選択された行をコメントから外す</para>
+ </td>
+ </tr>
+ <tr>
+ <td>選択部の空白をタブに変換</td>
+ <td>&lt;TAB&gt;</td>
+ <td>
+ <para>選択された行の空白をタブに変換する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>選択部のタブ変換を解除する</td>
+ <td>&lt;MAJ-TAB&gt;</td>
+ <td>
+ <para>選択された行のタブ変換を解除する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>インデント</td>
+ <td>&lt;CTRL-I&gt;</td>
+ <td>
+ <para>選択された行をインデントする</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>検索メニュー</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>検索/置換</td>
+ <td>&lt;CTRL-F&gt;</td>
+ <td>
+ <para>要素を検索または置換する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>指定行に移動</td>
+ <td>&lt;CTRL-G&gt;</td>
+ <td>
+ <para>指定行に移動する</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>表示メニュー</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>ツールバーを表示/隠す</td>
+ <td/>
+ <td>
+ <para>ツールバーを表示または隠すオプション</para>
+ </td>
+ </tr>
+ <tr>
+ <td>カレント行をハイライト表示</td>
+ <td>&lt;CTRL-J&gt;</td>
+ <td>
+ <para>カレント行をハイライト表示する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>行番号</td>
+ <td>&lt;CTRL-B&gt;</td>
+ <td>
+ <para>文書の行番号を表示する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>色を指定...</td>
+ <td/>
+ <td>
+ <para>文書の色を指定する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>フォントを指定...</td>
+ <td/>
+ <td>
+ <para>文書のフォントを設定する</para>
+ </td>
+ </tr>
+ <tr>
+ <td>デフォルトフォントをリセット</td>
+ <td/>
+ <td>
+ <para>文書のデフォルトフォント設定をリセットする</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>文書メニュー</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>構文型</td>
+ <td/>
+ <td>
+ <para>構文型設定(デフォルト型はScilab)</para>
+ </td>
+ </tr>
+ <tr>
+ <td>エンコーディング</td>
+ <td/>
+ <td>
+ <para>エンコーディング設定 (デフォルト型は UTF-8エンコーディング)
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>色付け</td>
+ <td/>
+ <td>
+ <para>文書を色付けする</para>
+ </td>
+ </tr>
+ <tr>
+ <td>自動インデント</td>
+ <td/>
+ <td>
+ <para>自動インデントをアクティブにする</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <para>実行メニュー</para>
+ <informaltable border="1">
+ <tr>
+ <td>
+ <para>コマンド</para>
+ </td>
+ <td>
+ <para>ショートカット</para>
+ </td>
+ <td>
+ <para>説明</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Scilabにロード</td>
+ <td>&lt;CTRL-L&gt;</td>
+ <td>
+ <para>文書全体をScilabコンソールにロードする</para>
+ </td>
+ </tr>
+ <tr>
+ <td>選択部を評価</td>
+ <td/>
+ <td>
+ <para>選択部をScilabコンソールにロードする</para>
+ </td>
+ </tr>
+ <tr>
+ <td>Scilabで実行</td>
+ <td>&lt;CTRL-E&gt;</td>
+ <td>
+ <para>ファイルが存在する場合, そのファイルの内容を実行する</para>
+ </td>
+ </tr>
+ </informaltable>
+ </listitem>
+ </itemizedlist>
+ </refsection>
+ <refsection>
+ <title>注意</title>
+ <variablelist>
+ <varlistentry>
+ <term>文書 :</term>
+ <listitem>
+ <para>デフォルトのテキストの色付けはScilab構文の色付けです.
+ </para>
+ <para>
+ <literal>自動インデント</literal> モードでは,(リターン操作後に)
+ Scilab構文に基づき行をインデントします.
+ </para>
+ <para/>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+ <refsection>
+ <title>例</title>
+ <programlisting role="example"><![CDATA[
+// パラメータなしでエディタを起動
+scinotes();
+// ファイル名を指定してエディタを起動
+scinotes('SCI/modules/time/macros/datenum.sci');
+// ファイル名の行列を指定してエディタを起動
+scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci']);
+// ファイル名とハイライト表示する行を指定してエディタを起動
+scinotes('SCI/modules/time/macros/datenum.sci', 5);
+// ファイル名とハイライト表示する行を指定してエディタを起動
+scinotes('SCI/modules/time/macros/datenum.sci', 8, 'datenum');
+// ファイル名の行列と対応するハイライト表示する行の行列を指定してエディタを起動
+// ファイル名の行列とハイライト表示する行の行列は同じ大きさにします
+scinotes(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci'], [5,10]);
+ ]]></programlisting>
+ Scilabコードをインデント
+ <programlisting role="example"><![CDATA[
+f=TMPDIR + "/file_to_correct.sci";
+mputl(["a=''abcdef'' ";
+ "if a==1";
+ " b=1+""abcdef'' ";
+ " c=2";
+ " d=3 ";
+ " if ";
+ "a=''abcdef""""""";
+ " end";
+ " end "], f);
+scinotes(f, ["indent" "trailing" "quote"]);
+// 結果を表示
+mgetl(f)
+ ]]></programlisting>
+ </refsection>
+ <refsection>
+ <title>履歴</title>
+ <revhistory>
+ <revision>
+ <revnumber>5.4.1</revnumber>
+ <revremark>['indent','trailing','quote'] オプションが追加されました.</revremark>
+ </revision>
+ </revhistory>
+ </refsection>
+</refentry>
diff --git a/modules/scinotes/help/pt_BR/addchapter.sce b/modules/scinotes/help/pt_BR/addchapter.sce
new file mode 100755
index 000000000..79234a133
--- /dev/null
+++ b/modules/scinotes/help/pt_BR/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Scilab editor (Scinotes)",SCI+"/modules/scinotes/help/pt_BR",%T);
+
diff --git a/modules/scinotes/help/ru_RU/addchapter.sce b/modules/scinotes/help/ru_RU/addchapter.sce
new file mode 100755
index 000000000..ebcdd99c0
--- /dev/null
+++ b/modules/scinotes/help/ru_RU/addchapter.sce
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+add_help_chapter("Text editor (Scinotes)",SCI+"/modules/scinotes/help/ru_RU",%T);
+
diff --git a/modules/scinotes/includes/callscinotes.h b/modules/scinotes/includes/callscinotes.h
new file mode 100755
index 000000000..c58680fc4
--- /dev/null
+++ b/modules/scinotes/includes/callscinotes.h
@@ -0,0 +1,29 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+#ifndef __CALLSCINOTES_H__
+#define __CALLSCINOTES_H__
+/*--------------------------------------------------------------------------*/
+#include <wchar.h>
+#include "dynlib_scinotes.h"
+/*--------------------------------------------------------------------------*/
+/**
+* call SciNotes from C (Wide Char as input filesname)
+* used by Windows for localized files name
+* @param[in] _wcfilenames wide char encoding (filenames to open)
+* @param[in] size of _wcfilenames
+* @return 0
+*/
+SCINOTES_IMPEXP int callSciNotesW(wchar_t **_wcfilenames, int _nbfiles);
+SCINOTES_IMPEXP int callSciNotesWWithLineNumberAndFunction(wchar_t **_wcfilenames, double* pdblLineNumber, char *functionName, int _nbfiles);
+SCINOTES_IMPEXP int callSciNotesWWithOption(wchar_t **_wcfilenames, wchar_t** option, int _nboptions, int _nbfiles);
+/*--------------------------------------------------------------------------*/
+#endif /* __CALLSCINOTES_H__ */
diff --git a/modules/scinotes/includes/dynlib_scinotes.h b/modules/scinotes/includes/dynlib_scinotes.h
new file mode 100755
index 000000000..b0ca9676f
--- /dev/null
+++ b/modules/scinotes/includes/dynlib_scinotes.h
@@ -0,0 +1,28 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2009 - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __DYNLIB_SCINOTES_H__
+#define __DYNLIB_SCINOTES_H__
+
+#ifdef _MSC_VER
+#ifdef SCINOTES_EXPORTS
+#define SCINOTES_IMPEXP __declspec(dllexport)
+#else
+#define SCINOTES_IMPEXP __declspec(dllimport)
+#endif
+#else
+#define SCINOTES_IMPEXP
+#endif
+
+#endif /* __DYNLIB_SCINOTES_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/includes/gw_scinotes.h b/modules/scinotes/includes/gw_scinotes.h
new file mode 100755
index 000000000..d49c3305c
--- /dev/null
+++ b/modules/scinotes/includes/gw_scinotes.h
@@ -0,0 +1,23 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+
+#ifndef __GW_SCINOTES__
+#define __GW_SCINOTES__
+/*--------------------------------------------------------------------------*/
+#include "dynlib_scinotes.h"
+/*--------------------------------------------------------------------------*/
+SCINOTES_IMPEXP int gw_scinotes(void);
+SCINOTES_IMPEXP int sci_scinotes(char* fname, unsigned long l);
+SCINOTES_IMPEXP int sci_closeSciNotesFromScilab(char *fname, unsigned long fname_len);
+/*--------------------------------------------------------------------------*/
+#endif /* __GW_SCINOTES__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/jar/org.scilab.modules.scinotes.jar b/modules/scinotes/jar/org.scilab.modules.scinotes.jar
new file mode 100755
index 000000000..a20488289
--- /dev/null
+++ b/modules/scinotes/jar/org.scilab.modules.scinotes.jar
Binary files differ
diff --git a/modules/scinotes/libsciscinotes-algo.la b/modules/scinotes/libsciscinotes-algo.la
new file mode 100755
index 000000000..eb856cc66
--- /dev/null
+++ b/modules/scinotes/libsciscinotes-algo.la
@@ -0,0 +1,41 @@
+# libsciscinotes-algo.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libsciscinotes-algo.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciscinotes-algo.
+current=
+age=
+revision=
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
diff --git a/modules/scinotes/libsciscinotes-disable.la b/modules/scinotes/libsciscinotes-disable.la
new file mode 100755
index 000000000..de20b773d
--- /dev/null
+++ b/modules/scinotes/libsciscinotes-disable.la
@@ -0,0 +1,41 @@
+# libsciscinotes-disable.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsciscinotes-disable.so.5'
+
+# Names of this library.
+library_names='libsciscinotes-disable.so.5.5.2 libsciscinotes-disable.so.5 libsciscinotes-disable.so'
+
+# The name of the static archive.
+old_library=''
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciscinotes-disable.
+current=10
+age=5
+revision=2
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib/scilab'
diff --git a/modules/scinotes/libsciscinotes.la b/modules/scinotes/libsciscinotes.la
new file mode 100755
index 000000000..a1b6e6e98
--- /dev/null
+++ b/modules/scinotes/libsciscinotes.la
@@ -0,0 +1,41 @@
+# libsciscinotes.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsciscinotes.so.5'
+
+# Names of this library.
+library_names='libsciscinotes.so.5.5.2 libsciscinotes.so.5 libsciscinotes.so'
+
+# The name of the static archive.
+old_library=''
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lpthread -ldl -lcurses'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsciscinotes.
+current=10
+age=5
+revision=2
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib/scilab'
diff --git a/modules/scinotes/license.txt b/modules/scinotes/license.txt
new file mode 100755
index 000000000..cdc1cfd98
--- /dev/null
+++ b/modules/scinotes/license.txt
@@ -0,0 +1,11 @@
+Copyright:
+Copyright (c) 2009 - DIGITEO
+
+License:
+This module must be used under the terms of the CeCILL.
+This module file is licensed as described in the file COPYING, which
+you should have received as part of this distribution. The terms
+are also available at
+http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
diff --git a/modules/scinotes/locales/ca_ES.po b/modules/scinotes/locales/ca_ES.po
new file mode 100755
index 000000000..0f7836ee7
--- /dev/null
+++ b/modules/scinotes/locales/ca_ES.po
@@ -0,0 +1,1136 @@
+# Catalan translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2010-07-29 16:41+0000\n"
+"Last-Translator: oriolsbd <oriolsbd@yahoo.es>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ca\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr ""
+"El mòdul '%s' de l'Scilab està inhabilitat en els modes -nogui i -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: No hi ha més memòria.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Els arguments d'entrada #%d i #%d tenen una mida incorrecta: Han de "
+"tenir les mateixes dimensions.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "Fitxer"
+
+msgid "New"
+msgstr "Nou"
+
+msgid "Open"
+msgstr "Obre"
+
+msgid "Open recent"
+msgstr ""
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+
+msgid "Open file in ..."
+msgstr ""
+
+msgid "Save file in ..."
+msgstr ""
+
+msgid "Reload"
+msgstr "Recarrega"
+
+msgid "Restore opened files on start-up"
+msgstr ""
+
+msgid "Open function source file"
+msgstr "Obre la font de la funció"
+
+msgid "Open URL"
+msgstr ""
+
+msgid "Save"
+msgstr "Desa"
+
+msgid "Save as"
+msgstr "Anomena i desa"
+
+msgid "Save All"
+msgstr "Desa-ho tot"
+
+msgid "Overwrite"
+msgstr "Sobreescriu"
+
+msgid "Export"
+msgstr ""
+
+msgid "Page Setup"
+msgstr "Configuració de pàgina"
+
+msgid "Print Preview"
+msgstr "Previsualitza la impressió"
+
+msgid "Print"
+msgstr "Imprimeix"
+
+msgid "Close"
+msgstr "Tanca"
+
+msgid "Close All"
+msgstr "Tanca-ho tot"
+
+msgid "Close All But This"
+msgstr "Tanca-ho tot excepte això"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "Edita"
+
+msgid "Undo"
+msgstr "Desfés"
+
+msgid "Redo"
+msgstr "Refés"
+
+msgid "Cut"
+msgstr "Retalla"
+
+msgid "Copy"
+msgstr "Copia"
+
+msgid "Copy as HTML with line number"
+msgstr ""
+
+msgid "Paste"
+msgstr "Enganxa"
+
+msgid "Delete"
+msgstr "Elimina"
+
+msgid "Columns actions"
+msgstr ""
+
+msgid "Paste Column"
+msgstr ""
+
+msgid "Repeat on the Column"
+msgstr ""
+
+msgid "Select All"
+msgstr "Selecciona-ho tot"
+
+msgid "Select current block"
+msgstr ""
+
+msgid "Search"
+msgstr "Cerca"
+
+msgid "Find/Replace"
+msgstr "Cerca/Reemplaça"
+
+msgid "Find Next"
+msgstr "Cerca el següent"
+
+msgid "Find Previous"
+msgstr "Cerca l'anterior"
+
+msgid "Incremental Search"
+msgstr ""
+
+msgid "Find files"
+msgstr ""
+
+msgid "Find word in files"
+msgstr ""
+
+msgid "Set anchor"
+msgstr ""
+
+msgid "Go to next anchor"
+msgstr ""
+
+msgid "Go to previous anchor"
+msgstr ""
+
+msgid "Remove anchor"
+msgstr ""
+
+msgid "Code Navigator"
+msgstr ""
+
+msgid "Format"
+msgstr ""
+
+msgid "Shift Right"
+msgstr "Desplaça a la dreta"
+
+msgid "Shift Left"
+msgstr "Desplaça a l'esquerra"
+
+msgid "Correct Indentation"
+msgstr "Sagnat correcte"
+
+msgid "Remove trailing spaces"
+msgstr ""
+
+msgid "Generate comments for help_from_sci"
+msgstr ""
+
+msgid "Comment Selection"
+msgstr "Comenta la selecció"
+
+msgid "Uncomment Selection"
+msgstr "Descomenta la selecció"
+
+msgid "Change the case"
+msgstr ""
+
+msgid "Make Selection Lowercase"
+msgstr ""
+
+msgid "Make Selection Uppercase"
+msgstr ""
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr ""
+
+msgid "Single to double quote strings"
+msgstr ""
+
+msgid "Options"
+msgstr "Opcions"
+
+msgid "Current file encoding"
+msgstr ""
+
+msgid "Line Endings"
+msgstr "Finals de línia"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Ressalta la línia actual"
+
+msgid "Enable Auto Reformat"
+msgstr "Habilita el format automàtic"
+
+msgid "Suppress comments when executing selection"
+msgstr ""
+
+msgid "Window"
+msgstr ""
+
+msgid "Copy tab in new window"
+msgstr ""
+
+msgid "Detach tab in new window"
+msgstr ""
+
+msgid "Copy selection in a new tab"
+msgstr ""
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Executa"
+
+msgid "... file with no echo"
+msgstr ""
+
+msgid "... file with echo"
+msgstr ""
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+
+msgid "Save and execute"
+msgstr ""
+
+msgid "Save and execute all files"
+msgstr ""
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr ""
+
+msgid "About"
+msgstr "Quant a"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+
+msgid "Complete"
+msgstr "Finalitzat"
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr ""
+
+msgid "Vertical rule"
+msgstr ""
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr ""
+
+msgid "No help"
+msgstr ""
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr ""
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr "Font de '"
+
+msgid "Recent Files"
+msgstr "Fitxers recents"
+
+msgid "The file could not be created, check the path"
+msgstr ""
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+
+msgid "You do not have the permissions to write this file"
+msgstr ""
+
+msgid "You do not have the permissions to read this file"
+msgstr ""
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr ""
+
+msgid "An error occurred when printing"
+msgstr ""
+
+msgid "Exit"
+msgstr "Surt"
+
+msgid "Tools"
+msgstr "Eines"
+
+msgid "Help on typing"
+msgstr "Ajuda a l'escriptura"
+
+msgid "Generate help from function"
+msgstr "Genera l'ajuda de la funció"
+
+msgid "Clone tab in a new window"
+msgstr "Clona la pestanya en una nova finestra"
+
+msgid "Clone and close tab in a new window"
+msgstr "Clona i tanca la pestanya en una nova finestra"
+
+msgid "Remove trailing whitespaces"
+msgstr "Elimina els espais del darrere"
+
+msgid "Goto line"
+msgstr "Ves a la línia"
+
+msgid "View"
+msgstr "Visualitza"
+
+msgid "Show/Hide ToolBar"
+msgstr "Mostra/amaga la barra d'eines"
+
+msgid "Word Wrap"
+msgstr "Ajust de paraula"
+
+msgid "Whereami Line Numbering"
+msgstr "Nombres de línia amb Whereami"
+
+msgid "Normal Line Numbering"
+msgstr "Números de línia normals"
+
+msgid "No Line Numbering"
+msgstr "Sense números de línia"
+
+msgid "Set Colors"
+msgstr "Determina els colors"
+
+msgid "Set Font"
+msgstr "Determina la font"
+
+msgid "Reset default font"
+msgstr "Reinicia la lletra predeterminada"
+
+msgid "Split horizontally"
+msgstr "Divideix horitzontalment"
+
+msgid "Split vertically"
+msgstr "Divideix verticalment"
+
+msgid "No split"
+msgstr "Sense divisió"
+
+msgid "Document"
+msgstr "Document"
+
+msgid "Syntax Type"
+msgstr "Tipus de sintaxi"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Codificació"
+
+msgid "Colorize"
+msgstr "Acoloreix"
+
+msgid "Auto (Default)"
+msgstr "Automàtic (Predeterminat)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Carrega a l'Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Avalua la selecció"
+
+msgid "Evaluate from beginning..."
+msgstr "Avalua des del principi..."
+
+msgid "Execute File Into Scilab"
+msgstr "Executa el fitxer a l'Scilab"
+
+msgid "SciNotes help"
+msgstr "Ajuda de SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Ajuda de la paraula actual"
+
+msgid "Help on the selected text"
+msgstr ""
+
+msgid "Help on selected text or keyword"
+msgstr "Ajuda del text seleccionat o de la paraula clau"
+
+msgid "Help about '"
+msgstr "Ajuda sobre '"
+
+msgid "Find:"
+msgstr "Cerca:"
+
+msgid "Find"
+msgstr "Cerca"
+
+msgid "Replace/Find"
+msgstr "Reemplaça/cerca"
+
+msgid "Replace With :"
+msgstr "Reemplaça per:"
+
+msgid "Direction"
+msgstr "Direcció"
+
+msgid "Forward"
+msgstr "Endavant"
+
+msgid "Backward"
+msgstr "Enrere"
+
+msgid "Scope"
+msgstr "Abast"
+
+msgid "All"
+msgstr "Tot"
+
+msgid "Selected lines"
+msgstr "Línies seleccionades"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Distingix majúscules i minúscules"
+
+msgid "Circular search"
+msgstr ""
+
+msgid "Restart the search from the beginning"
+msgstr ""
+
+msgid "Whole word"
+msgstr "Paraula completa"
+
+msgid "Regular expressions"
+msgstr "Expressions regulars"
+
+msgid "Replace"
+msgstr "Reemplaça"
+
+msgid "Replace All"
+msgstr "Reemplaça-ho tot"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Expressió regular invàlida: %s"
+
+msgid "You have passed the end of the document"
+msgstr "Heu passat el final del document"
+
+msgid "You have passed the beginning of the document"
+msgstr "Heu passat l'inici del document"
+
+msgid "You have reached the end of the document"
+msgstr "Heu arribat al final del document"
+
+msgid "You have reached the beginning of the document"
+msgstr "Heu arribat a l'inici del document"
+
+#, c-format
+msgid "String %s not found"
+msgstr "No s'ha trobat la cadena %s"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "Tanca aquesta pestanya"
+
+msgid "This file"
+msgstr "Aquest fitxer"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Avís: un altre programa ha modificat el fitxer."
+
+msgid "Ignore"
+msgstr "Ignora"
+
+msgid "Replace File?"
+msgstr "Reemplaçar el fitxer?"
+
+msgid "File already exists"
+msgstr "El fitxer ja existeix"
+
+msgid "Untitled "
+msgstr "Sense títol "
+
+msgid "Ok"
+msgstr "D'acord"
+
+msgid "Apply & Reindent"
+msgstr ""
+
+msgid "Cancel"
+msgstr "Cancel·la"
+
+msgid "Default"
+msgstr "Predeterminat"
+
+msgid "Next tab"
+msgstr "Pestanya següent"
+
+msgid "Previous tab"
+msgstr "Pestanya anterior"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Heu de desar les modificacions per executar aquest fitxer a l'Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Aquest fitxer és molt gran. És millor l'opció \"Executa el fitxer al "
+"Scilab\".\n"
+"Esteu segur que voleu continuar?"
+
+msgid "Enter line number"
+msgstr "Entreu el número de línia"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "Aquest fitxer és binari, si el desem serà incorrecte."
+
+msgid "Loading"
+msgstr "S'està carregant"
+
+msgid "Colorization canceled"
+msgstr "S'ha cancel·lat l'acoloriment"
+
+msgid "Binary file: read-only mode"
+msgstr "Fitxer binari: mode de només lectura"
+
+msgid "Read-only mode"
+msgstr "Mode de només lectura"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+
+msgid "Open in the navigator the URL "
+msgstr ""
+
+msgid "Mail to "
+msgstr ""
+
+msgid "Open the source of the macro "
+msgstr ""
+
+msgid "Show the definition of the macro "
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr ""
+
+msgid "Unknown function"
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr ""
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr "Error de SciNotes"
+
+msgid "The file could not be saved."
+msgstr "No s'ha pogut desar el text."
+
+msgid "The file could not be converted."
+msgstr "No s'ha pogut convertir el text."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s és un directori."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Perdreu les modificacions. Tot i així, voleu canviar la codificació?"
+
+msgid "Continue ?"
+msgstr ""
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "No s'ha pogut carregar el \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "No s'ha trobat la consola ni l'intèrpret de comandes."
+
+msgid "Could not find the temporary file."
+msgstr "No s'ha trobat el fitxer temporal"
+
+msgid "No text selected."
+msgstr ""
+
+msgid "No text to execute."
+msgstr ""
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+
+msgid "Encoding problems"
+msgstr ""
+
+msgid "Cannot guess the file encoding."
+msgstr ""
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Canvia els colors"
+
+msgid "Cursor Color"
+msgstr ""
+
+msgid "Background Color"
+msgstr ""
+
+msgid "Change Color"
+msgstr "Canvia el color"
+
+msgid "Italic"
+msgstr "Cursiva"
+
+msgid "Strike Through"
+msgstr "Tatxat"
+
+msgid "Preview"
+msgstr "Previsualitza"
+
+msgid "Underline"
+msgstr "Subratlla"
+
+msgid "Settings"
+msgstr "Configuració"
+
+msgid "Color"
+msgstr "Color"
+
+msgid "Bold"
+msgstr "Negreta"
+
+msgid "Absolute"
+msgstr ""
+
+msgid "Relative"
+msgstr ""
+
+msgid "Go to line: "
+msgstr ""
+
+msgid "Numeration"
+msgstr ""
+
+msgid "Alphabetic order"
+msgstr ""
+
+msgid "Natural order"
+msgstr ""
+
+msgid "Order"
+msgstr ""
+
+msgid "Functions"
+msgstr ""
+
+msgid "Anchors"
+msgstr ""
+
+msgid "Anchor's name: "
+msgstr ""
+
+msgid "Set an anchor"
+msgstr ""
+
+msgid "Anchor: "
+msgstr ""
+
+msgid "Open source file of the function:"
+msgstr ""
+
+msgid "Open source"
+msgstr ""
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Esteu segur que voleu tancar l'SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr ""
+
+msgid "Restore the last sessions"
+msgstr ""
+
+msgid "Configure Tabulation"
+msgstr ""
+
+msgid "Tab style"
+msgstr ""
+
+msgid "Use spaces"
+msgstr ""
+
+msgid "Length"
+msgstr ""
+
+msgid "Tab representation"
+msgstr ""
+
+msgid "Double chevrons"
+msgstr ""
+
+msgid "Copy full path"
+msgstr ""
+
+msgid "Exact"
+msgstr ""
+
+msgid "Search Files..."
+msgstr ""
+
+msgid "Search in Files..."
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr ""
+
+msgid "Base directory:"
+msgstr ""
+
+msgid "Recursive"
+msgstr ""
+
+msgid "File pattern"
+msgstr ""
+
+msgid "(* for any string and ? for any character)"
+msgstr ""
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+
+msgid "Word pattern"
+msgstr ""
+
+msgid "Read file line by line"
+msgstr ""
+
+msgid "Choose..."
+msgstr ""
+
+msgid "Stop"
+msgstr ""
+
+msgid "Regex"
+msgstr ""
+
+msgid "Word"
+msgstr ""
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr ""
+
+msgid "Line by line"
+msgstr ""
+
+msgid "Regular expression (Word)"
+msgstr ""
+
+msgid "Choose the search base directory"
+msgstr ""
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "No està instal·lat el mòdul '%s' del Scilab.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/cs_CZ.po b/modules/scinotes/locales/cs_CZ.po
new file mode 100755
index 000000000..f9a31c4c7
--- /dev/null
+++ b/modules/scinotes/locales/cs_CZ.po
@@ -0,0 +1,1136 @@
+# Czech translation for scilab
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2013-06-15 20:50+0000\n"
+"Last-Translator: Zbyněk Schwarz <Unknown>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Modul Scilabu '%s' je v režimu -nogui or -nwni zakázán.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Nelze přečíst vstupní argument #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr "%s: Špatný typ argumentu #%d: Očekávána řetězcová matice.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Není více paměti.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+"%s: Špatný typ argumentu #%d: Očekávána reálná matice nebo 'readonly'.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr "%s: Špatný typ argumentu #%d: Očekávána reálná matice.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Špatná velikost vstupních argumentů #%d a #%d: Očekávány stejné "
+"rozměry.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr "%s: Špatný typ argumentu #%d: Očekáván řetězec.\n"
+
+msgid "File"
+msgstr "Soubor"
+
+msgid "New"
+msgstr "Nové"
+
+msgid "Open"
+msgstr "Otevřít"
+
+msgid "Open recent"
+msgstr "Otevřít nedávné"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Pracovní adresáře;Přidat adresář;Odstranit poslední adresář"
+
+msgid "Open file in ..."
+msgstr "Otevřít soubor v ..."
+
+msgid "Save file in ..."
+msgstr "Uložit soubor do ..."
+
+msgid "Reload"
+msgstr "Načíst znovu"
+
+msgid "Restore opened files on start-up"
+msgstr "Obnovit otevřené soubory při spuštění"
+
+msgid "Open function source file"
+msgstr "Otevřít zdrojový soubor funkce"
+
+msgid "Open URL"
+msgstr "Otevřít URL"
+
+msgid "Save"
+msgstr "Uložit"
+
+msgid "Save as"
+msgstr "Uložit jako"
+
+msgid "Save All"
+msgstr "Uložit vše"
+
+msgid "Overwrite"
+msgstr "Přepsat"
+
+msgid "Export"
+msgstr "Exportovat"
+
+msgid "Page Setup"
+msgstr "Nastavení stránky"
+
+msgid "Print Preview"
+msgstr "Náhled tisku"
+
+msgid "Print"
+msgstr "Tisk"
+
+msgid "Close"
+msgstr "Zavřít"
+
+msgid "Close All"
+msgstr "Zavřít Vše"
+
+msgid "Close All But This"
+msgstr "Zavřít Vše Kromě Tohoto"
+
+msgid "Exit Scinotes"
+msgstr "Ukončit Scinotes"
+
+msgid "Edit"
+msgstr "Upravit"
+
+msgid "Undo"
+msgstr "Zpět"
+
+msgid "Redo"
+msgstr "Znovu"
+
+msgid "Cut"
+msgstr "Vyjmout"
+
+msgid "Copy"
+msgstr "Kopírovat"
+
+msgid "Copy as HTML with line number"
+msgstr "Kopírovat jako HTML s čísly řádků"
+
+msgid "Paste"
+msgstr "Vložit"
+
+msgid "Delete"
+msgstr "Smazat"
+
+msgid "Columns actions"
+msgstr "Činnosti sloupce"
+
+msgid "Paste Column"
+msgstr "Vložit Sloupec"
+
+msgid "Repeat on the Column"
+msgstr "Zopakovat ve Sloupci"
+
+msgid "Select All"
+msgstr "Vybrat vše"
+
+msgid "Select current block"
+msgstr "Vybrat současný blok"
+
+msgid "Search"
+msgstr "Hledat"
+
+msgid "Find/Replace"
+msgstr "Najít/Nahradit"
+
+msgid "Find Next"
+msgstr "Najít další"
+
+msgid "Find Previous"
+msgstr "Najít předchozí"
+
+msgid "Incremental Search"
+msgstr "Inkrementální Vyhledávání"
+
+msgid "Find files"
+msgstr "Najít soubory"
+
+msgid "Find word in files"
+msgstr "Najít slovo v souboru"
+
+msgid "Set anchor"
+msgstr "Nastavit kotvu"
+
+msgid "Go to next anchor"
+msgstr "Přejít na další kotvu"
+
+msgid "Go to previous anchor"
+msgstr "Přejit na předchozí kotvu"
+
+msgid "Remove anchor"
+msgstr "Odstranit kotvu"
+
+msgid "Code Navigator"
+msgstr "Navigátor Kódu"
+
+msgid "Format"
+msgstr "Formát"
+
+msgid "Shift Right"
+msgstr "Posun vpravo"
+
+msgid "Shift Left"
+msgstr "Posun vlevo"
+
+msgid "Correct Indentation"
+msgstr "Spravit odsazení"
+
+msgid "Remove trailing spaces"
+msgstr "Odstranit koncové mezery"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Vytvořit komentáře pro help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Výběr Komentáře"
+
+msgid "Uncomment Selection"
+msgstr "Odkomentovat Výběr"
+
+msgid "Change the case"
+msgstr "Změnit velikost"
+
+msgid "Make Selection Lowercase"
+msgstr "Změnit výběr na malá písmena"
+
+msgid "Make Selection Uppercase"
+msgstr "Změnit výběr na velká písmena"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Kapitalizovat výběr, Kapitalizovat znak"
+
+msgid "Single to double quote strings"
+msgstr "Z řetězů s jednou uvozovkou na řetězy s dvojitou uvozovkou"
+
+msgid "Options"
+msgstr "Možnosti"
+
+msgid "Current file encoding"
+msgstr "Kódování současného souboru"
+
+msgid "Line Endings"
+msgstr "Konce řádků"
+
+msgid "Preferences"
+msgstr "Nastavení"
+
+msgid "Set font"
+msgstr "Nastavit písmo"
+
+msgid "Set colors"
+msgstr "Nastavit barvy"
+
+msgid "Scinotes General settings"
+msgstr "Obecná nastavení Scinotes"
+
+msgid "Auto-completion on"
+msgstr "Autodokončení zapnuto"
+
+msgid "(, [, ..."
+msgstr "(, [, ..."
+
+msgid "if, function, ..."
+msgstr "if, funkce, ..."
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Zvýraznit aktuální řádek"
+
+msgid "Enable Auto Reformat"
+msgstr "Povolit Auto Formátování"
+
+msgid "Suppress comments when executing selection"
+msgstr "Potlačit komentáře při spouštění výběru"
+
+msgid "Window"
+msgstr "Okno"
+
+msgid "Copy tab in new window"
+msgstr "Zkopírovat kartu do nového okna"
+
+msgid "Detach tab in new window"
+msgstr "Odepnout kartu do nového okna"
+
+msgid "Copy selection in a new tab"
+msgstr "Zkopírovat výběr do nového okna"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Spustit"
+
+msgid "... file with no echo"
+msgstr "... soubory bez odezvy"
+
+msgid "... file with echo"
+msgstr "... soubory s odezvou"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "... výběr s odezvou;... až do stříšky, s odezvou"
+
+msgid "Save and execute"
+msgstr "Uložit a spustit"
+
+msgid "Save and execute all files"
+msgstr "Uložit a spustit všechny soubory"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr "Nápověda Scinotes"
+
+msgid "Help on ;Help on selection"
+msgstr "Nápověda na ;Nápověda pro výběr"
+
+msgid "About"
+msgstr "O programu"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Vyhodnotit Výběr s odezvou;Vyhodnotit do stříšky, s odezvou"
+
+msgid "Complete"
+msgstr "Hotovo"
+
+msgid "Display"
+msgstr "Zobrazení"
+
+msgid "Header"
+msgstr "Záhlaví"
+
+msgid "Autosave"
+msgstr "Automatické ukládání"
+
+msgid "Editor"
+msgstr "Editor"
+
+msgid "Use Scinotes"
+msgstr "Použít Scinotes"
+
+msgid "External editor: "
+msgstr "Externí editor: "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr "(Nezapomeňte použít uvozovky u cest obsahující mezery)"
+
+msgid "Scilab command: "
+msgstr "Příkaz Scilab: "
+
+msgid "Restore previous session on start-up"
+msgstr "Obnovit předchozí relaci při startu"
+
+msgid "Add carriage return at the end of the file."
+msgstr "Přidat návrat vozíku na konec souboru."
+
+msgid "Number of recently opened files to display: "
+msgstr "Počet nedávno otevřených souborů k zobrazení: "
+
+msgid "Default file encoding: "
+msgstr "Výchozí kódování souboru: "
+
+msgid "Default End-Of-Line: "
+msgstr "Výchozí konec řádku: "
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr "Obecné možnosti zobrazení"
+
+msgid "Highlight current line: "
+msgstr "Zvýraznit současný řádek: "
+
+msgid "Show line numbers: "
+msgstr "Zobrazit čísla řádku: "
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr "Normální"
+
+msgid "Wrap lines"
+msgstr "Zalamovat řádky"
+
+msgid "Background color: "
+msgstr "Barva pozadí: "
+
+msgid "Cursor color: "
+msgstr "Barva kurzoru: "
+
+msgid "Keywords"
+msgstr "Klíčová slova"
+
+msgid "Enable keywords colorization"
+msgstr "Povolit obarvení klíčových slov"
+
+msgid "Set syntax Colors"
+msgstr "Nastavit barvy syntakce"
+
+msgid "Highlight corresponding brackets"
+msgstr "Zvýraznit odpovídající závorky"
+
+msgid "Color: "
+msgstr "Barva: "
+
+msgid "Highlight on mouse over"
+msgstr "Zvýraznit při najetí myši"
+
+msgid "Style: "
+msgstr "Styl: "
+
+msgid "Filled"
+msgstr "Vyplněné"
+
+msgid "Framed"
+msgstr "V rámečku"
+
+msgid "Underlined"
+msgstr "Podtržené"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr "Zvýraznit odpovídající klíčová slova (např. if ... end)"
+
+msgid "Tabulation and Indentation"
+msgstr "Tabelace a odsazení"
+
+msgid "Tabulation size: "
+msgstr "Velikost tabelace: "
+
+msgid "Use space"
+msgstr "Použít mezeru"
+
+msgid "Representation: "
+msgstr "Znázornění: "
+
+msgid "Chevrons"
+msgstr "Ševrony"
+
+msgid "Horizontal rule"
+msgstr "Vodorovná čára"
+
+msgid "Vertical rule"
+msgstr "Svislá čára"
+
+msgid "Enable auto indentation"
+msgstr "Povolit automatické odsazování"
+
+msgid "Indent size: "
+msgstr "Velikost odsazení: "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Povolit automatické ukládání ve Scinotes"
+
+msgid "Save options"
+msgstr "Možnosti ukládání"
+
+msgid "Save every "
+msgstr "Uložit každých "
+
+msgid " minutes "
+msgstr " minut "
+
+msgid "Close options"
+msgstr "Zavřít možnosti"
+
+msgid "Delete automatically saved files"
+msgstr "Smazat automaticky uložené soubory"
+
+msgid "Filename"
+msgstr "Název souboru"
+
+msgid "Append filename with: "
+msgstr "Připojit k souborům: "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr "Nahradit příponu tímto: "
+
+msgid "Location"
+msgstr "Umístění"
+
+msgid "Source file directory"
+msgstr "Adresář zdrojového souboru"
+
+msgid "Single directory"
+msgstr "Jeden adresář"
+
+msgid "Choose an autosave directory"
+msgstr "Zvolte adresář pro automatické uložení"
+
+msgid "Default header"
+msgstr "Výchozí hlavička"
+
+msgid "Add a default header to new file"
+msgstr "Přidat výchozí hlavičku do nového souboru"
+
+msgid "Graphics handle field"
+msgstr "Grafická obslužná rutina pole"
+
+msgid "No help"
+msgstr "Žádná nápověda"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Chyba při čtení Řetězce"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr "Soubor nenalezen: %s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "Chyba I/O: %s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr "Soubor %s byl změněn jiným programem. Chcete ho znovu načíst ?"
+
+msgid "Source of '"
+msgstr "Zdroj '"
+
+msgid "Recent Files"
+msgstr "Nedávné soubory"
+
+msgid "The file could not be created, check the path"
+msgstr "Soubor nelze vytvořit, zkontrolujte cestu"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr "Soubor není zapisovatelný, proto je otevřen v režimu pouze pro čtení"
+
+msgid "You do not have the permissions to write this file"
+msgstr "Nemáte oprávnění zapsat tento soubor"
+
+msgid "You do not have the permissions to read this file"
+msgstr "Nemáte oprávnění přečíst tento soubor"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Při exportu kódu pomocí FOP nastala chyba"
+
+msgid "An error occurred when printing"
+msgstr "Při tisku nastala chyba"
+
+msgid "Exit"
+msgstr "Ukončit"
+
+msgid "Tools"
+msgstr "Nástroje"
+
+msgid "Help on typing"
+msgstr "Nápověda při psaní"
+
+msgid "Generate help from function"
+msgstr "Vytvořit nápovědu z funkce"
+
+msgid "Clone tab in a new window"
+msgstr "Klonovat kartu do nového okna"
+
+msgid "Clone and close tab in a new window"
+msgstr "Klonovat a zavřít kartu v novém okně"
+
+msgid "Remove trailing whitespaces"
+msgstr "Odstranit koncová prázdná místa"
+
+msgid "Goto line"
+msgstr "Přejít na řádek"
+
+msgid "View"
+msgstr "Zobrazení"
+
+msgid "Show/Hide ToolBar"
+msgstr "Zobrazit/Skrýt Panel Nástrojů"
+
+msgid "Word Wrap"
+msgstr "Zalamování slov"
+
+msgid "Whereami Line Numbering"
+msgstr "Číslování Řádků Whereami"
+
+msgid "Normal Line Numbering"
+msgstr "Normální Číslování Řádků"
+
+msgid "No Line Numbering"
+msgstr "Žádné číslování řádků"
+
+msgid "Set Colors"
+msgstr "Nastavit barvy"
+
+msgid "Set Font"
+msgstr "Nastavit Písmo"
+
+msgid "Reset default font"
+msgstr "Resetovat výchozí písmo"
+
+msgid "Split horizontally"
+msgstr "Rozdělit vodorovně"
+
+msgid "Split vertically"
+msgstr "Rozdělit svisle"
+
+msgid "No split"
+msgstr "Žádné rozdělení"
+
+msgid "Document"
+msgstr "Dokument"
+
+msgid "Syntax Type"
+msgstr "Typ Syntaxu"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Kódování"
+
+msgid "Colorize"
+msgstr "Vybarvit"
+
+msgid "Auto (Default)"
+msgstr "Auto (Výchozí)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Načíst do Scilabu"
+
+msgid "Evaluate Selection"
+msgstr "Vyhodnotit Výběr"
+
+msgid "Evaluate from beginning..."
+msgstr "Vyhodnotit od začátku..."
+
+msgid "Execute File Into Scilab"
+msgstr "Spustit Soubor Ve Scilab"
+
+msgid "SciNotes help"
+msgstr "Nápověda SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Nápověda pro současné klíčové slovo"
+
+msgid "Help on the selected text"
+msgstr "Nápověda pro zvolený text"
+
+msgid "Help on selected text or keyword"
+msgstr "Nápověda pro vybraný text nebo klíčové slovo"
+
+msgid "Help about '"
+msgstr "Nápověda o '"
+
+msgid "Find:"
+msgstr "Najít:"
+
+msgid "Find"
+msgstr "Najít"
+
+msgid "Replace/Find"
+msgstr "Nahradit/Najít"
+
+msgid "Replace With :"
+msgstr "Nahadit Za :"
+
+msgid "Direction"
+msgstr "Směr"
+
+msgid "Forward"
+msgstr "Dopředu"
+
+msgid "Backward"
+msgstr "Zpět"
+
+msgid "Scope"
+msgstr "Rozsah"
+
+msgid "All"
+msgstr "Vše"
+
+msgid "Selected lines"
+msgstr "Vybrané řádky"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Citlivost na velikost písmen"
+
+msgid "Circular search"
+msgstr "Kruhové hledání"
+
+msgid "Restart the search from the beginning"
+msgstr "Restartovat hledání od začátku"
+
+msgid "Whole word"
+msgstr "Celé slovo"
+
+msgid "Regular expressions"
+msgstr "Regulární výrazy"
+
+msgid "Replace"
+msgstr "Nahradit"
+
+msgid "Replace All"
+msgstr "Nahradit vše"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Neplatný regulární výraz : %s"
+
+msgid "You have passed the end of the document"
+msgstr "Přešli jste konec dokumentu"
+
+msgid "You have passed the beginning of the document"
+msgstr "Přešli jste začátek dokumentu"
+
+msgid "You have reached the end of the document"
+msgstr "Dosáhli jste konce dokumentu"
+
+msgid "You have reached the beginning of the document"
+msgstr "Dosáhli jste začátku dokumentu"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Řetězec %s nenalezen"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "Soubor %s neexistuje. Chcete ho vytvořit?"
+
+msgid "close this tab"
+msgstr "zavřít tuto kartu"
+
+msgid "This file"
+msgstr "Tento soubor"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr "Soubor %s byl změněn jiným programem. Chcete ho přepsat ?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Varování: soubor byl změněn jiným programem !"
+
+msgid "Ignore"
+msgstr "Ignorovat"
+
+msgid "Replace File?"
+msgstr "Nahradit Soubor?"
+
+msgid "File already exists"
+msgstr "Soubor již existuje"
+
+msgid "Untitled "
+msgstr "Bez názvu "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr "Použít a Znovu odsadit"
+
+msgid "Cancel"
+msgstr "Zrušit"
+
+msgid "Default"
+msgstr "Výchozí"
+
+msgid "Next tab"
+msgstr "Další karta"
+
+msgid "Previous tab"
+msgstr "Předchozí karta"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Před spuštěním tohoto souboru ve Scilab potřebujete uložit Vaše změny."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Tento soubor je velmi dlouhý. \"Spusit ve Scilab\" by mohlo být lepší\n"
+"Jste si jisti, že chcete pokračovat?"
+
+msgid "Enter line number"
+msgstr "Zadejte číslo řádku"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+"Tento soubor je binární, uložení bude mít za následek poškozený soubor."
+
+msgid "Loading"
+msgstr "Načítání"
+
+msgid "Colorization canceled"
+msgstr "Vybarvení zrušeno"
+
+msgid "Binary file: read-only mode"
+msgstr "Binární soubor: režim pouze pro čtení"
+
+msgid "Read-only mode"
+msgstr "Režim pouze pro čtení"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Stiskněte CTRL a najeďte myší na odkaz pro jeho aktivaci"
+
+msgid "Open in the navigator the URL "
+msgstr "Otevřít v navigátoru URL "
+
+msgid "Mail to "
+msgstr "Odeslat poštou do "
+
+msgid "Open the source of the macro "
+msgstr "Otevřít zdroj makra: "
+
+msgid "Show the definition of the macro "
+msgstr "Zobrazit určení makra "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Řádek %s, Sloupec %s. Funkce '%s' na Řádku %s."
+
+msgid "Unknown function"
+msgstr "Neznámá funkce"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Řádek %s, Sloupec %s."
+
+msgid "Copyright (c)"
+msgstr "Všechna práva vyhrazena (c)"
+
+msgid "SciNotes error"
+msgstr "Chyba SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Soubor nemohl být uložen."
+
+msgid "The file could not be converted."
+msgstr "Soubor nelze převést."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s je adresář."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Vaše změny budou ztraceny, přesto změnit kódování?"
+
+msgid "Continue ?"
+msgstr "Pokračovat ?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Nelze načíst \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Nelze najít ani konzoli ani InterpreterManagement."
+
+msgid "Could not find the temporary file."
+msgstr "Nelze najít dočasný soubor."
+
+msgid "No text selected."
+msgstr "Žádný text nevybrán."
+
+msgid "No text to execute."
+msgstr "Žádný text ke spuštění."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"Kódování souboru je ve skutečnosti %s a bude uloženo pomocí %s. Pokračovat?"
+
+msgid "Encoding problems"
+msgstr "Problémy s kódováním"
+
+msgid "Cannot guess the file encoding."
+msgstr "Nelze odhadnout kódování souboru."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr "Nelze uložit soubor %s... zastavte proces zálohování"
+
+msgid "Backup finished..."
+msgstr "Zálohování dokončeno..."
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr "nalezeno %s výskytů."
+
+msgid "Change Colors"
+msgstr "Změnit Barvy"
+
+msgid "Cursor Color"
+msgstr "Barva kurzoru"
+
+msgid "Background Color"
+msgstr "Barva pozadí"
+
+msgid "Change Color"
+msgstr "Změnit Barvu"
+
+msgid "Italic"
+msgstr "Kurzíva"
+
+msgid "Strike Through"
+msgstr "Přeškrtnuté"
+
+msgid "Preview"
+msgstr "Náhled"
+
+msgid "Underline"
+msgstr "Podrtžení"
+
+msgid "Settings"
+msgstr "Nastavení"
+
+msgid "Color"
+msgstr "Barva"
+
+msgid "Bold"
+msgstr "Tučné"
+
+msgid "Absolute"
+msgstr "Absolutní"
+
+msgid "Relative"
+msgstr "Relativní"
+
+msgid "Go to line: "
+msgstr "Přejít na řádek: "
+
+msgid "Numeration"
+msgstr "Číslování"
+
+msgid "Alphabetic order"
+msgstr "Podle abecedy"
+
+msgid "Natural order"
+msgstr "Přirozené seřazení"
+
+msgid "Order"
+msgstr "Seřadit"
+
+msgid "Functions"
+msgstr "Funkce"
+
+msgid "Anchors"
+msgstr "Kotvy"
+
+msgid "Anchor's name: "
+msgstr "Jméno kotvy: "
+
+msgid "Set an anchor"
+msgstr "Nastavit jako kotvu"
+
+msgid "Anchor: "
+msgstr "Kotva: "
+
+msgid "Open source file of the function:"
+msgstr "Otevřít zdrojový soubor funkce:"
+
+msgid "Open source"
+msgstr "Otevřít zdroj"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Jste si jisti, že chcete zavřít SciNotes ?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Obnovit soubory z Vaší poslední relace SciNotes ?"
+
+msgid "Restore the last sessions"
+msgstr "Obnovit poslední relace"
+
+msgid "Configure Tabulation"
+msgstr "Nastavit Tabulaci"
+
+msgid "Tab style"
+msgstr "Styl karty"
+
+msgid "Use spaces"
+msgstr "Použít mezery"
+
+msgid "Length"
+msgstr "Délka"
+
+msgid "Tab representation"
+msgstr "Zobrazení karty"
+
+msgid "Double chevrons"
+msgstr "Dvojité krokve"
+
+msgid "Copy full path"
+msgstr "Kopírovat úplnou cestu"
+
+msgid "Exact"
+msgstr "Přesné"
+
+msgid "Search Files..."
+msgstr "Hledat Soubory..."
+
+msgid "Search in Files..."
+msgstr "Hledat v Souborech..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s schod)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s schoda)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Uplynulý čas: %s vte."
+
+msgid "Base directory:"
+msgstr "Základní adresář:"
+
+msgid "Recursive"
+msgstr "Rekurzivně"
+
+msgid "File pattern"
+msgstr "Vzor souboru"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* pro jakýkoliv řetězec a ? pro jakýkoliv znak)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "(~ pro domací adresář uživatele a SCI pro domácí adresář Scilab)"
+
+msgid "Word pattern"
+msgstr "Vzorec slova"
+
+msgid "Read file line by line"
+msgstr "Číst soubor řádek po řádku"
+
+msgid "Choose..."
+msgstr "Zvolte..."
+
+msgid "Stop"
+msgstr "Zastavit"
+
+msgid "Regex"
+msgstr "Regulární výraz"
+
+msgid "Word"
+msgstr "Slovo"
+
+msgid "Case-sensitivity (Word)"
+msgstr "Citlivost na velikost písmen (Slovo)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "Citlivost na velikost písmen (Název souboru)"
+
+msgid "Recursive search"
+msgstr "Rekurzivní hledání"
+
+msgid "Line by line"
+msgstr "Řádek po řádku"
+
+msgid "Regular expression (Word)"
+msgstr "Regulární výraz (Slovo)"
+
+msgid "Choose the search base directory"
+msgstr "Zvolte základní adresář hledání"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Modul Scilabu '%s' není nainstalován.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr " online "
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr " ze zdrojového souboru funkce "
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr " nebylo nalezeno v žádné cestě knihovny"
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/de_DE.po b/modules/scinotes/locales/de_DE.po
new file mode 100755
index 000000000..525763596
--- /dev/null
+++ b/modules/scinotes/locales/de_DE.po
@@ -0,0 +1,1137 @@
+# German translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-02-22 19:28+0000\n"
+"Last-Translator: Petersen <Unknown>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: de\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Scilab '%s' Modul in Modus -nogui ider -nmwi deaktiviert.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: kein weiterer Speicher.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: falsche Größe für Eingangsargument #%d und #%d. Gleiche Dimensionen "
+"erwartet.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "Datei"
+
+msgid "New"
+msgstr "Neu"
+
+msgid "Open"
+msgstr "Öffnen"
+
+msgid "Open recent"
+msgstr ""
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+
+msgid "Open file in ..."
+msgstr ""
+
+msgid "Save file in ..."
+msgstr ""
+
+msgid "Reload"
+msgstr ""
+
+msgid "Restore opened files on start-up"
+msgstr ""
+
+msgid "Open function source file"
+msgstr ""
+
+msgid "Open URL"
+msgstr ""
+
+msgid "Save"
+msgstr "Speichern"
+
+msgid "Save as"
+msgstr "Speichern als"
+
+msgid "Save All"
+msgstr "Alles sichern"
+
+msgid "Overwrite"
+msgstr ""
+
+msgid "Export"
+msgstr ""
+
+msgid "Page Setup"
+msgstr "Seite einrichten"
+
+msgid "Print Preview"
+msgstr "Druckvorschau"
+
+msgid "Print"
+msgstr "Drucken"
+
+msgid "Close"
+msgstr "Schließen"
+
+msgid "Close All"
+msgstr "Alle Schließen"
+
+msgid "Close All But This"
+msgstr "Schließe alle außer diesem"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "Bearbeiten"
+
+msgid "Undo"
+msgstr "Rückgängig machen"
+
+msgid "Redo"
+msgstr "Wiederholen"
+
+msgid "Cut"
+msgstr "Ausschneiden"
+
+msgid "Copy"
+msgstr "kopieren"
+
+msgid "Copy as HTML with line number"
+msgstr ""
+
+msgid "Paste"
+msgstr "Einfügen"
+
+msgid "Delete"
+msgstr "Löschen"
+
+msgid "Columns actions"
+msgstr ""
+
+msgid "Paste Column"
+msgstr ""
+
+msgid "Repeat on the Column"
+msgstr ""
+
+msgid "Select All"
+msgstr "Alle auswählen"
+
+msgid "Select current block"
+msgstr ""
+
+msgid "Search"
+msgstr "Suchen"
+
+msgid "Find/Replace"
+msgstr "Suchen/Ersetzen"
+
+msgid "Find Next"
+msgstr "Weitersuchen"
+
+msgid "Find Previous"
+msgstr "Rückwärts suchen"
+
+msgid "Incremental Search"
+msgstr "Inkrementelle Suche"
+
+msgid "Find files"
+msgstr ""
+
+msgid "Find word in files"
+msgstr ""
+
+msgid "Set anchor"
+msgstr ""
+
+msgid "Go to next anchor"
+msgstr ""
+
+msgid "Go to previous anchor"
+msgstr ""
+
+msgid "Remove anchor"
+msgstr ""
+
+msgid "Code Navigator"
+msgstr ""
+
+msgid "Format"
+msgstr ""
+
+msgid "Shift Right"
+msgstr "Umschalttaste rechts"
+
+msgid "Shift Left"
+msgstr "Umschalttaste links"
+
+msgid "Correct Indentation"
+msgstr "korrekter Einschnitt"
+
+msgid "Remove trailing spaces"
+msgstr ""
+
+msgid "Generate comments for help_from_sci"
+msgstr ""
+
+msgid "Comment Selection"
+msgstr "Auswahl kommentieren"
+
+msgid "Uncomment Selection"
+msgstr "Auswahl nicht kommentieren"
+
+msgid "Change the case"
+msgstr ""
+
+msgid "Make Selection Lowercase"
+msgstr ""
+
+msgid "Make Selection Uppercase"
+msgstr ""
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr ""
+
+msgid "Single to double quote strings"
+msgstr ""
+
+msgid "Options"
+msgstr "Einstellungen"
+
+msgid "Current file encoding"
+msgstr ""
+
+msgid "Line Endings"
+msgstr "Zeilenende"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Aktuelle Zeile hervorheben"
+
+msgid "Enable Auto Reformat"
+msgstr "schalte automatische Formatierung ein"
+
+msgid "Suppress comments when executing selection"
+msgstr ""
+
+msgid "Window"
+msgstr ""
+
+msgid "Copy tab in new window"
+msgstr ""
+
+msgid "Detach tab in new window"
+msgstr ""
+
+msgid "Copy selection in a new tab"
+msgstr ""
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Anwenden"
+
+msgid "... file with no echo"
+msgstr ""
+
+msgid "... file with echo"
+msgstr ""
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+
+msgid "Save and execute"
+msgstr ""
+
+msgid "Save and execute all files"
+msgstr ""
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr ""
+
+msgid "About"
+msgstr "Über"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+
+msgid "Complete"
+msgstr ""
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr ""
+
+msgid "Vertical rule"
+msgstr ""
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr ""
+
+msgid "No help"
+msgstr ""
+
+msgid "SciNotes"
+msgstr ""
+
+msgid "Error while reading the String"
+msgstr ""
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr ""
+
+msgid "Recent Files"
+msgstr "Zuletzt geöffnete Dateien"
+
+msgid "The file could not be created, check the path"
+msgstr ""
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+
+msgid "You do not have the permissions to write this file"
+msgstr ""
+
+msgid "You do not have the permissions to read this file"
+msgstr ""
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr ""
+
+msgid "An error occurred when printing"
+msgstr ""
+
+msgid "Exit"
+msgstr "Beenden"
+
+msgid "Tools"
+msgstr ""
+
+msgid "Help on typing"
+msgstr ""
+
+msgid "Generate help from function"
+msgstr ""
+
+msgid "Clone tab in a new window"
+msgstr ""
+
+msgid "Clone and close tab in a new window"
+msgstr ""
+
+msgid "Remove trailing whitespaces"
+msgstr ""
+
+msgid "Goto line"
+msgstr "Gehe zu Zeile"
+
+msgid "View"
+msgstr "Ansicht"
+
+msgid "Show/Hide ToolBar"
+msgstr "Zusatzleiste zeigen/verstecken"
+
+msgid "Word Wrap"
+msgstr "Zeilenumbruch"
+
+msgid "Whereami Line Numbering"
+msgstr ""
+
+msgid "Normal Line Numbering"
+msgstr ""
+
+msgid "No Line Numbering"
+msgstr ""
+
+msgid "Set Colors"
+msgstr "Farben einstellen"
+
+msgid "Set Font"
+msgstr "Schriftart wählen"
+
+msgid "Reset default font"
+msgstr "voreingestellte Schriftart zurücksetzen"
+
+msgid "Split horizontally"
+msgstr ""
+
+msgid "Split vertically"
+msgstr ""
+
+msgid "No split"
+msgstr ""
+
+msgid "Document"
+msgstr "Dokument"
+
+msgid "Syntax Type"
+msgstr "Syntax Typ"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Zeichenkodierung"
+
+msgid "Colorize"
+msgstr "Einfärben"
+
+msgid "Auto (Default)"
+msgstr "Auto"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Nach Scilab laden"
+
+msgid "Evaluate Selection"
+msgstr "Auswahl evaluieren"
+
+msgid "Evaluate from beginning..."
+msgstr ""
+
+msgid "Execute File Into Scilab"
+msgstr "In Scilab ausführen"
+
+msgid "SciNotes help"
+msgstr ""
+
+msgid "Help on the current keyword"
+msgstr ""
+
+msgid "Help on the selected text"
+msgstr ""
+
+msgid "Help on selected text or keyword"
+msgstr ""
+
+msgid "Help about '"
+msgstr "Hilfe über '"
+
+msgid "Find:"
+msgstr "Suchen:"
+
+msgid "Find"
+msgstr "Suchen"
+
+msgid "Replace/Find"
+msgstr "Suchen/Ersetzen"
+
+msgid "Replace With :"
+msgstr "Ersetzen durch:"
+
+msgid "Direction"
+msgstr "Ausrichtung"
+
+msgid "Forward"
+msgstr "Weiter"
+
+msgid "Backward"
+msgstr "Rückwärts"
+
+msgid "Scope"
+msgstr "Gültigkeit"
+
+msgid "All"
+msgstr "Alle"
+
+msgid "Selected lines"
+msgstr "ausgewählte Zeilen"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Groß-/Kleinschreibung beachten"
+
+msgid "Circular search"
+msgstr ""
+
+msgid "Restart the search from the beginning"
+msgstr ""
+
+msgid "Whole word"
+msgstr "Ganzes Wort"
+
+msgid "Regular expressions"
+msgstr "Reguläre Ausdrücke"
+
+msgid "Replace"
+msgstr "Ersetzen"
+
+msgid "Replace All"
+msgstr "Alle ersetzen"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Ungültiger regulärer Ausdruck: %s"
+
+msgid "You have passed the end of the document"
+msgstr "Sie haben das Ende des Dokuments passiert"
+
+msgid "You have passed the beginning of the document"
+msgstr "Sie haben den Anfang des Dokuments passiert"
+
+msgid "You have reached the end of the document"
+msgstr "Sie haben das Ende des Dokuments erreicht"
+
+msgid "You have reached the beginning of the document"
+msgstr "Sie haben den Anfang des Dokument erreicht"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Zeichenkette %s nicht gefunden"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "diese Registerkarte schließen"
+
+msgid "This file"
+msgstr "Diese Datei"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr ""
+
+msgid "Ignore"
+msgstr ""
+
+msgid "Replace File?"
+msgstr "Datei ersetzen?"
+
+msgid "File already exists"
+msgstr "Datei existiert bereits"
+
+msgid "Untitled "
+msgstr "Unbenannt "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr ""
+
+msgid "Cancel"
+msgstr "Abbrechen"
+
+msgid "Default"
+msgstr "Standard"
+
+msgid "Next tab"
+msgstr "Nächster Reiter"
+
+msgid "Previous tab"
+msgstr "Voriger Reiter"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Sie müssen ihre Änderungen abspeichern bevor Sie die Datei in Scilab "
+"ausführen"
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Diese Datei ist sehr groß. \"In Scilab ausführen\" könnte eine bessere "
+"Alternative sein.\n"
+"Sind Sie sicher, daß Sie fortfahren möchten?"
+
+msgid "Enter line number"
+msgstr "Zeilenzahl eingeben"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+"Die Datei ist binär, diese abzuspeichert führt zu einer korrupten Datei"
+
+msgid "Loading"
+msgstr "Laden"
+
+msgid "Colorization canceled"
+msgstr "Färbung abgebrochen"
+
+msgid "Binary file: read-only mode"
+msgstr ""
+
+msgid "Read-only mode"
+msgstr ""
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+
+msgid "Open in the navigator the URL "
+msgstr ""
+
+msgid "Mail to "
+msgstr ""
+
+msgid "Open the source of the macro "
+msgstr ""
+
+msgid "Show the definition of the macro "
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr ""
+
+msgid "Unknown function"
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr ""
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr ""
+
+msgid "The file could not be saved."
+msgstr "Datei konnte nicht gespeichert werden."
+
+msgid "The file could not be converted."
+msgstr "Die Datei konnte nicht konvertiert werden."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "»%s« ist ein Ordner."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Ihre Veränderungen gehen verloren, die Enkodierung trotzdem ändern?"
+
+msgid "Continue ?"
+msgstr ""
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr ""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Konnte weder die Konsole noch Interpreter Managment finden"
+
+msgid "Could not find the temporary file."
+msgstr "konnte temporäre Datei nicht finden"
+
+msgid "No text selected."
+msgstr ""
+
+msgid "No text to execute."
+msgstr ""
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+
+msgid "Encoding problems"
+msgstr ""
+
+msgid "Cannot guess the file encoding."
+msgstr ""
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Farben ändern"
+
+msgid "Cursor Color"
+msgstr ""
+
+msgid "Background Color"
+msgstr ""
+
+msgid "Change Color"
+msgstr "Farbe ändern"
+
+msgid "Italic"
+msgstr ""
+
+msgid "Strike Through"
+msgstr ""
+
+msgid "Preview"
+msgstr ""
+
+msgid "Underline"
+msgstr ""
+
+msgid "Settings"
+msgstr ""
+
+msgid "Color"
+msgstr ""
+
+msgid "Bold"
+msgstr ""
+
+msgid "Absolute"
+msgstr ""
+
+msgid "Relative"
+msgstr ""
+
+msgid "Go to line: "
+msgstr ""
+
+msgid "Numeration"
+msgstr ""
+
+msgid "Alphabetic order"
+msgstr ""
+
+msgid "Natural order"
+msgstr ""
+
+msgid "Order"
+msgstr ""
+
+msgid "Functions"
+msgstr ""
+
+msgid "Anchors"
+msgstr ""
+
+msgid "Anchor's name: "
+msgstr ""
+
+msgid "Set an anchor"
+msgstr ""
+
+msgid "Anchor: "
+msgstr ""
+
+msgid "Open source file of the function:"
+msgstr ""
+
+msgid "Open source"
+msgstr ""
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr ""
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr ""
+
+msgid "Restore the last sessions"
+msgstr ""
+
+msgid "Configure Tabulation"
+msgstr ""
+
+msgid "Tab style"
+msgstr ""
+
+msgid "Use spaces"
+msgstr ""
+
+msgid "Length"
+msgstr ""
+
+msgid "Tab representation"
+msgstr ""
+
+msgid "Double chevrons"
+msgstr ""
+
+msgid "Copy full path"
+msgstr ""
+
+msgid "Exact"
+msgstr ""
+
+msgid "Search Files..."
+msgstr ""
+
+msgid "Search in Files..."
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr ""
+
+msgid "Base directory:"
+msgstr ""
+
+msgid "Recursive"
+msgstr ""
+
+msgid "File pattern"
+msgstr ""
+
+msgid "(* for any string and ? for any character)"
+msgstr ""
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+
+msgid "Word pattern"
+msgstr ""
+
+msgid "Read file line by line"
+msgstr ""
+
+msgid "Choose..."
+msgstr ""
+
+msgid "Stop"
+msgstr ""
+
+msgid "Regex"
+msgstr ""
+
+msgid "Word"
+msgstr ""
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr ""
+
+msgid "Line by line"
+msgstr ""
+
+msgid "Regular expression (Word)"
+msgstr "Regulärer Ausdruck (Wort)"
+
+msgid "Choose the search base directory"
+msgstr ""
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Scilab '%s' Modul nicht installiert.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/es_ES.po b/modules/scinotes/locales/es_ES.po
new file mode 100755
index 000000000..defc5ff72
--- /dev/null
+++ b/modules/scinotes/locales/es_ES.po
@@ -0,0 +1,1141 @@
+# Spanish translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-07-16 15:49+0000\n"
+"Last-Translator: Scilab.team <Unknown>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: es\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "El módulo «%s» de Scilab está desactivado en modo -nogui o -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: No se puede leer el argumento de entrada #%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: No hay más memoria.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Tamaño incorrecto del argumento de entrada #%d and #%d: Se los esperaba "
+"del mismo tamaño.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "Archivo"
+
+msgid "New"
+msgstr "Nuevo"
+
+msgid "Open"
+msgstr "Abrir"
+
+msgid "Open recent"
+msgstr "Abrir reciente"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Directorios de trabajo;Añadir directorio;Quitar el último directorio"
+
+msgid "Open file in ..."
+msgstr "Abrir archivo en ..."
+
+msgid "Save file in ..."
+msgstr "Guardar archivo en ..."
+
+msgid "Reload"
+msgstr "Recargar"
+
+msgid "Restore opened files on start-up"
+msgstr "Restaurar los archivos abiertos en el arranque"
+
+msgid "Open function source file"
+msgstr "Abrir el archivo fuente de la función"
+
+msgid "Open URL"
+msgstr "Abrir URL"
+
+msgid "Save"
+msgstr "Guardar"
+
+msgid "Save as"
+msgstr "Guardar como"
+
+msgid "Save All"
+msgstr "Guardar todo"
+
+msgid "Overwrite"
+msgstr "Sobrescribir"
+
+msgid "Export"
+msgstr "Exportar"
+
+msgid "Page Setup"
+msgstr "Configuración de la Página"
+
+msgid "Print Preview"
+msgstr "Imprimir Vista Previa"
+
+msgid "Print"
+msgstr "Imprimir"
+
+msgid "Close"
+msgstr "Cerrar"
+
+msgid "Close All"
+msgstr "Cerrar todo"
+
+msgid "Close All But This"
+msgstr "Cerrar todas menos esta"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "Editar"
+
+msgid "Undo"
+msgstr "Deshacer"
+
+msgid "Redo"
+msgstr "Rehacer"
+
+msgid "Cut"
+msgstr "Cortar"
+
+msgid "Copy"
+msgstr "Copiar"
+
+msgid "Copy as HTML with line number"
+msgstr "Copiar como HTML con número de línea"
+
+msgid "Paste"
+msgstr "Pegar"
+
+msgid "Delete"
+msgstr "Eliminar"
+
+msgid "Columns actions"
+msgstr "Aciones de columnas"
+
+msgid "Paste Column"
+msgstr "Pegar columna"
+
+msgid "Repeat on the Column"
+msgstr "Repetir en la columna"
+
+msgid "Select All"
+msgstr "Seleccionar todo"
+
+msgid "Select current block"
+msgstr "Seleccionar bloque actual"
+
+msgid "Search"
+msgstr "Buscar"
+
+msgid "Find/Replace"
+msgstr "Buscar/Reemplazar"
+
+msgid "Find Next"
+msgstr "Buscar siguiente"
+
+msgid "Find Previous"
+msgstr "Buscar anterior"
+
+msgid "Incremental Search"
+msgstr "Búsqueda incremental"
+
+msgid "Find files"
+msgstr "Buscar archivos"
+
+msgid "Find word in files"
+msgstr "Buscar palabra en archivos"
+
+msgid "Set anchor"
+msgstr "Establecer anclaje"
+
+msgid "Go to next anchor"
+msgstr "Ir al siguiente ancla"
+
+msgid "Go to previous anchor"
+msgstr "Ir al ancla anterior"
+
+msgid "Remove anchor"
+msgstr "Desanclar"
+
+msgid "Code Navigator"
+msgstr "Explorador de código"
+
+msgid "Format"
+msgstr "Formato"
+
+msgid "Shift Right"
+msgstr "Desplazar a la Derecha"
+
+msgid "Shift Left"
+msgstr "Desplazar a la Izquierda"
+
+msgid "Correct Indentation"
+msgstr "Corregir identación"
+
+msgid "Remove trailing spaces"
+msgstr "Borrar espacios finales"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Generar comentarios para help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Comentar Selección"
+
+msgid "Uncomment Selection"
+msgstr "Descomentar Selección"
+
+msgid "Change the case"
+msgstr "Cambiar las mayúsculas"
+
+msgid "Make Selection Lowercase"
+msgstr "Pasar la selección a minúsculas"
+
+msgid "Make Selection Uppercase"
+msgstr "Pasar la selección a mayúsculas"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Capitalizar selección;Capitalizar caracter"
+
+msgid "Single to double quote strings"
+msgstr "Apostrofes a comillas"
+
+msgid "Options"
+msgstr "Opciones"
+
+msgid "Current file encoding"
+msgstr "Codificación del archivo actual"
+
+msgid "Line Endings"
+msgstr "Finales de línea"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Resaltar la línea actual"
+
+msgid "Enable Auto Reformat"
+msgstr "Activar re-formateado automático"
+
+msgid "Suppress comments when executing selection"
+msgstr "Suprimir comentarios al ejecutar selección"
+
+msgid "Window"
+msgstr "Ventana"
+
+msgid "Copy tab in new window"
+msgstr "Copiar la pestaña en una nueva ventana"
+
+msgid "Detach tab in new window"
+msgstr "Transformar pestaña en una nueva ventana"
+
+msgid "Copy selection in a new tab"
+msgstr "Copyar la selección a una nueva pestaña"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Ejecutar"
+
+msgid "... file with no echo"
+msgstr "... archivo sin eco"
+
+msgid "... file with echo"
+msgstr "... archivo con eco"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "... la selección con eco;... hasta el cursor, con eco"
+
+msgid "Save and execute"
+msgstr "Guardar y ejecutar"
+
+msgid "Save and execute all files"
+msgstr "Guardar y ejecutar todos los archivos"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr "Ayuda en ;Ayuda en la selección"
+
+msgid "About"
+msgstr "Acerca de"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Evaluar la selección con eco;Evaluar hasta el cursor, con eco"
+
+msgid "Complete"
+msgstr "Completo"
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr "Regla horizontal"
+
+msgid "Vertical rule"
+msgstr "Regla vertical"
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr "Campo del manejador gráfico"
+
+msgid "No help"
+msgstr "Sin ayuda"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Error leyendo el String"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr "Fuente de '"
+
+msgid "Recent Files"
+msgstr "Archivos Recientes"
+
+msgid "The file could not be created, check the path"
+msgstr "No pudo crearse el archivo, revise la ruta"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"El archivo no puede ser escrito por lo tanto fue abierto en modo de solo "
+"lectura"
+
+msgid "You do not have the permissions to write this file"
+msgstr "No tiene permisos para escribir este archivo"
+
+msgid "You do not have the permissions to read this file"
+msgstr "No tiene permisos para leer este archivo"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Ocurrió un error al exportar el código usando FOP"
+
+msgid "An error occurred when printing"
+msgstr "Ocurrió un error al imprimir"
+
+msgid "Exit"
+msgstr "Salir"
+
+msgid "Tools"
+msgstr "Herramientas"
+
+msgid "Help on typing"
+msgstr "Ayuda al escribir"
+
+msgid "Generate help from function"
+msgstr "Generar ayuda desde la función"
+
+msgid "Clone tab in a new window"
+msgstr "Clonar pestaña es una ventana nueva"
+
+msgid "Clone and close tab in a new window"
+msgstr "Clonar y cerrar pestaña"
+
+msgid "Remove trailing whitespaces"
+msgstr "Quitar los espacios al final de la línea"
+
+msgid "Goto line"
+msgstr "Ir a la línea"
+
+msgid "View"
+msgstr "Ver"
+
+msgid "Show/Hide ToolBar"
+msgstr "Mostrar/Ocultar Barra de Herramientas"
+
+msgid "Word Wrap"
+msgstr "Ajuste de palabras"
+
+msgid "Whereami Line Numbering"
+msgstr "Numeración de línea dondeestoy"
+
+msgid "Normal Line Numbering"
+msgstr "Numeración normal de línea"
+
+msgid "No Line Numbering"
+msgstr "No numerar las líneas"
+
+msgid "Set Colors"
+msgstr "Establecer Colores"
+
+msgid "Set Font"
+msgstr "Configurar Tipografía"
+
+msgid "Reset default font"
+msgstr "Volver a la fuente predeterminada"
+
+msgid "Split horizontally"
+msgstr "Dividir horizontalmente"
+
+msgid "Split vertically"
+msgstr "Dividir verticalmente"
+
+msgid "No split"
+msgstr "No separar"
+
+msgid "Document"
+msgstr "Documento"
+
+msgid "Syntax Type"
+msgstr "Tipo de Sintaxis"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Codificación"
+
+msgid "Colorize"
+msgstr "Colorear"
+
+msgid "Auto (Default)"
+msgstr "Auto (Predeterminada)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Clásico (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Cargar en Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Evaluar Selección"
+
+msgid "Evaluate from beginning..."
+msgstr "Evaluar desde el principio..."
+
+msgid "Execute File Into Scilab"
+msgstr "Ejecutar archivo en Scilab"
+
+msgid "SciNotes help"
+msgstr "Ayuda de SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Ayuda en la palabra clave actual"
+
+msgid "Help on the selected text"
+msgstr "Ayuda en el texto seleccionado"
+
+msgid "Help on selected text or keyword"
+msgstr "Ayuda acerca del texto o palabra clave seleccionada"
+
+msgid "Help about '"
+msgstr "Ayuda acerca de '"
+
+msgid "Find:"
+msgstr "Buscar:"
+
+msgid "Find"
+msgstr "Buscar"
+
+msgid "Replace/Find"
+msgstr "Reemplazar/Buscar"
+
+msgid "Replace With :"
+msgstr "Reemplazar con :"
+
+msgid "Direction"
+msgstr "Dirección"
+
+msgid "Forward"
+msgstr "Siguiente"
+
+msgid "Backward"
+msgstr "Retroceder"
+
+msgid "Scope"
+msgstr "Ámbito"
+
+msgid "All"
+msgstr "Todo"
+
+msgid "Selected lines"
+msgstr "Líneas seleccionadas"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Distinguir mayúsculas"
+
+msgid "Circular search"
+msgstr "Búsqueda cíclica"
+
+msgid "Restart the search from the beginning"
+msgstr "Reiniciar la búsqueda desde el principio"
+
+msgid "Whole word"
+msgstr "Palabra completa"
+
+msgid "Regular expressions"
+msgstr "Expresiones regulares"
+
+msgid "Replace"
+msgstr "Reemplazar"
+
+msgid "Replace All"
+msgstr "Reemplazar todos"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Expresión regular inválida : &s"
+
+msgid "You have passed the end of the document"
+msgstr "Pasó el final del documento"
+
+msgid "You have passed the beginning of the document"
+msgstr "Pasó el comienzo del documento"
+
+msgid "You have reached the end of the document"
+msgstr "Ha alcanzado el final del documento"
+
+msgid "You have reached the beginning of the document"
+msgstr "Alcanzó el comienzo del documento"
+
+#, c-format
+msgid "String %s not found"
+msgstr "No se encontró la cadena %s"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "cerrar esta pestaña"
+
+msgid "This file"
+msgstr "Este archivo"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Advertencia: ¡El archivo fue modificado por otro programa!"
+
+msgid "Ignore"
+msgstr "Ignorar"
+
+msgid "Replace File?"
+msgstr "¿Reemplazar Archivo?"
+
+msgid "File already exists"
+msgstr "El archivo ya existe"
+
+msgid "Untitled "
+msgstr "Sin Título "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr "Aplicar y reidentar"
+
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgid "Default"
+msgstr "Predeterminado"
+
+msgid "Next tab"
+msgstr "Pestaña siguiente"
+
+msgid "Previous tab"
+msgstr "Pestaña anterior"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Es necesario que guarde sus cambios antes de ejecutar este archivo en Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Este archivo es muy largo. «Ejecutar archivo en Scilab» puede ser mejor.\n"
+"¿Está seguro de que desea continuar?"
+
+msgid "Enter line number"
+msgstr "Ingrese el número de línea"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+"Este es un archivo binario, el guardarlo resultará en una corrupción del "
+"archivo."
+
+msgid "Loading"
+msgstr "Cargando"
+
+msgid "Colorization canceled"
+msgstr "Coloreado cancelado"
+
+msgid "Binary file: read-only mode"
+msgstr "Archivo binario: modo solo lectura"
+
+msgid "Read-only mode"
+msgstr "Modo de sólo lectura"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Presione CTRL y mueva el ratón sobre el enlace para activarlo"
+
+msgid "Open in the navigator the URL "
+msgstr "Abrir el URL en la navegación "
+
+msgid "Mail to "
+msgstr "Enviar correo a "
+
+msgid "Open the source of the macro "
+msgstr "Abrir la fuente del macro "
+
+msgid "Show the definition of the macro "
+msgstr "Mostrar la definición del Macro "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Línea %s, Columna %s. Función '%s' en la línea %s."
+
+msgid "Unknown function"
+msgstr "Función desconocida"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Línea %s, Columna %s."
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr "Error de SciNotes"
+
+msgid "The file could not be saved."
+msgstr "No pudo guardarse el archivo."
+
+msgid "The file could not be converted."
+msgstr "No pudo convertirse el archivo."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s es un directorio."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr ""
+"Sus cambios se perderán ¿Desea cambiar la codificación de todas formas?"
+
+msgid "Continue ?"
+msgstr "¿Continuar?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "No se pudo cargar \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "No se puede encontrar la consola ni InterpreterManagement."
+
+msgid "Could not find the temporary file."
+msgstr "No se pudo encontrar el archivo temporal."
+
+msgid "No text selected."
+msgstr "No hay texto seleccionado"
+
+msgid "No text to execute."
+msgstr "No hay texto para ejecutar"
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"La codificación actual del archivo es %s y será guardado usando %s. "
+"¿Continuar?"
+
+msgid "Encoding problems"
+msgstr "Problemas de codificación"
+
+msgid "Cannot guess the file encoding."
+msgstr "No se pudo adivinar la codificación del archivo"
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Cambiar Colores"
+
+msgid "Cursor Color"
+msgstr "Color del cursor"
+
+msgid "Background Color"
+msgstr "Color de fondo"
+
+msgid "Change Color"
+msgstr "Cambiar Color"
+
+msgid "Italic"
+msgstr "Itálica"
+
+msgid "Strike Through"
+msgstr "Tachado"
+
+msgid "Preview"
+msgstr "Vista previa"
+
+msgid "Underline"
+msgstr "Subrayar"
+
+msgid "Settings"
+msgstr "Configuración"
+
+msgid "Color"
+msgstr "Color"
+
+msgid "Bold"
+msgstr "Negrita"
+
+msgid "Absolute"
+msgstr "Absoluto"
+
+msgid "Relative"
+msgstr "Relativo"
+
+msgid "Go to line: "
+msgstr "Ir a la línea: "
+
+msgid "Numeration"
+msgstr "Numeración"
+
+msgid "Alphabetic order"
+msgstr "Orden alfabético"
+
+msgid "Natural order"
+msgstr "Orden natural"
+
+msgid "Order"
+msgstr "Orden"
+
+msgid "Functions"
+msgstr "Funciones"
+
+msgid "Anchors"
+msgstr "Anclajes"
+
+msgid "Anchor's name: "
+msgstr "Nombre del anclaje: "
+
+msgid "Set an anchor"
+msgstr "Establecer un anclaje"
+
+msgid "Anchor: "
+msgstr "Anclaje: "
+
+msgid "Open source file of the function:"
+msgstr "Abrir el archivo fuente de la función:"
+
+msgid "Open source"
+msgstr "Abrir fuente"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "¿Está seguro que desea cerrar SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "¿Restaurar los archivos de la última sesión de SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Restaurar las últimas sesiones"
+
+msgid "Configure Tabulation"
+msgstr "Configurar tabulación"
+
+msgid "Tab style"
+msgstr "Estilo de la tabulación"
+
+msgid "Use spaces"
+msgstr "Usar espacios"
+
+msgid "Length"
+msgstr "Longitud"
+
+msgid "Tab representation"
+msgstr "Representación de la tabulación"
+
+msgid "Double chevrons"
+msgstr "Doble chevrón"
+
+msgid "Copy full path"
+msgstr "Copiar ruta completa"
+
+msgid "Exact"
+msgstr "Exacto"
+
+msgid "Search Files..."
+msgstr "Buscar archivos..."
+
+msgid "Search in Files..."
+msgstr "Buscar en archivos..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s coincidencias)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s coincidencia)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Tiempo transcurrido: %s seg."
+
+msgid "Base directory:"
+msgstr "Directorio base:"
+
+msgid "Recursive"
+msgstr "Recursivo"
+
+msgid "File pattern"
+msgstr "Patrón de archivo"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* para cualquier string y ? para cualquier caracter)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+
+msgid "Word pattern"
+msgstr "Patrón de palabra"
+
+msgid "Read file line by line"
+msgstr "Leer archivo linea por linea"
+
+msgid "Choose..."
+msgstr "Elegir…"
+
+msgid "Stop"
+msgstr "Detener"
+
+msgid "Regex"
+msgstr "Expresión regular"
+
+msgid "Word"
+msgstr "Palabra"
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr "Búsqueda recursiva"
+
+msgid "Line by line"
+msgstr "Línea por línea"
+
+msgid "Regular expression (Word)"
+msgstr "Expresión regular (Palabra)"
+
+msgid "Choose the search base directory"
+msgstr "Escoja el directorio base para la búsqueda"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "El módulo '%s' de Scilab no está instalado.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/fr_FR.po b/modules/scinotes/locales/fr_FR.po
new file mode 100755
index 000000000..8cdc4fe97
--- /dev/null
+++ b/modules/scinotes/locales/fr_FR.po
@@ -0,0 +1,1196 @@
+# French translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-09-09 10:04+0000\n"
+"Last-Translator: Julie PAUL <Unknown>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: fr\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Le module Scilab '%s' est désactivé en mode -nogui ou -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s : Impossible de lire l'argument d'entrée n°%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+"%s : Type erroné de l'argument n°%d : Une matrice de chaînes de caractères "
+"attendue.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s : Plus de mémoire disponible.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+"%s : Type erroné de l'argument n°%d : Une matrice réelle ou 'readonly' "
+"attendu.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr "%s : Type erroné de l'argument n°%d : Une matrice réelle attendue.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s : Dimension erronée des arguments d'entrée n°%d et n°%d : Mêmes "
+"dimensions attendues.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+"%s : Type erroné de l'argument n°%d : Une chaîne de caractères attendue.\n"
+
+msgid "File"
+msgstr "Fichier"
+
+msgid "New"
+msgstr "Nouveau"
+
+msgid "Open"
+msgstr "Ouvrir"
+
+msgid "Open recent"
+msgstr "Ouvrir récent"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+"Répertoires de travail;Ajouter un répertoire;Supprimer le dernier répertoire"
+
+msgid "Open file in ..."
+msgstr "Ouvrir le fichier dans ..."
+
+msgid "Save file in ..."
+msgstr "Enregistrer le fichier dans..."
+
+msgid "Reload"
+msgstr "Recharger"
+
+msgid "Restore opened files on start-up"
+msgstr "Restaurer les fichiers ouverts au démarrage"
+
+msgid "Open function source file"
+msgstr "Ouvrir le fichier source d'une fonction"
+
+msgid "Open URL"
+msgstr "Ouvrir l’URL"
+
+msgid "Save"
+msgstr "Enregistrer"
+
+msgid "Save as"
+msgstr "Enregistrer sous"
+
+msgid "Save All"
+msgstr "Enregistrer tout"
+
+msgid "Overwrite"
+msgstr "Écraser"
+
+msgid "Export"
+msgstr "Exporter"
+
+msgid "Page Setup"
+msgstr "Mise en page"
+
+msgid "Print Preview"
+msgstr "Aperçu avant impression"
+
+msgid "Print"
+msgstr "Imprimer"
+
+msgid "Close"
+msgstr "Fermer"
+
+msgid "Close All"
+msgstr "Fermer tout"
+
+msgid "Close All But This"
+msgstr "Fermer tout sauf le document actif"
+
+msgid "Exit Scinotes"
+msgstr "Quitter SciNotes"
+
+msgid "Edit"
+msgstr "Édition"
+
+msgid "Undo"
+msgstr "Annuler"
+
+msgid "Redo"
+msgstr "Rétablir"
+
+msgid "Cut"
+msgstr "Couper"
+
+msgid "Copy"
+msgstr "Copier"
+
+msgid "Copy as HTML with line number"
+msgstr "Copier en HTML avec les numéros de ligne"
+
+msgid "Paste"
+msgstr "Coller"
+
+msgid "Delete"
+msgstr "Supprimer"
+
+msgid "Columns actions"
+msgstr "Actions sur les colonnes"
+
+msgid "Paste Column"
+msgstr "Coller la colonne"
+
+msgid "Repeat on the Column"
+msgstr "Répéter sur la colonne"
+
+msgid "Select All"
+msgstr "Sélectionner tout"
+
+msgid "Select current block"
+msgstr "Sélectionner le bloc actuel"
+
+msgid "Search"
+msgstr "Rechercher"
+
+msgid "Find/Replace"
+msgstr "Rechercher/Remplacer"
+
+msgid "Find Next"
+msgstr "Rechercher suivant"
+
+msgid "Find Previous"
+msgstr "Rechercher précédent"
+
+msgid "Incremental Search"
+msgstr "Recherche incrémentale"
+
+msgid "Find files"
+msgstr "Rechercher des fichiers"
+
+msgid "Find word in files"
+msgstr "Rechercher une chaîne dans des fichiers"
+
+msgid "Set anchor"
+msgstr "Ajouter une ancre"
+
+msgid "Go to next anchor"
+msgstr "Ancre suivante"
+
+msgid "Go to previous anchor"
+msgstr "Ancre précédente"
+
+msgid "Remove anchor"
+msgstr "Supprimer l'ancre"
+
+msgid "Code Navigator"
+msgstr "Navigateur de code"
+
+msgid "Format"
+msgstr "Format"
+
+msgid "Shift Right"
+msgstr "Décaler à droite"
+
+msgid "Shift Left"
+msgstr "Décaler à gauche"
+
+msgid "Correct Indentation"
+msgstr "Corriger l'indentation"
+
+msgid "Remove trailing spaces"
+msgstr "Supprimer les espaces de fin"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Générer les commentaires pour help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Commenter la sélection"
+
+msgid "Uncomment Selection"
+msgstr "Décommenter la sélection"
+
+msgid "Change the case"
+msgstr "Changer la casse"
+
+msgid "Make Selection Lowercase"
+msgstr "Transformer la sélection en minuscules"
+
+msgid "Make Selection Uppercase"
+msgstr "Transformer la sélection en majuscules"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Capitaliser la sélection;Caractère en majuscule"
+
+msgid "Single to double quote strings"
+msgstr "Chaîne simple guillemet vers double guillemets"
+
+msgid "Options"
+msgstr "Options"
+
+msgid "Current file encoding"
+msgstr "Encodage du fichier actuel"
+
+msgid "Line Endings"
+msgstr "Fin de lignes"
+
+msgid "Preferences"
+msgstr "Préférences"
+
+msgid "Set font"
+msgstr "Définir la police"
+
+msgid "Set colors"
+msgstr "Définir les couleurs"
+
+msgid "Scinotes General settings"
+msgstr "Paramètres généraux de SciNotes"
+
+msgid "Auto-completion on"
+msgstr "Complétion automatique sur"
+
+msgid "(, [, ..."
+msgstr "(, [, ..."
+
+msgid "if, function, ..."
+msgstr "if, function, ..."
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr "Numérotation des lignes;Aucune;Normale;Locale"
+
+msgid "Highlight current line"
+msgstr "Mettre en surbrillance la ligne actuelle"
+
+msgid "Enable Auto Reformat"
+msgstr "Activer la mise en forme automatique"
+
+msgid "Suppress comments when executing selection"
+msgstr "Supprimer les commentaires à l'exécution de la sélection"
+
+msgid "Window"
+msgstr "Fenêtre"
+
+msgid "Copy tab in new window"
+msgstr "Copier l'onglet dans une nouvelle fenêtre"
+
+msgid "Detach tab in new window"
+msgstr "Extraire la tabulation dans une nouvelle fenêtre"
+
+msgid "Copy selection in a new tab"
+msgstr "Copier la sélection dans un nouvel onglet"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+"Séparation de la vue;Aucune;Séparation en deux colonnes;Séparation en deux "
+"lignes"
+
+msgid "Execute"
+msgstr "Exécuter"
+
+msgid "... file with no echo"
+msgstr "... fichier sans écho"
+
+msgid "... file with echo"
+msgstr "... fichier avec écho"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "... la sélection avec écho;... jusqu'au curseur, avec écho"
+
+#
+# File: scilab_fake_localization_file.c, line: 84
+msgid "Save and execute"
+msgstr "Enregistrer et exécuter"
+
+msgid "Save and execute all files"
+msgstr "Enregistrer et exécuter tous les fichiers"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr "Aide de SciNotes"
+
+msgid "Help on ;Help on selection"
+msgstr "Aide sur ;Aide sur la sélection"
+
+msgid "About"
+msgstr "À propos"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Évaluer la sélection avec écho;Évaluer jusqu'au curseur, avec écho"
+
+msgid "Complete"
+msgstr "Compléter"
+
+msgid "Display"
+msgstr "Affichage"
+
+msgid "Header"
+msgstr "En-tête"
+
+msgid "Autosave"
+msgstr "Enregistrement automatique"
+
+msgid "Editor"
+msgstr "Éditeur"
+
+msgid "Use Scinotes"
+msgstr "Utiliser SciNotes"
+
+msgid "External editor: "
+msgstr "Éditeur externe : "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+"N'oubliez pas de mettre des guillemets autour du chemin s'il contient des "
+"espaces blancs"
+
+msgid "Scilab command: "
+msgstr "Commande Scilab : "
+
+msgid "Restore previous session on start-up"
+msgstr "Restaurer la session précédente au démarrage"
+
+msgid "Add carriage return at the end of the file."
+msgstr "Ajouter retour chariot à la fin du fichier"
+
+msgid "Number of recently opened files to display: "
+msgstr "Nombre de fichiers ouverts récemment à afficher : "
+
+msgid "Default file encoding: "
+msgstr "Encodage de fichier par défaut : "
+
+msgid "Default End-Of-Line: "
+msgstr "Fin de ligne par défaut : "
+
+msgid "Completion"
+msgstr "Complétion"
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+"Complétion automatique sur les parenthèses quand le curseur est à la fin "
+"d'une ligne"
+
+msgid "General display options"
+msgstr "Options d'affichage"
+
+msgid "Highlight current line: "
+msgstr "Mettre en surbrillance la ligne courante : "
+
+msgid "Show line numbers: "
+msgstr "Afficher les numéros de ligne : "
+
+msgid "Local numbering"
+msgstr "Numérotation locale"
+
+msgid "Normal"
+msgstr "Normal"
+
+msgid "Wrap lines"
+msgstr "Retour automatique à la ligne"
+
+msgid "Background color: "
+msgstr "Couleur d'arrière-plan : "
+
+msgid "Cursor color: "
+msgstr "Couleur du curseur : "
+
+msgid "Keywords"
+msgstr "Mots-clés"
+
+msgid "Enable keywords colorization"
+msgstr "Activer la coloration des mots-clés"
+
+msgid "Set syntax Colors"
+msgstr "Régler les couleurs de syntaxe"
+
+msgid "Highlight corresponding brackets"
+msgstr "Mettre en surbrillance les parenthèses correspondantes"
+
+msgid "Color: "
+msgstr "Couleur: "
+
+msgid "Highlight on mouse over"
+msgstr "Mettre en surbrillance au passage de la souris"
+
+msgid "Style: "
+msgstr "Style : "
+
+msgid "Filled"
+msgstr "Surligné"
+
+msgid "Framed"
+msgstr "Encadré"
+
+msgid "Underlined"
+msgstr "Souligné"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+"Mettre en surbrillance les mots-clés correspondants (e.g. if ... end)"
+
+msgid "Tabulation and Indentation"
+msgstr "Tabulation et indentation"
+
+msgid "Tabulation size: "
+msgstr "Taille des tabulations : "
+
+msgid "Use space"
+msgstr "Utiliser des espaces"
+
+msgid "Representation: "
+msgstr "Représentation : "
+
+msgid "Chevrons"
+msgstr "Chevrons"
+
+msgid "Horizontal rule"
+msgstr "Règle horizontale"
+
+msgid "Vertical rule"
+msgstr "Règle verticale"
+
+msgid "Enable auto indentation"
+msgstr "Activer l'indentation automatique"
+
+msgid "Indent size: "
+msgstr "Taille des indentations : "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Activer l'enregistrement automatique dans SciNotes"
+
+msgid "Save options"
+msgstr "Options de sauvegarde"
+
+msgid "Save every "
+msgstr "Enregistrer toutes les "
+
+msgid " minutes "
+msgstr " minutes "
+
+msgid "Close options"
+msgstr "Options de fermeture"
+
+msgid "Delete automatically saved files"
+msgstr "Supprimer les fichiers enregistrés automatiquement"
+
+msgid "Filename"
+msgstr "Nom de fichier"
+
+msgid "Append filename with: "
+msgstr "Adjoindre le nom de fichier avec : "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr "(%date peut être utilisée pour être remplacée par la date actuelle)"
+
+msgid "Replace extension with: "
+msgstr "Remplacer l'extension par : "
+
+msgid "Location"
+msgstr "Emplacement"
+
+msgid "Source file directory"
+msgstr "Répertoire du fichier source"
+
+msgid "Single directory"
+msgstr "Répertoire unique"
+
+msgid "Choose an autosave directory"
+msgstr "Choisir un répertoire d'enregistrement automatique"
+
+msgid "Default header"
+msgstr "En-tête par défaut"
+
+msgid "Add a default header to new file"
+msgstr "Ajouter un en-tête par défaut à un nouveau fichier"
+
+msgid "Graphics handle field"
+msgstr "Champ d'un handle graphique"
+
+msgid "No help"
+msgstr "Pas d'aide"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Erreur pendant la lecture de la chaîne de caractères"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+"Le fichier de configuration a été endommagé. Réinitialisation à celui par "
+"défaut."
+
+#, c-format
+msgid "File not found: %s"
+msgstr "Fichier introuvable : %s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "Erreur E/S : %s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr "Le fichier %s a été modifié par un autre programme. Le recharger ?"
+
+msgid "Source of '"
+msgstr "Source de '"
+
+msgid "Recent Files"
+msgstr "Fichiers récents"
+
+msgid "The file could not be created, check the path"
+msgstr "Impossible de créer le fichier, vérifiez le chemin"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"Le fichier n'est pas accessible en écriture, il sera donc ouvert en lecture "
+"seule."
+
+msgid "You do not have the permissions to write this file"
+msgstr "Vous n'avez pas les droits suffisants pour écrire sur ce fichier"
+
+msgid "You do not have the permissions to read this file"
+msgstr "Vous n'avez pas les droits suffisants pour ouvrir ce fichier"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Une erreur s'est produite pendant l'exécution du code avec FOP"
+
+msgid "An error occurred when printing"
+msgstr "Une erreur s'est produite pendant l'impression"
+
+msgid "Exit"
+msgstr "Quitter"
+
+msgid "Tools"
+msgstr "Outils"
+
+msgid "Help on typing"
+msgstr "Aide à la saisie"
+
+msgid "Generate help from function"
+msgstr "Générer l'aide de la fonction"
+
+msgid "Clone tab in a new window"
+msgstr "Dupliquer l'onglet dans une nouvelle fenêtre"
+
+msgid "Clone and close tab in a new window"
+msgstr "Dupliquer et fermer l'onglet dans une nouvelle fenêtre"
+
+msgid "Remove trailing whitespaces"
+msgstr "Supprimer les espaces blancs en trop"
+
+msgid "Goto line"
+msgstr "Aller à la ligne"
+
+msgid "View"
+msgstr "Affichage"
+
+msgid "Show/Hide ToolBar"
+msgstr "Afficher/Masquer la barre d'outils"
+
+msgid "Word Wrap"
+msgstr "Césure des lignes"
+
+msgid "Whereami Line Numbering"
+msgstr "Numérotation de lignes whereami"
+
+msgid "Normal Line Numbering"
+msgstr "Numérotation de lignes normale"
+
+msgid "No Line Numbering"
+msgstr "Non-numérotation de lignes"
+
+msgid "Set Colors"
+msgstr "Définir les couleurs"
+
+msgid "Set Font"
+msgstr "Définir la police"
+
+msgid "Reset default font"
+msgstr "Rétablir les polices par défaut"
+
+msgid "Split horizontally"
+msgstr "Scission horizontale"
+
+msgid "Split vertically"
+msgstr "Scission verticale"
+
+msgid "No split"
+msgstr "Pas de décomposition"
+
+msgid "Document"
+msgstr "Document"
+
+msgid "Syntax Type"
+msgstr "Type de syntaxe"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Encodage"
+
+msgid "Colorize"
+msgstr "Coloriser"
+
+msgid "Auto (Default)"
+msgstr "Auto (Défaut)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Charger dans Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Évaluer la sélection"
+
+msgid "Evaluate from beginning..."
+msgstr "Évaluer depuis le début..."
+
+msgid "Execute File Into Scilab"
+msgstr "Exécuter le fichier dans Scilab"
+
+msgid "SciNotes help"
+msgstr "Aide de SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Aide sur le mot-clé actuel"
+
+msgid "Help on the selected text"
+msgstr "Aide sur le texte sélectionné"
+
+msgid "Help on selected text or keyword"
+msgstr "Aide sur le texte sélectionné ou sur le mot-clé"
+
+msgid "Help about '"
+msgstr "Aide sur '"
+
+msgid "Find:"
+msgstr "Rechercher :"
+
+msgid "Find"
+msgstr "Rechercher"
+
+msgid "Replace/Find"
+msgstr "Rechercher/Remplacer"
+
+msgid "Replace With :"
+msgstr "Remplacer par :"
+
+msgid "Direction"
+msgstr "Direction"
+
+msgid "Forward"
+msgstr "Suivant"
+
+msgid "Backward"
+msgstr "En arrière"
+
+msgid "Scope"
+msgstr "Portée"
+
+msgid "All"
+msgstr "Tous"
+
+msgid "Selected lines"
+msgstr "Lignes sélectionnées"
+
+msgid "Select from caret"
+msgstr "Sélectionner à partir du curseur"
+
+msgid "Case sensitive"
+msgstr "Respecter la casse"
+
+msgid "Circular search"
+msgstr "Recherche circulaire"
+
+msgid "Restart the search from the beginning"
+msgstr "Continuer la recherche depuis le début"
+
+msgid "Whole word"
+msgstr "Mot entier"
+
+msgid "Regular expressions"
+msgstr "Expressions rationnelles"
+
+msgid "Replace"
+msgstr "Remplacer"
+
+msgid "Replace All"
+msgstr "Remplacer tout"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Expression rationnelle invalide : %s"
+
+msgid "You have passed the end of the document"
+msgstr "Vous avez dépassé la fin du document"
+
+msgid "You have passed the beginning of the document"
+msgstr "Vous avez dépassé le début du document"
+
+msgid "You have reached the end of the document"
+msgstr "Vous avez atteint la fin du document"
+
+msgid "You have reached the beginning of the document"
+msgstr "Vous avez atteint le début du document"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Chaîne %s non trouvée"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "Le fichier %s n'existe pas. Souhaitez-vous le créer ?"
+
+msgid "close this tab"
+msgstr "Fermer cet onglet"
+
+msgid "This file"
+msgstr "Ce fichier"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+"Le fichier %s a été modifié depuis le dernier enregistrement. L'enregistrer ?"
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr "Le fichier %s a été modifié par un autre programme. L'écraser ?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Attention : Le fichier a été modifié par un autre programme !"
+
+msgid "Ignore"
+msgstr "Ignorer"
+
+msgid "Replace File?"
+msgstr "Remplacer le fichier ?"
+
+msgid "File already exists"
+msgstr "Le fichier existe déjà"
+
+msgid "Untitled "
+msgstr "Sans titre "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr "Appliquer et ré-indenter"
+
+msgid "Cancel"
+msgstr "Annuler"
+
+msgid "Default"
+msgstr "Standard"
+
+msgid "Next tab"
+msgstr "Onglet suivant"
+
+msgid "Previous tab"
+msgstr "Onglet précédent"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Enregistrez vos modifications avant d'exécuter ce fichier dans Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Ce fichier comporte un nombre de lignes très important. Le menu \"Exécuter / "
+"fichier sans écho\" serait plus approprié.\n"
+"Êtes-vous sûr de vouloir continuer ?"
+
+msgid "Enter line number"
+msgstr "Entrer le numéro de ligne"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "Il s'agit d'un fichier binaire, l'enregistrer pourrait le corrompre."
+
+msgid "Loading"
+msgstr "Chargement"
+
+msgid "Colorization canceled"
+msgstr "Coloration annulée"
+
+msgid "Binary file: read-only mode"
+msgstr "Fichier binaire : mode en lecture seule"
+
+msgid "Read-only mode"
+msgstr "Mode en lecture seule"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Appuyez sur CTRL et déplacez la souris sur le lien pour l'activer"
+
+msgid "Open in the navigator the URL "
+msgstr "Ouvrir l'URL dans le navigateur "
+
+msgid "Mail to "
+msgstr "Courrier à "
+
+msgid "Open the source of the macro "
+msgstr "Ouvrir le code source de la macro "
+
+msgid "Show the definition of the macro "
+msgstr "Afficher la définition de la macro "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Ligne %s, Colonne %s. Fonction '%s' à la Ligne %s."
+
+msgid "Unknown function"
+msgstr "Fonction inconnue"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Ligne %s, Colonne %s."
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr "Erreur SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Impossible d'enregistrer le fichier"
+
+msgid "The file could not be converted."
+msgstr "Impossible de convertir le fichier"
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s est un répertoire."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr ""
+"Vos modifications seront perdues, êtes-vous sûr de vouloir changer "
+"l'encodage ?"
+
+msgid "Continue ?"
+msgstr "Continuer ?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Impossible de charger \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Impossible de trouver la console ou l'InterpreterManagement."
+
+msgid "Could not find the temporary file."
+msgstr "Impossible de trouver le fichier temporaire."
+
+msgid "No text selected."
+msgstr "Pas de texte sélectionné."
+
+msgid "No text to execute."
+msgstr "Pas de texte à exécuter."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"L'encodage de fichier est actuellement %s ; il sera enregistré en %s. "
+"Continuer ?"
+
+msgid "Encoding problems"
+msgstr "Problèmes d'encodage"
+
+msgid "Cannot guess the file encoding."
+msgstr "Impossible de supposer l'encodage du fichier."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+"Impossible d'enregistrer le fichier %s... Arrêt du processus de sauvegarde"
+
+msgid "Backup finished..."
+msgstr "Sauvegarde terminée..."
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr "Le répertoire %s n'existe pas. Souhaitez-vous le créer ?"
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+"Le répertoire %s ne peut pas être créé. Veuillez vérifier vos droits d'accès."
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+"Impossible d'écrire un fichier dans %s. Veuillez vérifier vos droits d'accès."
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr "Nom de répertoire invalide : %s."
+
+msgid "SciNotes autosave"
+msgstr "Enregistrement automatique de SciNotes"
+
+#, c-format
+msgid "%s occurences found."
+msgstr "%s occurrences trouvées."
+
+msgid "Change Colors"
+msgstr "Changer les couleurs"
+
+msgid "Cursor Color"
+msgstr "Couleur du curseur"
+
+msgid "Background Color"
+msgstr "Couleur de fond"
+
+msgid "Change Color"
+msgstr "Changer la couleur"
+
+msgid "Italic"
+msgstr "Italique"
+
+msgid "Strike Through"
+msgstr "Barré"
+
+msgid "Preview"
+msgstr "Prévisualisation"
+
+msgid "Underline"
+msgstr "Souligner"
+
+msgid "Settings"
+msgstr "Paramètres"
+
+msgid "Color"
+msgstr "Couleur"
+
+msgid "Bold"
+msgstr "Gras"
+
+msgid "Absolute"
+msgstr "Absolu"
+
+msgid "Relative"
+msgstr "Relatif"
+
+msgid "Go to line: "
+msgstr "Aller à la ligne : "
+
+msgid "Numeration"
+msgstr "Numération"
+
+msgid "Alphabetic order"
+msgstr "Ordre alphabétique"
+
+msgid "Natural order"
+msgstr "Ordre naturel"
+
+msgid "Order"
+msgstr "Ordre"
+
+msgid "Functions"
+msgstr "Fonctions"
+
+msgid "Anchors"
+msgstr "Ancres"
+
+msgid "Anchor's name: "
+msgstr "Nom de l'ancre : "
+
+msgid "Set an anchor"
+msgstr "Ajouter une ancre"
+
+msgid "Anchor: "
+msgstr "Ancre : "
+
+msgid "Open source file of the function:"
+msgstr "Ouvrir le fichier source de la fonction :"
+
+msgid "Open source"
+msgstr "Ouvrir la source"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Êtes-vous sûr de vouloir fermer SciNotes ?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Restaurer les fichiers de la session précédente ?"
+
+msgid "Restore the last sessions"
+msgstr "Restaurer la dernière session"
+
+msgid "Configure Tabulation"
+msgstr "Configurer la tabulation"
+
+msgid "Tab style"
+msgstr "Style de tabulation"
+
+msgid "Use spaces"
+msgstr "Utilisez des espaces"
+
+msgid "Length"
+msgstr "Longueur"
+
+msgid "Tab representation"
+msgstr "Représentation de la tabulation"
+
+msgid "Double chevrons"
+msgstr "Double chevrons"
+
+msgid "Copy full path"
+msgstr "Copier le chemin complet"
+
+msgid "Exact"
+msgstr "Exact"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 306
+msgid "Search Files..."
+msgstr "Rechercher des fichiers..."
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 307
+msgid "Search in Files..."
+msgstr "Rechercher dans des fichiers..."
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 308
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s correspondances)</i></html>"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 309
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s correspondance)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Temps écoulé : %s sec."
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 312
+msgid "Base directory:"
+msgstr "Répertoire de base :"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 313
+msgid "Recursive"
+msgstr "Récursive"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 314
+msgid "File pattern"
+msgstr "Motif fichier"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* pour une chaîne de caractères et ? pour un caractère)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+"(~ pour le répertoire home de l'utilisateur et SCI pour le répertoire de "
+"base de Scilab)"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 316
+msgid "Word pattern"
+msgstr "Motif de mot"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 317
+msgid "Read file line by line"
+msgstr "Lire le fichier ligne par ligne"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 318
+msgid "Choose..."
+msgstr "Sélectionner..."
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 319
+msgid "Stop"
+msgstr "Arrêter"
+
+msgid "Regex"
+msgstr "Expression rationelle"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 321
+msgid "Word"
+msgstr "Mot"
+
+msgid "Case-sensitivity (Word)"
+msgstr "Respecter la casse (mot)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "Respecter la casse (nom de fichier)"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 324
+msgid "Recursive search"
+msgstr "Recherche récursive"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 325
+msgid "Line by line"
+msgstr "Ligne par ligne"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 326
+msgid "Regular expression (Word)"
+msgstr "Expression rationnelle (mot)"
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 327
+msgid "Choose the search base directory"
+msgstr "Sélectionner le répertoire de base pour la recherche"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Le module '%s' de Scilab n'est pas installé.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr "La dernière erreur ne s'est pas produite dans une macro Scilab."
+
+msgid " on line "
+msgstr " à la ligne "
+
+msgid "Opening file "
+msgstr "Ouverture du fichier "
+
+msgid " of the source file of the function "
+msgstr " du fichier source de la fonction "
+
+msgid "The source file of the function "
+msgstr "Le fichier source de la fonction "
+
+msgid " was not found in any library path"
+msgstr " n'a pas pu être trouvée dans aucune bibliothèque"
+
+msgid "There is no recorded error"
+msgstr "Il n'y a aucune erreur enregistrée"
diff --git a/modules/scinotes/locales/it_IT.po b/modules/scinotes/locales/it_IT.po
new file mode 100755
index 000000000..8e0bd3813
--- /dev/null
+++ b/modules/scinotes/locales/it_IT.po
@@ -0,0 +1,1143 @@
+# Italian translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-07-16 15:53+0000\n"
+"Last-Translator: Carml <mighty.carml@gmail.com>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: it\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr ""
+"Il modulo \"%s\" di Scilab è disabilitato in modalità -nogui o -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Memoria esaurita.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Gli argomenti in ingresso #%d e #%d hanno una dimensione sbagliata: "
+"erano attese le stesse dimensioni.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "_File"
+
+msgid "New"
+msgstr "_Nuovo"
+
+msgid "Open"
+msgstr "_Apri"
+
+msgid "Open recent"
+msgstr ""
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+"Le directory di lavoro; Aggiungi una directory;Rimuovi l'ultima directory"
+
+msgid "Open file in ..."
+msgstr "Apri file in ..."
+
+msgid "Save file in ..."
+msgstr "Salva file in ..."
+
+msgid "Reload"
+msgstr "Ricarica"
+
+msgid "Restore opened files on start-up"
+msgstr "Ripristina all'avvio i file aperti"
+
+msgid "Open function source file"
+msgstr ""
+
+msgid "Open URL"
+msgstr "Apri URL"
+
+msgid "Save"
+msgstr "_Salva"
+
+msgid "Save as"
+msgstr "Sal_va come"
+
+msgid "Save All"
+msgstr "Salva tutto"
+
+msgid "Overwrite"
+msgstr "Sovrascrivi"
+
+msgid "Export"
+msgstr "Esporta"
+
+msgid "Page Setup"
+msgstr "_Imposta pagina"
+
+msgid "Print Preview"
+msgstr "Antepri_ma di stampa"
+
+msgid "Print"
+msgstr "Stam_pa"
+
+msgid "Close"
+msgstr "Chiudere"
+
+msgid "Close All"
+msgstr "Chiudi tutto"
+
+msgid "Close All But This"
+msgstr "Chiudi tutte tranne questa"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "_Modifica"
+
+msgid "Undo"
+msgstr "_Annulla"
+
+msgid "Redo"
+msgstr "_Ripeti"
+
+msgid "Cut"
+msgstr "_Taglia"
+
+msgid "Copy"
+msgstr "_Copia"
+
+msgid "Copy as HTML with line number"
+msgstr "Copia come HTML con numeri di riga"
+
+msgid "Paste"
+msgstr "_Incolla"
+
+msgid "Delete"
+msgstr "Elimina"
+
+msgid "Columns actions"
+msgstr ""
+
+msgid "Paste Column"
+msgstr "Incolla la colonna"
+
+msgid "Repeat on the Column"
+msgstr ""
+
+msgid "Select All"
+msgstr "_Seleziona tutto"
+
+msgid "Select current block"
+msgstr ""
+
+msgid "Search"
+msgstr "_Cerca"
+
+msgid "Find/Replace"
+msgstr "Trova/Sostit_uisci"
+
+msgid "Find Next"
+msgstr "Trova successivo"
+
+msgid "Find Previous"
+msgstr "Trova precedente"
+
+msgid "Incremental Search"
+msgstr "Ricerca incrementale"
+
+msgid "Find files"
+msgstr "Cerca file"
+
+msgid "Find word in files"
+msgstr "Cerca una parola nei file"
+
+msgid "Set anchor"
+msgstr ""
+
+msgid "Go to next anchor"
+msgstr ""
+
+msgid "Go to previous anchor"
+msgstr ""
+
+msgid "Remove anchor"
+msgstr ""
+
+msgid "Code Navigator"
+msgstr "Navigatore del codice"
+
+msgid "Format"
+msgstr ""
+
+msgid "Shift Right"
+msgstr "Sposta a _destra"
+
+msgid "Shift Left"
+msgstr "Sposta a si_nistra"
+
+msgid "Correct Indentation"
+msgstr "Correggi l'indentazione"
+
+msgid "Remove trailing spaces"
+msgstr ""
+
+msgid "Generate comments for help_from_sci"
+msgstr ""
+
+msgid "Comment Selection"
+msgstr "_Commenta la selezione"
+
+msgid "Uncomment Selection"
+msgstr "_Togli il commento alla selezione"
+
+msgid "Change the case"
+msgstr ""
+
+msgid "Make Selection Lowercase"
+msgstr "Trasforma in minuscolo la selezione"
+
+msgid "Make Selection Uppercase"
+msgstr "Trasforma in maiuscolo la selezione"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr ""
+
+msgid "Single to double quote strings"
+msgstr ""
+
+msgid "Options"
+msgstr "Opzioni"
+
+msgid "Current file encoding"
+msgstr "Codifica attuale del file"
+
+msgid "Line Endings"
+msgstr "Fine riga"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "_Evidenzia la riga attuale"
+
+msgid "Enable Auto Reformat"
+msgstr "Abilita la riformattazione automatica"
+
+msgid "Suppress comments when executing selection"
+msgstr ""
+
+msgid "Window"
+msgstr "Finestra"
+
+msgid "Copy tab in new window"
+msgstr "Copia la scheda in una nuova finestra"
+
+msgid "Detach tab in new window"
+msgstr "Apri la scheda in una nuova finestra"
+
+msgid "Copy selection in a new tab"
+msgstr "Copia la selezione in una nuova scheda"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "_Esegui"
+
+msgid "... file with no echo"
+msgstr "... file senza echo"
+
+msgid "... file with echo"
+msgstr ""
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+
+msgid "Save and execute"
+msgstr "Salva ed esegui"
+
+msgid "Save and execute all files"
+msgstr ""
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr "Aiuto su ; aiuto sulla selezione"
+
+msgid "About"
+msgstr "Informazioni"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+
+msgid "Complete"
+msgstr "Completo"
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr ""
+
+msgid "Vertical rule"
+msgstr "Righello verticale"
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr ""
+
+msgid "No help"
+msgstr "Nessun aiuto"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Errore durante la lettura della stringa"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr ""
+
+msgid "Recent Files"
+msgstr "File _recenti"
+
+msgid "The file could not be created, check the path"
+msgstr "Il file non può essere creato,controllare il percorso"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"Il file non può essere scritto,cosicché è aperto in modalità di sola lettura"
+
+msgid "You do not have the permissions to write this file"
+msgstr "Non si hanno i permessi di scrittura per questo file"
+
+msgid "You do not have the permissions to read this file"
+msgstr "Non si dispone dei permessi per leggere questo file"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr ""
+"Si è verificato un errore durante l'esportazione del codice usando FOP"
+
+msgid "An error occurred when printing"
+msgstr "Si è verificato un errore durante la stampa"
+
+msgid "Exit"
+msgstr "_Esci"
+
+msgid "Tools"
+msgstr "Strumenti"
+
+msgid "Help on typing"
+msgstr ""
+
+msgid "Generate help from function"
+msgstr ""
+
+msgid "Clone tab in a new window"
+msgstr "Clona la scheda in una nuova finestra"
+
+msgid "Clone and close tab in a new window"
+msgstr "Clona e chiudi la scheda in una nuova finestra"
+
+msgid "Remove trailing whitespaces"
+msgstr ""
+
+msgid "Goto line"
+msgstr "_Vai alla linea"
+
+msgid "View"
+msgstr "_Visualizza"
+
+msgid "Show/Hide ToolBar"
+msgstr "Mostra/Nascondi Barra degli strumenti"
+
+msgid "Word Wrap"
+msgstr "A capo automatico"
+
+msgid "Whereami Line Numbering"
+msgstr ""
+
+msgid "Normal Line Numbering"
+msgstr "Numerazione normale delle righe"
+
+msgid "No Line Numbering"
+msgstr ""
+
+msgid "Set Colors"
+msgstr "Imposta i co_lori"
+
+msgid "Set Font"
+msgstr "Imposta il tipo di carattere"
+
+msgid "Reset default font"
+msgstr "_Reimposta il font predefinito"
+
+msgid "Split horizontally"
+msgstr ""
+
+msgid "Split vertically"
+msgstr ""
+
+msgid "No split"
+msgstr ""
+
+msgid "Document"
+msgstr "_Documento"
+
+msgid "Syntax Type"
+msgstr "Tipo di sintassi"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "_Codifica"
+
+msgid "Colorize"
+msgstr "_Colora"
+
+msgid "Auto (Default)"
+msgstr "Auto (Predefinito)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classico (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "_Carica in Scilab"
+
+msgid "Evaluate Selection"
+msgstr "_Valuta la selezione"
+
+msgid "Evaluate from beginning..."
+msgstr "Analizza dall'inizio"
+
+msgid "Execute File Into Scilab"
+msgstr "Esegui un _file in Scilab"
+
+msgid "SciNotes help"
+msgstr "Aiuto di SciNotes"
+
+msgid "Help on the current keyword"
+msgstr ""
+
+msgid "Help on the selected text"
+msgstr "Aiuto sul testo selezionato"
+
+msgid "Help on selected text or keyword"
+msgstr ""
+
+msgid "Help about '"
+msgstr "Aiuto riguardo"
+
+msgid "Find:"
+msgstr "Cerca:"
+
+msgid "Find"
+msgstr "Tr_ova"
+
+msgid "Replace/Find"
+msgstr "Sostituisci/Cerca"
+
+msgid "Replace With :"
+msgstr "Sostituisci con:"
+
+msgid "Direction"
+msgstr "Direzione"
+
+msgid "Forward"
+msgstr "Avanti"
+
+msgid "Backward"
+msgstr "_Indietro"
+
+msgid "Scope"
+msgstr "Contesto"
+
+msgid "All"
+msgstr "Tutto"
+
+msgid "Selected lines"
+msgstr "Righe selezionate"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Distinzione maiuscole/minuscole"
+
+msgid "Circular search"
+msgstr "Ricerca circolare"
+
+msgid "Restart the search from the beginning"
+msgstr "Ricomincia la ricerca dall'inizio"
+
+msgid "Whole word"
+msgstr "Parola intera"
+
+msgid "Regular expressions"
+msgstr "Espressioni regolari"
+
+msgid "Replace"
+msgstr "Sostituisci"
+
+msgid "Replace All"
+msgstr "Sostituisci tutto"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Espressione regolare non valida : %s"
+
+msgid "You have passed the end of the document"
+msgstr "È stato passata la fine del documento"
+
+msgid "You have passed the beginning of the document"
+msgstr "È stato passato l'inizio del documento"
+
+msgid "You have reached the end of the document"
+msgstr "Raggiunta la fine del documento"
+
+msgid "You have reached the beginning of the document"
+msgstr "È stato raggiunto l'inizio del documento"
+
+#, c-format
+msgid "String %s not found"
+msgstr "La stringa %s non è stata trovata"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "chiudi questa scheda"
+
+msgid "This file"
+msgstr "Questo file"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Attenzione: il file è stato modificato da un altro programma !"
+
+msgid "Ignore"
+msgstr "Ignora"
+
+msgid "Replace File?"
+msgstr "Sostituire il file?"
+
+msgid "File already exists"
+msgstr "Il file già esiste"
+
+msgid "Untitled "
+msgstr "Senza nome "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr ""
+
+msgid "Cancel"
+msgstr "Annulla"
+
+msgid "Default"
+msgstr "Predefinito"
+
+msgid "Next tab"
+msgstr "Scheda s_uccessiva"
+
+msgid "Previous tab"
+msgstr "Scheda pr_ecedente"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"È necessario salvare le modifiche prima di eseguire questo file in Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Questo file è molto lungo. \"Esegui file in Scilab\" potrebbe essere "
+"meglio.\n"
+"Continuare comunque?"
+
+msgid "Enter line number"
+msgstr "Inserire il numero della riga"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+"Questo file è di tipo binario, il suo salvataggio porterà ad un file "
+"corrotto."
+
+msgid "Loading"
+msgstr "Caricamento in corso"
+
+msgid "Colorization canceled"
+msgstr "Colorazione annullata"
+
+msgid "Binary file: read-only mode"
+msgstr "File binario: modalità sola lettura"
+
+msgid "Read-only mode"
+msgstr "Modalità a sola lettura"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Premere CTRL e muovere il mouse sul collegamento per attivarlo"
+
+msgid "Open in the navigator the URL "
+msgstr ""
+
+msgid "Mail to "
+msgstr ""
+
+msgid "Open the source of the macro "
+msgstr ""
+
+msgid "Show the definition of the macro "
+msgstr "Mostra la definizione della macro "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Riga %s, Colonna %s, Funzione '%s' alla riga %s."
+
+msgid "Unknown function"
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Riga %s, Colonna %s"
+
+msgid "Copyright (c)"
+msgstr "Diritto d'atutore (c)"
+
+msgid "SciNotes error"
+msgstr "Errore di SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Il file non può essere salvato."
+
+msgid "The file could not be converted."
+msgstr "Il file non può essere convertito."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s è una directory."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Le modifiche saranno perse, cambiare comunque la codifica?"
+
+msgid "Continue ?"
+msgstr "Continuare ?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Impossibile caricare !scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Non è possibile trovare il terminale né lo InterpreterManagement"
+
+msgid "Could not find the temporary file."
+msgstr "Non è possibile trovare il file temporaneo."
+
+msgid "No text selected."
+msgstr "Nessun testo selezionato"
+
+msgid "No text to execute."
+msgstr "Nessun testo da eseguire"
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"La codifica del file è in realtà %s ed esso verrà salvato usando %s. "
+"Continuare?"
+
+msgid "Encoding problems"
+msgstr "Problemi di codifica"
+
+msgid "Cannot guess the file encoding."
+msgstr "Impossibile stabilire la codifica del file."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Cambia i colori"
+
+msgid "Cursor Color"
+msgstr "Colore del cursore"
+
+msgid "Background Color"
+msgstr "Colore di sfondo"
+
+msgid "Change Color"
+msgstr "Cambia il colore"
+
+msgid "Italic"
+msgstr "Corsivo"
+
+msgid "Strike Through"
+msgstr ""
+
+msgid "Preview"
+msgstr "Anteprima"
+
+msgid "Underline"
+msgstr "Sottolineato"
+
+msgid "Settings"
+msgstr "Impostazioni"
+
+msgid "Color"
+msgstr "Colore"
+
+msgid "Bold"
+msgstr "Grassetto"
+
+msgid "Absolute"
+msgstr "Assoluto"
+
+msgid "Relative"
+msgstr "Relativo"
+
+msgid "Go to line: "
+msgstr "Vai alla linea: "
+
+msgid "Numeration"
+msgstr "Numerazione"
+
+msgid "Alphabetic order"
+msgstr "Ordine alfabetico"
+
+msgid "Natural order"
+msgstr "Ordine naturale"
+
+msgid "Order"
+msgstr "Ordine"
+
+msgid "Functions"
+msgstr "Funzioni"
+
+msgid "Anchors"
+msgstr ""
+
+msgid "Anchor's name: "
+msgstr ""
+
+msgid "Set an anchor"
+msgstr ""
+
+msgid "Anchor: "
+msgstr ""
+
+msgid "Open source file of the function:"
+msgstr ""
+
+msgid "Open source"
+msgstr ""
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Chiudere veramente SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Ripristinare i file dall'ultima sessione di SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Ripristina le ultime sessioni"
+
+msgid "Configure Tabulation"
+msgstr ""
+
+msgid "Tab style"
+msgstr "Stile della scheda"
+
+msgid "Use spaces"
+msgstr ""
+
+msgid "Length"
+msgstr "Lunghezza"
+
+msgid "Tab representation"
+msgstr ""
+
+msgid "Double chevrons"
+msgstr ""
+
+msgid "Copy full path"
+msgstr ""
+
+msgid "Exact"
+msgstr "Esatto"
+
+msgid "Search Files..."
+msgstr "Cerca file..."
+
+msgid "Search in Files..."
+msgstr "Cerca nei file..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Tempo trascorso: %s sec."
+
+msgid "Base directory:"
+msgstr "Directory Base:"
+
+msgid "Recursive"
+msgstr "Ricorsivo"
+
+msgid "File pattern"
+msgstr "Schema di file"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* per ogni stringa e ? per ogni carattere)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "(~ per la dir. home dell'utente e SCI per la dir. base di Scilab)"
+
+msgid "Word pattern"
+msgstr ""
+
+msgid "Read file line by line"
+msgstr "Leggi il file riga per riga"
+
+msgid "Choose..."
+msgstr "Seleziona..."
+
+msgid "Stop"
+msgstr "Ferma"
+
+msgid "Regex"
+msgstr "Espressione regolare"
+
+msgid "Word"
+msgstr ""
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr "Ricerca ricorsiva"
+
+msgid "Line by line"
+msgstr "Riga per riga"
+
+msgid "Regular expression (Word)"
+msgstr ""
+
+msgid "Choose the search base directory"
+msgstr ""
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Il modulo \"%s\" di Scilab non è installato.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/ja_JP.po b/modules/scinotes/locales/ja_JP.po
new file mode 100755
index 000000000..142c71b15
--- /dev/null
+++ b/modules/scinotes/locales/ja_JP.po
@@ -0,0 +1,1131 @@
+# Japanese translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-09-15 05:24+0000\n"
+"Last-Translator: Rui Hirokawa <Unknown>\n"
+"Language-Team: Japanese <ja@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ja\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "-nogui または -nwni モードでは Scilab '%s' モジュールは無効です.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: 入力引数 #%d を読み込めません.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr "%s: 引数 #%d の型が間違っています: 文字列の行列を指定してください.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: メモリ不足です.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr "%s: 引数 #%d の型が間違っています: 実数の行列または'readonly'を指定してください.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr "%s: 引数 #%d の型が間違っています: 実数の行列を指定してください.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr "%s: 入力引数 #%d および #%d の大きさが間違っています: 同じ次元で指定してください.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr "%s: 引数 #%d の型が間違っています: 文字列を指定してください.\n"
+
+msgid "File"
+msgstr "ファイル"
+
+msgid "New"
+msgstr "新規"
+
+msgid "Open"
+msgstr "開く"
+
+msgid "Open recent"
+msgstr "最近使ったファイルを開く"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "ワーキングディレクトリ;ディレクトリを追加;直近のディレクトリを削除"
+
+msgid "Open file in ..."
+msgstr "ファイルをオープン ..."
+
+msgid "Save file in ..."
+msgstr "ファイルを保存 ..."
+
+msgid "Reload"
+msgstr "再読み込み"
+
+msgid "Restore opened files on start-up"
+msgstr "起動時にオープンされたファイルを復元する"
+
+msgid "Open function source file"
+msgstr "関数のソースファイルを開く"
+
+msgid "Open URL"
+msgstr "URLを開く"
+
+msgid "Save"
+msgstr "保存"
+
+msgid "Save as"
+msgstr "名前を付けて保存"
+
+msgid "Save All"
+msgstr "全て保存"
+
+msgid "Overwrite"
+msgstr "上書き"
+
+msgid "Export"
+msgstr "エクスポート"
+
+msgid "Page Setup"
+msgstr "ページ設定"
+
+msgid "Print Preview"
+msgstr "印刷プレビュー"
+
+msgid "Print"
+msgstr "印刷"
+
+msgid "Close"
+msgstr "閉じる"
+
+msgid "Close All"
+msgstr "全て閉じる"
+
+msgid "Close All But This"
+msgstr "これを除きすべてを閉じる"
+
+msgid "Exit Scinotes"
+msgstr "Scinotesを終了"
+
+msgid "Edit"
+msgstr "編集"
+
+msgid "Undo"
+msgstr "取り消す"
+
+msgid "Redo"
+msgstr "やり直す"
+
+msgid "Cut"
+msgstr "切り取り"
+
+msgid "Copy"
+msgstr "コピー"
+
+msgid "Copy as HTML with line number"
+msgstr "行番号付きのHTMLとしてコピー"
+
+msgid "Paste"
+msgstr "貼り付け"
+
+msgid "Delete"
+msgstr "削除"
+
+msgid "Columns actions"
+msgstr "カラム処理"
+
+msgid "Paste Column"
+msgstr "カラムを貼付け"
+
+msgid "Repeat on the Column"
+msgstr "カラムに繰り返す"
+
+msgid "Select All"
+msgstr "全て選択"
+
+msgid "Select current block"
+msgstr "カレントのブロックを選択"
+
+msgid "Search"
+msgstr "検索"
+
+msgid "Find/Replace"
+msgstr "検索/置換"
+
+msgid "Find Next"
+msgstr "次を検索"
+
+msgid "Find Previous"
+msgstr "前を検索"
+
+msgid "Incremental Search"
+msgstr "インクリメンタルサーチ"
+
+msgid "Find files"
+msgstr "ファイルを検索"
+
+msgid "Find word in files"
+msgstr "ファイル中で単語検索"
+
+msgid "Set anchor"
+msgstr "アンカーを設定"
+
+msgid "Go to next anchor"
+msgstr "次のアンカーに移動"
+
+msgid "Go to previous anchor"
+msgstr "前のアンカーに移動"
+
+msgid "Remove anchor"
+msgstr "アンカーを削除"
+
+msgid "Code Navigator"
+msgstr "コードナビゲータ"
+
+msgid "Format"
+msgstr "書式"
+
+msgid "Shift Right"
+msgstr "右シフト"
+
+msgid "Shift Left"
+msgstr "左シフト"
+
+msgid "Correct Indentation"
+msgstr "インデントを修正"
+
+msgid "Remove trailing spaces"
+msgstr "末尾の空白を削除する"
+
+msgid "Generate comments for help_from_sci"
+msgstr "help_from_sci 用のコメントを生成"
+
+msgid "Comment Selection"
+msgstr "コメント選択"
+
+msgid "Uncomment Selection"
+msgstr "選択部のコメントを外す"
+
+msgid "Change the case"
+msgstr "大文字/小文字を変更"
+
+msgid "Make Selection Lowercase"
+msgstr "選択部を小文字にする"
+
+msgid "Make Selection Uppercase"
+msgstr "選択部を大文字にする"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "選択部の先頭を大文字にする;先頭を大文字にする"
+
+msgid "Single to double quote strings"
+msgstr "一重または二重引用符付きの文字列"
+
+msgid "Options"
+msgstr "オプション"
+
+msgid "Current file encoding"
+msgstr "現在のファイルエンコーディング"
+
+msgid "Line Endings"
+msgstr "行末コード"
+
+msgid "Preferences"
+msgstr "設定"
+
+msgid "Set font"
+msgstr "フォントを設定"
+
+msgid "Set colors"
+msgstr "色を設定"
+
+msgid "Scinotes General settings"
+msgstr "Scinotes一般設定"
+
+msgid "Auto-completion on"
+msgstr "オートコンプリート有効"
+
+msgid "(, [, ..."
+msgstr "(, [, ..."
+
+msgid "if, function, ..."
+msgstr "if, function, ..."
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr "行番号付け;オフ;通常;ローカル番号付け"
+
+msgid "Highlight current line"
+msgstr "現在行をハイライト"
+
+msgid "Enable Auto Reformat"
+msgstr "自動再フォーマットを有効"
+
+msgid "Suppress comments when executing selection"
+msgstr "選択部を実行する際にコメントを非表示にする"
+
+msgid "Window"
+msgstr "ウィンドウ"
+
+msgid "Copy tab in new window"
+msgstr "新規ウインドウにタブをコピー"
+
+msgid "Detach tab in new window"
+msgstr "タブを新規ウインドウに切り離す"
+
+msgid "Copy selection in a new tab"
+msgstr "選択部を新規タブにコピー"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr "分割表示;オフ;2列に分割;2行に分割"
+
+msgid "Execute"
+msgstr "実行"
+
+msgid "... file with no echo"
+msgstr "... ファイルを実行(出力なし)"
+
+msgid "... file with echo"
+msgstr "... ファイルを実行(出力あり)"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "... 選択部を実行(出力あり) ;... カーソルまで実行(出力あり)"
+
+msgid "Save and execute"
+msgstr "保存して実行"
+
+msgid "Save and execute all files"
+msgstr "すべてのファイルを保存し実行する"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr "Scinotesヘルプ"
+
+msgid "Help on ;Help on selection"
+msgstr "ヘルプ; 選択部に関するヘルプ"
+
+msgid "About"
+msgstr "このソフトウェアについて"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "選択部を評価(出力あり); カーソルまで評価(出力あり)"
+
+msgid "Complete"
+msgstr "完了"
+
+msgid "Display"
+msgstr "表示"
+
+msgid "Header"
+msgstr "ヘッダ"
+
+msgid "Autosave"
+msgstr "自動保存"
+
+msgid "Editor"
+msgstr "エディタ"
+
+msgid "Use Scinotes"
+msgstr "Scinotesを使用"
+
+msgid "External editor: "
+msgstr "外部エディタ: "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr "(パスが空白文字を含む場合,必ず引用符で括ってください)"
+
+msgid "Scilab command: "
+msgstr "Scilabコマンド: "
+
+msgid "Restore previous session on start-up"
+msgstr "起動時に前のセッションを回復する"
+
+msgid "Add carriage return at the end of the file."
+msgstr "ファイルの末尾に復改を追加"
+
+msgid "Number of recently opened files to display: "
+msgstr "表示用に最近開いたファイルの数: "
+
+msgid "Default file encoding: "
+msgstr "デフォルトのファイルエンコーディング: "
+
+msgid "Default End-Of-Line: "
+msgstr "デフォルトの改行: "
+
+msgid "Completion"
+msgstr "補完"
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr "カーソルが行末にある時, 括弧を自動補完"
+
+msgid "General display options"
+msgstr "一般表示オプション"
+
+msgid "Highlight current line: "
+msgstr "カレント行をハイライト表示: "
+
+msgid "Show line numbers: "
+msgstr "行数を表示: "
+
+msgid "Local numbering"
+msgstr "ローカルな数値付け"
+
+msgid "Normal"
+msgstr "標準"
+
+msgid "Wrap lines"
+msgstr "行を完了"
+
+msgid "Background color: "
+msgstr "背景色: "
+
+msgid "Cursor color: "
+msgstr "カーソル色: "
+
+msgid "Keywords"
+msgstr "キーワード"
+
+msgid "Enable keywords colorization"
+msgstr "キーワードの色分けを有効にする"
+
+msgid "Set syntax Colors"
+msgstr "構文色を設定"
+
+msgid "Highlight corresponding brackets"
+msgstr "対応する括弧をハイライト表示"
+
+msgid "Color: "
+msgstr "色: "
+
+msgid "Highlight on mouse over"
+msgstr "マウス通過部をハイライト表示"
+
+msgid "Style: "
+msgstr "スタイル: "
+
+msgid "Filled"
+msgstr "塗りつぶす"
+
+msgid "Framed"
+msgstr "フレームで囲む"
+
+msgid "Underlined"
+msgstr "下線付き"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr "対応するキーワードをハイライト表示 (例: if .. end)"
+
+msgid "Tabulation and Indentation"
+msgstr "タブまたはインデント"
+
+msgid "Tabulation size: "
+msgstr "タブの大きさ: "
+
+msgid "Use space"
+msgstr "空白を使用"
+
+msgid "Representation: "
+msgstr "表現: "
+
+msgid "Chevrons"
+msgstr "シェブロン"
+
+msgid "Horizontal rule"
+msgstr "水平方向の罫線"
+
+msgid "Vertical rule"
+msgstr "縦罫線"
+
+msgid "Enable auto indentation"
+msgstr "自動インデントを有効にする"
+
+msgid "Indent size: "
+msgstr "インデントの大きさ: "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Scinotesの自動保存を有効にする"
+
+msgid "Save options"
+msgstr "オプションを保存"
+
+msgid "Save every "
+msgstr "毎に保存 "
+
+msgid " minutes "
+msgstr " 分 "
+
+msgid "Close options"
+msgstr "オプションを閉じる"
+
+msgid "Delete automatically saved files"
+msgstr "自動保存したファイルを削除"
+
+msgid "Filename"
+msgstr "ファイル名"
+
+msgid "Append filename with: "
+msgstr "ファイル名に以下を追加: "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr "(%date は現在の日付に置換するために使用できます)"
+
+msgid "Replace extension with: "
+msgstr "拡張子を以下に置換: "
+
+msgid "Location"
+msgstr "位置"
+
+msgid "Source file directory"
+msgstr "ソースファイル用ディレクトリ"
+
+msgid "Single directory"
+msgstr "単一のディレクトリ"
+
+msgid "Choose an autosave directory"
+msgstr "自動保存用ディレクトリを選択"
+
+msgid "Default header"
+msgstr "デフォルトのヘッダ"
+
+msgid "Add a default header to new file"
+msgstr "デフォルトのヘッダを新規ファイルに追加"
+
+msgid "Graphics handle field"
+msgstr "グラフィックハンドルのフィールド"
+
+msgid "No help"
+msgstr "ヘルプ無し"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "文字列を読み込む際にエラーが発生しました"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr "設定ファイルが壊れており, デフォルトのファイルにリセットしました."
+
+#, c-format
+msgid "File not found: %s"
+msgstr "ファイルが見つかりません: %s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "I/Oエラー: %s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr "ファイル %s が他のプログラムにより変更されました. 再度読み込みますか?"
+
+msgid "Source of '"
+msgstr "ソースコード '"
+
+msgid "Recent Files"
+msgstr "最近使ったファイル"
+
+msgid "The file could not be created, check the path"
+msgstr "ファイルを作成できません, パスを確認してください"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr "このファイルは書込み不可のため,読み込み専用モードでオープンします"
+
+msgid "You do not have the permissions to write this file"
+msgstr "このファイルへの書込みが許可されていません"
+
+msgid "You do not have the permissions to read this file"
+msgstr "このファイルの読み込みが許可されていません"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "FOPによりコードをエクスポートする際にエラーが発生しました"
+
+msgid "An error occurred when printing"
+msgstr "印刷時にエラーが発生しました"
+
+msgid "Exit"
+msgstr "終了"
+
+msgid "Tools"
+msgstr "ツール"
+
+msgid "Help on typing"
+msgstr "入力に関するヘルプ"
+
+msgid "Generate help from function"
+msgstr "関数からヘルプを生成"
+
+msgid "Clone tab in a new window"
+msgstr "新規ウインドウにタブを複製"
+
+msgid "Clone and close tab in a new window"
+msgstr "新規ウインドウに複製し, タブを閉じる"
+
+msgid "Remove trailing whitespaces"
+msgstr "末尾の空白文字を削除する"
+
+msgid "Goto line"
+msgstr "指定行へ移動"
+
+msgid "View"
+msgstr "表示"
+
+msgid "Show/Hide ToolBar"
+msgstr "ツールバーの表示/非表示"
+
+msgid "Word Wrap"
+msgstr "ワードラップ"
+
+msgid "Whereami Line Numbering"
+msgstr "whereami 行番号付け"
+
+msgid "Normal Line Numbering"
+msgstr "通常の行番号付け"
+
+msgid "No Line Numbering"
+msgstr "行番号を付けない"
+
+msgid "Set Colors"
+msgstr "色設定"
+
+msgid "Set Font"
+msgstr "フォントを指定"
+
+msgid "Reset default font"
+msgstr "デフォルトフォントにリセット"
+
+msgid "Split horizontally"
+msgstr "水平方向に分割"
+
+msgid "Split vertically"
+msgstr "垂直方向に分割"
+
+msgid "No split"
+msgstr "分割しない"
+
+msgid "Document"
+msgstr "文書"
+
+msgid "Syntax Type"
+msgstr "構文の型"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "エンコーディング"
+
+msgid "Colorize"
+msgstr "色付け"
+
+msgid "Auto (Default)"
+msgstr "自動(デフォルト)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Macクラシック(CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Scilabへロード"
+
+msgid "Evaluate Selection"
+msgstr "選択部を評価"
+
+msgid "Evaluate from beginning..."
+msgstr "先頭から評価..."
+
+msgid "Execute File Into Scilab"
+msgstr "Scilabへ取り込んで実行"
+
+msgid "SciNotes help"
+msgstr "SciNotesヘルプ"
+
+msgid "Help on the current keyword"
+msgstr "カレントのキーワードのヘルプ"
+
+msgid "Help on the selected text"
+msgstr "選択されたテキストに関するヘルプ"
+
+msgid "Help on selected text or keyword"
+msgstr "選択されたテキストまたはキーワードのヘルプ"
+
+msgid "Help about '"
+msgstr "ヘルプ ’"
+
+msgid "Find:"
+msgstr "検索:"
+
+msgid "Find"
+msgstr "検索"
+
+msgid "Replace/Find"
+msgstr "置換/検索"
+
+msgid "Replace With :"
+msgstr "置換:"
+
+msgid "Direction"
+msgstr "方向"
+
+msgid "Forward"
+msgstr "前へ"
+
+msgid "Backward"
+msgstr "戻る"
+
+msgid "Scope"
+msgstr "範囲"
+
+msgid "All"
+msgstr "全て"
+
+msgid "Selected lines"
+msgstr "選択された行"
+
+msgid "Select from caret"
+msgstr "キャレットから選択"
+
+msgid "Case sensitive"
+msgstr "大文字/小文字を区別"
+
+msgid "Circular search"
+msgstr "環状探索"
+
+msgid "Restart the search from the beginning"
+msgstr "先頭から再検索する"
+
+msgid "Whole word"
+msgstr "単語全体"
+
+msgid "Regular expressions"
+msgstr "正規表現"
+
+msgid "Replace"
+msgstr "置換"
+
+msgid "Replace All"
+msgstr "全て置換"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "正規表現が不正です: %s"
+
+msgid "You have passed the end of the document"
+msgstr "文書の終端を通り過ぎました"
+
+msgid "You have passed the beginning of the document"
+msgstr "文書の先頭を通過しました"
+
+msgid "You have reached the end of the document"
+msgstr "文書の終端に達しました"
+
+msgid "You have reached the beginning of the document"
+msgstr "文書の先頭に達しました"
+
+#, c-format
+msgid "String %s not found"
+msgstr "文字列 %s は見つかりません"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "ファイル %s が存在しません. 作成しますか?"
+
+msgid "close this tab"
+msgstr "このタブを閉じる"
+
+msgid "This file"
+msgstr "このファイル"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr "直近の保存以降にファイル %s が修正されています. 保存しますか?"
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr "%s が他のプログラムにより変更されています! 上書きしますか?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "警告: このファイルは他のプログラムで修正されています!"
+
+msgid "Ignore"
+msgstr "無視する"
+
+msgid "Replace File?"
+msgstr "ファイルを置換しますか?"
+
+msgid "File already exists"
+msgstr "ファイルが既に存在します"
+
+msgid "Untitled "
+msgstr "無題 "
+
+msgid "Ok"
+msgstr "OK"
+
+msgid "Apply & Reindent"
+msgstr "適用 & 再インデント"
+
+msgid "Cancel"
+msgstr "取消"
+
+msgid "Default"
+msgstr "デフォルト"
+
+msgid "Next tab"
+msgstr "次のタブ"
+
+msgid "Previous tab"
+msgstr "前のタブ"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr "このファイルをScilabへ取り込んで実行する前に修正部を保存する必要があります。"
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"このファイルはとても長いです。\"Scilabにファイルをロードして実行\" の方が適している可能性があります.\n"
+"本当に続けますか?"
+
+msgid "Enter line number"
+msgstr "行番号を入力してください"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "このファイルはバイナリ形式です, このファイルに保存するとファイルを壊す可能性があります."
+
+msgid "Loading"
+msgstr "読み込み中"
+
+msgid "Colorization canceled"
+msgstr "色付けは取り消されました"
+
+msgid "Binary file: read-only mode"
+msgstr "バイナリファイル: 読み出し専用モード"
+
+msgid "Read-only mode"
+msgstr "読み込み専用モード"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "CTRLキーを押しながらマウスでリンクの上を移動させるとアクティブ化されます"
+
+msgid "Open in the navigator the URL "
+msgstr "URLをナビゲータで開く "
+
+msgid "Mail to "
+msgstr "メール送信 "
+
+msgid "Open the source of the macro "
+msgstr "マクロのソースを開く "
+
+msgid "Show the definition of the macro "
+msgstr "マクロの定義を表示する "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "%s 行, %s 列. 関数 '%s' (%s 行目)."
+
+msgid "Unknown function"
+msgstr "未知の関数"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "%s 行, %s 列目."
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr "SciNotesエラー"
+
+msgid "The file could not be saved."
+msgstr "ファイルは保存できませんでした."
+
+msgid "The file could not be converted."
+msgstr "ファイルは変換できませんでした."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s はディレクトリです"
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "変更内容を失うかもしれません, それでもエンコーディングを変えますか?"
+
+msgid "Continue ?"
+msgstr "続けますか?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "\"scinotesConfiguration.xml\"を読み込めません"
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "インタープリタ・マネージメントもコンソールも見つけることができません。"
+
+msgid "Could not find the temporary file."
+msgstr "一時ファイルを見つけることができません。"
+
+msgid "No text selected."
+msgstr "テキストが選択されていません."
+
+msgid "No text to execute."
+msgstr "実行するテキストがありません."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr "現在のファイルエンコーディングは %s ですが, %s に変換されて保存されます. 続けてよろしいですか?"
+
+msgid "Encoding problems"
+msgstr "エンコーディングの問題"
+
+msgid "Cannot guess the file encoding."
+msgstr "ファイルのエンコーディングを推定できません."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr "ファイル %s を保存できません... バックアップ処理を停止します"
+
+msgid "Backup finished..."
+msgstr "バックアップを終了しました..."
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr "ディレクトリ %s が存在しません. 作成しますか?"
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr "ディレクトリ %s を作成できませんでした. アクセス権を確認してください."
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr "ファイルを %s に書き込めません. アクセス権を確認してください."
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr "ディレクトリ名が無効です: %s."
+
+msgid "SciNotes autosave"
+msgstr "SciNotes自動保存"
+
+#, c-format
+msgid "%s occurences found."
+msgstr "%s 回の発生が見つかりました."
+
+msgid "Change Colors"
+msgstr "色を変更"
+
+msgid "Cursor Color"
+msgstr "カーソルの色"
+
+msgid "Background Color"
+msgstr "背景色"
+
+msgid "Change Color"
+msgstr "色を変更"
+
+msgid "Italic"
+msgstr "イタリック体"
+
+msgid "Strike Through"
+msgstr "削除"
+
+msgid "Preview"
+msgstr "プレビュー"
+
+msgid "Underline"
+msgstr "下線"
+
+msgid "Settings"
+msgstr "設定"
+
+msgid "Color"
+msgstr "色"
+
+msgid "Bold"
+msgstr "ボールド体"
+
+msgid "Absolute"
+msgstr "絶対位置"
+
+msgid "Relative"
+msgstr "相対"
+
+msgid "Go to line: "
+msgstr "指定行に移動: "
+
+msgid "Numeration"
+msgstr "計算"
+
+msgid "Alphabetic order"
+msgstr "アルファベット順"
+
+msgid "Natural order"
+msgstr "自然順序"
+
+msgid "Order"
+msgstr "順番"
+
+msgid "Functions"
+msgstr "関数"
+
+msgid "Anchors"
+msgstr "アンカー"
+
+msgid "Anchor's name: "
+msgstr "アンカーの名前: "
+
+msgid "Set an anchor"
+msgstr "アンカーを設定"
+
+msgid "Anchor: "
+msgstr "アンカー: "
+
+msgid "Open source file of the function:"
+msgstr "関数のソースファイルを開く"
+
+msgid "Open source"
+msgstr "ソースを開く"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "本当に SciNotes を閉じてよいですか ?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "直近のSciNotesセッションからファイルを復元しますか?"
+
+msgid "Restore the last sessions"
+msgstr "直近のセッションを復元する"
+
+msgid "Configure Tabulation"
+msgstr "設定の一覧表化"
+
+msgid "Tab style"
+msgstr "タブ形式"
+
+msgid "Use spaces"
+msgstr "空白を使用"
+
+msgid "Length"
+msgstr "長さ"
+
+msgid "Tab representation"
+msgstr "タブ形式"
+
+msgid "Double chevrons"
+msgstr "二重逆V字型"
+
+msgid "Copy full path"
+msgstr "完全なパスをコピー"
+
+msgid "Exact"
+msgstr "完全一致"
+
+msgid "Search Files..."
+msgstr "ファイルを検索..."
+
+msgid "Search in Files..."
+msgstr "ファイルを検索..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s 回マッチ)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s 回マッチ)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "経過時間: %s 秒."
+
+msgid "Base directory:"
+msgstr "ベースディレクトリ:"
+
+msgid "Recursive"
+msgstr "再帰的"
+
+msgid "File pattern"
+msgstr "ファイルパターン"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* : 任意の文字列, ?: 任意の文字)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "(~ : ユーザのホームディレクトリ. SCI: Scilabのベースディレクトリ.)"
+
+msgid "Word pattern"
+msgstr "単語パターン"
+
+msgid "Read file line by line"
+msgstr "ファイルを一行毎に読み込む"
+
+msgid "Choose..."
+msgstr "選択..."
+
+msgid "Stop"
+msgstr "停止"
+
+msgid "Regex"
+msgstr "正規表現"
+
+msgid "Word"
+msgstr "単語"
+
+msgid "Case-sensitivity (Word)"
+msgstr "大文字小文字を区別 (単語)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "大文字小文字を区別 (ファイル名)"
+
+msgid "Recursive search"
+msgstr "再帰検索"
+
+msgid "Line by line"
+msgstr "行単位"
+
+msgid "Regular expression (Word)"
+msgstr "正規表現 (単語)"
+
+msgid "Choose the search base directory"
+msgstr "検索用基本ディレクトリを選択"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Scilabモジュール '%s' はインストールされていません.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr "直近のエラーはScilabマクロ内で発生したものではありません."
+
+msgid " on line "
+msgstr " 行目 "
+
+msgid "Opening file "
+msgstr "ファイルをオープン中 "
+
+msgid " of the source file of the function "
+msgstr " 関数のソースファイル "
+
+msgid "The source file of the function "
+msgstr "関数のソースファイル "
+
+msgid " was not found in any library path"
+msgstr " ライブラリパス内に見つかりません"
+
+msgid "There is no recorded error"
+msgstr "記録されたエラーはありません"
diff --git a/modules/scinotes/locales/pl_PL.po b/modules/scinotes/locales/pl_PL.po
new file mode 100755
index 000000000..f9e183dee
--- /dev/null
+++ b/modules/scinotes/locales/pl_PL.po
@@ -0,0 +1,1138 @@
+# Polish translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-07-16 15:57+0000\n"
+"Last-Translator: Scilab.team <Unknown>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pl\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr ""
+"Moduł '%s' programu Scilab jest wyłączony w trybie -nogui lub -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Brak możliwości odczytu argumentu wejściowego nr %d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Brak pamięci.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Nieprawidłowy rozmiar argumentu wejściowego nr %d i nr %d: Oczekuje "
+"takich samych wymiarów.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "Plik"
+
+msgid "New"
+msgstr "Nowy"
+
+msgid "Open"
+msgstr "Otwórz"
+
+msgid "Open recent"
+msgstr "Ostatnio otwierane"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Katalog roboczy;Dodaj katalog;Usuń ostatni katalog"
+
+msgid "Open file in ..."
+msgstr "Otwórz plik w ..."
+
+msgid "Save file in ..."
+msgstr "Zapisz plik w ..."
+
+msgid "Reload"
+msgstr "Załaduj ponownie"
+
+msgid "Restore opened files on start-up"
+msgstr "Odczytaj wczesniej edytowane pliki po starcie"
+
+msgid "Open function source file"
+msgstr "Otwórz plik źródłowy funkcji"
+
+msgid "Open URL"
+msgstr "Otwórz URL"
+
+msgid "Save"
+msgstr "Zapisz"
+
+msgid "Save as"
+msgstr "Zapisz jako"
+
+msgid "Save All"
+msgstr "Zapisz wszystko"
+
+msgid "Overwrite"
+msgstr "Nadpisz"
+
+msgid "Export"
+msgstr "Eksportuj"
+
+msgid "Page Setup"
+msgstr "Ustawienia strony"
+
+msgid "Print Preview"
+msgstr "Podgląd wydruku"
+
+msgid "Print"
+msgstr "Drukuj"
+
+msgid "Close"
+msgstr "Zamknij"
+
+msgid "Close All"
+msgstr "Zamknij wszystko"
+
+msgid "Close All But This"
+msgstr "Zamknij wszystko poza tym"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "Edycja"
+
+msgid "Undo"
+msgstr "Cofnij"
+
+msgid "Redo"
+msgstr "Ponów"
+
+msgid "Cut"
+msgstr "Wytnij"
+
+msgid "Copy"
+msgstr "Kopiuj"
+
+msgid "Copy as HTML with line number"
+msgstr "Kopiuj jako HTML wraz z numerami linii"
+
+msgid "Paste"
+msgstr "Wklej"
+
+msgid "Delete"
+msgstr "Usuń"
+
+msgid "Columns actions"
+msgstr "Operacje na kolumnach"
+
+msgid "Paste Column"
+msgstr "Wklej kolumnę"
+
+msgid "Repeat on the Column"
+msgstr "Powtórz na kolumnie"
+
+msgid "Select All"
+msgstr "Zaznacz wszystko"
+
+msgid "Select current block"
+msgstr "Zaznacz bierzący blok"
+
+msgid "Search"
+msgstr "Znajdź"
+
+msgid "Find/Replace"
+msgstr "Znajdź/Zamień"
+
+msgid "Find Next"
+msgstr "Znajdź następny"
+
+msgid "Find Previous"
+msgstr "Znajdź poprzedni"
+
+msgid "Incremental Search"
+msgstr "Poszukiwanie przyrostowe"
+
+msgid "Find files"
+msgstr "Znajdź pliki"
+
+msgid "Find word in files"
+msgstr "Znajdź słowo w plikach"
+
+msgid "Set anchor"
+msgstr "Ustaw kotwicę"
+
+msgid "Go to next anchor"
+msgstr "Do następnej kotwicy"
+
+msgid "Go to previous anchor"
+msgstr "Do poprzedniej kotwicy"
+
+msgid "Remove anchor"
+msgstr "Usuń kotwicę"
+
+msgid "Code Navigator"
+msgstr "Nawigator kodu"
+
+msgid "Format"
+msgstr "Formatowanie"
+
+msgid "Shift Right"
+msgstr "Zwiększ wcięcie"
+
+msgid "Shift Left"
+msgstr "Zminiejsz wcięcie"
+
+msgid "Correct Indentation"
+msgstr "Popraw wcięcie"
+
+msgid "Remove trailing spaces"
+msgstr "Usuń końcowe spacje"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Generuj komentarz dla pliku pomocy Scilab"
+
+msgid "Comment Selection"
+msgstr "Zakomentuj zaznaczenie"
+
+msgid "Uncomment Selection"
+msgstr "Odkomentuj zaznaczone"
+
+msgid "Change the case"
+msgstr "Zmień wielkość liter"
+
+msgid "Make Selection Lowercase"
+msgstr "Zmień litery w zaznaczeniu na małe"
+
+msgid "Make Selection Uppercase"
+msgstr "Zmień litery w zaznaczeniu na duże"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Zmień litery w zaznaczeniu na duże;Zmień literę na dużą"
+
+msgid "Single to double quote strings"
+msgstr ""
+
+msgid "Options"
+msgstr "Ustawienia"
+
+msgid "Current file encoding"
+msgstr "Kodowanie bieżącego pliku"
+
+msgid "Line Endings"
+msgstr "Zakończenie linii"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Podświetl bierzącą linię"
+
+msgid "Enable Auto Reformat"
+msgstr "Włącz autoformatowanie"
+
+msgid "Suppress comments when executing selection"
+msgstr "Brak wyświetlania komentarzy przy wykonaniu zaznaczenia"
+
+msgid "Window"
+msgstr "Okno"
+
+msgid "Copy tab in new window"
+msgstr "Skopiuj zaznaczenie do nowego okna"
+
+msgid "Detach tab in new window"
+msgstr "Otwórz zakładkę w nowym oknie"
+
+msgid "Copy selection in a new tab"
+msgstr "Skopiuj zaznaczenie do nowej zakładki"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Wykonaj"
+
+msgid "... file with no echo"
+msgstr "... plik, bez echa"
+
+msgid "... file with echo"
+msgstr "... plik, z echem"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ".. zaznaczenie z echem;... do kursoru, z echem"
+
+msgid "Save and execute"
+msgstr "Zapisz i wykonaj"
+
+msgid "Save and execute all files"
+msgstr "Zapisz i wykonaj wszystkie pliki"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr "Pomoc dla ;Pomoc dla zaznaczenia"
+
+msgid "About"
+msgstr "O programie..."
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Oblicz zaznaczenie z echem;Oblicz do pozycji kursora, z echem"
+
+msgid "Complete"
+msgstr "Zakończ"
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr "Linia pozioma"
+
+msgid "Vertical rule"
+msgstr "Linia pionowa"
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr "Pole uchwytu graficznego"
+
+msgid "No help"
+msgstr "Brak pomocy"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Błąd przy odczytywaniu łańcucha"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr "Źródło '"
+
+msgid "Recent Files"
+msgstr "Ostatnio używane pliki"
+
+msgid "The file could not be created, check the path"
+msgstr "Brak możliwości utworzenia pliku. Sprawdź ścieżkę dostępu"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"Plik jest chroniony przez zapisem, dlatego będzie otwarty w trybie \"tylko "
+"do odczytu\""
+
+msgid "You do not have the permissions to write this file"
+msgstr "Nie masz uprawnień aby zapisywać z tym pliku"
+
+msgid "You do not have the permissions to read this file"
+msgstr "Nie masz uprawnień do odczytu tego pliku"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Błąd w czasie eksportowania kodu za pomocą FOP"
+
+msgid "An error occurred when printing"
+msgstr "Błąd w czasie drukowania"
+
+msgid "Exit"
+msgstr "Wyjście"
+
+msgid "Tools"
+msgstr "Narzędzia"
+
+msgid "Help on typing"
+msgstr "Pomoc w czasie pisania"
+
+msgid "Generate help from function"
+msgstr "Generuj plik pomocy dla funkcji"
+
+msgid "Clone tab in a new window"
+msgstr "Sklonuj zawartość karty do nowego okna"
+
+msgid "Clone and close tab in a new window"
+msgstr ""
+
+msgid "Remove trailing whitespaces"
+msgstr "Usuń spacje na końcu"
+
+msgid "Goto line"
+msgstr "Idź do linii"
+
+msgid "View"
+msgstr "Widok"
+
+msgid "Show/Hide ToolBar"
+msgstr "Pokaż/ukryj pasek narzędzi"
+
+msgid "Word Wrap"
+msgstr "Zawijanie wierszy"
+
+msgid "Whereami Line Numbering"
+msgstr "Względna numeracja linii"
+
+msgid "Normal Line Numbering"
+msgstr "Normalna numeracja wierszy"
+
+msgid "No Line Numbering"
+msgstr "Brak numeracji wierszy"
+
+msgid "Set Colors"
+msgstr "Ustaw kolory"
+
+msgid "Set Font"
+msgstr "Ustaw czcionkę"
+
+msgid "Reset default font"
+msgstr "Przywróć domyślną czcionkę"
+
+msgid "Split horizontally"
+msgstr "Podziel poziomo"
+
+msgid "Split vertically"
+msgstr "Podziel pionowo"
+
+msgid "No split"
+msgstr "Nie dziel"
+
+msgid "Document"
+msgstr "Dokument"
+
+msgid "Syntax Type"
+msgstr "Rodzaj składni"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Kodowanie"
+
+msgid "Colorize"
+msgstr "Koloryzacja"
+
+msgid "Auto (Default)"
+msgstr "Automatycznie (domyślnie)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Klasyczny Mac (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Załaduj do Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Oblicz zaznaczone"
+
+msgid "Evaluate from beginning..."
+msgstr "Oblicz od początku..."
+
+msgid "Execute File Into Scilab"
+msgstr "Wykonaj plik w Scilab"
+
+msgid "SciNotes help"
+msgstr "Pomoc SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Pomoc dt. bierzącego słowa kluczowego"
+
+msgid "Help on the selected text"
+msgstr "Temat pomocy dla zaznaczonego tekstu"
+
+msgid "Help on selected text or keyword"
+msgstr "Pomoc dla zaznaczonego tekstu lub słowa kluczowego"
+
+msgid "Help about '"
+msgstr "Pomoc o '"
+
+msgid "Find:"
+msgstr "Znajdź:"
+
+msgid "Find"
+msgstr "Znajdź"
+
+msgid "Replace/Find"
+msgstr "Zastąp/Znajdź"
+
+msgid "Replace With :"
+msgstr "Zastąp przez:"
+
+msgid "Direction"
+msgstr "Kierunek"
+
+msgid "Forward"
+msgstr "Do przodu"
+
+msgid "Backward"
+msgstr "Wstecz"
+
+msgid "Scope"
+msgstr "Zakres"
+
+msgid "All"
+msgstr "Wszystko"
+
+msgid "Selected lines"
+msgstr "Zaznaczone linie"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Rozróżniaj wielkość liter"
+
+msgid "Circular search"
+msgstr "Wyszukiwanie kołowe"
+
+msgid "Restart the search from the beginning"
+msgstr "Zacznij wyszukiwanie od początku"
+
+msgid "Whole word"
+msgstr "Całe słowo"
+
+msgid "Regular expressions"
+msgstr "Wyrażenia regularne"
+
+msgid "Replace"
+msgstr "Zastąp"
+
+msgid "Replace All"
+msgstr "Zastąp wszystko"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Błędne wyrażenie regularne : %s"
+
+msgid "You have passed the end of the document"
+msgstr "Przekroczyleś koniec dokumentu"
+
+msgid "You have passed the beginning of the document"
+msgstr "Przekroczyleś początek dokumentu"
+
+msgid "You have reached the end of the document"
+msgstr "Jesteś na końcu dokumentu"
+
+msgid "You have reached the beginning of the document"
+msgstr "Jesteś na początku dokumentu"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Nie znaleziono ciągu %s"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "zamknij kartę"
+
+msgid "This file"
+msgstr "Ten plik"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Ostrzeżenie: plik został zmieniony przez inny program !"
+
+msgid "Ignore"
+msgstr "Ignoruj"
+
+msgid "Replace File?"
+msgstr "Zastąpic plik?"
+
+msgid "File already exists"
+msgstr "Plik już istnieje"
+
+msgid "Untitled "
+msgstr "Bez nazwy "
+
+msgid "Ok"
+msgstr "OK"
+
+msgid "Apply & Reindent"
+msgstr "Zastosuj i wznów wcięcie"
+
+msgid "Cancel"
+msgstr "Anuluj"
+
+msgid "Default"
+msgstr "Domyślne"
+
+msgid "Next tab"
+msgstr "Następna karta"
+
+msgid "Previous tab"
+msgstr "Poprzednia karta"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr "Musisz zapisać zmiany przed wykonaniem tego pliku w Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Ten plik jest bardzo długi. \"Załaduj plik do Scilab\" może być lepsze.\n"
+"Kontynuować?"
+
+msgid "Enter line number"
+msgstr "Wprowadź numer linii"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "Ten plik jest binarny, zapisanie go spowoduje uszkodzenie pliku."
+
+msgid "Loading"
+msgstr "Ładowanie"
+
+msgid "Colorization canceled"
+msgstr "Koloryzacja anulowana"
+
+msgid "Binary file: read-only mode"
+msgstr "Plik binarny (tryb tylko do odczytu)"
+
+msgid "Read-only mode"
+msgstr "Tryb tylko do odczytu"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Naciśnij CTRL i przesuń wskaźnik myszy na link, żeby go aktywować"
+
+msgid "Open in the navigator the URL "
+msgstr "Open URL w nawigatorze "
+
+msgid "Mail to "
+msgstr "E-mail do "
+
+msgid "Open the source of the macro "
+msgstr "Otwórz plik źródłowy dla makra "
+
+msgid "Show the definition of the macro "
+msgstr "Pokaż definicję makra "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Linia %s, kolumna %s. funkcja '%s' w wierszu %s."
+
+msgid "Unknown function"
+msgstr "Nieznana funkcja"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Linia %s, kolumna %s."
+
+msgid "Copyright (c)"
+msgstr "Copyright (c)"
+
+msgid "SciNotes error"
+msgstr "Bład SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Plik nie może być zapisany"
+
+msgid "The file could not be converted."
+msgstr "Plik nie może być przekonwertowany"
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s jest katalogiem."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Twoje zmiany zostaną utracone, należy zmienić kodowanie."
+
+msgid "Continue ?"
+msgstr "Kontunuować?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Nie można załadować \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Nie udało się znaleść ani konsoli ani InterpreterManagement"
+
+msgid "Could not find the temporary file."
+msgstr "Nie można znaleźć pliku tymczasowego"
+
+msgid "No text selected."
+msgstr "Brak zaznaczonego tekstu"
+
+msgid "No text to execute."
+msgstr "Brak kodu do wykonania"
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"Bieżące kodowanie pliku to %s, będzie zapisany używając kodowania %s. "
+"Kontynuować?"
+
+msgid "Encoding problems"
+msgstr "Problemy z kodowaniem"
+
+msgid "Cannot guess the file encoding."
+msgstr "NIe rozpoznano kodowania pliku"
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Zmienić kolory"
+
+msgid "Cursor Color"
+msgstr "Kolor kursora"
+
+msgid "Background Color"
+msgstr "Kolor tła"
+
+msgid "Change Color"
+msgstr "Zmień kolor"
+
+msgid "Italic"
+msgstr "Kursywa"
+
+msgid "Strike Through"
+msgstr "Przekreślenie"
+
+msgid "Preview"
+msgstr "Podgląd"
+
+msgid "Underline"
+msgstr "Podkreślenie"
+
+msgid "Settings"
+msgstr "Ustawienia"
+
+msgid "Color"
+msgstr "Kolor"
+
+msgid "Bold"
+msgstr "Pogrubiony"
+
+msgid "Absolute"
+msgstr "Bezwzględnie"
+
+msgid "Relative"
+msgstr "Względny"
+
+msgid "Go to line: "
+msgstr "Idź do linii: "
+
+msgid "Numeration"
+msgstr "Numeracja"
+
+msgid "Alphabetic order"
+msgstr "Kolejność alfabetyczna"
+
+msgid "Natural order"
+msgstr "Kolejność naturalna"
+
+msgid "Order"
+msgstr "Kolejność"
+
+msgid "Functions"
+msgstr "Funkcje"
+
+msgid "Anchors"
+msgstr "Kotwice"
+
+msgid "Anchor's name: "
+msgstr "Nazwa kotwicy "
+
+msgid "Set an anchor"
+msgstr "Ustaw kotwicę"
+
+msgid "Anchor: "
+msgstr "Kotwica "
+
+msgid "Open source file of the function:"
+msgstr "Otwórz plik źródłowy dla funkcji:"
+
+msgid "Open source"
+msgstr "Otwórz plik źródłowy"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Jesteś pewny, że chcesz zamknąć SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Odczytać pliki z ostatniej sesji SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Wznów ostatnie sesje"
+
+msgid "Configure Tabulation"
+msgstr "Konfiguracja tabulacji"
+
+msgid "Tab style"
+msgstr "Styl zakładki"
+
+msgid "Use spaces"
+msgstr "Użyj spacji"
+
+msgid "Length"
+msgstr "Długość"
+
+msgid "Tab representation"
+msgstr "Symbol tabulacji"
+
+msgid "Double chevrons"
+msgstr "Podwójne nawiasy kątowe"
+
+msgid "Copy full path"
+msgstr "Kopiuj pełną ścieżkę"
+
+msgid "Exact"
+msgstr "Dokładnie"
+
+msgid "Search Files..."
+msgstr "Znajdź pliki..."
+
+msgid "Search in Files..."
+msgstr "Znajdź w plikach..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Minęło: %s sec."
+
+msgid "Base directory:"
+msgstr "Katalog bazowy:"
+
+msgid "Recursive"
+msgstr "Rekursywnie"
+
+msgid "File pattern"
+msgstr ""
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* oznacza dowolny łańcuch, ? - dowolny znak)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "(~ oznacza katalog domowy wuzytk., SCI - katalog intalacyjny Scilab)"
+
+msgid "Word pattern"
+msgstr ""
+
+msgid "Read file line by line"
+msgstr "Odczytaj plik wiersz po wierszu"
+
+msgid "Choose..."
+msgstr "Wybierz..."
+
+msgid "Stop"
+msgstr "Zatrzymaj"
+
+msgid "Regex"
+msgstr "Wyrażenia regularne"
+
+msgid "Word"
+msgstr "Słowo"
+
+msgid "Case-sensitivity (Word)"
+msgstr "Rozróżnienie wielkości liter (słowo)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "Rozróżnienie wielkości liter (nazwa pliku)"
+
+msgid "Recursive search"
+msgstr "Szukanie rekursywne"
+
+msgid "Line by line"
+msgstr "Wiersz po wierszu"
+
+msgid "Regular expression (Word)"
+msgstr "Wyrażenia regularne"
+
+msgid "Choose the search base directory"
+msgstr "Wybierz katalog bazowy do wyszukiwania"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Moduł %s Scilab nie jest zainstalowany.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/pt_BR.po b/modules/scinotes/locales/pt_BR.po
new file mode 100755
index 000000000..74ee26e66
--- /dev/null
+++ b/modules/scinotes/locales/pt_BR.po
@@ -0,0 +1,1137 @@
+# Brazilian Portuguese translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2012-07-16 15:57+0000\n"
+"Last-Translator: RodolfoRG <rodolforg@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: pt_BR\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "O módulo \"%s\" do Scilab é desabilitado em modo -nogui ou -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Memória esgotada.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Tamanho incorreto para os argumentos de entrada #%d e #%d: esperava-se "
+"as mesmas dimensões.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr "Arquivo"
+
+msgid "New"
+msgstr "Novo"
+
+msgid "Open"
+msgstr "Abrir"
+
+msgid "Open recent"
+msgstr "Abrir recente"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Diretórios de trabalho;Adicionar um;Remover o último"
+
+msgid "Open file in ..."
+msgstr "Abrir arquivo em..."
+
+msgid "Save file in ..."
+msgstr "Salvar arquivo em..."
+
+msgid "Reload"
+msgstr "Recarregar"
+
+msgid "Restore opened files on start-up"
+msgstr "Reabrir arquivos abertos na iniciação"
+
+msgid "Open function source file"
+msgstr "Abrir arquivo fonte da função"
+
+msgid "Open URL"
+msgstr "Abrir URL"
+
+msgid "Save"
+msgstr "Salvar"
+
+msgid "Save as"
+msgstr "Salvar como"
+
+msgid "Save All"
+msgstr "Salvar todos"
+
+msgid "Overwrite"
+msgstr "Sobrescrever"
+
+msgid "Export"
+msgstr "Exportar"
+
+msgid "Page Setup"
+msgstr "Configurar da página"
+
+msgid "Print Preview"
+msgstr "Visualizar impressão"
+
+msgid "Print"
+msgstr "Imprimir"
+
+msgid "Close"
+msgstr "Fechar"
+
+msgid "Close All"
+msgstr "Fechar todos"
+
+msgid "Close All But This"
+msgstr "Fechar todos menos este"
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr "Editar"
+
+msgid "Undo"
+msgstr "Desfazer"
+
+msgid "Redo"
+msgstr "Refazer"
+
+msgid "Cut"
+msgstr "Recortar"
+
+msgid "Copy"
+msgstr "Copiar"
+
+msgid "Copy as HTML with line number"
+msgstr "Copiar como HTML com numeração de linha"
+
+msgid "Paste"
+msgstr "Colar"
+
+msgid "Delete"
+msgstr "Excluir"
+
+msgid "Columns actions"
+msgstr "Ações em colunas"
+
+msgid "Paste Column"
+msgstr "Colar coluna"
+
+msgid "Repeat on the Column"
+msgstr "Repetir na coluna"
+
+msgid "Select All"
+msgstr "Selecionar tudo"
+
+msgid "Select current block"
+msgstr "Selecionar o bloco atual"
+
+msgid "Search"
+msgstr "Buscar"
+
+msgid "Find/Replace"
+msgstr "Localizar/Substituir"
+
+msgid "Find Next"
+msgstr "Localizar próximo"
+
+msgid "Find Previous"
+msgstr "Localizar anterior"
+
+msgid "Incremental Search"
+msgstr "Busca incremental"
+
+msgid "Find files"
+msgstr "Localizar arquivos"
+
+msgid "Find word in files"
+msgstr "Localizar palavra em arquivos"
+
+msgid "Set anchor"
+msgstr "Definir âncora"
+
+msgid "Go to next anchor"
+msgstr "Ir para a próxima âncora"
+
+msgid "Go to previous anchor"
+msgstr "Ir para a âncora anterior"
+
+msgid "Remove anchor"
+msgstr "Remover âncora"
+
+msgid "Code Navigator"
+msgstr "Navegador de código"
+
+msgid "Format"
+msgstr ""
+
+msgid "Shift Right"
+msgstr "Deslocar para a direita"
+
+msgid "Shift Left"
+msgstr "Deslocar para a esquerda"
+
+msgid "Correct Indentation"
+msgstr "Corrigir recuos"
+
+msgid "Remove trailing spaces"
+msgstr "Remover espaços à direita"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Gerar comentários para o help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Comentar seleção"
+
+msgid "Uncomment Selection"
+msgstr "Remover comentário da seleção"
+
+msgid "Change the case"
+msgstr "Alterar a maiusculização"
+
+msgid "Make Selection Lowercase"
+msgstr "Alterar a seleção para minúsculas"
+
+msgid "Make Selection Uppercase"
+msgstr "Alterar a seleção para maiúsculas"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Maiusculizar seleção;Maiusculizar caractere"
+
+msgid "Single to double quote strings"
+msgstr "De aspas simples para duplas"
+
+msgid "Options"
+msgstr "Opções"
+
+msgid "Current file encoding"
+msgstr "Codificação de caracteres do arquivo atual"
+
+msgid "Line Endings"
+msgstr "Finais de linhas"
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "Realçar a linha atual"
+
+msgid "Enable Auto Reformat"
+msgstr "Habilitar reformatação automática"
+
+msgid "Suppress comments when executing selection"
+msgstr "Suprimir comentários ao executar seleção"
+
+msgid "Window"
+msgstr "Janela"
+
+msgid "Copy tab in new window"
+msgstr "Copiar aba em uma nova janela"
+
+msgid "Detach tab in new window"
+msgstr "Desanexar aba para uma nova janela"
+
+msgid "Copy selection in a new tab"
+msgstr "Copiar seleção em uma nova aba"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "Executar"
+
+msgid "... file with no echo"
+msgstr "... arquivo sem eco"
+
+msgid "... file with echo"
+msgstr "... arquivo com eco"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "... a seleção com eco;... até o cursor, com eco"
+
+msgid "Save and execute"
+msgstr "Salvar e executar"
+
+msgid "Save and execute all files"
+msgstr "Salvar e executar todos os arquivos"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr "Ajuda sobre ;Ajuda sobre seleção"
+
+msgid "About"
+msgstr "Sobre"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Avaliar seleção com eco;Avaliar até o cursor, com eco"
+
+msgid "Complete"
+msgstr "Completar"
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr "Régua horizontal"
+
+msgid "Vertical rule"
+msgstr "Régua vertical"
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr "Campo de manipulador gráfico"
+
+msgid "No help"
+msgstr "Sem ajuda"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Erro ao ler o texto"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr "Fonte de \""
+
+msgid "Recent Files"
+msgstr "Arquivos recentes"
+
+msgid "The file could not be created, check the path"
+msgstr "O arquivo não pôde ser criado: verifique o caminho"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"O arquivo não pode ser escrito, então está aberto em modo somente-leitura"
+
+msgid "You do not have the permissions to write this file"
+msgstr "Você não possui permissão para escrita neste arquivo"
+
+msgid "You do not have the permissions to read this file"
+msgstr "Você não possui permissão para leitura deste arquivo"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Ocorreu um erro ao exportar o código usando FOP"
+
+msgid "An error occurred when printing"
+msgstr "Ocorreu um erro ao imprimir"
+
+msgid "Exit"
+msgstr "Sair"
+
+msgid "Tools"
+msgstr "Ferramentas"
+
+msgid "Help on typing"
+msgstr "Ajuda durante digitação"
+
+msgid "Generate help from function"
+msgstr "Gerar ajuda a partir da função"
+
+msgid "Clone tab in a new window"
+msgstr "Clona a aba em uma nova janela"
+
+msgid "Clone and close tab in a new window"
+msgstr "Move a aba em uma nova janela"
+
+msgid "Remove trailing whitespaces"
+msgstr "Remover espaços brancos em fim de linha"
+
+msgid "Goto line"
+msgstr "Ir para a linha"
+
+msgid "View"
+msgstr "Exibir"
+
+msgid "Show/Hide ToolBar"
+msgstr "Mostrar/ocultar barra de ferramentas"
+
+msgid "Word Wrap"
+msgstr "Quebra de linhas"
+
+msgid "Whereami Line Numbering"
+msgstr "Numeraçao de linhas Ondeestou"
+
+msgid "Normal Line Numbering"
+msgstr "Numeração normal de linhas"
+
+msgid "No Line Numbering"
+msgstr "Sem numeração de linha"
+
+msgid "Set Colors"
+msgstr "Configurar cores"
+
+msgid "Set Font"
+msgstr "Configurar fonte"
+
+msgid "Reset default font"
+msgstr "Redefinir a fonte padrão"
+
+msgid "Split horizontally"
+msgstr "Dividir horizontalmente"
+
+msgid "Split vertically"
+msgstr "Dividir verticalmente"
+
+msgid "No split"
+msgstr "Sem dividir"
+
+msgid "Document"
+msgstr "Documento"
+
+msgid "Syntax Type"
+msgstr "Tipo de sintaxe"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Codificação"
+
+msgid "Colorize"
+msgstr "Colorir"
+
+msgid "Auto (Default)"
+msgstr "Automático (padrão)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Clássico do Mac (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Carregar no Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Avaliar seleção"
+
+msgid "Evaluate from beginning..."
+msgstr "Avaliar do começo..."
+
+msgid "Execute File Into Scilab"
+msgstr "Executar arquivo no Scilab"
+
+msgid "SciNotes help"
+msgstr "Ajuda do SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Ajuda sobre a palavra-chave atual"
+
+msgid "Help on the selected text"
+msgstr "Ajuda sobre o texto selecionado"
+
+msgid "Help on selected text or keyword"
+msgstr "Ajuda sobre o texto ou palavra-chave selecionada"
+
+msgid "Help about '"
+msgstr "Ajuda sobre \""
+
+msgid "Find:"
+msgstr "Localizar:"
+
+msgid "Find"
+msgstr "Localizar"
+
+msgid "Replace/Find"
+msgstr "Substituir/Localizar"
+
+msgid "Replace With :"
+msgstr "Substituir por:"
+
+msgid "Direction"
+msgstr "Direção"
+
+msgid "Forward"
+msgstr "Próximo"
+
+msgid "Backward"
+msgstr "Para trás"
+
+msgid "Scope"
+msgstr "Escopo"
+
+msgid "All"
+msgstr "Tudo"
+
+msgid "Selected lines"
+msgstr "Linhas selecionadas"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "Diferenciar maiúsculas de minúsculas"
+
+msgid "Circular search"
+msgstr "Busca circular"
+
+msgid "Restart the search from the beginning"
+msgstr "Reiniciar a busca pelo começo"
+
+msgid "Whole word"
+msgstr "Palavra toda"
+
+msgid "Regular expressions"
+msgstr "Expressões regulares"
+
+msgid "Replace"
+msgstr "Substituir"
+
+msgid "Replace All"
+msgstr "Substituir todos"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Expressão regular inválida: %s"
+
+msgid "You have passed the end of the document"
+msgstr "Você passou do final do documento"
+
+msgid "You have passed the beginning of the document"
+msgstr "Você passou do começo do documento"
+
+msgid "You have reached the end of the document"
+msgstr "Você atingiu o final do documento"
+
+msgid "You have reached the beginning of the document"
+msgstr "Você atingiu o início do documento"
+
+#, c-format
+msgid "String %s not found"
+msgstr "O texto \"%s\" não foi encontrado"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr "fecha esta aba"
+
+msgid "This file"
+msgstr "Este arquivo"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Aviso: o arquivo foi modificado por outro programa!"
+
+msgid "Ignore"
+msgstr "Ignorar"
+
+msgid "Replace File?"
+msgstr "Substituir arquivo?"
+
+msgid "File already exists"
+msgstr "O arquivo já existe"
+
+msgid "Untitled "
+msgstr "Sem nome "
+
+msgid "Ok"
+msgstr "Ok"
+
+msgid "Apply & Reindent"
+msgstr "Aplicar e refazer recuos"
+
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgid "Default"
+msgstr "Padrão"
+
+msgid "Next tab"
+msgstr "Próxima aba"
+
+msgid "Previous tab"
+msgstr "Aba anterior"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Você precisa salvar as modificações antes de executar este arquivo no Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"O arquivo é muito extenso. Seria melhor \"Executar arquivo no Scilab\"."
+
+msgid "Enter line number"
+msgstr "Insira o número da linha"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+"Este é um arquivo binário; salvá-lo resultará em um arquivo corrompido."
+
+msgid "Loading"
+msgstr "Carregando"
+
+msgid "Colorization canceled"
+msgstr "Coloração cancelada"
+
+msgid "Binary file: read-only mode"
+msgstr "Arquivo binário: modo de somente leitura"
+
+msgid "Read-only mode"
+msgstr "Modo somente leitura"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "Pressione CTRL e mova o mouse sobre o link para ativá-lo"
+
+msgid "Open in the navigator the URL "
+msgstr "Abre no navegador o URL "
+
+msgid "Mail to "
+msgstr "Envia e-mail para "
+
+msgid "Open the source of the macro "
+msgstr "Abre o código-fonte da macro "
+
+msgid "Show the definition of the macro "
+msgstr "Mostra a definição da macro "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Linha %s, coluna %s. Função \"%s\" na linha %s."
+
+msgid "Unknown function"
+msgstr "Função desconhecida"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Linha %s, coluna %s."
+
+msgid "Copyright (c)"
+msgstr "Direitos reservados (c)"
+
+msgid "SciNotes error"
+msgstr "erro no SciNotes"
+
+msgid "The file could not be saved."
+msgstr "O arquivo não pôde ser salvo."
+
+msgid "The file could not be converted."
+msgstr "O arquivo não pôde ser convertido."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s é um diretório."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Suas modificações serão perdidas. Alterar a codificação mesmo assim?"
+
+msgid "Continue ?"
+msgstr "Continuar?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Não é possível carregar \"scinotesConfiguration.xml\""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr ""
+"Não foi possível encontrar o console ou o gerenciador de interpretação."
+
+msgid "Could not find the temporary file."
+msgstr "Não foi possível encontrar o arquivo temporário."
+
+msgid "No text selected."
+msgstr "Nenhum texto está selecionado."
+
+msgid "No text to execute."
+msgstr "Não há texto para executar."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr "A codificação de arquivo é %s e será salva usando %s. Continuar?"
+
+msgid "Encoding problems"
+msgstr "Problemas com a codificação de caracteres"
+
+msgid "Cannot guess the file encoding."
+msgstr "Não foi possível adivinhar a codificação de caracteres do arquivo."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "Alterar cores"
+
+msgid "Cursor Color"
+msgstr "Cor do cursor"
+
+msgid "Background Color"
+msgstr "Cor do plano de fundo"
+
+msgid "Change Color"
+msgstr "Alterar cor"
+
+msgid "Italic"
+msgstr "Itálico"
+
+msgid "Strike Through"
+msgstr "Riscado"
+
+msgid "Preview"
+msgstr "Visualizar"
+
+msgid "Underline"
+msgstr "Sublinhado"
+
+msgid "Settings"
+msgstr "Configurações"
+
+msgid "Color"
+msgstr "Cor"
+
+msgid "Bold"
+msgstr "Negrito"
+
+msgid "Absolute"
+msgstr "Absoluto"
+
+msgid "Relative"
+msgstr "Relativo"
+
+msgid "Go to line: "
+msgstr "Ir para a linha: "
+
+msgid "Numeration"
+msgstr "Numeração"
+
+msgid "Alphabetic order"
+msgstr "Ordem alfabética"
+
+msgid "Natural order"
+msgstr "Ordem natural"
+
+msgid "Order"
+msgstr ""
+
+msgid "Functions"
+msgstr "Funções"
+
+msgid "Anchors"
+msgstr "Âncoras"
+
+msgid "Anchor's name: "
+msgstr "Nome da âncora: "
+
+msgid "Set an anchor"
+msgstr "Definir uma âncora"
+
+msgid "Anchor: "
+msgstr "Âncora: "
+
+msgid "Open source file of the function:"
+msgstr "Abre o código fonte da função:"
+
+msgid "Open source"
+msgstr "Abrir código-fonte"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Tem certeza de que quer fechar o SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Reabrir arquivos da sua última sessão no SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Reabrir as últimas sessões"
+
+msgid "Configure Tabulation"
+msgstr "Configurar tabulação"
+
+msgid "Tab style"
+msgstr "Estilo de tabulação"
+
+msgid "Use spaces"
+msgstr "Usar espaços"
+
+msgid "Length"
+msgstr "Comprimento"
+
+msgid "Tab representation"
+msgstr "Representação da tabulação"
+
+msgid "Double chevrons"
+msgstr "Divisas duplas"
+
+msgid "Copy full path"
+msgstr "Copiar caminho completo"
+
+msgid "Exact"
+msgstr ""
+
+msgid "Search Files..."
+msgstr "Buscar arquivos..."
+
+msgid "Search in Files..."
+msgstr "Buscar nos arquivos..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s ocorrências)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s ocorrência)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Tempo decorrido: %ss."
+
+msgid "Base directory:"
+msgstr "Diretório base:"
+
+msgid "Recursive"
+msgstr "Recursivo"
+
+msgid "File pattern"
+msgstr "Padrão do arquivo"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(? para qualquer caractere e * para qualquer sequência deles)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+"(~ para a pasta pessoal do usuário e SCI para o diretório base do Scilab)"
+
+msgid "Word pattern"
+msgstr "Padrão da palavra"
+
+msgid "Read file line by line"
+msgstr "Ler arquivo linha por linha"
+
+msgid "Choose..."
+msgstr "Escolher..."
+
+msgid "Stop"
+msgstr "Parar"
+
+msgid "Regex"
+msgstr "Expressão Regular"
+
+msgid "Word"
+msgstr "Palavra"
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr "Busca recursiva"
+
+msgid "Line by line"
+msgstr "Linha por linha"
+
+msgid "Regular expression (Word)"
+msgstr ""
+
+msgid "Choose the search base directory"
+msgstr "Escolha o diretório base da busca"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "O módulo \"%s\" do Scilab não está instalado.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/ru_RU.po b/modules/scinotes/locales/ru_RU.po
new file mode 100755
index 000000000..cc4206895
--- /dev/null
+++ b/modules/scinotes/locales/ru_RU.po
@@ -0,0 +1,1145 @@
+# Russian translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2015-03-08 12:21+0000\n"
+"Last-Translator: Stanislav V. Kroter <krotersv@gmail.com>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: ru\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Модуль «%s» выключен в режимах -nogui и -nwni.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: Не могу прочитать входной аргумент №%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr "%s: Неверный тип аргумента №%d: ожидалась матрица строк.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: Не осталось доступной памяти.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+"%s: Неверный тип аргумента №%d: ожидалась вещественная матрица либо "
+"'readonly'.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr "%s: Неверный тип аргумента №%d: ожидалась вещественная матрица.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: Неверный размер входных параметров №%d и №%d: ожидались одинаковые "
+"размерности.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr "%s: Неверный тип аргумента №%d: ожидалась строка.\n"
+
+msgid "File"
+msgstr "Файл"
+
+msgid "New"
+msgstr "Создать"
+
+msgid "Open"
+msgstr "Открыть"
+
+msgid "Open recent"
+msgstr "Открыть последние"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Рабочие каталоги;Добавить каталог;Удалить последний каталог"
+
+msgid "Open file in ..."
+msgstr "Открыть файл в ..."
+
+msgid "Save file in ..."
+msgstr "Сохранить файл в ..."
+
+msgid "Reload"
+msgstr "Перезагрузить"
+
+msgid "Restore opened files on start-up"
+msgstr "Восстанавливать открытые файлы при запуске"
+
+msgid "Open function source file"
+msgstr "Открыть исходный текст функции"
+
+msgid "Open URL"
+msgstr "Открыть URL"
+
+msgid "Save"
+msgstr "Сохранить"
+
+msgid "Save as"
+msgstr "Сохранить как"
+
+msgid "Save All"
+msgstr "Сохранить все"
+
+msgid "Overwrite"
+msgstr "Перезаписать"
+
+msgid "Export"
+msgstr "Экспорт"
+
+msgid "Page Setup"
+msgstr "Параметры страницы"
+
+msgid "Print Preview"
+msgstr "Предварительный просмотр"
+
+msgid "Print"
+msgstr "Печать"
+
+msgid "Close"
+msgstr "Закрыть"
+
+msgid "Close All"
+msgstr "Закрыть все"
+
+msgid "Close All But This"
+msgstr "Закрыть другие"
+
+msgid "Exit Scinotes"
+msgstr "Выйти из Scinotes"
+
+msgid "Edit"
+msgstr "Правка"
+
+msgid "Undo"
+msgstr "Отменить"
+
+msgid "Redo"
+msgstr "Повторить"
+
+msgid "Cut"
+msgstr "Вырезать"
+
+msgid "Copy"
+msgstr "Копировать"
+
+msgid "Copy as HTML with line number"
+msgstr "Копировать как HTML с номерами строк"
+
+msgid "Paste"
+msgstr "Вставить"
+
+msgid "Delete"
+msgstr "Удалить"
+
+msgid "Columns actions"
+msgstr "Действия со столбцами"
+
+msgid "Paste Column"
+msgstr "Вставить столбец"
+
+msgid "Repeat on the Column"
+msgstr "Повторить на столбце"
+
+msgid "Select All"
+msgstr "Выделить всё"
+
+msgid "Select current block"
+msgstr "Выделить текущий блок"
+
+msgid "Search"
+msgstr "Поиск"
+
+msgid "Find/Replace"
+msgstr "Найти/заменить"
+
+msgid "Find Next"
+msgstr "Найти следующее"
+
+msgid "Find Previous"
+msgstr "Найти предыдущее"
+
+msgid "Incremental Search"
+msgstr "Пошаговый поиск"
+
+msgid "Find files"
+msgstr "Найти файлы"
+
+msgid "Find word in files"
+msgstr "Найти слово в файлах"
+
+msgid "Set anchor"
+msgstr "Установить метку"
+
+msgid "Go to next anchor"
+msgstr "Перейти к следующей метке"
+
+msgid "Go to previous anchor"
+msgstr "Перейти к предыдущей метке"
+
+msgid "Remove anchor"
+msgstr "Удалить метку"
+
+msgid "Code Navigator"
+msgstr "Обозреватель кода"
+
+msgid "Format"
+msgstr "Формат"
+
+msgid "Shift Right"
+msgstr "Сделать отступ"
+
+msgid "Shift Left"
+msgstr "Убрать отступ"
+
+msgid "Correct Indentation"
+msgstr "Исправить отступы"
+
+msgid "Remove trailing spaces"
+msgstr "Удалить пробелы в конце строки"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Сформировать комментарии для help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Добавить комментарии"
+
+msgid "Uncomment Selection"
+msgstr "Удалить комментарии"
+
+msgid "Change the case"
+msgstr "Сменить регистр"
+
+msgid "Make Selection Lowercase"
+msgstr "Изменить на строчные буквы"
+
+msgid "Make Selection Uppercase"
+msgstr "Изменить на прописные буквы"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Начинать слова с прописной буквы;Заменить букву на прописную"
+
+msgid "Single to double quote strings"
+msgstr "Заменить одинарные кавычки на двойные"
+
+msgid "Options"
+msgstr "Настройки"
+
+msgid "Current file encoding"
+msgstr "Текущая кодировка файла"
+
+msgid "Line Endings"
+msgstr "Конец строки"
+
+msgid "Preferences"
+msgstr "Настройки"
+
+msgid "Set font"
+msgstr "Установить шрифт"
+
+msgid "Set colors"
+msgstr "Установить цвета"
+
+msgid "Scinotes General settings"
+msgstr "Общие настройки Scinotes"
+
+msgid "Auto-completion on"
+msgstr "Автодополнение включить"
+
+msgid "(, [, ..."
+msgstr "(, [, ..."
+
+msgid "if, function, ..."
+msgstr "if, function, ..."
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr "Нумерация строк;Выключить;Нормальная;Местная нумерация"
+
+msgid "Highlight current line"
+msgstr "Подсвечивать текущую строку"
+
+msgid "Enable Auto Reformat"
+msgstr "Автоматический отступ"
+
+msgid "Suppress comments when executing selection"
+msgstr "Скрывать комментарии во время выполнения"
+
+msgid "Window"
+msgstr "Окно"
+
+msgid "Copy tab in new window"
+msgstr "Скопировать вкладку в новое окно"
+
+msgid "Detach tab in new window"
+msgstr "Отделить вкладку в новое окно"
+
+msgid "Copy selection in a new tab"
+msgstr "Скопировать выделенное в новую вкладку"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+"Разделённый вид;Выключить;Разделить на две колонки;Разделить на две строки"
+
+msgid "Execute"
+msgstr "Выполнение"
+
+msgid "... file with no echo"
+msgstr "... файла без отображения команд"
+
+msgid "... file with echo"
+msgstr "... файла с отображением команд"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+"... выделенного с отображением команд;... до курсора с отображением команд"
+
+msgid "Save and execute"
+msgstr "Сохранить и выполнить"
+
+msgid "Save and execute all files"
+msgstr "Сохранить и выполнить все файлы"
+
+msgid "?"
+msgstr "Справка"
+
+msgid "Scinotes help"
+msgstr "Справка по Scinotes"
+
+msgid "Help on ;Help on selection"
+msgstr "Справка по ;Справка по выделенному"
+
+msgid "About"
+msgstr "О программе"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+"Вычислить выделенное с отображение команд;Вычислить до курсора с "
+"отображением команд"
+
+msgid "Complete"
+msgstr "Завершить"
+
+msgid "Display"
+msgstr "Показать"
+
+msgid "Header"
+msgstr "Заголовок"
+
+msgid "Autosave"
+msgstr "Автосохранение"
+
+msgid "Editor"
+msgstr "Редактор"
+
+msgid "Use Scinotes"
+msgstr "Использовать Scinotes"
+
+msgid "External editor: "
+msgstr "Внешний редактор: "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr "(Не забудьте помещать в кавычки путь, содержащий пробелы.)"
+
+msgid "Scilab command: "
+msgstr "Scilab-команда: "
+
+msgid "Restore previous session on start-up"
+msgstr "Восстанавливать предыдущую сессию при запуске"
+
+msgid "Add carriage return at the end of the file."
+msgstr "Добавлять возврат каретки в конце файла."
+
+msgid "Number of recently opened files to display: "
+msgstr "Количество отображаемых недавно открытых файлов: "
+
+msgid "Default file encoding: "
+msgstr "Кодировка файла по умолчанию: "
+
+msgid "Default End-Of-Line: "
+msgstr "Конец строки по умолчанию: "
+
+msgid "Completion"
+msgstr "Завершение"
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+"Автоматически закрывать скобки, когда курсор находится в конце строки"
+
+msgid "General display options"
+msgstr "Общие настройки отображения"
+
+msgid "Highlight current line: "
+msgstr "Подсветка текущей строки: "
+
+msgid "Show line numbers: "
+msgstr "Показать номера строк: "
+
+msgid "Local numbering"
+msgstr "Местная нумерация"
+
+msgid "Normal"
+msgstr "Стандартная"
+
+msgid "Wrap lines"
+msgstr "Перенос строк"
+
+msgid "Background color: "
+msgstr "Цвет фона: "
+
+msgid "Cursor color: "
+msgstr "Цвет курсора: "
+
+msgid "Keywords"
+msgstr "Ключевые слова"
+
+msgid "Enable keywords colorization"
+msgstr "Включить расцветку ключевых слов"
+
+msgid "Set syntax Colors"
+msgstr "Установка цветов синтаксиса"
+
+msgid "Highlight corresponding brackets"
+msgstr "Подсветка соответствующих скобок"
+
+msgid "Color: "
+msgstr "Цвет: "
+
+msgid "Highlight on mouse over"
+msgstr "Подсветка при наведении курсора"
+
+msgid "Style: "
+msgstr "Стиль: "
+
+msgid "Filled"
+msgstr "Заливка"
+
+msgid "Framed"
+msgstr "Рамка"
+
+msgid "Underlined"
+msgstr "Подчёркивание"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr "Подсветка соответствующих ключевых слов (например, if ... end)"
+
+msgid "Tabulation and Indentation"
+msgstr "Табуляция и отступы"
+
+msgid "Tabulation size: "
+msgstr "Размер табуляции: "
+
+msgid "Use space"
+msgstr "Использовать пробелы"
+
+msgid "Representation: "
+msgstr "Представление: "
+
+msgid "Chevrons"
+msgstr "Угловые скобки"
+
+msgid "Horizontal rule"
+msgstr "Горизонтальная линия"
+
+msgid "Vertical rule"
+msgstr "Вертикальная линия"
+
+msgid "Enable auto indentation"
+msgstr "Включить автоматические отступы"
+
+msgid "Indent size: "
+msgstr "Размер отступов: "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Включить автосохранение в SciNotes"
+
+msgid "Save options"
+msgstr "Сохранить настройки"
+
+msgid "Save every "
+msgstr "Сохранять каждые "
+
+msgid " minutes "
+msgstr " минут "
+
+msgid "Close options"
+msgstr "Закрыть настройки"
+
+msgid "Delete automatically saved files"
+msgstr "Удалить автоматически сохранённые файлы"
+
+msgid "Filename"
+msgstr "Имя файла"
+
+msgid "Append filename with: "
+msgstr "Добавить к имени файла: "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr "(%date может быть использована для замены текущей датой)"
+
+msgid "Replace extension with: "
+msgstr "Заменить расширение: "
+
+msgid "Location"
+msgstr "Расположение"
+
+msgid "Source file directory"
+msgstr "Директория исходных файлов"
+
+msgid "Single directory"
+msgstr "Отдельная директория"
+
+msgid "Choose an autosave directory"
+msgstr "Выбрать директорию для автосохранения"
+
+msgid "Default header"
+msgstr "Заголовок по умолчанию"
+
+msgid "Add a default header to new file"
+msgstr "Добавлять заголовок по умолчанию к новому файлу"
+
+msgid "Graphics handle field"
+msgstr "Поле графического дескриптора"
+
+msgid "No help"
+msgstr "Справка отсутствует"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Ошибка при чтении строки"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr "Файл настроек был повреждён и сброшен к значениям по умолчанию."
+
+#, c-format
+msgid "File not found: %s"
+msgstr "Файл не найден: %s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "ошибка ввода/вывода: %s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr "Файл %s был изменён другой программой. Перезагрузить его?"
+
+msgid "Source of '"
+msgstr "Исходный текст для '"
+
+msgid "Recent Files"
+msgstr "Недавние файлы"
+
+msgid "The file could not be created, check the path"
+msgstr "Не удалось создать файл, проверьте путь"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+"Нет разрешения на запись файла, поэтому он доступен только для чтения"
+
+msgid "You do not have the permissions to write this file"
+msgstr "У вас нет разрешения на запись этого файла"
+
+msgid "You do not have the permissions to read this file"
+msgstr "У вас нет разрешения на чтение этого файла"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Произошла ошибка при экспортировании кода, использующего FOP"
+
+msgid "An error occurred when printing"
+msgstr "Произошла ошибка при печати"
+
+msgid "Exit"
+msgstr "Выход"
+
+msgid "Tools"
+msgstr "Инструменты"
+
+msgid "Help on typing"
+msgstr "Помощь при наборе"
+
+msgid "Generate help from function"
+msgstr "Generate help from function"
+
+msgid "Clone tab in a new window"
+msgstr "Скопировать вкладку в новое окно"
+
+msgid "Clone and close tab in a new window"
+msgstr "Отделить вкладку в новое окно"
+
+msgid "Remove trailing whitespaces"
+msgstr "Удалить конечные пробелы"
+
+msgid "Goto line"
+msgstr "Перейти к строке"
+
+msgid "View"
+msgstr "Вид"
+
+msgid "Show/Hide ToolBar"
+msgstr "Показать/скрыть панель инструментов"
+
+msgid "Word Wrap"
+msgstr "Автоматический переход на новую строку"
+
+msgid "Whereami Line Numbering"
+msgstr "Вложенная нумерация строк"
+
+msgid "Normal Line Numbering"
+msgstr "Общая нумерация строк"
+
+msgid "No Line Numbering"
+msgstr "Без нумерации строк"
+
+msgid "Set Colors"
+msgstr "Цвета"
+
+msgid "Set Font"
+msgstr "Шрифт"
+
+msgid "Reset default font"
+msgstr "Установить шрифт по умолчанию"
+
+msgid "Split horizontally"
+msgstr "Горизонтальное разделение"
+
+msgid "Split vertically"
+msgstr "Вертикальное разделение"
+
+msgid "No split"
+msgstr "Без разделения"
+
+msgid "Document"
+msgstr "Документ"
+
+msgid "Syntax Type"
+msgstr "Режим подсветки синтаксиса"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Кодировка"
+
+msgid "Colorize"
+msgstr "Подсветка синтаксиса"
+
+msgid "Auto (Default)"
+msgstr "Автоматический (По умолчанию)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Загрузить в Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Вычислить выделенное"
+
+msgid "Evaluate from beginning..."
+msgstr "Вычислить до текущей позиции"
+
+msgid "Execute File Into Scilab"
+msgstr "Выполнить файл в Scilab"
+
+msgid "SciNotes help"
+msgstr "Справка по SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Справка по выделенной команде"
+
+msgid "Help on the selected text"
+msgstr "Справка по выделенному тексту"
+
+msgid "Help on selected text or keyword"
+msgstr "Справка по выделенному тексту или команде"
+
+msgid "Help about '"
+msgstr "Справка по '"
+
+msgid "Find:"
+msgstr "Найти:"
+
+msgid "Find"
+msgstr "Найти"
+
+msgid "Replace/Find"
+msgstr "Заменить/найти"
+
+msgid "Replace With :"
+msgstr "Заменить на:"
+
+msgid "Direction"
+msgstr "Направление"
+
+msgid "Forward"
+msgstr "Вперёд"
+
+msgid "Backward"
+msgstr "Назад"
+
+msgid "Scope"
+msgstr "Область поиска"
+
+msgid "All"
+msgstr "Весь документ"
+
+msgid "Selected lines"
+msgstr "Выделенные строки"
+
+msgid "Select from caret"
+msgstr "Выбрать от курсора"
+
+msgid "Case sensitive"
+msgstr "Учитывать регистр"
+
+msgid "Circular search"
+msgstr "Круговой поиск"
+
+msgid "Restart the search from the beginning"
+msgstr "Поиск возобновлен с начала"
+
+msgid "Whole word"
+msgstr "Только полные слова"
+
+msgid "Regular expressions"
+msgstr "Регулярные выражения"
+
+msgid "Replace"
+msgstr "Заменить"
+
+msgid "Replace All"
+msgstr "Заменить всё"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Недопустимое регулярное выражение: %s"
+
+msgid "You have passed the end of the document"
+msgstr "Пройден конец документа"
+
+msgid "You have passed the beginning of the document"
+msgstr "Пройдено начало документа"
+
+msgid "You have reached the end of the document"
+msgstr "Достигнут конец документа"
+
+msgid "You have reached the beginning of the document"
+msgstr "Достигнуто начало документа"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Фраза %s не найдена"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "Файл %s не существует. Вы хотите его создать?"
+
+msgid "close this tab"
+msgstr "Закрыть эту вкладку"
+
+msgid "This file"
+msgstr "Этот файл"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr "Файл %s был изменён со времени последнего сохранения. Сохранить его?"
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr "Файл %s был изменён другой программой! Переписать его?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Внимание: файл был изменён другой программой!"
+
+msgid "Ignore"
+msgstr "Пропускать"
+
+msgid "Replace File?"
+msgstr "Заменить файл?"
+
+msgid "File already exists"
+msgstr "Файл уже существует"
+
+msgid "Untitled "
+msgstr "Безымянный документ "
+
+msgid "Ok"
+msgstr "ОК"
+
+msgid "Apply & Reindent"
+msgstr "Исправить отступы"
+
+msgid "Cancel"
+msgstr "Отменить"
+
+msgid "Default"
+msgstr "По умолчанию"
+
+msgid "Next tab"
+msgstr "Следующая вкладка"
+
+msgid "Previous tab"
+msgstr "Предыдущая вкладка"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+"Необходимо сохранить изменения перед выполнением данного файла в Scilab."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Этот файл очень длинный. Было бы лучше \"Выполнить файл в Scilab'е\".\n"
+"Продолжить?"
+
+msgid "Enter line number"
+msgstr "Введите номер строки"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "Данный файл является бинарным, при сохранении он будет испорчен."
+
+msgid "Loading"
+msgstr "Идёт загрузка"
+
+msgid "Colorization canceled"
+msgstr "Подсветка синтаксиса отключена"
+
+msgid "Binary file: read-only mode"
+msgstr "Бинарный файл: режим только для чтения"
+
+msgid "Read-only mode"
+msgstr "Режим только для чтения"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+"Нажмите левую кнопку мыши при зажатой клавише CTRL для перехода по ссылке"
+
+msgid "Open in the navigator the URL "
+msgstr "Открыть URL "
+
+msgid "Mail to "
+msgstr "Пишите на адрес "
+
+msgid "Open the source of the macro "
+msgstr "Открыть исходный код макроса "
+
+msgid "Show the definition of the macro "
+msgstr "Показать определение макроса "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Строка %s, Столбец %s. Функция «%s» в строке %s."
+
+msgid "Unknown function"
+msgstr "Неизвестная функция"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Строка %s, Столбец %s."
+
+msgid "Copyright (c)"
+msgstr "Авторское право (c)"
+
+msgid "SciNotes error"
+msgstr "Ошибка SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Не удалось сохранить файл."
+
+msgid "The file could not be converted."
+msgstr "Не удалось преобразовать файл."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "«%s» является каталогом."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "Изменения будут потеряны, всё равно изменить кодировку?"
+
+msgid "Continue ?"
+msgstr "Продолжить?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Не удалось загрузить «scinotesConfiguration.xml»"
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Не удалось найти командное окно или InterpreterManagement."
+
+msgid "Could not find the temporary file."
+msgstr "Не удалось найти временный файл."
+
+msgid "No text selected."
+msgstr "Нет выделенного текста."
+
+msgid "No text to execute."
+msgstr "Нет текста для выполнения."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr "Исходная кодировка файла - %s. Сохранить файл в кодировке %s?"
+
+msgid "Encoding problems"
+msgstr "Проблемы с кодировкой"
+
+msgid "Cannot guess the file encoding."
+msgstr "Не удалось определить кодировку файла."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+"Нельзя сохранить файл %s... Прекращение процесса резервного копирования"
+
+msgid "Backup finished..."
+msgstr "Резервирование завершено..."
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr "Директория %s не существует. Вы хотите её создать?"
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr "Нельзя создать директорию %s. Проверьте права доступа."
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr "Невозможно записать файл в %s. Проверьте права доступа."
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr "Недопустимое имя директории: %s."
+
+msgid "SciNotes autosave"
+msgstr "Автосохранение SciNotes"
+
+#, c-format
+msgid "%s occurences found."
+msgstr "Найдено %s мест."
+
+msgid "Change Colors"
+msgstr "Настройка цветов"
+
+msgid "Cursor Color"
+msgstr "Цвет курсора"
+
+msgid "Background Color"
+msgstr "Цвет фона"
+
+msgid "Change Color"
+msgstr "Изменить цвет"
+
+msgid "Italic"
+msgstr "Курсив"
+
+msgid "Strike Through"
+msgstr "Зачёркнутый"
+
+msgid "Preview"
+msgstr "Предпросмотр"
+
+msgid "Underline"
+msgstr "Подчёркнутый"
+
+msgid "Settings"
+msgstr "Параметры"
+
+msgid "Color"
+msgstr "Цвет"
+
+msgid "Bold"
+msgstr "Полужирный"
+
+msgid "Absolute"
+msgstr "Абсолютная"
+
+msgid "Relative"
+msgstr "Относительный"
+
+msgid "Go to line: "
+msgstr "Перейти к строке: "
+
+msgid "Numeration"
+msgstr "Нумерация"
+
+msgid "Alphabetic order"
+msgstr "Алфавитный порядок"
+
+msgid "Natural order"
+msgstr "Естественный порядок"
+
+msgid "Order"
+msgstr "Порядок"
+
+msgid "Functions"
+msgstr "Функции"
+
+msgid "Anchors"
+msgstr "Метки"
+
+msgid "Anchor's name: "
+msgstr "Имя метки: "
+
+msgid "Set an anchor"
+msgstr "Установить метку"
+
+msgid "Anchor: "
+msgstr "Метка: "
+
+msgid "Open source file of the function:"
+msgstr "Открыть исходный код функции:"
+
+msgid "Open source"
+msgstr "Открыть исходный код"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Закрыть SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Восстановить файлы из предыдущей сессии SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Восстановить последнюю сессию"
+
+msgid "Configure Tabulation"
+msgstr "Параметры табуляции"
+
+msgid "Tab style"
+msgstr "Стиль табуляции"
+
+msgid "Use spaces"
+msgstr "Вставлять пробелы вместо табуляций"
+
+msgid "Length"
+msgstr "Длина"
+
+msgid "Tab representation"
+msgstr "Отображение табуляции"
+
+msgid "Double chevrons"
+msgstr "Двойные угловые скобки"
+
+msgid "Copy full path"
+msgstr "Копировать полный путь"
+
+msgid "Exact"
+msgstr "Учесть регистр"
+
+msgid "Search Files..."
+msgstr "Поиск файлов..."
+
+msgid "Search in Files..."
+msgstr "Поиск в файлах..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s совпадений)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s совпадение)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Затраченное время: %s сек."
+
+msgid "Base directory:"
+msgstr "Базовый каталог:"
+
+msgid "Recursive"
+msgstr "Рекурсивно"
+
+msgid "File pattern"
+msgstr "Шаблон файла"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* для любой строки и ? для любого символа)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+"(~ для домашнего каталога пользователя и SCI для базового каталога Scilab)"
+
+msgid "Word pattern"
+msgstr "Шаблон слова"
+
+msgid "Read file line by line"
+msgstr "Читать файл построчно"
+
+msgid "Choose..."
+msgstr "Выбрать..."
+
+msgid "Stop"
+msgstr "Завершить"
+
+msgid "Regex"
+msgstr "Регулярное выражение"
+
+msgid "Word"
+msgstr "Слово"
+
+msgid "Case-sensitivity (Word)"
+msgstr "Учитывать регистр (слово)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "Учитывать регистр (имя файла)"
+
+msgid "Recursive search"
+msgstr "Рекурсивный поиск"
+
+msgid "Line by line"
+msgstr "Построчно"
+
+msgid "Regular expression (Word)"
+msgstr "Регулярное выражение (слово)"
+
+msgid "Choose the search base directory"
+msgstr "Выберите базовый каталог для поиска"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Модуль «%s» не установлен.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr "Последняя ошибка не встретилась внутри макроса Scilab."
+
+msgid " on line "
+msgstr " на строке "
+
+msgid "Opening file "
+msgstr "Открытие файла "
+
+msgid " of the source file of the function "
+msgstr " файла с исходным кодом функции "
+
+msgid "The source file of the function "
+msgstr "Файл-исходник функции "
+
+msgid " was not found in any library path"
+msgstr " не обнаружен в пути ни одной библиотеки"
+
+msgid "There is no recorded error"
+msgstr "Нет записанной ошибки"
diff --git a/modules/scinotes/locales/scinotes.pot b/modules/scinotes/locales/scinotes.pot
new file mode 100755
index 000000000..110899657
--- /dev/null
+++ b/modules/scinotes/locales/scinotes.pot
@@ -0,0 +1,1925 @@
+# Localization of the module scinotes
+# Please see in SCI/tools/localization for localization management
+# Copyright (C) 2007-2008 - INRIA
+# Copyright (C) 2008-2011 - DIGITEO
+# Copyright (C) 2012-2014 - Scilab-Enterprises
+# This file is distributed under the same license as the Scilab package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n"
+"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Revision-Date: 2015-03-27 13:54+0100\n"
+
+# File: sci_gateway/c/gw_scinotes.c, line: 37
+# File: src/noscinotes/noscinotes.c, line: 22
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 68
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 76
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 91
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 107
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 141
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 158
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 168
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 192
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 212
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 248
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 295
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 317
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 82
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 98
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 115
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 125
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 201
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 222
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 234
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 176
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 285
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 303
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+
+#
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 323
+# File: sci_gateway/cpp/sci_scinotes.cpp, line: 333
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 1
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 39
+msgid "File"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 2
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 40
+msgid "New"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 3
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 41
+msgid "Open"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 4
+msgid "Open recent"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 5
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 6
+msgid "Open file in ..."
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 7
+msgid "Save file in ..."
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 8
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 179
+msgid "Reload"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 9
+msgid "Restore opened files on start-up"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 10
+# File: scilab_fake_localization_file.c, line: 103
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 42
+msgid "Open function source file"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 11
+# File: scilab_fake_localization_file.c, line: 104
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 43
+msgid "Open URL"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 12
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 46
+msgid "Save"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 13
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 47
+msgid "Save as"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 14
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 56
+msgid "Save All"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 15
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 180
+msgid "Overwrite"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 16
+msgid "Export"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 17
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 57
+msgid "Page Setup"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 18
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 58
+msgid "Print Preview"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 19
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 59
+msgid "Print"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 20
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 62
+msgid "Close"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 21
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 63
+msgid "Close All"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 22
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 64
+msgid "Close All But This"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 23
+msgid "Exit Scinotes"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 24
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 69
+msgid "Edit"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 25
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 70
+msgid "Undo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 26
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 71
+msgid "Redo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 27
+# File: scilab_fake_localization_file.c, line: 98
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 72
+msgid "Cut"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 28
+# File: scilab_fake_localization_file.c, line: 97
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 73
+msgid "Copy"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 29
+# File: scilab_fake_localization_file.c, line: 102
+msgid "Copy as HTML with line number"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 30
+# File: scilab_fake_localization_file.c, line: 99
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 74
+msgid "Paste"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 31
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 76
+msgid "Delete"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 32
+msgid "Columns actions"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 33
+# File: scilab_fake_localization_file.c, line: 100
+msgid "Paste Column"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 34
+msgid "Repeat on the Column"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 35
+# File: scilab_fake_localization_file.c, line: 95
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 75
+msgid "Select All"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 36
+# File: scilab_fake_localization_file.c, line: 96
+msgid "Select current block"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 37
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 92
+msgid "Search"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 38
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 93
+msgid "Find/Replace"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 39
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 94
+msgid "Find Next"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 40
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 95
+msgid "Find Previous"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 41
+msgid "Incremental Search"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 42
+msgid "Find files"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 43
+msgid "Find word in files"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 44
+msgid "Set anchor"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 45
+msgid "Go to next anchor"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 46
+msgid "Go to previous anchor"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 47
+msgid "Remove anchor"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 48
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 267
+msgid "Code Navigator"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 49
+msgid "Format"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 50
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 82
+msgid "Shift Right"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 51
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 83
+msgid "Shift Left"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 52
+# File: scilab_fake_localization_file.c, line: 101
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 84
+msgid "Correct Indentation"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 53
+msgid "Remove trailing spaces"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 54
+msgid "Generate comments for help_from_sci"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 55
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 80
+msgid "Comment Selection"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 56
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 81
+msgid "Uncomment Selection"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 57
+msgid "Change the case"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 58
+msgid "Make Selection Lowercase"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 59
+msgid "Make Selection Uppercase"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 60
+msgid "Capitalize Selection;Capitalize character"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 61
+msgid "Single to double quote strings"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 62
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 158
+msgid "Options"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 63
+msgid "Current file encoding"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 64
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 124
+msgid "Line Endings"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 65
+msgid "Preferences"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 66
+msgid "Set font"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 67
+msgid "Set colors"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 68
+# File: scilab_fake_localization_file.c, line: 532
+msgid "Scinotes General settings"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 69
+msgid "Auto-completion on"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 70
+msgid "(, [, ..."
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 71
+msgid "if, function, ..."
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 72
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 73
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 101
+msgid "Highlight current line"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 74
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 123
+msgid "Enable Auto Reformat"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 75
+msgid "Suppress comments when executing selection"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 76
+msgid "Window"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 77
+msgid "Copy tab in new window"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 78
+msgid "Detach tab in new window"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 79
+# File: scilab_fake_localization_file.c, line: 93
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 229
+msgid "Copy selection in a new tab"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 80
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 81
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 131
+msgid "Execute"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 82
+msgid "... file with no echo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 83
+msgid "... file with echo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 84
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 85
+msgid "Save and execute"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 86
+msgid "Save and execute all files"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 87
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 66
+msgid "?"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 88
+msgid "Scinotes help"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 89
+# File: scilab_fake_localization_file.c, line: 92
+msgid "Help on ;Help on selection"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 90
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 143
+msgid "About"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 91
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 94
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 228
+msgid "Complete"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 433
+msgid "Display"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 438
+msgid "Header"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 449
+msgid "Autosave"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 459
+msgid "Editor"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 462
+msgid "Use Scinotes"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 482
+msgid "External editor: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 501
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 511
+msgid "Scilab command: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 537
+msgid "Restore previous session on start-up"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 544
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 548
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 563
+msgid "Default file encoding: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 575
+msgid "Default End-Of-Line: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 612
+msgid "Completion"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 613
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 623
+msgid "General display options"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 625
+msgid "Highlight current line: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 638
+msgid "Show line numbers: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 644
+msgid "Local numbering"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 650
+msgid "Normal"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 656
+msgid "Wrap lines"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 662
+msgid "Background color: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 669
+msgid "Cursor color: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 680
+msgid "Keywords"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 682
+msgid "Enable keywords colorization"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 689
+msgid "Set syntax Colors"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 692
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 698
+# File: scilab_fake_localization_file.c, line: 742
+msgid "Color: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 705
+# File: scilab_fake_localization_file.c, line: 749
+msgid "Highlight on mouse over"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 711
+# File: scilab_fake_localization_file.c, line: 755
+msgid "Style: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 717
+# File: scilab_fake_localization_file.c, line: 761
+msgid "Filled"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 722
+# File: scilab_fake_localization_file.c, line: 766
+msgid "Framed"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 727
+msgid "Underlined"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 735
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 778
+msgid "Tabulation and Indentation"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 780
+msgid "Tabulation size: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 796
+msgid "Use space"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 813
+msgid "Representation: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 815
+msgid "Chevrons"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 821
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 310
+msgid "Horizontal rule"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 827
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 311
+msgid "Vertical rule"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 833
+msgid "Enable auto indentation"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 839
+msgid "Indent size: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 861
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 869
+msgid "Save options"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 871
+msgid "Save every "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 886
+msgid " minutes "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 894
+msgid "Close options"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 895
+msgid "Delete automatically saved files"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 905
+msgid "Filename"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 907
+msgid "Append filename with: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 925
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 933
+msgid "Replace extension with: "
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 956
+msgid "Location"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 958
+msgid "Source file directory"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 964
+msgid "Single directory"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 973
+msgid "Choose an autosave directory"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 991
+msgid "Default header"
+msgstr ""
+
+#
+# File: scilab_fake_localization_file.c, line: 993
+msgid "Add a default header to new file"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java, line: 313
+msgid "Graphics handle field"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java, line: 318
+msgid "No help"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 30
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 144
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 213
+msgid "SciNotes"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 31
+msgid "Error while reading the String"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 32
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 34
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 35
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 36
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 44
+msgid "Source of '"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 45
+msgid "Recent Files"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 48
+msgid "The file could not be created, check the path"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 49
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 50
+msgid "You do not have the permissions to write this file"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 51
+msgid "You do not have the permissions to read this file"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 60
+msgid "An error occurred when exporting the code using FOP"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 61
+msgid "An error occurred when printing"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 65
+msgid "Exit"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 79
+msgid "Tools"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 85
+msgid "Help on typing"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 86
+msgid "Generate help from function"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 87
+msgid "Clone tab in a new window"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 88
+msgid "Clone and close tab in a new window"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 89
+msgid "Remove trailing whitespaces"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 96
+msgid "Goto line"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 99
+msgid "View"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 100
+msgid "Show/Hide ToolBar"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 102
+msgid "Word Wrap"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 103
+msgid "Whereami Line Numbering"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 104
+msgid "Normal Line Numbering"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 105
+msgid "No Line Numbering"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 107
+msgid "Set Colors"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 108
+msgid "Set Font"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 109
+msgid "Reset default font"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 111
+msgid "Split horizontally"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 112
+msgid "Split vertically"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 113
+msgid "No split"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 116
+msgid "Document"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 117
+msgid "Syntax Type"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 118
+msgid "Scilab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 121
+msgid "Encoding"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 122
+msgid "Colorize"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 125
+msgid "Auto (Default)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 126
+msgid "Windows/DOS (CR + LF)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 127
+msgid "Mac Classic (CR)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 128
+msgid "Unix (LF)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 132
+msgid "Load Into Scilab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 133
+msgid "Evaluate Selection"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 134
+msgid "Evaluate from beginning..."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 135
+msgid "Execute File Into Scilab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 138
+msgid "SciNotes help"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 139
+msgid "Help on the current keyword"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 140
+msgid "Help on the selected text"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 141
+msgid "Help on selected text or keyword"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 142
+msgid "Help about '"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 147
+msgid "Find:"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 148
+msgid "Find"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 149
+msgid "Replace/Find"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 150
+msgid "Replace With :"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 151
+msgid "Direction"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 152
+msgid "Forward"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 153
+msgid "Backward"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 154
+msgid "Scope"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 155
+msgid "All"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 156
+msgid "Selected lines"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 157
+msgid "Select from caret"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 159
+msgid "Case sensitive"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 160
+msgid "Circular search"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 161
+msgid "Restart the search from the beginning"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 162
+msgid "Whole word"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 163
+msgid "Regular expressions"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 164
+msgid "Replace"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 165
+msgid "Replace All"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 166
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 167
+msgid "You have passed the end of the document"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 168
+msgid "You have passed the beginning of the document"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 169
+msgid "You have reached the end of the document"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 170
+msgid "You have reached the beginning of the document"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 171
+#, c-format
+msgid "String %s not found"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 173
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 174
+msgid "close this tab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 175
+msgid "This file"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 176
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 177
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 178
+msgid "Warning: the file has been modified by another program !"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 181
+msgid "Ignore"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 182
+msgid "Replace File?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 183
+msgid "File already exists"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 184
+msgid "Untitled "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 185
+msgid "Ok"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 186
+msgid "Apply & Reindent"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 187
+msgid "Cancel"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 188
+msgid "Default"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 189
+msgid "Next tab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 190
+msgid "Previous tab"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 191
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 192
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 195
+msgid "Enter line number"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 196
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 199
+msgid "Loading"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 200
+msgid "Colorization canceled"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 201
+msgid "Binary file: read-only mode"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 202
+msgid "Read-only mode"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 203
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 204
+msgid "Open in the navigator the URL "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 205
+msgid "Mail to "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 206
+msgid "Open the source of the macro "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 207
+msgid "Show the definition of the macro "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 208
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 209
+msgid "Unknown function"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 210
+#, c-format
+msgid "Line %s, Column %s."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 214
+msgid "Copyright (c)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 216
+msgid "SciNotes error"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 217
+msgid "The file could not be saved."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 218
+msgid "The file could not be converted."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 219
+#, c-format
+msgid "%s is a directory."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 220
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 221
+msgid "Continue ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 222
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 224
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 225
+msgid "Could not find the temporary file."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 226
+msgid "No text selected."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 227
+msgid "No text to execute."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 231
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 232
+msgid "Encoding problems"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 233
+msgid "Cannot guess the file encoding."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 235
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 236
+msgid "Backup finished..."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 237
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 238
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 239
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 240
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 241
+msgid "SciNotes autosave"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 243
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 248
+msgid "Change Colors"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 253
+msgid "Cursor Color"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 254
+msgid "Background Color"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 255
+msgid "Change Color"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 256
+msgid "Italic"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 257
+msgid "Strike Through"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 258
+msgid "Preview"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 259
+msgid "Underline"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 260
+msgid "Settings"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 261
+msgid "Color"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 262
+msgid "Bold"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 268
+msgid "Absolute"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 269
+msgid "Relative"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 270
+msgid "Go to line: "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 271
+msgid "Numeration"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 272
+msgid "Alphabetic order"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 273
+msgid "Natural order"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 274
+msgid "Order"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 275
+msgid "Functions"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 276
+msgid "Anchors"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 281
+msgid "Anchor's name: "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 282
+msgid "Set an anchor"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 283
+msgid "Anchor: "
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 288
+msgid "Open source file of the function:"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 289
+msgid "Open source"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 294
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 299
+msgid "Restore files from your last SciNotes session ?"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 300
+msgid "Restore the last sessions"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 305
+msgid "Configure Tabulation"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 306
+msgid "Tab style"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 307
+msgid "Use spaces"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 308
+msgid "Length"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 309
+msgid "Tab representation"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 312
+msgid "Double chevrons"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 314
+msgid "Copy full path"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 319
+msgid "Exact"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 324
+msgid "Search Files..."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 325
+msgid "Search in Files..."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 326
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 327
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 328
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 329
+msgid "Base directory:"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 330
+msgid "Recursive"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 331
+msgid "File pattern"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 332
+msgid "(* for any string and ? for any character)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 333
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 334
+msgid "Word pattern"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 335
+msgid "Read file line by line"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 336
+msgid "Choose..."
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 337
+msgid "Stop"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 338
+msgid "Regex"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 339
+msgid "Word"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 340
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 341
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 342
+msgid "Recursive search"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 343
+msgid "Line by line"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 344
+msgid "Regular expression (Word)"
+msgstr ""
+
+#
+# File: src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java, line: 345
+msgid "Choose the search base directory"
+msgstr ""
+
+#
+# File: src/noscinotes/noscinotes.c, line: 26
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr ""
+
+# File: macros/edit_error.sci, line: 19
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 24
+msgid " on line "
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 24
+msgid "Opening file "
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 25
+msgid " of the source file of the function "
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 27
+msgid "The source file of the function "
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 28
+msgid " was not found in any library path"
+msgstr ""
+
+#
+# File: macros/edit_error.sci, line: 32
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/uk_UA.po b/modules/scinotes/locales/uk_UA.po
new file mode 100755
index 000000000..5ea5ba2af
--- /dev/null
+++ b/modules/scinotes/locales/uk_UA.po
@@ -0,0 +1,1158 @@
+# Ukrainian translation for scilab
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the scilab package.
+#
+# Yuri Chornoivan <yurchor@gmail.com>, 2010.
+# Yuri Chornoivan <yurchor@ukr.net>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2014-09-30 16:53+0000\n"
+"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
+"Language-Team: Ukrainian <translation@linux.org.ua>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: uk\n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Модуль «%s» Scilab у режимі -nogui або -nwni вимкнено.\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s: не вдалося прочитати вхідний параметр №%d.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+"%s: помилковий тип параметра №%d: слід використовувати матрицю з рядків.\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: доступну пам’ять вичерпано.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+"#%s: помилковий тип параметра №%d: слід використовувати матрицю дійсних "
+"значень або рядок «readonly».\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+"%s: помилковий тип параметра №%d: слід використовувати матрицю дійсних "
+"значень.\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr ""
+"%s: помилкові розмірності вхідних параметрів №%d та №%d: розмірності мали "
+"збігатися.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+"%s: помилковий тип параметра №%d: слід використовувати рядок з одного "
+"символу.\n"
+
+msgid "File"
+msgstr "Файл"
+
+msgid "New"
+msgstr "Створити"
+
+msgid "Open"
+msgstr "Відкрити"
+
+msgid "Open recent"
+msgstr "Відкрити повторно"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "Робочі каталоги;Додати каталог;Вилучити останній каталог"
+
+msgid "Open file in ..."
+msgstr "Відкрити файл у…"
+
+msgid "Save file in ..."
+msgstr "Зберегти файл у…"
+
+msgid "Reload"
+msgstr "Перезавантажити"
+
+msgid "Restore opened files on start-up"
+msgstr "Відкривати попередні файли під час запуску"
+
+msgid "Open function source file"
+msgstr "Відкрити файл коду функції"
+
+msgid "Open URL"
+msgstr "Відкрити URL"
+
+msgid "Save"
+msgstr "Зберегти"
+
+msgid "Save as"
+msgstr "Зберегти як"
+
+msgid "Save All"
+msgstr "Зберегти всі"
+
+msgid "Overwrite"
+msgstr "Перезаписати"
+
+msgid "Export"
+msgstr "Експорт"
+
+msgid "Page Setup"
+msgstr "Налаштування сторінки"
+
+msgid "Print Preview"
+msgstr "Перегляд друку"
+
+msgid "Print"
+msgstr "Надрукувати"
+
+msgid "Close"
+msgstr "Закрити"
+
+msgid "Close All"
+msgstr "Закрити всі"
+
+msgid "Close All But This"
+msgstr "Закрити всі крім поточної"
+
+msgid "Exit Scinotes"
+msgstr "Вийти зі Scinotes"
+
+msgid "Edit"
+msgstr "Зміни"
+
+msgid "Undo"
+msgstr "Вернути"
+
+msgid "Redo"
+msgstr "Повторити"
+
+msgid "Cut"
+msgstr "Вирізати"
+
+msgid "Copy"
+msgstr "Копіювати"
+
+msgid "Copy as HTML with line number"
+msgstr "Копіювати як HTML з номерами рядків"
+
+msgid "Paste"
+msgstr "Вставити"
+
+msgid "Delete"
+msgstr "Вилучити"
+
+msgid "Columns actions"
+msgstr "Дії над стовпчиками"
+
+msgid "Paste Column"
+msgstr "Вставити стовпчик"
+
+msgid "Repeat on the Column"
+msgstr "Повторити над цим стовпчиком"
+
+msgid "Select All"
+msgstr "Вибрати все"
+
+msgid "Select current block"
+msgstr "Позначити поточний блок"
+
+msgid "Search"
+msgstr "Пошук"
+
+msgid "Find/Replace"
+msgstr "Знайти/Замінити"
+
+msgid "Find Next"
+msgstr "Знайти далі"
+
+msgid "Find Previous"
+msgstr "Знайти позаду"
+
+msgid "Incremental Search"
+msgstr "Покроковий пошук"
+
+msgid "Find files"
+msgstr "Пошук файлів"
+
+msgid "Find word in files"
+msgstr "Пошук слів у файлах"
+
+msgid "Set anchor"
+msgstr "Встановити прив’язку"
+
+msgid "Go to next anchor"
+msgstr "Перейти до наступної прив’язки"
+
+msgid "Go to previous anchor"
+msgstr "Перейти до попередньої прив’язки"
+
+msgid "Remove anchor"
+msgstr "Вилучити прив’язку"
+
+msgid "Code Navigator"
+msgstr "Навігація кодом"
+
+msgid "Format"
+msgstr "Формат"
+
+msgid "Shift Right"
+msgstr "Зсунути праворуч"
+
+msgid "Shift Left"
+msgstr "Зсунути ліворуч"
+
+msgid "Correct Indentation"
+msgstr "Виправити відступи"
+
+msgid "Remove trailing spaces"
+msgstr "Вилучати кінцеві пробіли"
+
+msgid "Generate comments for help_from_sci"
+msgstr "Створити записи коментарів для help_from_sci"
+
+msgid "Comment Selection"
+msgstr "Закоментувати позначене"
+
+msgid "Uncomment Selection"
+msgstr "Зняти позначки коментаря з позначеного"
+
+msgid "Change the case"
+msgstr "Змінити регістр"
+
+msgid "Make Selection Lowercase"
+msgstr "Замінити великі літери у позначеному малими"
+
+msgid "Make Selection Uppercase"
+msgstr "Замінити малі літери у позначеному великими"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "Змінити регістр позначеного;Змінити регістр символу"
+
+msgid "Single to double quote strings"
+msgstr "Рядки у одинарних лапках у подвійні лапки"
+
+msgid "Options"
+msgstr "Параметри"
+
+msgid "Current file encoding"
+msgstr "Кодування поточного файла"
+
+msgid "Line Endings"
+msgstr "Завершення рядків"
+
+msgid "Preferences"
+msgstr "Параметри"
+
+msgid "Set font"
+msgstr "Встановити шрифт"
+
+msgid "Set colors"
+msgstr "Встановити кольори"
+
+msgid "Scinotes General settings"
+msgstr "Загальні параметри Scinotes"
+
+msgid "Auto-completion on"
+msgstr "Автодоповнення"
+
+msgid "(, [, ..."
+msgstr "(, [, …"
+
+msgid "if, function, ..."
+msgstr "if, function, …"
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr "Нумерація рядків;Вимкнено;Локальна нумерація"
+
+msgid "Highlight current line"
+msgstr "Підсвічувати поточний рядок"
+
+msgid "Enable Auto Reformat"
+msgstr "Увімкнути автоматичну зміну формату"
+
+msgid "Suppress comments when executing selection"
+msgstr "Придушити коментарі під час виконання позначеного"
+
+msgid "Window"
+msgstr "Вікно"
+
+msgid "Copy tab in new window"
+msgstr "Копіювати вкладку у окреме вікно"
+
+msgid "Detach tab in new window"
+msgstr "Від’єднати вкладку у окреме вікно"
+
+msgid "Copy selection in a new tab"
+msgstr "Копіювати позначене до нової вкладки"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+"Розділений перегляд;Вимкнути;Розділити на два стовпчики;Розділити на два "
+"рядки"
+
+msgid "Execute"
+msgstr "Виконати"
+
+msgid "... file with no echo"
+msgstr "…файл без виведення"
+
+msgid "... file with echo"
+msgstr "…файл з виведенням"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "…позначене з виведенням;…до курсора з виведенням"
+
+msgid "Save and execute"
+msgstr "Зберегти і виконати"
+
+msgid "Save and execute all files"
+msgstr "Зберегти і виконати всі файли"
+
+msgid "?"
+msgstr "Довідка"
+
+msgid "Scinotes help"
+msgstr "Довідка зі Scinotes"
+
+msgid "Help on ;Help on selection"
+msgstr "Довідка щодо ;Довідка щодо позначеного"
+
+msgid "About"
+msgstr "Про програму"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "Обчислити позначене з виведенням;Обчислити до курсора з виведенням"
+
+msgid "Complete"
+msgstr "Завершити"
+
+msgid "Display"
+msgstr "Показ"
+
+msgid "Header"
+msgstr "Заголовок"
+
+msgid "Autosave"
+msgstr "Автозбереження"
+
+msgid "Editor"
+msgstr "Редактор"
+
+msgid "Use Scinotes"
+msgstr "Користування Scinotes"
+
+msgid "External editor: "
+msgstr "Зовнішній редактор: "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr "(Не забудьте додати лапки, якщо у запису шляху містяться пробіли)"
+
+msgid "Scilab command: "
+msgstr "Команда Scilab: "
+
+msgid "Restore previous session on start-up"
+msgstr "Відновлювати попередній сеанс під час запуску"
+
+msgid "Add carriage return at the end of the file."
+msgstr "Додавати символ нового рядка наприкінці файла."
+
+msgid "Number of recently opened files to display: "
+msgstr "Кількість нещодавно відкритих файлів у списку: "
+
+msgid "Default file encoding: "
+msgstr "Типове кодування файлів: "
+
+msgid "Default End-Of-Line: "
+msgstr "Типове завершення рядка: "
+
+msgid "Completion"
+msgstr "Доповнення"
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+"Автоматично доповнювати дужки, коли курсор перебуває наприкінці рядка"
+
+msgid "General display options"
+msgstr "Загальні параметри показу"
+
+msgid "Highlight current line: "
+msgstr "Підсвічування поточного рядка: "
+
+msgid "Show line numbers: "
+msgstr "Показ номерів рядків: "
+
+msgid "Local numbering"
+msgstr "Локальна нумерація"
+
+msgid "Normal"
+msgstr "Звичайна"
+
+msgid "Wrap lines"
+msgstr "Переносити рядки"
+
+msgid "Background color: "
+msgstr "Колір тла: "
+
+msgid "Cursor color: "
+msgstr "Колір курсора: "
+
+msgid "Keywords"
+msgstr "Ключові слова"
+
+msgid "Enable keywords colorization"
+msgstr "Увімкнути розфарбовування ключових слів"
+
+msgid "Set syntax Colors"
+msgstr "Встановити кольори синтаксису"
+
+msgid "Highlight corresponding brackets"
+msgstr "Підсвічувати відповідні дужки"
+
+msgid "Color: "
+msgstr "Колір: "
+
+msgid "Highlight on mouse over"
+msgstr "Підсвічування у разі наведення вказівника"
+
+msgid "Style: "
+msgstr "Стиль: "
+
+msgid "Filled"
+msgstr "Заповнення кольором"
+
+msgid "Framed"
+msgstr "У рамці"
+
+msgid "Underlined"
+msgstr "Підкреслення"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr "Підсвічувати відповідні ключові слова (наприклад if ... end)"
+
+msgid "Tabulation and Indentation"
+msgstr "Табуляція і відступи"
+
+msgid "Tabulation size: "
+msgstr "Розмір табуляції: "
+
+msgid "Use space"
+msgstr "Використовувати пробіл"
+
+msgid "Representation: "
+msgstr "Представлення: "
+
+msgid "Chevrons"
+msgstr "Шеврон"
+
+msgid "Horizontal rule"
+msgstr "Горизонтальна лінійка"
+
+msgid "Vertical rule"
+msgstr "Вертикальна лінійка"
+
+msgid "Enable auto indentation"
+msgstr "Увімкнути автовідступ"
+
+msgid "Indent size: "
+msgstr "Розмір відступу: "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Увімкнути автозбереження у Scinotes"
+
+msgid "Save options"
+msgstr "Параметри збереження"
+
+msgid "Save every "
+msgstr "Зберігати кожні "
+
+msgid " minutes "
+msgstr " хвилин "
+
+msgid "Close options"
+msgstr "Параметри закриття"
+
+msgid "Delete automatically saved files"
+msgstr "Вилучити автоматично збережені файли"
+
+msgid "Filename"
+msgstr "Назва файла"
+
+msgid "Append filename with: "
+msgstr "Додати назву файла з: "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr "(заповнювач %date буде замінено значенням поточної дати)"
+
+msgid "Replace extension with: "
+msgstr "Замінити суфікс на такий: "
+
+msgid "Location"
+msgstr "Розташування"
+
+msgid "Source file directory"
+msgstr "Каталог файлів кодів"
+
+msgid "Single directory"
+msgstr "Окремий каталог"
+
+msgid "Choose an autosave directory"
+msgstr "Виберіть каталог для автозбереження"
+
+msgid "Default header"
+msgstr "Типовий заголовок"
+
+msgid "Add a default header to new file"
+msgstr "Додавати до нових файлів типовий заголовок"
+
+msgid "Graphics handle field"
+msgstr "Поле елемента керування графіки"
+
+msgid "No help"
+msgstr "Немає довідки"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "Помилка під час спроби читання рядка"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr "Файл налаштувань пошкоджено. Відновлено типові значення."
+
+#, c-format
+msgid "File not found: %s"
+msgstr "Файла не існує: %s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "Помилка введення-виведення: %s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+"До файла %s внесено зміни сторонньою програмою. Перезавантажити його вміст?"
+
+msgid "Source of '"
+msgstr "Джерело «"
+
+msgid "Recent Files"
+msgstr "Нещодавні файли"
+
+msgid "The file could not be created, check the path"
+msgstr "Не вдалося створити файл, перевірте вказану адресу"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr "Файл непридатний до запису, його відкрито у режимі читання"
+
+msgid "You do not have the permissions to write this file"
+msgstr "У вас немає прав доступу до запису даних до цього файла"
+
+msgid "You do not have the permissions to read this file"
+msgstr "У вас немає прав доступу до читання цього файла"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "Під час експортування коду за допомогою FOP сталася помилка"
+
+msgid "An error occurred when printing"
+msgstr "Під час спроби друку сталася помилка"
+
+msgid "Exit"
+msgstr "Вийти"
+
+msgid "Tools"
+msgstr "Інструменти"
+
+msgid "Help on typing"
+msgstr "Довідка при введенні"
+
+msgid "Generate help from function"
+msgstr "Створити довідку на основі функції"
+
+msgid "Clone tab in a new window"
+msgstr "Клонувати вкладку у новому вікні"
+
+msgid "Clone and close tab in a new window"
+msgstr "Клонувати і закрити вкладку у новому вікні"
+
+msgid "Remove trailing whitespaces"
+msgstr "Вилучити кінцеві пробіли"
+
+msgid "Goto line"
+msgstr "Перейти до рядка"
+
+msgid "View"
+msgstr "Перегляд"
+
+msgid "Show/Hide ToolBar"
+msgstr "Показати/Сховати панель інструментів"
+
+msgid "Word Wrap"
+msgstr "Перенесення слів"
+
+msgid "Whereami Line Numbering"
+msgstr "Нумерація рядків Whereami"
+
+msgid "Normal Line Numbering"
+msgstr "Звичайна нумерація рядків"
+
+msgid "No Line Numbering"
+msgstr "Без нумерації рядків"
+
+msgid "Set Colors"
+msgstr "Вказати кольори"
+
+msgid "Set Font"
+msgstr "Вказати шрифт"
+
+msgid "Reset default font"
+msgstr "Відновити типовий шрифт"
+
+msgid "Split horizontally"
+msgstr "Розділити горизонтально"
+
+msgid "Split vertically"
+msgstr "Розділити вертикально"
+
+msgid "No split"
+msgstr "Без поділу"
+
+msgid "Document"
+msgstr "Документ"
+
+msgid "Syntax Type"
+msgstr "Тип синтаксису"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "Кодування"
+
+msgid "Colorize"
+msgstr "Розфарбовування"
+
+msgid "Auto (Default)"
+msgstr "Автоматично (типово)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Класичний для Mac (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "Завантажити до Scilab"
+
+msgid "Evaluate Selection"
+msgstr "Обчислити позначене"
+
+msgid "Evaluate from beginning..."
+msgstr "Обчислити з початку…"
+
+msgid "Execute File Into Scilab"
+msgstr "Виконати файл у Scilab"
+
+msgid "SciNotes help"
+msgstr "Довідка SciNotes"
+
+msgid "Help on the current keyword"
+msgstr "Довідка щодо поточного ключового слова"
+
+msgid "Help on the selected text"
+msgstr "Довідка щодо позначеного фрагмента тексту"
+
+msgid "Help on selected text or keyword"
+msgstr "Довідка щодо позначеного фрагмента тексту або слова"
+
+msgid "Help about '"
+msgstr "Довідка щодо «"
+
+msgid "Find:"
+msgstr "Знайти:"
+
+msgid "Find"
+msgstr "Знайти"
+
+msgid "Replace/Find"
+msgstr "Замінити/Знайти"
+
+msgid "Replace With :"
+msgstr "Замінити на:"
+
+msgid "Direction"
+msgstr "Напрямок"
+
+msgid "Forward"
+msgstr "Вперед"
+
+msgid "Backward"
+msgstr "Назад"
+
+msgid "Scope"
+msgstr "Область"
+
+msgid "All"
+msgstr "Всі"
+
+msgid "Selected lines"
+msgstr "Позначені рядки"
+
+msgid "Select from caret"
+msgstr "Позначити від каретки"
+
+msgid "Case sensitive"
+msgstr "З врахуванням регістру"
+
+msgid "Circular search"
+msgstr "Циклічний пошук"
+
+msgid "Restart the search from the beginning"
+msgstr "Поновити пошук з початку"
+
+msgid "Whole word"
+msgstr "Цілі слова"
+
+msgid "Regular expressions"
+msgstr "Формальні вирази"
+
+msgid "Replace"
+msgstr "Замінити"
+
+msgid "Replace All"
+msgstr "Замінити всі"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "Некоректний формальний вираз: %s"
+
+msgid "You have passed the end of the document"
+msgstr "Перехід за кінець документа"
+
+msgid "You have passed the beginning of the document"
+msgstr "Перехід за початок документа"
+
+msgid "You have reached the end of the document"
+msgstr "Досягнуто кінця документа"
+
+msgid "You have reached the beginning of the document"
+msgstr "Досягнуто початку документа"
+
+#, c-format
+msgid "String %s not found"
+msgstr "Рядка %s не знайдено"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "Файла з назвою %s не інує. Хочете його створити?"
+
+msgid "close this tab"
+msgstr "закрити цю вкладку"
+
+msgid "This file"
+msgstr "Поточний файл"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+"З часу останнього збереження до файла %s було внесено зміни. Зберегти файл?"
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+"Файл %s було змінено іншою програмою! Перезаписати його поточний вміст?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "Попередження: до файла було внесено зміни сторонньою програмою!"
+
+msgid "Ignore"
+msgstr "Ігнорувати"
+
+msgid "Replace File?"
+msgstr "Замінити файл?"
+
+msgid "File already exists"
+msgstr "Файл вже існує"
+
+msgid "Untitled "
+msgstr "Без назви "
+
+msgid "Ok"
+msgstr "Гаразд"
+
+msgid "Apply & Reindent"
+msgstr "Застосувати і змінити відступи"
+
+msgid "Cancel"
+msgstr "Скасувати"
+
+msgid "Default"
+msgstr "Типовий"
+
+msgid "Next tab"
+msgstr "Наступна вкладка"
+
+msgid "Previous tab"
+msgstr "Попередня вкладка"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr "Перш ніж виконувати цей файл у Scilab, його вміст слід зберегти."
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"Цей файл є занадто довгим. Краще скористатися командою «Завантажити до "
+"Scilab».\n"
+"Ви справді бажаєте виконати обчислення?"
+
+msgid "Enter line number"
+msgstr "Введіть номер рядка"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "Цей файл є бінарним файлом, збереження пошкодить цей файл."
+
+msgid "Loading"
+msgstr "Завантаження"
+
+msgid "Colorization canceled"
+msgstr "Розфарбування скасовано"
+
+msgid "Binary file: read-only mode"
+msgstr "Бінарний файл: режим лише читання"
+
+msgid "Read-only mode"
+msgstr "Режим тільки для читання"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+"Натисніть клавішу CTRL і пересуньте вказівник миші на посилання, щоб задіяти "
+"його"
+
+msgid "Open in the navigator the URL "
+msgstr "Відкрити у програмі для перегляду адресу "
+
+msgid "Mail to "
+msgstr "Надіслати листа до "
+
+msgid "Open the source of the macro "
+msgstr "Відкрити початковий код макросу "
+
+msgid "Show the definition of the macro "
+msgstr "Показати місце визначення макросу "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "Рядок %s, позиція %s. Функція «%s» у рядку %s."
+
+msgid "Unknown function"
+msgstr "Невідома функція"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "Рядок %s, позиція %s."
+
+msgid "Copyright (c)"
+msgstr "Авторські права належать ©"
+
+msgid "SciNotes error"
+msgstr "Помилка SciNotes"
+
+msgid "The file could not be saved."
+msgstr "Зберегти файл не вдалося."
+
+msgid "The file could not be converted."
+msgstr "Перетворити файл не вдалося."
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s — це каталог."
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr ""
+"Внесені вами зміни буде втрачено. Попри це бажаєте змінити кодування?"
+
+msgid "Continue ?"
+msgstr "Продовжити?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "Не вдалося завантажити «scinotesConfiguration.xml»"
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "Не вдалося виявити консолі або InterpreterManagement."
+
+msgid "Could not find the temporary file."
+msgstr "Не вдалося виявити тимчасовий файл."
+
+msgid "No text selected."
+msgstr "Не позначено жодного фрагмента тексту."
+
+msgid "No text to execute."
+msgstr "Немає тексту для обробки."
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+"Справжнім кодуванням символів файла є %s, файл буде збережено у кодуванні "
+"%s. Зберегти?"
+
+msgid "Encoding problems"
+msgstr "Проблеми з кодуванням"
+
+msgid "Cannot guess the file encoding."
+msgstr "Не вдалося визначити кодування даних файла."
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+"Не вдалося зберегти файл %s… Процедуру створення резервної копії перервано."
+
+msgid "Backup finished..."
+msgstr "Створення резервної копії завершено…"
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr "Каталогу з назвою %s не існує. Хочете його створити?"
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+"Не вдалося створити каталог %s. Будь ласка, перевірте, чи є у вас відповідні "
+"права доступу."
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+"Не вдалося записати файл до %s. Будь ласка, перевірте, чи є у вас відповідні "
+"права доступу."
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr "Некоректна назва каталогу: %s."
+
+msgid "SciNotes autosave"
+msgstr "Автозбереження SciNotes"
+
+#, c-format
+msgid "%s occurences found."
+msgstr "Знайдено відповідники %s."
+
+msgid "Change Colors"
+msgstr "Змінити кольори"
+
+msgid "Cursor Color"
+msgstr "Колір курсора"
+
+msgid "Background Color"
+msgstr "Колір тла"
+
+msgid "Change Color"
+msgstr "Змінити колір"
+
+msgid "Italic"
+msgstr "Курсив"
+
+msgid "Strike Through"
+msgstr "Перекреслити"
+
+msgid "Preview"
+msgstr "Перегляд"
+
+msgid "Underline"
+msgstr "Підкреслити"
+
+msgid "Settings"
+msgstr "Параметри"
+
+msgid "Color"
+msgstr "Колір"
+
+msgid "Bold"
+msgstr "Жирний"
+
+msgid "Absolute"
+msgstr "Абсолютний"
+
+msgid "Relative"
+msgstr "Відносний"
+
+msgid "Go to line: "
+msgstr "Перейти до рядка: "
+
+msgid "Numeration"
+msgstr "Нумерація"
+
+msgid "Alphabetic order"
+msgstr "За абеткою"
+
+msgid "Natural order"
+msgstr "Природній порядок"
+
+msgid "Order"
+msgstr "Порядок"
+
+msgid "Functions"
+msgstr "Функції"
+
+msgid "Anchors"
+msgstr "Прив’язки"
+
+msgid "Anchor's name: "
+msgstr "Назва прив’язки: "
+
+msgid "Set an anchor"
+msgstr "Встановити прив’язку"
+
+msgid "Anchor: "
+msgstr "Прив’язка: "
+
+msgid "Open source file of the function:"
+msgstr "Відкрити початковий код функції:"
+
+msgid "Open source"
+msgstr "Відкрити файл з кодом"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "Ви справді бажаєте завершити роботу SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "Відкрити файли з вашого попереднього сеансу у SciNotes?"
+
+msgid "Restore the last sessions"
+msgstr "Відновлення попереднього сеансу"
+
+msgid "Configure Tabulation"
+msgstr "Налаштування табуляції"
+
+msgid "Tab style"
+msgstr "Стиль табуляції"
+
+msgid "Use spaces"
+msgstr "Використовувати пробіли"
+
+msgid "Length"
+msgstr "Довжина"
+
+msgid "Tab representation"
+msgstr "Показ табуляції"
+
+msgid "Double chevrons"
+msgstr "Подвійний шеврон"
+
+msgid "Copy full path"
+msgstr "Копіювати шлях повністю"
+
+msgid "Exact"
+msgstr "Точно"
+
+msgid "Search Files..."
+msgstr "Знайти файли…"
+
+msgid "Search in Files..."
+msgstr "Знайти у файлах…"
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s відповідників)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s відповідник)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "Витрачено часу: %s сек."
+
+msgid "Base directory:"
+msgstr "Базовий каталог:"
+
+msgid "Recursive"
+msgstr "Рекурсивно"
+
+msgid "File pattern"
+msgstr "Шаблон файла"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(* — будь-який рядок, ? — будь-який символ)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "(~ — домашня тека користувача, SCI — основна тека Scilab)"
+
+msgid "Word pattern"
+msgstr "Шаблон слова"
+
+msgid "Read file line by line"
+msgstr "Читати файл порядково"
+
+msgid "Choose..."
+msgstr "Вибрати…"
+
+msgid "Stop"
+msgstr "Перервати"
+
+msgid "Regex"
+msgstr "Формальний вираз"
+
+msgid "Word"
+msgstr "Слово"
+
+msgid "Case-sensitivity (Word)"
+msgstr "Врахування регістру (слово)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "Врахування регістру (назва файла)"
+
+msgid "Recursive search"
+msgstr "Виконувати пошук рекурсивно"
+
+msgid "Line by line"
+msgstr "Порядково"
+
+msgid "Regular expression (Word)"
+msgstr "Формальний вираз (слово)"
+
+msgid "Choose the search base directory"
+msgstr "Виберіть кореневий каталог пошуку"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Модуль «%s» Scilab не встановлено.\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr "Остання помилка не сталася у межах макросу Scilab."
+
+msgid " on line "
+msgstr " у рядку "
+
+msgid "Opening file "
+msgstr "Відкриваємо файл "
+
+msgid " of the source file of the function "
+msgstr " початкового коду функції "
+
+msgid "The source file of the function "
+msgstr "Файл коду функції "
+
+msgid " was not found in any library path"
+msgstr " не було знайдено за жодною з адрес бібліотек"
+
+msgid "There is no recorded error"
+msgstr "Записів помилок не збереглося"
diff --git a/modules/scinotes/locales/zh_CN.po b/modules/scinotes/locales/zh_CN.po
new file mode 100755
index 000000000..32cb3c007
--- /dev/null
+++ b/modules/scinotes/locales/zh_CN.po
@@ -0,0 +1,1131 @@
+# Simplified Chinese translation for scilab
+# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2013-07-15 05:27+0000\n"
+"Last-Translator: Wesh <Unknown>\n"
+"Language-Team: Simplified Chinese <zh_CN@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr "Scilab的‘%s’模块在-nogui或-nwni模式中无效。\n"
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr "%s:不能读取第%d个输入参数。\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr "%s:第%d个参数的类型错误:应该为字符串矩阵。\n"
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s:内存不足。\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr "%s:第%d个参数的类型错误:应该为实矩阵或‘只读’。\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr "%s:第%d个参数的类型错误:应该为实矩阵。\n"
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr "%s:输入参数#%d和#%d的大小错误:应该为同样的维数。\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr "%s:第%d个参数的类型错误:应该为字符串。\n"
+
+msgid "File"
+msgstr "文件"
+
+msgid "New"
+msgstr "新建"
+
+msgid "Open"
+msgstr "打开"
+
+msgid "Open recent"
+msgstr "打开最近"
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr "工作目录;添加目录;删除最后一个目录"
+
+msgid "Open file in ..."
+msgstr "打开文件从..."
+
+msgid "Save file in ..."
+msgstr "保存文件到..."
+
+msgid "Reload"
+msgstr "重新加载"
+
+msgid "Restore opened files on start-up"
+msgstr "启动时恢复打开的文件"
+
+msgid "Open function source file"
+msgstr "打开函数源文件"
+
+msgid "Open URL"
+msgstr "打开URL"
+
+msgid "Save"
+msgstr "保存"
+
+msgid "Save as"
+msgstr "另存为"
+
+msgid "Save All"
+msgstr "保存全部"
+
+msgid "Overwrite"
+msgstr "覆盖"
+
+msgid "Export"
+msgstr "导出"
+
+msgid "Page Setup"
+msgstr "页面设置"
+
+msgid "Print Preview"
+msgstr "打印预览"
+
+msgid "Print"
+msgstr "打印"
+
+msgid "Close"
+msgstr "关闭"
+
+msgid "Close All"
+msgstr "关闭所有文档"
+
+msgid "Close All But This"
+msgstr "关闭其他文档"
+
+msgid "Exit Scinotes"
+msgstr "退出Scinotes"
+
+msgid "Edit"
+msgstr "编辑"
+
+msgid "Undo"
+msgstr "撤销"
+
+msgid "Redo"
+msgstr "重做"
+
+msgid "Cut"
+msgstr "剪切"
+
+msgid "Copy"
+msgstr "复制"
+
+msgid "Copy as HTML with line number"
+msgstr "复制为带行号HTML"
+
+msgid "Paste"
+msgstr "粘贴"
+
+msgid "Delete"
+msgstr "删除"
+
+msgid "Columns actions"
+msgstr "列操作"
+
+msgid "Paste Column"
+msgstr "粘贴列"
+
+msgid "Repeat on the Column"
+msgstr "重复列"
+
+msgid "Select All"
+msgstr "全选"
+
+msgid "Select current block"
+msgstr "选择当前区块"
+
+msgid "Search"
+msgstr "搜索"
+
+msgid "Find/Replace"
+msgstr "查找/替换"
+
+msgid "Find Next"
+msgstr "查找下一个"
+
+msgid "Find Previous"
+msgstr "查找上一个(E)"
+
+msgid "Incremental Search"
+msgstr "增量查找"
+
+msgid "Find files"
+msgstr "查找文件"
+
+msgid "Find word in files"
+msgstr "文件中查找词"
+
+msgid "Set anchor"
+msgstr "设置锚点"
+
+msgid "Go to next anchor"
+msgstr "转到下一个锚点"
+
+msgid "Go to previous anchor"
+msgstr "转到上一个锚点"
+
+msgid "Remove anchor"
+msgstr "移除锚点"
+
+msgid "Code Navigator"
+msgstr "代码导航器"
+
+msgid "Format"
+msgstr "格式化"
+
+msgid "Shift Right"
+msgstr "右移"
+
+msgid "Shift Left"
+msgstr "左移"
+
+msgid "Correct Indentation"
+msgstr "纠正缩进"
+
+msgid "Remove trailing spaces"
+msgstr "删除行尾空格"
+
+msgid "Generate comments for help_from_sci"
+msgstr "为help_from_sci生成注释"
+
+msgid "Comment Selection"
+msgstr "注释选区"
+
+msgid "Uncomment Selection"
+msgstr "取消选区注释"
+
+msgid "Change the case"
+msgstr "更改大小写"
+
+msgid "Make Selection Lowercase"
+msgstr "小写化所选内容"
+
+msgid "Make Selection Uppercase"
+msgstr "大写化所选内容"
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr "首字母大写化所选内容;首字母大写化字符"
+
+msgid "Single to double quote strings"
+msgstr "字符串单引号转为双引号"
+
+msgid "Options"
+msgstr "选项"
+
+msgid "Current file encoding"
+msgstr "当前文件编码"
+
+msgid "Line Endings"
+msgstr "行结束符"
+
+msgid "Preferences"
+msgstr "首选项"
+
+msgid "Set font"
+msgstr "设置字体"
+
+msgid "Set colors"
+msgstr "设置颜色"
+
+msgid "Scinotes General settings"
+msgstr "Scinotes一般设置"
+
+msgid "Auto-completion on"
+msgstr "自动补全开"
+
+msgid "(, [, ..."
+msgstr "(, [, ..."
+
+msgid "if, function, ..."
+msgstr "if, function, ..."
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr "高亮显示当前行"
+
+msgid "Enable Auto Reformat"
+msgstr "启用自动重新格式化"
+
+msgid "Suppress comments when executing selection"
+msgstr "执行所选内容时不显示注释"
+
+msgid "Window"
+msgstr "窗口"
+
+msgid "Copy tab in new window"
+msgstr "将标签页复制到新窗口"
+
+msgid "Detach tab in new window"
+msgstr "将标签页分离到新窗口"
+
+msgid "Copy selection in a new tab"
+msgstr "将所选内容复制到新标签页"
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr "执行"
+
+msgid "... file with no echo"
+msgstr "....文件带回显"
+
+msgid "... file with echo"
+msgstr "....文件不回显"
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr "...所选内容带回显;...直到插入符(^),带回显"
+
+msgid "Save and execute"
+msgstr "保存并执行"
+
+msgid "Save and execute all files"
+msgstr "保存并执行所有文件"
+
+msgid "?"
+msgstr "?"
+
+msgid "Scinotes help"
+msgstr "Scinotes帮助"
+
+msgid "Help on ;Help on selection"
+msgstr "帮助关于;所选内容帮助"
+
+msgid "About"
+msgstr "关于"
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr "执行所选内容带回显;执行直到插入符(^),带回显"
+
+msgid "Complete"
+msgstr "补全"
+
+msgid "Display"
+msgstr "显示"
+
+msgid "Header"
+msgstr "头部"
+
+msgid "Autosave"
+msgstr "自动保存"
+
+msgid "Editor"
+msgstr "编辑器"
+
+msgid "Use Scinotes"
+msgstr "使用Scinotes"
+
+msgid "External editor: "
+msgstr "外部编辑器: "
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr "(不要忘记含空格的路径要加双引号)"
+
+msgid "Scilab command: "
+msgstr "Scilab命令: "
+
+msgid "Restore previous session on start-up"
+msgstr "启动时恢复前一次会话"
+
+msgid "Add carriage return at the end of the file."
+msgstr "文件末尾添加回车."
+
+msgid "Number of recently opened files to display: "
+msgstr "显示最近打开文件数目: "
+
+msgid "Default file encoding: "
+msgstr "默认文件编码: "
+
+msgid "Default End-Of-Line: "
+msgstr "默认行结束符 "
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr "一般显示选项"
+
+msgid "Highlight current line: "
+msgstr "高亮当前行: "
+
+msgid "Show line numbers: "
+msgstr "显示行号: "
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr "普通"
+
+msgid "Wrap lines"
+msgstr "自动换行"
+
+msgid "Background color: "
+msgstr "背景颜色: "
+
+msgid "Cursor color: "
+msgstr "光标颜色: "
+
+msgid "Keywords"
+msgstr "关键词"
+
+msgid "Enable keywords colorization"
+msgstr "关键词彩色显示"
+
+msgid "Set syntax Colors"
+msgstr "设置语法颜色"
+
+msgid "Highlight corresponding brackets"
+msgstr "高亮匹配括号"
+
+msgid "Color: "
+msgstr "颜色: "
+
+msgid "Highlight on mouse over"
+msgstr "鼠标悬停时高亮"
+
+msgid "Style: "
+msgstr "样式: "
+
+msgid "Filled"
+msgstr "填充"
+
+msgid "Framed"
+msgstr "边框"
+
+msgid "Underlined"
+msgstr "下划线"
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr "高亮匹配关键词 (e.g. if ... end)"
+
+msgid "Tabulation and Indentation"
+msgstr "制表与缩进"
+
+msgid "Tabulation size: "
+msgstr "制表符大小: "
+
+msgid "Use space"
+msgstr "使用空格"
+
+msgid "Representation: "
+msgstr "表示符号: "
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr "水平线"
+
+msgid "Vertical rule"
+msgstr "垂直线"
+
+msgid "Enable auto indentation"
+msgstr "启用自动缩进"
+
+msgid "Indent size: "
+msgstr "缩进大小: "
+
+msgid "Enable autosave in Scinotes"
+msgstr "Scinotes启用自动保存"
+
+msgid "Save options"
+msgstr "保存选项"
+
+msgid "Save every "
+msgstr "保存每个 "
+
+msgid " minutes "
+msgstr " 分钟 "
+
+msgid "Close options"
+msgstr "关闭选项"
+
+msgid "Delete automatically saved files"
+msgstr "删除自动保存的文件"
+
+msgid "Filename"
+msgstr "文件名"
+
+msgid "Append filename with: "
+msgstr "文件名附加上: "
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr "扩展名替换为: "
+
+msgid "Location"
+msgstr "位置"
+
+msgid "Source file directory"
+msgstr "源文件目录"
+
+msgid "Single directory"
+msgstr "单一目录"
+
+msgid "Choose an autosave directory"
+msgstr "选择自动保存目录"
+
+msgid "Default header"
+msgstr "默认头部内容"
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr "图形句柄域"
+
+msgid "No help"
+msgstr "无帮助"
+
+msgid "SciNotes"
+msgstr "SciNotes"
+
+msgid "Error while reading the String"
+msgstr "读取字符串时出错"
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr "文件未找到:%s"
+
+#, c-format
+msgid "I/O error: %s"
+msgstr "I/O错误:%s"
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr "文件%s已被另一程序修改,重新载入?"
+
+msgid "Source of '"
+msgstr "来源之‘"
+
+msgid "Recent Files"
+msgstr "最近的文件"
+
+msgid "The file could not be created, check the path"
+msgstr "不能创建此文件,请检查文件路径"
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr "此文件不可写,故以只读模式打开"
+
+msgid "You do not have the permissions to write this file"
+msgstr "您没有权限写此文件"
+
+msgid "You do not have the permissions to read this file"
+msgstr "您没有权限读此文件"
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr "使用FOP导出代码时发生错误"
+
+msgid "An error occurred when printing"
+msgstr "打印出错"
+
+msgid "Exit"
+msgstr "退出"
+
+msgid "Tools"
+msgstr "工具"
+
+msgid "Help on typing"
+msgstr "即时输入帮助"
+
+msgid "Generate help from function"
+msgstr "从函数生成帮助"
+
+msgid "Clone tab in a new window"
+msgstr "克隆标签页到新窗口"
+
+msgid "Clone and close tab in a new window"
+msgstr "克隆"
+
+msgid "Remove trailing whitespaces"
+msgstr "删除行尾空白"
+
+msgid "Goto line"
+msgstr "转到行"
+
+msgid "View"
+msgstr "查看"
+
+msgid "Show/Hide ToolBar"
+msgstr "显示/隐藏工具栏"
+
+msgid "Word Wrap"
+msgstr "文字换行"
+
+msgid "Whereami Line Numbering"
+msgstr "Whereami行号"
+
+msgid "Normal Line Numbering"
+msgstr "普通行号"
+
+msgid "No Line Numbering"
+msgstr "无行号"
+
+msgid "Set Colors"
+msgstr "设置颜色"
+
+msgid "Set Font"
+msgstr "设置字体"
+
+msgid "Reset default font"
+msgstr "重置缺省字体"
+
+msgid "Split horizontally"
+msgstr "水平分割"
+
+msgid "Split vertically"
+msgstr "垂直分割"
+
+msgid "No split"
+msgstr "不分割"
+
+msgid "Document"
+msgstr "文档"
+
+msgid "Syntax Type"
+msgstr "语法类型"
+
+msgid "Scilab"
+msgstr "Scilab"
+
+msgid "Encoding"
+msgstr "编码"
+
+msgid "Colorize"
+msgstr "加彩色"
+
+msgid "Auto (Default)"
+msgstr "自动(默认)"
+
+msgid "Windows/DOS (CR + LF)"
+msgstr "Windows/DOS (CR + LF)"
+
+msgid "Mac Classic (CR)"
+msgstr "Mac Classic (CR)"
+
+msgid "Unix (LF)"
+msgstr "Unix (LF)"
+
+msgid "Load Into Scilab"
+msgstr "载入Scilab"
+
+msgid "Evaluate Selection"
+msgstr "执行所选命令"
+
+msgid "Evaluate from beginning..."
+msgstr "从头开始运行..."
+
+msgid "Execute File Into Scilab"
+msgstr "载入Scilab执行"
+
+msgid "SciNotes help"
+msgstr "SciNotes帮助"
+
+msgid "Help on the current keyword"
+msgstr "当前关键字帮助"
+
+msgid "Help on the selected text"
+msgstr "所选文本帮助"
+
+msgid "Help on selected text or keyword"
+msgstr "所选文本或关键字帮助"
+
+msgid "Help about '"
+msgstr "帮助'"
+
+msgid "Find:"
+msgstr "查找:"
+
+msgid "Find"
+msgstr "查找"
+
+msgid "Replace/Find"
+msgstr "替换/查找"
+
+msgid "Replace With :"
+msgstr "替换为:"
+
+msgid "Direction"
+msgstr "方向"
+
+msgid "Forward"
+msgstr "向前"
+
+msgid "Backward"
+msgstr "向后"
+
+msgid "Scope"
+msgstr "范围"
+
+msgid "All"
+msgstr "全部"
+
+msgid "Selected lines"
+msgstr "选择的区域"
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr "区分大小写"
+
+msgid "Circular search"
+msgstr "循环搜索"
+
+msgid "Restart the search from the beginning"
+msgstr "从头开始搜索"
+
+msgid "Whole word"
+msgstr "全词匹配"
+
+msgid "Regular expressions"
+msgstr "正则表达式"
+
+msgid "Replace"
+msgstr "替换"
+
+msgid "Replace All"
+msgstr "全部替换"
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr "不正确的正则表达式:%s"
+
+msgid "You have passed the end of the document"
+msgstr "已到文档末尾"
+
+msgid "You have passed the beginning of the document"
+msgstr "已到文档开头"
+
+msgid "You have reached the end of the document"
+msgstr "已经到达文档尾部"
+
+msgid "You have reached the beginning of the document"
+msgstr "已到文档开头"
+
+#, c-format
+msgid "String %s not found"
+msgstr "没有发现字符串 %s"
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr "文件%s不存在,创建此文件?"
+
+msgid "close this tab"
+msgstr "关闭这个标签页"
+
+msgid "This file"
+msgstr "文件"
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr "文件%s已经被另一程序修改!覆盖?"
+
+msgid "Warning: the file has been modified by another program !"
+msgstr "警告:此文件已被其他程序修改"
+
+msgid "Ignore"
+msgstr "忽略"
+
+msgid "Replace File?"
+msgstr "替换文件?"
+
+msgid "File already exists"
+msgstr "文件已存在"
+
+msgid "Untitled "
+msgstr "未命名 "
+
+msgid "Ok"
+msgstr "确定"
+
+msgid "Apply & Reindent"
+msgstr "应用&重新缩进"
+
+msgid "Cancel"
+msgstr "取消"
+
+msgid "Default"
+msgstr "默认"
+
+msgid "Next tab"
+msgstr "下一个标签"
+
+msgid "Previous tab"
+msgstr "上一个标签"
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr "在Scilab中执行文件前您需要先保存修改。"
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+"文件太长,“载入Scilab执行”可能会更好。\n"
+"你确定要继续?"
+
+msgid "Enter line number"
+msgstr "输入行号"
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr "此文件是二进制文件,保存会导致文件损坏。"
+
+msgid "Loading"
+msgstr "加载中"
+
+msgid "Colorization canceled"
+msgstr "着色已撤销"
+
+msgid "Binary file: read-only mode"
+msgstr "二进制文件:只读模式"
+
+msgid "Read-only mode"
+msgstr "只读模式"
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr "按住CTRL键并将鼠标移动到链接上激活"
+
+msgid "Open in the navigator the URL "
+msgstr "在导航器中打开URL "
+
+msgid "Mail to "
+msgstr "邮寄至 "
+
+msgid "Open the source of the macro "
+msgstr "打开宏代码 "
+
+msgid "Show the definition of the macro "
+msgstr "显示宏定义 "
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr "行%s,列%s。行%s处函数‘%s’。"
+
+msgid "Unknown function"
+msgstr "未知函数"
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr "行%s,列%s。"
+
+msgid "Copyright (c)"
+msgstr "版权所有 (c)"
+
+msgid "SciNotes error"
+msgstr "SciNotes错误"
+
+msgid "The file could not be saved."
+msgstr "不能保存此文件"
+
+msgid "The file could not be converted."
+msgstr "不能转换此文件"
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%s 是目录。"
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr "你的修改会丢失,仍然要改变编码?"
+
+msgid "Continue ?"
+msgstr "继续?"
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr "不能加载“scinotesConfiguration.xml”"
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr "找不到控制台,也找不到InterpreterManagement。"
+
+msgid "Could not find the temporary file."
+msgstr "找不到临时文件"
+
+msgid "No text selected."
+msgstr "没有选择文本"
+
+msgid "No text to execute."
+msgstr "没有文本要执行"
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr "文件编码实际是%s,并会已%s编码保存。继续?"
+
+msgid "Encoding problems"
+msgstr "编码问题"
+
+msgid "Cannot guess the file encoding."
+msgstr "不能猜出文件编码"
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr "不能保存文件%s... 停止备份"
+
+msgid "Backup finished..."
+msgstr "备份结束..."
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr "更改颜色"
+
+msgid "Cursor Color"
+msgstr "指针颜色"
+
+msgid "Background Color"
+msgstr "背景色"
+
+msgid "Change Color"
+msgstr "更改颜色"
+
+msgid "Italic"
+msgstr "斜体"
+
+msgid "Strike Through"
+msgstr "删除线"
+
+msgid "Preview"
+msgstr "预览"
+
+msgid "Underline"
+msgstr "下划线"
+
+msgid "Settings"
+msgstr "设置"
+
+msgid "Color"
+msgstr "颜色"
+
+msgid "Bold"
+msgstr "粗体"
+
+msgid "Absolute"
+msgstr "绝对"
+
+msgid "Relative"
+msgstr "相对"
+
+msgid "Go to line: "
+msgstr "转到行: "
+
+msgid "Numeration"
+msgstr "计数方式"
+
+msgid "Alphabetic order"
+msgstr "字母顺序"
+
+msgid "Natural order"
+msgstr "自然顺序"
+
+msgid "Order"
+msgstr "顺序"
+
+msgid "Functions"
+msgstr "函数"
+
+msgid "Anchors"
+msgstr "锚点"
+
+msgid "Anchor's name: "
+msgstr "锚点名 "
+
+msgid "Set an anchor"
+msgstr "设置锚点"
+
+msgid "Anchor: "
+msgstr "锚点 "
+
+msgid "Open source file of the function:"
+msgstr "打开函数源文件:"
+
+msgid "Open source"
+msgstr "开放源码"
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr "你确定要关闭SciNotes?"
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr "从最后一次SciNotes会话恢复文件?"
+
+msgid "Restore the last sessions"
+msgstr "恢复最后一次会话"
+
+msgid "Configure Tabulation"
+msgstr "配置制表符"
+
+msgid "Tab style"
+msgstr "制表符样式"
+
+msgid "Use spaces"
+msgstr "使用空格"
+
+msgid "Length"
+msgstr "长度"
+
+msgid "Tab representation"
+msgstr "制表符表示法"
+
+msgid "Double chevrons"
+msgstr "双V符号(»)"
+
+msgid "Copy full path"
+msgstr "复制完整路径"
+
+msgid "Exact"
+msgstr "精确"
+
+msgid "Search Files..."
+msgstr "搜索文件..."
+
+msgid "Search in Files..."
+msgstr "文件中搜索..."
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr "<html>%s <i>(%s匹配)</i></html>"
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr "<html>%s <i>(%s匹配)</i></html>"
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr "运行时间:%s秒"
+
+msgid "Base directory:"
+msgstr "基目录:"
+
+msgid "Recursive"
+msgstr "递归"
+
+msgid "File pattern"
+msgstr "文件模式"
+
+msgid "(* for any string and ? for any character)"
+msgstr "(*号通配任意字符串,?号通配任意字符)"
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr "~代表用户主目录,SCI代表Scilab基目录"
+
+msgid "Word pattern"
+msgstr "单词模式"
+
+msgid "Read file line by line"
+msgstr "逐行读取文件"
+
+msgid "Choose..."
+msgstr "选择..."
+
+msgid "Stop"
+msgstr "停止"
+
+msgid "Regex"
+msgstr "正则表达式"
+
+msgid "Word"
+msgstr "词"
+
+msgid "Case-sensitivity (Word)"
+msgstr "大小写敏感(词)"
+
+msgid "Case-sensitivity (File name)"
+msgstr "大小写敏感(文件名)"
+
+msgid "Recursive search"
+msgstr "递归搜索"
+
+msgid "Line by line"
+msgstr "逐行"
+
+msgid "Regular expression (Word)"
+msgstr "正则表达式(词)"
+
+msgid "Choose the search base directory"
+msgstr "选择搜索基目录"
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr "Scilab模块'%s'尚未安装。\n"
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/locales/zh_TW.po b/modules/scinotes/locales/zh_TW.po
new file mode 100755
index 000000000..81bff13bd
--- /dev/null
+++ b/modules/scinotes/locales/zh_TW.po
@@ -0,0 +1,1129 @@
+# Chinese (Traditional) translation for scilab
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the scilab package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: scilab\n"
+"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
+"POT-Creation-Date: 2013-04-16 17:44+0100\n"
+"PO-Revision-Date: 2011-05-23 01:34+0000\n"
+"Last-Translator: MouetteYang <Unknown>\n"
+"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Launchpad (build 17413)\n"
+"Language: \n"
+
+#, c-format
+msgid "Scilab '%s' module disabled in -nogui or -nwni mode.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Can not read input argument #%d.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: String matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: No more memory.\n"
+msgstr "%s: 記憶體空間不足。\n"
+
+#, c-format
+msgid ""
+"%s: Wrong type for argument #%d: Real matrix or 'readonly' expected.\n"
+msgstr ""
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: Real matrix expected.\n"
+msgstr ""
+
+#, c-format
+msgid ""
+"%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"
+msgstr "%s: 第 %d 及第 %d 輸入參數長度錯誤: 應為相同維度.\n"
+
+#, c-format
+msgid "%s: Wrong type for argument #%d: A string expected.\n"
+msgstr ""
+
+msgid "File"
+msgstr ""
+
+msgid "New"
+msgstr ""
+
+msgid "Open"
+msgstr ""
+
+msgid "Open recent"
+msgstr ""
+
+msgid "Working directories;Add a directory;Remove last directory"
+msgstr ""
+
+msgid "Open file in ..."
+msgstr ""
+
+msgid "Save file in ..."
+msgstr ""
+
+msgid "Reload"
+msgstr ""
+
+msgid "Restore opened files on start-up"
+msgstr ""
+
+msgid "Open function source file"
+msgstr ""
+
+msgid "Open URL"
+msgstr ""
+
+msgid "Save"
+msgstr ""
+
+msgid "Save as"
+msgstr ""
+
+msgid "Save All"
+msgstr ""
+
+msgid "Overwrite"
+msgstr ""
+
+msgid "Export"
+msgstr ""
+
+msgid "Page Setup"
+msgstr ""
+
+msgid "Print Preview"
+msgstr ""
+
+msgid "Print"
+msgstr ""
+
+msgid "Close"
+msgstr ""
+
+msgid "Close All"
+msgstr ""
+
+msgid "Close All But This"
+msgstr ""
+
+msgid "Exit Scinotes"
+msgstr ""
+
+msgid "Edit"
+msgstr ""
+
+msgid "Undo"
+msgstr ""
+
+msgid "Redo"
+msgstr ""
+
+msgid "Cut"
+msgstr ""
+
+msgid "Copy"
+msgstr ""
+
+msgid "Copy as HTML with line number"
+msgstr ""
+
+msgid "Paste"
+msgstr ""
+
+msgid "Delete"
+msgstr ""
+
+msgid "Columns actions"
+msgstr ""
+
+msgid "Paste Column"
+msgstr ""
+
+msgid "Repeat on the Column"
+msgstr ""
+
+msgid "Select All"
+msgstr ""
+
+msgid "Select current block"
+msgstr ""
+
+msgid "Search"
+msgstr ""
+
+msgid "Find/Replace"
+msgstr ""
+
+msgid "Find Next"
+msgstr ""
+
+msgid "Find Previous"
+msgstr ""
+
+msgid "Incremental Search"
+msgstr ""
+
+msgid "Find files"
+msgstr ""
+
+msgid "Find word in files"
+msgstr ""
+
+msgid "Set anchor"
+msgstr ""
+
+msgid "Go to next anchor"
+msgstr ""
+
+msgid "Go to previous anchor"
+msgstr ""
+
+msgid "Remove anchor"
+msgstr ""
+
+msgid "Code Navigator"
+msgstr ""
+
+msgid "Format"
+msgstr ""
+
+msgid "Shift Right"
+msgstr ""
+
+msgid "Shift Left"
+msgstr ""
+
+msgid "Correct Indentation"
+msgstr ""
+
+msgid "Remove trailing spaces"
+msgstr ""
+
+msgid "Generate comments for help_from_sci"
+msgstr ""
+
+msgid "Comment Selection"
+msgstr ""
+
+msgid "Uncomment Selection"
+msgstr ""
+
+msgid "Change the case"
+msgstr ""
+
+msgid "Make Selection Lowercase"
+msgstr ""
+
+msgid "Make Selection Uppercase"
+msgstr ""
+
+msgid "Capitalize Selection;Capitalize character"
+msgstr ""
+
+msgid "Single to double quote strings"
+msgstr ""
+
+msgid "Options"
+msgstr ""
+
+msgid "Current file encoding"
+msgstr ""
+
+msgid "Line Endings"
+msgstr ""
+
+msgid "Preferences"
+msgstr ""
+
+msgid "Set font"
+msgstr ""
+
+msgid "Set colors"
+msgstr ""
+
+msgid "Scinotes General settings"
+msgstr ""
+
+msgid "Auto-completion on"
+msgstr ""
+
+msgid "(, [, ..."
+msgstr ""
+
+msgid "if, function, ..."
+msgstr ""
+
+msgid "Line numbering;Off;Normal;Local numbering"
+msgstr ""
+
+msgid "Highlight current line"
+msgstr ""
+
+msgid "Enable Auto Reformat"
+msgstr ""
+
+msgid "Suppress comments when executing selection"
+msgstr ""
+
+msgid "Window"
+msgstr ""
+
+msgid "Copy tab in new window"
+msgstr ""
+
+msgid "Detach tab in new window"
+msgstr ""
+
+msgid "Copy selection in a new tab"
+msgstr ""
+
+msgid "Split View;Off;Split in two columns;Split in two rows"
+msgstr ""
+
+msgid "Execute"
+msgstr ""
+
+msgid "... file with no echo"
+msgstr ""
+
+msgid "... file with echo"
+msgstr ""
+
+msgid "... the selection with echo;... until the caret, with echo"
+msgstr ""
+
+msgid "Save and execute"
+msgstr ""
+
+msgid "Save and execute all files"
+msgstr ""
+
+msgid "?"
+msgstr ""
+
+msgid "Scinotes help"
+msgstr ""
+
+msgid "Help on ;Help on selection"
+msgstr ""
+
+msgid "About"
+msgstr ""
+
+msgid "Evaluate Selection with echo;Evaluate until the caret, with echo"
+msgstr ""
+
+msgid "Complete"
+msgstr ""
+
+msgid "Display"
+msgstr ""
+
+msgid "Header"
+msgstr ""
+
+msgid "Autosave"
+msgstr ""
+
+msgid "Editor"
+msgstr ""
+
+msgid "Use Scinotes"
+msgstr ""
+
+msgid "External editor: "
+msgstr ""
+
+msgid "(Don't forget to quote path containing white spaces)"
+msgstr ""
+
+msgid "Scilab command: "
+msgstr ""
+
+msgid "Restore previous session on start-up"
+msgstr ""
+
+msgid "Add carriage return at the end of the file."
+msgstr ""
+
+msgid "Number of recently opened files to display: "
+msgstr ""
+
+msgid "Default file encoding: "
+msgstr ""
+
+msgid "Default End-Of-Line: "
+msgstr ""
+
+msgid "Completion"
+msgstr ""
+
+msgid "Auto-complete brackets when cursor is at the end of a line"
+msgstr ""
+
+msgid "General display options"
+msgstr ""
+
+msgid "Highlight current line: "
+msgstr ""
+
+msgid "Show line numbers: "
+msgstr ""
+
+msgid "Local numbering"
+msgstr ""
+
+msgid "Normal"
+msgstr ""
+
+msgid "Wrap lines"
+msgstr ""
+
+msgid "Background color: "
+msgstr ""
+
+msgid "Cursor color: "
+msgstr ""
+
+msgid "Keywords"
+msgstr ""
+
+msgid "Enable keywords colorization"
+msgstr ""
+
+msgid "Set syntax Colors"
+msgstr ""
+
+msgid "Highlight corresponding brackets"
+msgstr ""
+
+msgid "Color: "
+msgstr ""
+
+msgid "Highlight on mouse over"
+msgstr ""
+
+msgid "Style: "
+msgstr ""
+
+msgid "Filled"
+msgstr ""
+
+msgid "Framed"
+msgstr ""
+
+msgid "Underlined"
+msgstr ""
+
+msgid "Highlight corresponding keywords (e.g. if ... end)"
+msgstr ""
+
+msgid "Tabulation and Indentation"
+msgstr ""
+
+msgid "Tabulation size: "
+msgstr ""
+
+msgid "Use space"
+msgstr ""
+
+msgid "Representation: "
+msgstr ""
+
+msgid "Chevrons"
+msgstr ""
+
+msgid "Horizontal rule"
+msgstr ""
+
+msgid "Vertical rule"
+msgstr ""
+
+msgid "Enable auto indentation"
+msgstr ""
+
+msgid "Indent size: "
+msgstr ""
+
+msgid "Enable autosave in Scinotes"
+msgstr ""
+
+msgid "Save options"
+msgstr ""
+
+msgid "Save every "
+msgstr ""
+
+msgid " minutes "
+msgstr ""
+
+msgid "Close options"
+msgstr ""
+
+msgid "Delete automatically saved files"
+msgstr ""
+
+msgid "Filename"
+msgstr ""
+
+msgid "Append filename with: "
+msgstr ""
+
+#, c-format
+msgid "(%date can be used to be replaced by the current date)"
+msgstr ""
+
+msgid "Replace extension with: "
+msgstr ""
+
+msgid "Location"
+msgstr ""
+
+msgid "Source file directory"
+msgstr ""
+
+msgid "Single directory"
+msgstr ""
+
+msgid "Choose an autosave directory"
+msgstr ""
+
+msgid "Default header"
+msgstr ""
+
+msgid "Add a default header to new file"
+msgstr ""
+
+msgid "Graphics handle field"
+msgstr ""
+
+msgid "No help"
+msgstr ""
+
+msgid "SciNotes"
+msgstr ""
+
+msgid "Error while reading the String"
+msgstr ""
+
+msgid "The configuration file has been corrupted and reset to default one."
+msgstr ""
+
+#, c-format
+msgid "File not found: %s"
+msgstr ""
+
+#, c-format
+msgid "I/O error: %s"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by an other program. Reload it ?"
+msgstr ""
+
+msgid "Source of '"
+msgstr ""
+
+msgid "Recent Files"
+msgstr ""
+
+msgid "The file could not be created, check the path"
+msgstr ""
+
+msgid "The file is not writable so it is opened in read-only mode"
+msgstr ""
+
+msgid "You do not have the permissions to write this file"
+msgstr ""
+
+msgid "You do not have the permissions to read this file"
+msgstr ""
+
+msgid "An error occurred when exporting the code using FOP"
+msgstr ""
+
+msgid "An error occurred when printing"
+msgstr ""
+
+msgid "Exit"
+msgstr ""
+
+msgid "Tools"
+msgstr ""
+
+msgid "Help on typing"
+msgstr ""
+
+msgid "Generate help from function"
+msgstr ""
+
+msgid "Clone tab in a new window"
+msgstr ""
+
+msgid "Clone and close tab in a new window"
+msgstr ""
+
+msgid "Remove trailing whitespaces"
+msgstr ""
+
+msgid "Goto line"
+msgstr ""
+
+msgid "View"
+msgstr ""
+
+msgid "Show/Hide ToolBar"
+msgstr ""
+
+msgid "Word Wrap"
+msgstr ""
+
+msgid "Whereami Line Numbering"
+msgstr ""
+
+msgid "Normal Line Numbering"
+msgstr ""
+
+msgid "No Line Numbering"
+msgstr ""
+
+msgid "Set Colors"
+msgstr ""
+
+msgid "Set Font"
+msgstr ""
+
+msgid "Reset default font"
+msgstr ""
+
+msgid "Split horizontally"
+msgstr ""
+
+msgid "Split vertically"
+msgstr ""
+
+msgid "No split"
+msgstr ""
+
+msgid "Document"
+msgstr ""
+
+msgid "Syntax Type"
+msgstr ""
+
+msgid "Scilab"
+msgstr ""
+
+msgid "Encoding"
+msgstr ""
+
+msgid "Colorize"
+msgstr ""
+
+msgid "Auto (Default)"
+msgstr ""
+
+msgid "Windows/DOS (CR + LF)"
+msgstr ""
+
+msgid "Mac Classic (CR)"
+msgstr ""
+
+msgid "Unix (LF)"
+msgstr ""
+
+msgid "Load Into Scilab"
+msgstr ""
+
+msgid "Evaluate Selection"
+msgstr ""
+
+msgid "Evaluate from beginning..."
+msgstr ""
+
+msgid "Execute File Into Scilab"
+msgstr ""
+
+msgid "SciNotes help"
+msgstr ""
+
+msgid "Help on the current keyword"
+msgstr ""
+
+msgid "Help on the selected text"
+msgstr ""
+
+msgid "Help on selected text or keyword"
+msgstr ""
+
+msgid "Help about '"
+msgstr ""
+
+msgid "Find:"
+msgstr ""
+
+msgid "Find"
+msgstr ""
+
+msgid "Replace/Find"
+msgstr ""
+
+msgid "Replace With :"
+msgstr ""
+
+msgid "Direction"
+msgstr ""
+
+msgid "Forward"
+msgstr ""
+
+msgid "Backward"
+msgstr ""
+
+msgid "Scope"
+msgstr ""
+
+msgid "All"
+msgstr ""
+
+msgid "Selected lines"
+msgstr ""
+
+msgid "Select from caret"
+msgstr ""
+
+msgid "Case sensitive"
+msgstr ""
+
+msgid "Circular search"
+msgstr ""
+
+msgid "Restart the search from the beginning"
+msgstr ""
+
+msgid "Whole word"
+msgstr ""
+
+msgid "Regular expressions"
+msgstr ""
+
+msgid "Replace"
+msgstr ""
+
+msgid "Replace All"
+msgstr ""
+
+#, c-format
+msgid "Invalid regular expression : %s"
+msgstr ""
+
+msgid "You have passed the end of the document"
+msgstr ""
+
+msgid "You have passed the beginning of the document"
+msgstr ""
+
+msgid "You have reached the end of the document"
+msgstr ""
+
+msgid "You have reached the beginning of the document"
+msgstr ""
+
+#, c-format
+msgid "String %s not found"
+msgstr ""
+
+#, c-format
+msgid "The file %s does not exist. Do you want to create it?"
+msgstr ""
+
+msgid "close this tab"
+msgstr ""
+
+msgid "This file"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified since last save. Save it?"
+msgstr ""
+
+#, c-format
+msgid "The file %s has been modified by another program ! Overwrite it ?"
+msgstr ""
+
+msgid "Warning: the file has been modified by another program !"
+msgstr ""
+
+msgid "Ignore"
+msgstr ""
+
+msgid "Replace File?"
+msgstr ""
+
+msgid "File already exists"
+msgstr ""
+
+msgid "Untitled "
+msgstr ""
+
+msgid "Ok"
+msgstr ""
+
+msgid "Apply & Reindent"
+msgstr ""
+
+msgid "Cancel"
+msgstr ""
+
+msgid "Default"
+msgstr ""
+
+msgid "Next tab"
+msgstr ""
+
+msgid "Previous tab"
+msgstr ""
+
+msgid ""
+"You need to save your modifications before executing this file into Scilab."
+msgstr ""
+
+msgid ""
+"This file is very long. \"Execute File Into Scilab\" could be better.\n"
+"Are you sure to continue ?"
+msgstr ""
+
+msgid "Enter line number"
+msgstr ""
+
+msgid "This file is a binary, saving it will result in a corrupt file."
+msgstr ""
+
+msgid "Loading"
+msgstr ""
+
+msgid "Colorization canceled"
+msgstr ""
+
+msgid "Binary file: read-only mode"
+msgstr ""
+
+msgid "Read-only mode"
+msgstr ""
+
+msgid "Press CTRL and move the mouse over the link to activate it"
+msgstr ""
+
+msgid "Open in the navigator the URL "
+msgstr ""
+
+msgid "Mail to "
+msgstr ""
+
+msgid "Open the source of the macro "
+msgstr ""
+
+msgid "Show the definition of the macro "
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s. Function '%s' at Line %s."
+msgstr ""
+
+msgid "Unknown function"
+msgstr ""
+
+#, c-format
+msgid "Line %s, Column %s."
+msgstr ""
+
+msgid "Copyright (c)"
+msgstr ""
+
+msgid "SciNotes error"
+msgstr ""
+
+msgid "The file could not be saved."
+msgstr ""
+
+msgid "The file could not be converted."
+msgstr ""
+
+#, c-format
+msgid "%s is a directory."
+msgstr "%目錄"
+
+msgid "Your modifications will be lost, change encoding anyway?"
+msgstr ""
+
+msgid "Continue ?"
+msgstr ""
+
+msgid "Cannot load \"scinotesConfiguration.xml\""
+msgstr ""
+
+msgid "Could not find the console nor the InterpreterManagement."
+msgstr ""
+
+msgid "Could not find the temporary file."
+msgstr ""
+
+msgid "No text selected."
+msgstr ""
+
+msgid "No text to execute."
+msgstr ""
+
+#, c-format
+msgid ""
+"The file encoding is actually %s and it will be saved in using %s. Continue ?"
+msgstr ""
+
+msgid "Encoding problems"
+msgstr ""
+
+msgid "Cannot guess the file encoding."
+msgstr ""
+
+#, c-format
+msgid "Cannot save the file %s... stop the backup process"
+msgstr ""
+
+msgid "Backup finished..."
+msgstr ""
+
+#, c-format
+msgid "The directory %s does not exist. Do you want to create it?"
+msgstr ""
+
+#, c-format
+msgid "The directory %s cannot be created. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Impossible to write a file in %s. Please check your access rights."
+msgstr ""
+
+#, c-format
+msgid "Invalid directory name: %s."
+msgstr ""
+
+msgid "SciNotes autosave"
+msgstr ""
+
+#, c-format
+msgid "%s occurences found."
+msgstr ""
+
+msgid "Change Colors"
+msgstr ""
+
+msgid "Cursor Color"
+msgstr ""
+
+msgid "Background Color"
+msgstr ""
+
+msgid "Change Color"
+msgstr ""
+
+msgid "Italic"
+msgstr ""
+
+msgid "Strike Through"
+msgstr ""
+
+msgid "Preview"
+msgstr ""
+
+msgid "Underline"
+msgstr ""
+
+msgid "Settings"
+msgstr ""
+
+msgid "Color"
+msgstr ""
+
+msgid "Bold"
+msgstr ""
+
+msgid "Absolute"
+msgstr ""
+
+msgid "Relative"
+msgstr ""
+
+msgid "Go to line: "
+msgstr ""
+
+msgid "Numeration"
+msgstr ""
+
+msgid "Alphabetic order"
+msgstr ""
+
+msgid "Natural order"
+msgstr ""
+
+msgid "Order"
+msgstr ""
+
+msgid "Functions"
+msgstr ""
+
+msgid "Anchors"
+msgstr ""
+
+msgid "Anchor's name: "
+msgstr ""
+
+msgid "Set an anchor"
+msgstr ""
+
+msgid "Anchor: "
+msgstr ""
+
+msgid "Open source file of the function:"
+msgstr ""
+
+msgid "Open source"
+msgstr ""
+
+msgid "Are you sure that you want to close SciNotes ?"
+msgstr ""
+
+msgid "Restore files from your last SciNotes session ?"
+msgstr ""
+
+msgid "Restore the last sessions"
+msgstr ""
+
+msgid "Configure Tabulation"
+msgstr ""
+
+msgid "Tab style"
+msgstr ""
+
+msgid "Use spaces"
+msgstr ""
+
+msgid "Length"
+msgstr ""
+
+msgid "Tab representation"
+msgstr ""
+
+msgid "Double chevrons"
+msgstr ""
+
+msgid "Copy full path"
+msgstr ""
+
+msgid "Exact"
+msgstr ""
+
+msgid "Search Files..."
+msgstr ""
+
+msgid "Search in Files..."
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s matches)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "<html>%s <i>(%s match)</i></html>"
+msgstr ""
+
+#, c-format
+msgid "Elapsed time: %s sec."
+msgstr ""
+
+msgid "Base directory:"
+msgstr ""
+
+msgid "Recursive"
+msgstr ""
+
+msgid "File pattern"
+msgstr ""
+
+msgid "(* for any string and ? for any character)"
+msgstr ""
+
+msgid "(~ for user home dir. and SCI for Scilab base dir.)"
+msgstr ""
+
+msgid "Word pattern"
+msgstr ""
+
+msgid "Read file line by line"
+msgstr ""
+
+msgid "Choose..."
+msgstr ""
+
+msgid "Stop"
+msgstr ""
+
+msgid "Regex"
+msgstr ""
+
+msgid "Word"
+msgstr ""
+
+msgid "Case-sensitivity (Word)"
+msgstr ""
+
+msgid "Case-sensitivity (File name)"
+msgstr ""
+
+msgid "Recursive search"
+msgstr ""
+
+msgid "Line by line"
+msgstr ""
+
+msgid "Regular expression (Word)"
+msgstr ""
+
+msgid "Choose the search base directory"
+msgstr ""
+
+#, c-format
+msgid "Scilab '%s' module not installed.\n"
+msgstr ""
+
+msgid "The last error did not occur inside a Scilab macro."
+msgstr ""
+
+msgid " on line "
+msgstr ""
+
+msgid "Opening file "
+msgstr ""
+
+msgid " of the source file of the function "
+msgstr ""
+
+msgid "The source file of the function "
+msgstr ""
+
+msgid " was not found in any library path"
+msgstr ""
+
+msgid "There is no recorded error"
+msgstr ""
diff --git a/modules/scinotes/macros/buildmacros.bat b/modules/scinotes/macros/buildmacros.bat
new file mode 100755
index 000000000..23a827489
--- /dev/null
+++ b/modules/scinotes/macros/buildmacros.bat
@@ -0,0 +1,11 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2009 - DIGITEO
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit;
diff --git a/modules/scinotes/macros/buildmacros.sce b/modules/scinotes/macros/buildmacros.sce
new file mode 100755
index 000000000..2ef3aa8d2
--- /dev/null
+++ b/modules/scinotes/macros/buildmacros.sce
@@ -0,0 +1,16 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET <allan.cornet@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+if (isdef("genlib") == %f) then
+ exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce");
+end
+
+genlib("scinoteslib","SCI/modules/scinotes/macros",%f,%t);
+
diff --git a/modules/scinotes/macros/cleanmacros.bat b/modules/scinotes/macros/cleanmacros.bat
new file mode 100755
index 000000000..053cf56f2
--- /dev/null
+++ b/modules/scinotes/macros/cleanmacros.bat
@@ -0,0 +1,13 @@
+
+rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) 2009 - DIGITEO
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL
diff --git a/modules/scinotes/macros/edit_error.bin b/modules/scinotes/macros/edit_error.bin
new file mode 100755
index 000000000..c4ef6cc1c
--- /dev/null
+++ b/modules/scinotes/macros/edit_error.bin
Binary files differ
diff --git a/modules/scinotes/macros/edit_error.sci b/modules/scinotes/macros/edit_error.sci
new file mode 100755
index 000000000..315e0f044
--- /dev/null
+++ b/modules/scinotes/macros/edit_error.sci
@@ -0,0 +1,35 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+//
+
+function answ = edit_error(clearerror)
+ if (argn(2) == 0) then
+ clearerror = %f;
+ end
+ [str, n, line, func] = lasterror(clearerror);
+ if (n > 0) then
+ if (func == "") then
+ answ = gettext("The last error did not occur inside a Scilab macro.");
+ else
+ p = get_function_path(func);
+ if (p <> []) then
+ editor(p, line, func);
+ answ = gettext("Opening file ") + p + gettext(" on line ") + ..
+ msprintf("%d",line) + gettext(" of the source file of the function ") + func;
+ else
+ answ = gettext("The source file of the function ") + func + ..
+ gettext(" was not found in any library path");
+ end
+ end
+ else
+ answ = gettext("There is no recorded error");
+ end
+endfunction
+
diff --git a/modules/scinotes/macros/editor.bin b/modules/scinotes/macros/editor.bin
new file mode 100755
index 000000000..0a540dab6
--- /dev/null
+++ b/modules/scinotes/macros/editor.bin
Binary files differ
diff --git a/modules/scinotes/macros/editor.sci b/modules/scinotes/macros/editor.sci
new file mode 100755
index 000000000..07da1236d
--- /dev/null
+++ b/modules/scinotes/macros/editor.sci
@@ -0,0 +1,67 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// This function is designed to call the godd "editor" according the values in
+// the preferences file.
+// This function can take any type of arguments.
+function editor(varargin)
+ if ~isfile(SCIHOME + "/XConfiguration.xml") then
+ cmd = makeCommand("scinotes", varargin);
+ execstr(cmd);
+ return;
+ end
+
+ doc = xmlRead(SCIHOME + "/XConfiguration.xml");
+ prefsNode = xmlXPath(doc, "//scinotes/body/scinotes-preferences");
+ prefsNode = prefsNode(1);
+ if prefsNode.attributes.scinotes == "true" then
+ xmlDelete(doc);
+ cmd = makeCommand("scinotes", varargin);
+ execstr(cmd);
+ elseif prefsNode.attributes("external-cmd") == "true" then
+ cmd = prefsNode.attributes.cmd;
+ xmlDelete(doc);
+ if ~isempty(varargin) then
+ cmd = cmd + " """ + string(varargin(1)) + """";
+ end
+ unix_w(cmd);
+ else
+ cmd = makeCommand(prefsNode.attributes.macro, varargin);
+ xmlDelete(doc);
+ execstr(cmd);
+ end
+endfunction
+
+// Private function
+// Params:
+// - name: the command name
+// - args: a list of arguments
+// Return:
+// - cmd: the complete command to call with execstr
+//
+function cmd = makeCommand(name, args)
+ cmd = name + "(";
+ N = size(args);
+ if N ~= 0 then
+ for i=1:(N-1)
+ arg = string(args(i));
+ if type(args(i)) == 10 then
+ arg = """" + arg + """";
+ end
+ cmd = cmd + arg + ",";
+ end
+
+ arg = string(args(N));
+ if type(args(N)) == 10 then
+ arg = """" + arg + """";
+ end
+ cmd = cmd + arg
+ end
+ cmd = cmd + ")";
+endfunction
diff --git a/modules/scinotes/macros/lib b/modules/scinotes/macros/lib
new file mode 100755
index 000000000..03e685df8
--- /dev/null
+++ b/modules/scinotes/macros/lib
Binary files differ
diff --git a/modules/scinotes/macros/names b/modules/scinotes/macros/names
new file mode 100755
index 000000000..ed44955f8
--- /dev/null
+++ b/modules/scinotes/macros/names
@@ -0,0 +1,2 @@
+edit_error
+editor
diff --git a/modules/scinotes/sci_gateway/c/.deps/.dirstamp b/modules/scinotes/sci_gateway/c/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/.deps/.dirstamp
diff --git a/modules/scinotes/sci_gateway/c/.deps/libsciscinotes_la-gw_scinotes.Plo b/modules/scinotes/sci_gateway/c/.deps/libsciscinotes_la-gw_scinotes.Plo
new file mode 100755
index 000000000..8b4a1e4e6
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/.deps/libsciscinotes_la-gw_scinotes.Plo
@@ -0,0 +1,305 @@
+sci_gateway/c/libsciscinotes_la-gw_scinotes.lo: \
+ sci_gateway/c/gw_scinotes.c /usr/include/stdc-predef.h \
+ includes/gw_scinotes.h includes/dynlib_scinotes.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/core/includes/stack-c.h /usr/include/string.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/api_scilab/includes/api_common.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/api_scilab/includes/api_double.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/api_scilab/includes/api_string.h /usr/include/wchar.h \
+ /usr/include/stdio.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar2.h \
+ ../../modules/api_scilab/includes/api_int.h \
+ ../../modules/api_scilab/includes/api_poly.h \
+ ../../modules/api_scilab/includes/api_sparse.h \
+ ../../modules/api_scilab/includes/api_boolean.h \
+ ../../modules/api_scilab/includes/api_boolean_sparse.h \
+ ../../modules/api_scilab/includes/api_pointer.h \
+ ../../modules/api_scilab/includes/api_list.h \
+ ../../modules/api_scilab/includes/api_error.h \
+ ../../modules/api_scilab/includes/api_handle.h \
+ ../../modules/api_scilab/includes/api_optional.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/api_scilab/includes/api_hypermat.h \
+ ../../modules/core/includes/core_math.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h \
+ ../../modules/core/includes/callFunctionFromGateway.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/scilabmode.h \
+ ../../modules/localization/includes/localization.h \
+ ../../modules/core/includes/machine.h /usr/include/libintl.h \
+ /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/jvm/includes/loadOnUseClassPath.h \
+ ../../modules/jvm/includes/dynlib_jvm.h
+
+/usr/include/stdc-predef.h:
+
+includes/gw_scinotes.h:
+
+includes/dynlib_scinotes.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/core/includes/stack-c.h:
+
+/usr/include/string.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/api_scilab/includes/api_common.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/api_scilab/includes/api_double.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/api_scilab/includes/api_string.h:
+
+/usr/include/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar2.h:
+
+../../modules/api_scilab/includes/api_int.h:
+
+../../modules/api_scilab/includes/api_poly.h:
+
+../../modules/api_scilab/includes/api_sparse.h:
+
+../../modules/api_scilab/includes/api_boolean.h:
+
+../../modules/api_scilab/includes/api_boolean_sparse.h:
+
+../../modules/api_scilab/includes/api_pointer.h:
+
+../../modules/api_scilab/includes/api_list.h:
+
+../../modules/api_scilab/includes/api_error.h:
+
+../../modules/api_scilab/includes/api_handle.h:
+
+../../modules/api_scilab/includes/api_optional.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/api_scilab/includes/api_hypermat.h:
+
+../../modules/core/includes/core_math.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+../../modules/core/includes/callFunctionFromGateway.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/scilabmode.h:
+
+../../modules/localization/includes/localization.h:
+
+../../modules/core/includes/machine.h:
+
+/usr/include/libintl.h:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/jvm/includes/loadOnUseClassPath.h:
+
+../../modules/jvm/includes/dynlib_jvm.h:
diff --git a/modules/scinotes/sci_gateway/c/.dirstamp b/modules/scinotes/sci_gateway/c/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/.dirstamp
diff --git a/modules/scinotes/sci_gateway/c/.libs/libsciscinotes_la-gw_scinotes.o b/modules/scinotes/sci_gateway/c/.libs/libsciscinotes_la-gw_scinotes.o
new file mode 100755
index 000000000..af958ffa5
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/.libs/libsciscinotes_la-gw_scinotes.o
Binary files differ
diff --git a/modules/scinotes/sci_gateway/c/gw_scinotes.c b/modules/scinotes/sci_gateway/c/gw_scinotes.c
new file mode 100755
index 000000000..5313a85da
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/gw_scinotes.c
@@ -0,0 +1,56 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "gw_scinotes.h"
+#include "api_scilab.h"
+#include "MALLOC.h"
+#include "callFunctionFromGateway.h"
+#include "BOOL.h"
+#include "scilabmode.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "loadOnUseClassPath.h"
+/*--------------------------------------------------------------------------*/
+static BOOL loadedDep = FALSE;
+/*--------------------------------------------------------------------------*/
+static gw_generic_table Tab[] =
+{
+ {sci_scinotes, "editor"},
+ {sci_closeSciNotesFromScilab, "closeEditor"}
+};
+/*--------------------------------------------------------------------------*/
+int gw_scinotes(void)
+{
+ Rhs = Max(0, Rhs);
+
+ if ( getScilabMode() == SCILAB_NWNI)
+ {
+ Scierror(999, _("Scilab '%s' module disabled in -nogui or -nwni mode.\n"), "scinotes");
+ return 0;
+ }
+
+ if (!loadedDep)
+ {
+ loadOnUseClassPath("SciNotes");
+ loadedDep = TRUE;
+ }
+
+ if (pvApiCtx == NULL)
+ {
+ pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
+ }
+
+ pvApiCtx->pstName = (char*)Tab[Fin - 1].name;
+ callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/sci_gateway/c/libsciscinotes_la-gw_scinotes.lo b/modules/scinotes/sci_gateway/c/libsciscinotes_la-gw_scinotes.lo
new file mode 100755
index 000000000..aef0a5f13
--- /dev/null
+++ b/modules/scinotes/sci_gateway/c/libsciscinotes_la-gw_scinotes.lo
@@ -0,0 +1,12 @@
+# sci_gateway/c/libsciscinotes_la-gw_scinotes.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_la-gw_scinotes.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/sci_gateway/cpp/.deps/.dirstamp b/modules/scinotes/sci_gateway/cpp/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.deps/.dirstamp
diff --git a/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo b/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo
new file mode 100755
index 000000000..3a6189a68
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo
@@ -0,0 +1,513 @@
+sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo: \
+ sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp \
+ /usr/include/stdc-predef.h src/jni/SciNotes.hxx \
+ /usr/include/c++/5/iostream \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \
+ /usr/include/c++/5/ostream /usr/include/c++/5/ios \
+ /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \
+ /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \
+ /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \
+ /usr/include/c++/5/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/5/bits/char_traits.h \
+ /usr/include/c++/5/bits/stl_algobase.h \
+ /usr/include/c++/5/bits/functexcept.h \
+ /usr/include/c++/5/bits/exception_defines.h \
+ /usr/include/c++/5/bits/cpp_type_traits.h \
+ /usr/include/c++/5/ext/type_traits.h \
+ /usr/include/c++/5/ext/numeric_traits.h \
+ /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \
+ /usr/include/c++/5/bits/concept_check.h \
+ /usr/include/c++/5/bits/stl_iterator_base_types.h \
+ /usr/include/c++/5/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \
+ /usr/include/c++/5/bits/ptr_traits.h \
+ /usr/include/c++/5/bits/predefined_ops.h \
+ /usr/include/c++/5/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \
+ /usr/include/c++/5/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \
+ /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \
+ /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \
+ /usr/include/c++/5/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \
+ /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \
+ /usr/include/c++/5/bits/ostream_insert.h \
+ /usr/include/c++/5/bits/cxxabi_forced.h \
+ /usr/include/c++/5/bits/stl_function.h \
+ /usr/include/c++/5/backward/binders.h \
+ /usr/include/c++/5/bits/range_access.h \
+ /usr/include/c++/5/bits/basic_string.h \
+ /usr/include/c++/5/ext/alloc_traits.h \
+ /usr/include/c++/5/bits/basic_string.tcc \
+ /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \
+ /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \
+ /usr/include/c++/5/bits/basic_ios.h \
+ /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \
+ /usr/include/wctype.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \
+ /usr/include/c++/5/bits/streambuf_iterator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \
+ /usr/include/c++/5/bits/locale_facets.tcc \
+ /usr/include/c++/5/bits/basic_ios.tcc \
+ /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \
+ /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \
+ ../../modules/commons/src/jni/GiwsException.hxx includes/gw_scinotes.h \
+ includes/dynlib_scinotes.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/xopen_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/api_scilab/includes/api_common.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/api_scilab/includes/api_double.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/api_scilab/includes/api_string.h \
+ ../../modules/api_scilab/includes/api_int.h \
+ ../../modules/api_scilab/includes/api_poly.h \
+ ../../modules/api_scilab/includes/api_sparse.h \
+ ../../modules/api_scilab/includes/api_boolean.h \
+ ../../modules/api_scilab/includes/api_boolean_sparse.h \
+ ../../modules/api_scilab/includes/api_pointer.h \
+ ../../modules/api_scilab/includes/api_list.h \
+ ../../modules/api_scilab/includes/api_error.h \
+ ../../modules/api_scilab/includes/api_handle.h \
+ ../../modules/api_scilab/includes/api_optional.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/api_scilab/includes/api_hypermat.h \
+ ../../modules/core/includes/core_math.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/jvm/includes/getScilabJavaVM.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/core/includes/machine.h
+
+/usr/include/stdc-predef.h:
+
+src/jni/SciNotes.hxx:
+
+/usr/include/c++/5/iostream:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h:
+
+/usr/include/c++/5/ostream:
+
+/usr/include/c++/5/ios:
+
+/usr/include/c++/5/iosfwd:
+
+/usr/include/c++/5/bits/stringfwd.h:
+
+/usr/include/c++/5/bits/memoryfwd.h:
+
+/usr/include/c++/5/bits/postypes.h:
+
+/usr/include/c++/5/cwchar:
+
+/usr/include/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar2.h:
+
+/usr/include/c++/5/exception:
+
+/usr/include/c++/5/bits/atomic_lockfree_defines.h:
+
+/usr/include/c++/5/bits/char_traits.h:
+
+/usr/include/c++/5/bits/stl_algobase.h:
+
+/usr/include/c++/5/bits/functexcept.h:
+
+/usr/include/c++/5/bits/exception_defines.h:
+
+/usr/include/c++/5/bits/cpp_type_traits.h:
+
+/usr/include/c++/5/ext/type_traits.h:
+
+/usr/include/c++/5/ext/numeric_traits.h:
+
+/usr/include/c++/5/bits/stl_pair.h:
+
+/usr/include/c++/5/bits/move.h:
+
+/usr/include/c++/5/bits/concept_check.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_types.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_funcs.h:
+
+/usr/include/c++/5/debug/debug.h:
+
+/usr/include/c++/5/bits/stl_iterator.h:
+
+/usr/include/c++/5/bits/ptr_traits.h:
+
+/usr/include/c++/5/bits/predefined_ops.h:
+
+/usr/include/c++/5/bits/localefwd.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:
+
+/usr/include/c++/5/clocale:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+/usr/include/c++/5/cctype:
+
+/usr/include/ctype.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/c++/5/bits/ios_base.h:
+
+/usr/include/c++/5/ext/atomicity.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:
+
+/usr/include/pthread.h:
+
+/usr/include/sched.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/sched.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/timex.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/x86_64-linux-gnu/bits/setjmp.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h:
+
+/usr/include/c++/5/bits/locale_classes.h:
+
+/usr/include/c++/5/string:
+
+/usr/include/c++/5/bits/allocator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:
+
+/usr/include/c++/5/ext/new_allocator.h:
+
+/usr/include/c++/5/new:
+
+/usr/include/c++/5/bits/ostream_insert.h:
+
+/usr/include/c++/5/bits/cxxabi_forced.h:
+
+/usr/include/c++/5/bits/stl_function.h:
+
+/usr/include/c++/5/backward/binders.h:
+
+/usr/include/c++/5/bits/range_access.h:
+
+/usr/include/c++/5/bits/basic_string.h:
+
+/usr/include/c++/5/ext/alloc_traits.h:
+
+/usr/include/c++/5/bits/basic_string.tcc:
+
+/usr/include/c++/5/bits/locale_classes.tcc:
+
+/usr/include/c++/5/stdexcept:
+
+/usr/include/c++/5/streambuf:
+
+/usr/include/c++/5/bits/streambuf.tcc:
+
+/usr/include/c++/5/bits/basic_ios.h:
+
+/usr/include/c++/5/bits/locale_facets.h:
+
+/usr/include/c++/5/cwctype:
+
+/usr/include/wctype.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h:
+
+/usr/include/c++/5/bits/streambuf_iterator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h:
+
+/usr/include/c++/5/bits/locale_facets.tcc:
+
+/usr/include/c++/5/bits/basic_ios.tcc:
+
+/usr/include/c++/5/bits/ostream.tcc:
+
+/usr/include/c++/5/istream:
+
+/usr/include/c++/5/bits/istream.tcc:
+
+/usr/include/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h:
+
+../../modules/commons/src/jni/GiwsException.hxx:
+
+includes/gw_scinotes.h:
+
+includes/dynlib_scinotes.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/api_scilab/includes/api_common.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/api_scilab/includes/api_double.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/api_scilab/includes/api_string.h:
+
+../../modules/api_scilab/includes/api_int.h:
+
+../../modules/api_scilab/includes/api_poly.h:
+
+../../modules/api_scilab/includes/api_sparse.h:
+
+../../modules/api_scilab/includes/api_boolean.h:
+
+../../modules/api_scilab/includes/api_boolean_sparse.h:
+
+../../modules/api_scilab/includes/api_pointer.h:
+
+../../modules/api_scilab/includes/api_list.h:
+
+../../modules/api_scilab/includes/api_error.h:
+
+../../modules/api_scilab/includes/api_handle.h:
+
+../../modules/api_scilab/includes/api_optional.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/api_scilab/includes/api_hypermat.h:
+
+../../modules/core/includes/core_math.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/jvm/includes/getScilabJavaVM.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/core/includes/machine.h:
diff --git a/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_scinotes.Plo b/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_scinotes.Plo
new file mode 100755
index 000000000..5931190a7
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.deps/libsciscinotes_la-sci_scinotes.Plo
@@ -0,0 +1,525 @@
+sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo: \
+ sci_gateway/cpp/sci_scinotes.cpp /usr/include/stdc-predef.h \
+ src/jni/SciNotes.hxx /usr/include/c++/5/iostream \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \
+ /usr/include/c++/5/ostream /usr/include/c++/5/ios \
+ /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \
+ /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \
+ /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \
+ /usr/include/c++/5/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/5/bits/char_traits.h \
+ /usr/include/c++/5/bits/stl_algobase.h \
+ /usr/include/c++/5/bits/functexcept.h \
+ /usr/include/c++/5/bits/exception_defines.h \
+ /usr/include/c++/5/bits/cpp_type_traits.h \
+ /usr/include/c++/5/ext/type_traits.h \
+ /usr/include/c++/5/ext/numeric_traits.h \
+ /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \
+ /usr/include/c++/5/bits/concept_check.h \
+ /usr/include/c++/5/bits/stl_iterator_base_types.h \
+ /usr/include/c++/5/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \
+ /usr/include/c++/5/bits/ptr_traits.h \
+ /usr/include/c++/5/bits/predefined_ops.h \
+ /usr/include/c++/5/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \
+ /usr/include/c++/5/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \
+ /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \
+ /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \
+ /usr/include/c++/5/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \
+ /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \
+ /usr/include/c++/5/bits/ostream_insert.h \
+ /usr/include/c++/5/bits/cxxabi_forced.h \
+ /usr/include/c++/5/bits/stl_function.h \
+ /usr/include/c++/5/backward/binders.h \
+ /usr/include/c++/5/bits/range_access.h \
+ /usr/include/c++/5/bits/basic_string.h \
+ /usr/include/c++/5/ext/alloc_traits.h \
+ /usr/include/c++/5/bits/basic_string.tcc \
+ /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \
+ /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \
+ /usr/include/c++/5/bits/basic_ios.h \
+ /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \
+ /usr/include/wctype.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \
+ /usr/include/c++/5/bits/streambuf_iterator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \
+ /usr/include/c++/5/bits/locale_facets.tcc \
+ /usr/include/c++/5/bits/basic_ios.tcc \
+ /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \
+ /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \
+ ../../modules/commons/src/jni/GiwsException.hxx includes/callscinotes.h \
+ includes/dynlib_scinotes.h includes/gw_scinotes.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/core/includes/stack-c.h \
+ ../../modules/core/includes/core_math.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/local_lim.h \
+ /usr/include/linux/limits.h \
+ /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/xopen_lim.h /usr/include/math.h \
+ /usr/include/x86_64-linux-gnu/bits/math-vector.h \
+ /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_val.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_valf.h \
+ /usr/include/x86_64-linux-gnu/bits/huge_vall.h \
+ /usr/include/x86_64-linux-gnu/bits/inf.h \
+ /usr/include/x86_64-linux-gnu/bits/nan.h \
+ /usr/include/x86_64-linux-gnu/bits/mathdef.h \
+ /usr/include/x86_64-linux-gnu/bits/mathcalls.h \
+ /usr/include/x86_64-linux-gnu/bits/mathinline.h \
+ ../../modules/core/includes/stack-def.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/core/includes/stackTypeVariable.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/core/includes/stack1.h \
+ ../../modules/core/includes/scisparse.h \
+ ../../modules/core/includes/stack2.h \
+ ../../modules/core/includes/stack3.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/api_scilab/includes/api_common.h \
+ ../../modules/api_scilab/includes/api_scilab.h \
+ ../../modules/api_scilab/includes/api_double.h \
+ ../../modules/core/includes/doublecomplex.h \
+ ../../modules/api_scilab/includes/api_string.h \
+ ../../modules/api_scilab/includes/api_int.h \
+ ../../modules/api_scilab/includes/api_poly.h \
+ ../../modules/api_scilab/includes/api_sparse.h \
+ ../../modules/api_scilab/includes/api_boolean.h \
+ ../../modules/api_scilab/includes/api_boolean_sparse.h \
+ ../../modules/api_scilab/includes/api_pointer.h \
+ ../../modules/api_scilab/includes/api_list.h \
+ ../../modules/api_scilab/includes/api_error.h \
+ ../../modules/api_scilab/includes/api_handle.h \
+ ../../modules/api_scilab/includes/api_optional.h \
+ ../../modules/core/includes/stack-optional.h \
+ ../../modules/api_scilab/includes/api_hypermat.h \
+ ../../modules/core/includes/core_math.h \
+ ../../modules/core/includes/sci_types.h \
+ ../../modules/localization/includes/localization.h \
+ ../../modules/core/includes/machine.h /usr/include/libintl.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h \
+ ../../modules/core/includes/freeArrayOfString.h
+
+/usr/include/stdc-predef.h:
+
+src/jni/SciNotes.hxx:
+
+/usr/include/c++/5/iostream:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h:
+
+/usr/include/c++/5/ostream:
+
+/usr/include/c++/5/ios:
+
+/usr/include/c++/5/iosfwd:
+
+/usr/include/c++/5/bits/stringfwd.h:
+
+/usr/include/c++/5/bits/memoryfwd.h:
+
+/usr/include/c++/5/bits/postypes.h:
+
+/usr/include/c++/5/cwchar:
+
+/usr/include/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar2.h:
+
+/usr/include/c++/5/exception:
+
+/usr/include/c++/5/bits/atomic_lockfree_defines.h:
+
+/usr/include/c++/5/bits/char_traits.h:
+
+/usr/include/c++/5/bits/stl_algobase.h:
+
+/usr/include/c++/5/bits/functexcept.h:
+
+/usr/include/c++/5/bits/exception_defines.h:
+
+/usr/include/c++/5/bits/cpp_type_traits.h:
+
+/usr/include/c++/5/ext/type_traits.h:
+
+/usr/include/c++/5/ext/numeric_traits.h:
+
+/usr/include/c++/5/bits/stl_pair.h:
+
+/usr/include/c++/5/bits/move.h:
+
+/usr/include/c++/5/bits/concept_check.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_types.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_funcs.h:
+
+/usr/include/c++/5/debug/debug.h:
+
+/usr/include/c++/5/bits/stl_iterator.h:
+
+/usr/include/c++/5/bits/ptr_traits.h:
+
+/usr/include/c++/5/bits/predefined_ops.h:
+
+/usr/include/c++/5/bits/localefwd.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:
+
+/usr/include/c++/5/clocale:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+/usr/include/c++/5/cctype:
+
+/usr/include/ctype.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/c++/5/bits/ios_base.h:
+
+/usr/include/c++/5/ext/atomicity.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:
+
+/usr/include/pthread.h:
+
+/usr/include/sched.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/sched.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/timex.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/x86_64-linux-gnu/bits/setjmp.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h:
+
+/usr/include/c++/5/bits/locale_classes.h:
+
+/usr/include/c++/5/string:
+
+/usr/include/c++/5/bits/allocator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:
+
+/usr/include/c++/5/ext/new_allocator.h:
+
+/usr/include/c++/5/new:
+
+/usr/include/c++/5/bits/ostream_insert.h:
+
+/usr/include/c++/5/bits/cxxabi_forced.h:
+
+/usr/include/c++/5/bits/stl_function.h:
+
+/usr/include/c++/5/backward/binders.h:
+
+/usr/include/c++/5/bits/range_access.h:
+
+/usr/include/c++/5/bits/basic_string.h:
+
+/usr/include/c++/5/ext/alloc_traits.h:
+
+/usr/include/c++/5/bits/basic_string.tcc:
+
+/usr/include/c++/5/bits/locale_classes.tcc:
+
+/usr/include/c++/5/stdexcept:
+
+/usr/include/c++/5/streambuf:
+
+/usr/include/c++/5/bits/streambuf.tcc:
+
+/usr/include/c++/5/bits/basic_ios.h:
+
+/usr/include/c++/5/bits/locale_facets.h:
+
+/usr/include/c++/5/cwctype:
+
+/usr/include/wctype.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h:
+
+/usr/include/c++/5/bits/streambuf_iterator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h:
+
+/usr/include/c++/5/bits/locale_facets.tcc:
+
+/usr/include/c++/5/bits/basic_ios.tcc:
+
+/usr/include/c++/5/bits/ostream.tcc:
+
+/usr/include/c++/5/istream:
+
+/usr/include/c++/5/bits/istream.tcc:
+
+/usr/include/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h:
+
+../../modules/commons/src/jni/GiwsException.hxx:
+
+includes/callscinotes.h:
+
+includes/dynlib_scinotes.h:
+
+includes/gw_scinotes.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/core/includes/stack-c.h:
+
+../../modules/core/includes/core_math.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
+
+/usr/include/math.h:
+
+/usr/include/x86_64-linux-gnu/bits/math-vector.h:
+
+/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_val.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
+
+/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
+
+/usr/include/x86_64-linux-gnu/bits/inf.h:
+
+/usr/include/x86_64-linux-gnu/bits/nan.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathdef.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
+
+/usr/include/x86_64-linux-gnu/bits/mathinline.h:
+
+../../modules/core/includes/stack-def.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/stackTypeVariable.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/core/includes/stack1.h:
+
+../../modules/core/includes/scisparse.h:
+
+../../modules/core/includes/stack2.h:
+
+../../modules/core/includes/stack3.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/api_scilab/includes/api_common.h:
+
+../../modules/api_scilab/includes/api_scilab.h:
+
+../../modules/api_scilab/includes/api_double.h:
+
+../../modules/core/includes/doublecomplex.h:
+
+../../modules/api_scilab/includes/api_string.h:
+
+../../modules/api_scilab/includes/api_int.h:
+
+../../modules/api_scilab/includes/api_poly.h:
+
+../../modules/api_scilab/includes/api_sparse.h:
+
+../../modules/api_scilab/includes/api_boolean.h:
+
+../../modules/api_scilab/includes/api_boolean_sparse.h:
+
+../../modules/api_scilab/includes/api_pointer.h:
+
+../../modules/api_scilab/includes/api_list.h:
+
+../../modules/api_scilab/includes/api_error.h:
+
+../../modules/api_scilab/includes/api_handle.h:
+
+../../modules/api_scilab/includes/api_optional.h:
+
+../../modules/core/includes/stack-optional.h:
+
+../../modules/api_scilab/includes/api_hypermat.h:
+
+../../modules/core/includes/core_math.h:
+
+../../modules/core/includes/sci_types.h:
+
+../../modules/localization/includes/localization.h:
+
+../../modules/core/includes/machine.h:
+
+/usr/include/libintl.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+../../modules/core/includes/freeArrayOfString.h:
diff --git a/modules/scinotes/sci_gateway/cpp/.dirstamp b/modules/scinotes/sci_gateway/cpp/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.dirstamp
diff --git a/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_closeSciNotesFromScilab.o b/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_closeSciNotesFromScilab.o
new file mode 100755
index 000000000..a7efb0876
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_closeSciNotesFromScilab.o
Binary files differ
diff --git a/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_scinotes.o b/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_scinotes.o
new file mode 100755
index 000000000..765ba51cc
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/.libs/libsciscinotes_la-sci_scinotes.o
Binary files differ
diff --git a/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo b/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo
new file mode 100755
index 000000000..1f473d364
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo
@@ -0,0 +1,12 @@
+# sci_gateway/cpp/libsciscinotes_la-sci_closeSciNotesFromScilab.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_la-sci_closeSciNotesFromScilab.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo b/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo
new file mode 100755
index 000000000..22e0cb7c1
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo
@@ -0,0 +1,12 @@
+# sci_gateway/cpp/libsciscinotes_la-sci_scinotes.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_la-sci_scinotes.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp b/modules/scinotes/sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
new file mode 100755
index 000000000..18570d6f0
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
@@ -0,0 +1,58 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
+ * Copyright (C) 2010 - Clément DAVID
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "SciNotes.hxx"
+#include "GiwsException.hxx"
+
+extern "C"
+{
+#include "gw_scinotes.h"
+#include "api_scilab.h"
+#include "getScilabJavaVM.h"
+#include "Scierror.h"
+}
+/*--------------------------------------------------------------------------*/
+using namespace org_scilab_modules_scinotes;
+
+/*--------------------------------------------------------------------------*/
+int sci_closeSciNotesFromScilab(char *fname, unsigned long fname_len)
+{
+ CheckRhs(0, 0);
+ CheckLhs(0, 1);
+
+ try
+ {
+ JavaVM *jvm = getScilabJavaVM();
+
+ if (jvm)
+ {
+ SciNotes::closeSciNotesFromScilab(jvm);
+ }
+ }
+ catch (GiwsException::JniCallMethodException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.getJavaDescription().c_str());
+ return 0;
+ }
+ catch (GiwsException::JniException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.whatStr().c_str());
+ return 0;
+ }
+
+ LhsVar(1) = 0;
+ PutLhsVar();
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/sci_gateway/cpp/sci_scinotes.cpp b/modules/scinotes/sci_gateway/cpp/sci_scinotes.cpp
new file mode 100755
index 000000000..3a01d9e79
--- /dev/null
+++ b/modules/scinotes/sci_gateway/cpp/sci_scinotes.cpp
@@ -0,0 +1,383 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+ * Copyright (C) 2010 - Calixte DENIZET
+ * Copyright (C) 2010 - Clément DAVID
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "SciNotes.hxx"
+#include "GiwsException.hxx"
+
+extern "C"
+{
+#include <wchar.h>
+#include "callscinotes.h"
+#include "gw_scinotes.h"
+#include "api_scilab.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "MALLOC.h"
+#include "freeArrayOfString.h"
+}
+
+/*--------------------------------------------------------------------------*/
+int sci_scinotes(char *fname, unsigned long fname_len)
+{
+ SciErr sciErr;
+
+ CheckRhs(0, 3);
+ CheckLhs(0, 1);
+
+ if (Rhs == 0)
+ {
+ try
+ {
+ callSciNotesW(NULL, 0);
+ }
+ catch (GiwsException::JniCallMethodException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.getJavaDescription().c_str());
+ }
+ catch (GiwsException::JniException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.whatStr().c_str());
+ }
+ }
+ else
+ {
+ int m1 = 0, n1 = 0;
+ int *piAddressVarOne = NULL;
+ wchar_t **pStVarOne = NULL;
+ int *lenStVarOne = NULL;
+ int i = 0;
+ int iType1 = 0;
+ char *functionName = NULL;
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ if (iType1 != sci_strings)
+ {
+ Scierror(999, _("%s: Wrong type for argument #%d: String matrix expected.\n"), fname, 1);
+ return 0;
+ }
+
+ /* get dimensions */
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, NULL);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ return 0;
+ }
+
+ lenStVarOne = (int *)MALLOC(sizeof(int) * (m1 * n1));
+ if (lenStVarOne == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ return 0;
+ }
+
+ /* get lengths */
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ pStVarOne = (wchar_t **) MALLOC(sizeof(wchar_t *) * (m1 * n1));
+ if (pStVarOne == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ for (i = 0; i < m1 * n1; i++)
+ {
+ pStVarOne[i] = (wchar_t *) MALLOC(sizeof(wchar_t) * (lenStVarOne[i] + 1));
+ if (pStVarOne[i] == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ for (; i >= 0; i--)
+ {
+ FREE(pStVarOne[i]);
+ }
+ FREE(pStVarOne);
+ FREE(lenStVarOne);
+ return 0;
+ }
+ }
+
+ /* get strings */
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ if (Rhs >= 2) //get line numbers
+ {
+ int *piAddressVarTwo = NULL;
+ int m2 = 0, n2 = 0;
+ double *pdblVarTwo = NULL;
+ int iType2 = 0;
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ if (iType2 != sci_matrix && iType2 != sci_strings)
+ {
+ Scierror(999, _("%s: Wrong type for argument #%d: Real matrix or \'readonly\' expected.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ if (iType2 == sci_strings)
+ {
+ /* get dimensions */
+ wchar_t **pStVarTwo = NULL;
+ int *lenStVarTwo = NULL;
+
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m2, &n2, lenStVarTwo, NULL);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ lenStVarTwo = (int *)MALLOC(sizeof(int) * m2 * n2);
+ if (lenStVarTwo == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ /* get lengths */
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m2, &n2, lenStVarTwo, pStVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ pStVarTwo = (wchar_t **) MALLOC(sizeof(wchar_t *) * m2 * n2);
+ if (pStVarTwo == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ for (int i = 0; i < m2 * n2; i++)
+ {
+ pStVarTwo[i] = (wchar_t *) MALLOC(sizeof(wchar_t) * (lenStVarTwo[i] + 1));
+ if (pStVarTwo[i] == NULL)
+ {
+ Scierror(999, _("%s: No more memory.\n"), fname);
+ freeArrayOfWideString(pStVarTwo, i);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+ }
+
+ /* get strings */
+ sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m2, &n2, lenStVarTwo, pStVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ FREE(pStVarTwo);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ try
+ {
+ callSciNotesWWithOption(pStVarOne, pStVarTwo, m2 * n2, m1 * n1);
+ }
+ catch (GiwsException::JniCallMethodException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.getJavaDescription().c_str());
+ freeArrayOfWideString(pStVarTwo, m2 * n2);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+ catch (GiwsException::JniException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.whatStr().c_str());
+ freeArrayOfWideString(pStVarTwo, m2 * n2);
+ FREE(lenStVarTwo);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+ freeArrayOfWideString(pStVarTwo, m2 * n2);
+ FREE(lenStVarTwo);
+ }
+ else
+ {
+ if (isVarComplex(pvApiCtx, piAddressVarTwo) == 1)
+ {
+ Scierror(999, _("%s: Wrong type for argument #%d: Real matrix expected.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarTwo, &m2, &n2, &pdblVarTwo);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ if (m2 * n2 != m1 * n1)
+ {
+ Scierror(999, _("%s: Wrong size for input arguments #%d and #%d: Same dimensions expected.\n"), fname, 1, 2);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ if (Rhs == 3)
+ {
+ int *piAddressVarThree = NULL;
+
+ sciErr = getVarAddressFromPosition(pvApiCtx, 3, &piAddressVarThree);
+ if (sciErr.iErr)
+ {
+ printError(&sciErr, 0);
+ Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 3);
+ return 0;
+ }
+
+ if (!isStringType(pvApiCtx, piAddressVarThree))
+ {
+ Scierror(999, _("%s: Wrong type for argument #%d: A string expected.\n"), fname, 3);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+
+ int ret = getAllocatedSingleString(pvApiCtx, piAddressVarThree, &functionName);
+
+ if (ret)
+ {
+ Scierror(999, _("%s: Wrong type for argument #%d: A string expected.\n"), fname, 3);
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ return 0;
+ }
+ }
+
+ try
+ {
+ callSciNotesWWithLineNumberAndFunction(pStVarOne, pdblVarTwo, functionName, m1 * n1);
+ }
+ catch (GiwsException::JniCallMethodException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.getJavaDescription().c_str());
+ }
+ catch (GiwsException::JniException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.whatStr().c_str());
+ }
+ }
+ }
+ else
+ {
+ try
+ {
+ callSciNotesW(pStVarOne, m1 * n1);
+ }
+ catch (GiwsException::JniCallMethodException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.getJavaDescription().c_str());
+ }
+ catch (GiwsException::JniException exception)
+ {
+ Scierror(999, "%s: %s\n", fname, exception.whatStr().c_str());
+ }
+ }
+
+ freeArrayOfWideString(pStVarOne, m1 * n1);
+ FREE(lenStVarOne);
+ if (functionName)
+ {
+ freeAllocatedSingleString(functionName);
+ }
+ }
+
+ LhsVar(1) = 0;
+ PutLhsVar();
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/sci_gateway/scinotes_gateway.xml b/modules/scinotes/sci_gateway/scinotes_gateway.xml
new file mode 100755
index 000000000..605893361
--- /dev/null
+++ b/modules/scinotes/sci_gateway/scinotes_gateway.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
+<GATEWAY name="scinotes">
+ <!-- =================== -->
+ <!--
+ Scilab
+ Interface description. In this file, we define the list of the function which
+ will be available into Scilab and the link to the "native" function.
+
+ gatewayId is the position in the hashtable 'Interfaces' defined in the
+ file SCI/modules/core/src/c/callinterf.h
+
+ primitiveId is the position in the hashtable '<module>Table Tab[]' defined
+ in the file modules/<module>/sci_gateway/c/gw_<module>.c
+
+ primitiveName is the name of the Scilab function
+
+ @author Allan CORNET
+ @date DIGITEO 2009
+ ===================
+ Don't touch if you do not know what you are doing
+-->
+ <!-- =================== -->
+ <PRIMITIVE gatewayId="63" primitiveId="1" primitiveName="scinotes" />
+ <PRIMITIVE gatewayId="63" primitiveId="2" primitiveName="closeEditor" />
+</GATEWAY>
diff --git a/modules/scinotes/scinotes.iss b/modules/scinotes/scinotes.iss
new file mode 100755
index 000000000..3f1fbcd89
--- /dev/null
+++ b/modules/scinotes/scinotes.iss
@@ -0,0 +1,48 @@
+;
+; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
+;
+; This file must be used under the terms of the CeCILL.
+; This source file is licensed as described in the file COPYING, which
+; you should have received as part of this distribution. The terms
+; are also available at
+; http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+;
+;--------------------------------------------------------------------------------------------------------------
+; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required)
+;
+;--------------------------------------------------------------------------------------------------------------
+; scinotes module
+;--------------------------------------------------------------------------------------------------------------
+;
+#define SCINOTES "scinotes"
+;
+Source: bin\sci{#SCINOTES}.dll; DestDir: {app}\bin; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\jar\org.scilab.modules.{#SCINOTES}.jar; DestDir: {app}\modules\{#SCINOTES}\jar; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\license.txt; DestDir: {app}\modules\{#SCINOTES}; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\sci_gateway\{#SCINOTES}_gateway.xml; DestDir: {app}\modules\{#SCINOTES}\sci_gateway; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\etc\{#SCINOTES}.quit; DestDir: {app}\modules\{#SCINOTES}\etc; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\etc\{#SCINOTES}.start; DestDir: {app}\modules\{#SCINOTES}\etc; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\etc\*.xml; DestDir: {app}\modules\{#SCINOTES}\etc; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\etc\*.xsl; DestDir: {app}\modules\{#SCINOTES}\etc; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\macros\lib; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\names; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\*.bin; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\*.sci; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\buildmacros.sce; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\buildmacros.bat; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+Source: modules\{#SCINOTES}\macros\cleanmacros.bat; DestDir: {app}\modules\{#SCINOTES}\macros; Components: {#COMPN_SCINOTES}
+;
+;Source: modules\{#SCINOTES}\includes\*.h; DestDir: {app}\modules\{#SCINOTES}\includes; Components: {#COMPN_SCINOTES}
+;
+;
+;Source: modules\{#SCINOTES}\demos\*.*; DestDir: {app}\modules\{#SCINOTES}\demos; Flags: recursesubdirs; Components: {#COMPN_SCINOTES}
+;
+Source: modules\{#SCINOTES}\tests\*.*; DestDir: {app}\modules\{#SCINOTES}\tests; Flags: recursesubdirs; Components: {#COMPN_SCINOTES} and {#COMPN_TESTS}
+;
+;--------------------------------------------------------------------------------------------------------------
diff --git a/modules/scinotes/src/c/.deps/.dirstamp b/modules/scinotes/src/c/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/c/.deps/.dirstamp
diff --git a/modules/scinotes/src/c/.deps/libsciscinotes_algo_la-ScilabKeywords.Plo b/modules/scinotes/src/c/.deps/libsciscinotes_algo_la-ScilabKeywords.Plo
new file mode 100755
index 000000000..84ccec005
--- /dev/null
+++ b/modules/scinotes/src/c/.deps/libsciscinotes_algo_la-ScilabKeywords.Plo
@@ -0,0 +1,112 @@
+src/c/libsciscinotes_algo_la-ScilabKeywords.lo: src/c/ScilabKeywords.c \
+ /usr/include/stdc-predef.h \
+ ../../modules/core/includes/getvariablesname.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/core/includes/commandwords.h \
+ ../../modules/core/includes/getfunctionslist.h \
+ ../../modules/functions/includes/getmacroslist.h \
+ ../../modules/functions/includes/dynlib_functions.h \
+ ../../modules/core/includes/BOOL.h src/c/ScilabKeywords.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h /usr/include/stdlib.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h
+
+/usr/include/stdc-predef.h:
+
+../../modules/core/includes/getvariablesname.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/core/includes/commandwords.h:
+
+../../modules/core/includes/getfunctionslist.h:
+
+../../modules/functions/includes/getmacroslist.h:
+
+../../modules/functions/includes/dynlib_functions.h:
+
+../../modules/core/includes/BOOL.h:
+
+src/c/ScilabKeywords.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
diff --git a/modules/scinotes/src/c/.dirstamp b/modules/scinotes/src/c/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/c/.dirstamp
diff --git a/modules/scinotes/src/c/.libs/libsciscinotes_algo_la-ScilabKeywords.o b/modules/scinotes/src/c/.libs/libsciscinotes_algo_la-ScilabKeywords.o
new file mode 100755
index 000000000..1b9229861
--- /dev/null
+++ b/modules/scinotes/src/c/.libs/libsciscinotes_algo_la-ScilabKeywords.o
Binary files differ
diff --git a/modules/scinotes/src/c/DllmainSCINOTES.c b/modules/scinotes/src/c/DllmainSCINOTES.c
new file mode 100755
index 000000000..89967839e
--- /dev/null
+++ b/modules/scinotes/src/c/DllmainSCINOTES.c
@@ -0,0 +1,33 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include <windows.h>
+/*--------------------------------------------------------------------------*/
+#pragma comment(lib,"../../../../bin/libintl.lib")
+/*--------------------------------------------------------------------------*/
+int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved)
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ case DLL_THREAD_ATTACH:
+ break;
+ case DLL_THREAD_DETACH:
+ break;
+ }
+ return 1;
+}
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/scinotes/src/c/ScilabKeywords.c b/modules/scinotes/src/c/ScilabKeywords.c
new file mode 100755
index 000000000..d0591bfc1
--- /dev/null
+++ b/modules/scinotes/src/c/ScilabKeywords.c
@@ -0,0 +1,70 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "getvariablesname.h"
+#include "commandwords.h"
+#include "getfunctionslist.h"
+#include "getmacroslist.h"
+#include "BOOL.h"
+#include "ScilabKeywords.h"
+#include "MALLOC.h"
+/*--------------------------------------------------------------------------*/
+char **GetVariablesName(void)
+{
+ int returnedArraySize = 0;
+ char **VarsName = getVariablesName(&returnedArraySize, TRUE);
+ /* SWIG char array must be finished by NULL */
+ if (VarsName)
+ {
+ VarsName = (char**)REALLOC(VarsName, sizeof(char*) * (returnedArraySize + 1));
+ VarsName[returnedArraySize] = NULL;
+ }
+ return VarsName;
+}
+/*--------------------------------------------------------------------------*/
+char **GetCommandsName(void)
+{
+ int returnedArraySize = 0;
+ char **CommandKeywords = getcommandkeywords(&returnedArraySize);
+ if (CommandKeywords)
+ {
+ CommandKeywords = (char**)REALLOC(CommandKeywords, sizeof(char*) * (returnedArraySize + 1));
+ CommandKeywords[returnedArraySize] = NULL;
+ }
+ return CommandKeywords;
+}
+/*--------------------------------------------------------------------------*/
+char **GetFunctionsName(void)
+{
+ int returnedArraySize = 0;
+ char **FunctionsName = GetFunctionsList(&returnedArraySize);
+ if (FunctionsName)
+ {
+ FunctionsName = (char**)REALLOC(FunctionsName, sizeof(char*) * (returnedArraySize + 1));
+ FunctionsName[returnedArraySize] = NULL;
+ }
+ return FunctionsName;
+}
+/*--------------------------------------------------------------------------*/
+char **GetMacrosName(void)
+{
+ int returnedArraySize = 0;
+ char **MacrosName = getmacroslist(&returnedArraySize);
+ if (MacrosName)
+ {
+ MacrosName = (char**)REALLOC(MacrosName, sizeof(char*) * (returnedArraySize + 1));
+ MacrosName[returnedArraySize] = NULL;
+ }
+ return MacrosName;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/src/c/ScilabKeywords.h b/modules/scinotes/src/c/ScilabKeywords.h
new file mode 100755
index 000000000..cabf079be
--- /dev/null
+++ b/modules/scinotes/src/c/ScilabKeywords.h
@@ -0,0 +1,42 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __SCILABKEYWORDS_H__
+#define __SCILABKEYWORDS_H__
+
+/**
+* Get all variables name in scilab
+* @return char array
+*/
+char **GetVariablesName(void);
+
+/**
+* Get all commands name in scilab
+* @return char array
+*/
+char **GetCommandsName(void);
+
+/**
+* get primitives name in scilab
+* @return char array
+*/
+char **GetFunctionsName(void);
+
+/**
+* get macros name in scilab
+* @return char array
+*/
+char **GetMacrosName(void);
+
+#endif /* __SCILABKEYWORDS_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/src/c/core_Import.def b/modules/scinotes/src/c/core_Import.def
new file mode 100755
index 000000000..620f5fc75
--- /dev/null
+++ b/modules/scinotes/src/c/core_Import.def
@@ -0,0 +1,15 @@
+LIBRARY core.dll
+
+
+EXPORTS
+;
+callFunctionFromGateway
+getScilabMode
+com_
+freeArrayOfWideString
+getVariablesName
+getcommandkeywords
+GetFunctionsList
+MyHeapAlloc
+MyHeapFree
+MyHeapRealloc
diff --git a/modules/scinotes/src/c/libsciscinotes_algo_la-ScilabKeywords.lo b/modules/scinotes/src/c/libsciscinotes_algo_la-ScilabKeywords.lo
new file mode 100755
index 000000000..b80b614b9
--- /dev/null
+++ b/modules/scinotes/src/c/libsciscinotes_algo_la-ScilabKeywords.lo
@@ -0,0 +1,12 @@
+# src/c/libsciscinotes_algo_la-ScilabKeywords.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_algo_la-ScilabKeywords.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/src/c/scinotes.rc b/modules/scinotes/src/c/scinotes.rc
new file mode 100755
index 000000000..50bcb3f8c
--- /dev/null
+++ b/modules/scinotes/src/c/scinotes.rc
@@ -0,0 +1,96 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,5,2,0
+ PRODUCTVERSION 5,5,2,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040c04b0"
+ BEGIN
+ VALUE "FileDescription", "scinotes module"
+ VALUE "FileVersion", "5, 5, 2, 0"
+ VALUE "InternalName", "scinotes module"
+ VALUE "LegalCopyright", "Copyright (C) 2017"
+ VALUE "OriginalFilename", "scinotes.dll"
+ VALUE "ProductName", "scinotes module"
+ VALUE "ProductVersion", "5, 5, 2, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x40c, 1200
+ END
+END
+
+#endif // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/modules/scinotes/src/c/scinotes.vcxproj b/modules/scinotes/src/c/scinotes.vcxproj
new file mode 100755
index 000000000..54a30313a
--- /dev/null
+++ b/modules/scinotes/src/c/scinotes.vcxproj
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{BAE68B54-2C1A-44D0-A0E9-05156A784E79}</ProjectGuid>
+ <RootNamespace>scinotes</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">sci$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">sci$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">sci$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">sci$(ProjectName)</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>..\..\..\..\bin\scilocalization.lib;core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\sci$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\sci$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\sci$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(SolutionDir)bin\sci$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>..\..\..\..\bin\scilocalization.lib;core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\sci$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\sci$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PreLinkEvent>
+ <Message>Make dependencies</Message>
+ <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1&gt;NUL 2&gt;NUL
+</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(SolutionDir)bin\sci$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(SolutionDir)bin\sci$(ProjectName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\cpp\callscinotes.cpp" />
+ <ClCompile Include="DllmainSCINOTES.c" />
+ <ClCompile Include="..\..\sci_gateway\c\gw_scinotes.c" />
+ <ClCompile Include="..\..\sci_gateway\cpp\sci_closeSciNotesFromScilab.cpp" />
+ <ClCompile Include="..\..\sci_gateway\cpp\sci_scinotes.cpp" />
+ <ClCompile Include="ScilabKeywords.c" />
+ <ClCompile Include="..\jni\ScilabKeywords_wrap.c" />
+ <ClCompile Include="..\jni\SciNotes.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\callscinotes.h" />
+ <ClInclude Include="..\..\includes\dynlib_scinotes.h" />
+ <ClInclude Include="..\..\includes\gw_scinotes.h" />
+ <ClInclude Include="ScilabKeywords.h" />
+ <ClInclude Include="..\jni\SciNotes.hxx" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\locales\scinotes.pot" />
+ <None Include="core_import.def" />
+ <None Include="..\jni\ScilabKeywords.i" />
+ <None Include="..\..\Makefile.am" />
+ <None Include="..\..\scinotes.iss" />
+ <None Include="..\..\sci_gateway\scinotes_gateway.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="scinotes.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+ <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+ <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\commons\src\c\commons.vcxproj">
+ <Project>{eca09a1e-6d12-4a47-92e1-a671c181df77}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+ <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\functions\src\c\functions.vcxproj">
+ <Project>{53a01263-92be-4c87-aa9a-79297f882310}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\jvm\libjvm.vcxproj">
+ <Project>{8ba2dda8-bd04-4d4d-8ee6-6caa955f7470}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+ <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+ <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/modules/scinotes/src/c/scinotes.vcxproj.filters b/modules/scinotes/src/c/scinotes.vcxproj.filters
new file mode 100755
index 000000000..f73b4a5f0
--- /dev/null
+++ b/modules/scinotes/src/c/scinotes.vcxproj.filters
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{efbdc4d1-dd8b-4ddb-bba6-47eddea3ea5c}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{b70da001-658d-4f37-bf6f-a55067a0ee85}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="localization">
+ <UniqueIdentifier>{6ead0ade-2d54-423a-a14d-2b833c78e915}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies">
+ <UniqueIdentifier>{6b10ec04-5b9e-47a0-b5d6-ca4858224eb5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Libraries Dependencies\Imports">
+ <UniqueIdentifier>{e68ea0f6-5f53-4216-800c-2243ad3d9e22}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="swig">
+ <UniqueIdentifier>{04789187-62f2-4df4-bb87-eb9fee2cb49a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{c470fad2-08f4-4f6d-a01c-ca6ca7bb4c80}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\cpp\callscinotes.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="DllmainSCINOTES.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\c\gw_scinotes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\cpp\sci_closeSciNotesFromScilab.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\sci_gateway\cpp\sci_scinotes.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ScilabKeywords.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\jni\ScilabKeywords_wrap.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\jni\SciNotes.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\includes\callscinotes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\dynlib_scinotes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\includes\gw_scinotes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ScilabKeywords.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\jni\SciNotes.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="core_import.def">
+ <Filter>Libraries Dependencies\Imports</Filter>
+ </None>
+ <None Include="..\jni\ScilabKeywords.i">
+ <Filter>swig</Filter>
+ </None>
+ <None Include="..\..\Makefile.am" />
+ <None Include="..\..\scinotes.iss" />
+ <None Include="..\..\sci_gateway\scinotes_gateway.xml" />
+ <None Include="..\..\locales\scinotes.pot">
+ <Filter>localization</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="scinotes.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/modules/scinotes/src/cpp/.deps/.dirstamp b/modules/scinotes/src/cpp/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/cpp/.deps/.dirstamp
diff --git a/modules/scinotes/src/cpp/.deps/libsciscinotes_algo_la-callscinotes.Plo b/modules/scinotes/src/cpp/.deps/libsciscinotes_algo_la-callscinotes.Plo
new file mode 100755
index 000000000..c02d01f41
--- /dev/null
+++ b/modules/scinotes/src/cpp/.deps/libsciscinotes_algo_la-callscinotes.Plo
@@ -0,0 +1,379 @@
+src/cpp/libsciscinotes_algo_la-callscinotes.lo: src/cpp/callscinotes.cpp \
+ /usr/include/stdc-predef.h src/jni/SciNotes.hxx \
+ /usr/include/c++/5/iostream \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \
+ /usr/include/c++/5/ostream /usr/include/c++/5/ios \
+ /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \
+ /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \
+ /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \
+ /usr/include/c++/5/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/5/bits/char_traits.h \
+ /usr/include/c++/5/bits/stl_algobase.h \
+ /usr/include/c++/5/bits/functexcept.h \
+ /usr/include/c++/5/bits/exception_defines.h \
+ /usr/include/c++/5/bits/cpp_type_traits.h \
+ /usr/include/c++/5/ext/type_traits.h \
+ /usr/include/c++/5/ext/numeric_traits.h \
+ /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \
+ /usr/include/c++/5/bits/concept_check.h \
+ /usr/include/c++/5/bits/stl_iterator_base_types.h \
+ /usr/include/c++/5/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \
+ /usr/include/c++/5/bits/ptr_traits.h \
+ /usr/include/c++/5/bits/predefined_ops.h \
+ /usr/include/c++/5/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \
+ /usr/include/c++/5/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \
+ /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \
+ /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \
+ /usr/include/c++/5/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \
+ /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \
+ /usr/include/c++/5/bits/ostream_insert.h \
+ /usr/include/c++/5/bits/cxxabi_forced.h \
+ /usr/include/c++/5/bits/stl_function.h \
+ /usr/include/c++/5/backward/binders.h \
+ /usr/include/c++/5/bits/range_access.h \
+ /usr/include/c++/5/bits/basic_string.h \
+ /usr/include/c++/5/ext/alloc_traits.h \
+ /usr/include/c++/5/bits/basic_string.tcc \
+ /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \
+ /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \
+ /usr/include/c++/5/bits/basic_ios.h \
+ /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \
+ /usr/include/wctype.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \
+ /usr/include/c++/5/bits/streambuf_iterator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \
+ /usr/include/c++/5/bits/locale_facets.tcc \
+ /usr/include/c++/5/bits/basic_ios.tcc \
+ /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \
+ /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \
+ ../../modules/commons/src/jni/GiwsException.hxx includes/callscinotes.h \
+ includes/dynlib_scinotes.h \
+ ../../modules/localization/includes/charEncoding.h \
+ /usr/include/x86_64-linux-gnu/sys/stat.h \
+ /usr/include/x86_64-linux-gnu/bits/stat.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/jvm/includes/getScilabJavaVM.h \
+ ../../modules/core/includes/freeArrayOfString.h \
+ ../../modules/core/includes/BOOL.h \
+ ../../modules/fileio/includes/getFullFilename.h \
+ ../../modules/fileio/includes/dynlib_fileio.h
+
+/usr/include/stdc-predef.h:
+
+src/jni/SciNotes.hxx:
+
+/usr/include/c++/5/iostream:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h:
+
+/usr/include/c++/5/ostream:
+
+/usr/include/c++/5/ios:
+
+/usr/include/c++/5/iosfwd:
+
+/usr/include/c++/5/bits/stringfwd.h:
+
+/usr/include/c++/5/bits/memoryfwd.h:
+
+/usr/include/c++/5/bits/postypes.h:
+
+/usr/include/c++/5/cwchar:
+
+/usr/include/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar2.h:
+
+/usr/include/c++/5/exception:
+
+/usr/include/c++/5/bits/atomic_lockfree_defines.h:
+
+/usr/include/c++/5/bits/char_traits.h:
+
+/usr/include/c++/5/bits/stl_algobase.h:
+
+/usr/include/c++/5/bits/functexcept.h:
+
+/usr/include/c++/5/bits/exception_defines.h:
+
+/usr/include/c++/5/bits/cpp_type_traits.h:
+
+/usr/include/c++/5/ext/type_traits.h:
+
+/usr/include/c++/5/ext/numeric_traits.h:
+
+/usr/include/c++/5/bits/stl_pair.h:
+
+/usr/include/c++/5/bits/move.h:
+
+/usr/include/c++/5/bits/concept_check.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_types.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_funcs.h:
+
+/usr/include/c++/5/debug/debug.h:
+
+/usr/include/c++/5/bits/stl_iterator.h:
+
+/usr/include/c++/5/bits/ptr_traits.h:
+
+/usr/include/c++/5/bits/predefined_ops.h:
+
+/usr/include/c++/5/bits/localefwd.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:
+
+/usr/include/c++/5/clocale:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+/usr/include/c++/5/cctype:
+
+/usr/include/ctype.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/c++/5/bits/ios_base.h:
+
+/usr/include/c++/5/ext/atomicity.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:
+
+/usr/include/pthread.h:
+
+/usr/include/sched.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/sched.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/timex.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/x86_64-linux-gnu/bits/setjmp.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h:
+
+/usr/include/c++/5/bits/locale_classes.h:
+
+/usr/include/c++/5/string:
+
+/usr/include/c++/5/bits/allocator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:
+
+/usr/include/c++/5/ext/new_allocator.h:
+
+/usr/include/c++/5/new:
+
+/usr/include/c++/5/bits/ostream_insert.h:
+
+/usr/include/c++/5/bits/cxxabi_forced.h:
+
+/usr/include/c++/5/bits/stl_function.h:
+
+/usr/include/c++/5/backward/binders.h:
+
+/usr/include/c++/5/bits/range_access.h:
+
+/usr/include/c++/5/bits/basic_string.h:
+
+/usr/include/c++/5/ext/alloc_traits.h:
+
+/usr/include/c++/5/bits/basic_string.tcc:
+
+/usr/include/c++/5/bits/locale_classes.tcc:
+
+/usr/include/c++/5/stdexcept:
+
+/usr/include/c++/5/streambuf:
+
+/usr/include/c++/5/bits/streambuf.tcc:
+
+/usr/include/c++/5/bits/basic_ios.h:
+
+/usr/include/c++/5/bits/locale_facets.h:
+
+/usr/include/c++/5/cwctype:
+
+/usr/include/wctype.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h:
+
+/usr/include/c++/5/bits/streambuf_iterator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h:
+
+/usr/include/c++/5/bits/locale_facets.tcc:
+
+/usr/include/c++/5/bits/basic_ios.tcc:
+
+/usr/include/c++/5/bits/ostream.tcc:
+
+/usr/include/c++/5/istream:
+
+/usr/include/c++/5/bits/istream.tcc:
+
+/usr/include/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h:
+
+../../modules/commons/src/jni/GiwsException.hxx:
+
+includes/callscinotes.h:
+
+includes/dynlib_scinotes.h:
+
+../../modules/localization/includes/charEncoding.h:
+
+/usr/include/x86_64-linux-gnu/sys/stat.h:
+
+/usr/include/x86_64-linux-gnu/bits/stat.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/jvm/includes/getScilabJavaVM.h:
+
+../../modules/core/includes/freeArrayOfString.h:
+
+../../modules/core/includes/BOOL.h:
+
+../../modules/fileio/includes/getFullFilename.h:
+
+../../modules/fileio/includes/dynlib_fileio.h:
diff --git a/modules/scinotes/src/cpp/.dirstamp b/modules/scinotes/src/cpp/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/cpp/.dirstamp
diff --git a/modules/scinotes/src/cpp/.libs/libsciscinotes_algo_la-callscinotes.o b/modules/scinotes/src/cpp/.libs/libsciscinotes_algo_la-callscinotes.o
new file mode 100755
index 000000000..3411e98be
--- /dev/null
+++ b/modules/scinotes/src/cpp/.libs/libsciscinotes_algo_la-callscinotes.o
Binary files differ
diff --git a/modules/scinotes/src/cpp/callscinotes.cpp b/modules/scinotes/src/cpp/callscinotes.cpp
new file mode 100755
index 000000000..5a4a7faa8
--- /dev/null
+++ b/modules/scinotes/src/cpp/callscinotes.cpp
@@ -0,0 +1,137 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#include "SciNotes.hxx"
+
+extern "C"
+{
+#include "callscinotes.h"
+#include "charEncoding.h"
+#include "getScilabJavaVM.h"
+#include "charEncoding.h"
+#include "MALLOC.h"
+#include "freeArrayOfString.h"
+#include "getFullFilename.h"
+}
+/*--------------------------------------------------------------------------*/
+using namespace org_scilab_modules_scinotes;
+/*--------------------------------------------------------------------------*/
+int callSciNotesW(wchar_t **_wcfilenames, int _nbfiles)
+{
+ if ( (_wcfilenames) && (_nbfiles > 0) )
+ {
+ int i = 0;
+ for (i = 0; i < _nbfiles; i++)
+ {
+ if (_wcfilenames[i])
+ {
+ wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
+ if (wcFullFilename)
+ {
+ char *fullFilename = wide_string_to_UTF8(wcFullFilename);
+ if (fullFilename)
+ {
+ SciNotes::scinotes(getScilabJavaVM(), fullFilename);
+ FREE(fullFilename);
+ fullFilename = NULL;
+ }
+
+ FREE(wcFullFilename);
+ wcFullFilename = NULL;
+ }
+ }
+ }
+ }
+ else
+ {
+ SciNotes::scinotes(getScilabJavaVM());
+ }
+ return 0;
+}
+
+int callSciNotesWWithLineNumberAndFunction(wchar_t **_wcfilenames, double* pdblLineNumber, char *functionName, int _nbfiles)
+{
+ if ( (_wcfilenames) && (_nbfiles > 0) )
+ {
+ int i = 0;
+ for (i = 0; i < _nbfiles; i++)
+ {
+ if (_wcfilenames[i])
+ {
+ wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
+ if (wcFullFilename)
+ {
+ char *fullFilename = wide_string_to_UTF8(wcFullFilename);
+ if (fullFilename)
+ {
+ SciNotes::scinotes(getScilabJavaVM(), fullFilename, (int)pdblLineNumber[i], functionName);
+ FREE(fullFilename);
+ fullFilename = NULL;
+ }
+
+ FREE(wcFullFilename);
+ wcFullFilename = NULL;
+ }
+ }
+ }
+ }
+ else
+ {
+ SciNotes::scinotes(getScilabJavaVM());
+ }
+ return 0;
+}
+
+int callSciNotesWWithOption(wchar_t **_wcfilenames, wchar_t** option, int _nboptions, int _nbfiles)
+{
+ if ( (_wcfilenames) && (_nbfiles > 0) )
+ {
+ int i = 0;
+ char ** opt = NULL;
+ if (_nboptions)
+ {
+ opt = new char*[_nboptions];
+ for (int i = 0; i < _nboptions; i++)
+ {
+ opt[i] = wide_string_to_UTF8(option[i]);
+ }
+ }
+
+ for (i = 0; i < _nbfiles; i++)
+ {
+ if (_wcfilenames[i])
+ {
+ wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
+ if (wcFullFilename)
+ {
+ char *fullFilename = wide_string_to_UTF8(wcFullFilename);
+ if (fullFilename)
+ {
+ SciNotes::scinotes(getScilabJavaVM(), fullFilename, opt, _nboptions);
+ FREE(fullFilename);
+ fullFilename = NULL;
+ }
+
+ FREE(wcFullFilename);
+ wcFullFilename = NULL;
+ }
+ }
+ }
+ FREE(opt);
+ }
+ else
+ {
+ SciNotes::scinotes(getScilabJavaVM());
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/src/cpp/libsciscinotes_algo_la-callscinotes.lo b/modules/scinotes/src/cpp/libsciscinotes_algo_la-callscinotes.lo
new file mode 100755
index 000000000..1a75da516
--- /dev/null
+++ b/modules/scinotes/src/cpp/libsciscinotes_algo_la-callscinotes.lo
@@ -0,0 +1,12 @@
+# src/cpp/libsciscinotes_algo_la-callscinotes.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_algo_la-callscinotes.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/src/java/jflex/function.jflex b/modules/scinotes/src/java/jflex/function.jflex
new file mode 100755
index 000000000..02118f4d6
--- /dev/null
+++ b/modules/scinotes/src/java/jflex/function.jflex
@@ -0,0 +1,258 @@
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import javax.swing.text.Element;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+%%
+
+%public
+%class FunctionScanner
+%final
+%unicode
+%char
+%type int
+
+%switch
+
+%{
+ List<String> returnValues;
+ List<String> argsValues;
+ String functionName;
+ int end;
+
+ private ScilabDocument doc;
+ private String id;
+ private boolean inRETS;
+
+ public FunctionScanner(ScilabDocument doc) {
+ this.doc = doc;
+ returnValues = new ArrayList();
+ argsValues = new ArrayList();
+ }
+
+ public String getFunctionName() {
+ return functionName;
+ }
+
+ public List<String> getReturnValues() {
+ return returnValues;
+ }
+
+ public List<String> getArgsValues() {
+ return argsValues;
+ }
+
+ public int getLineType(int p0, int p1) {
+ try {
+ returnValues = new ArrayList();
+ argsValues = new ArrayList();
+ end = p1;
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ yybegin(BROKEN);
+ int broken = yylex();
+
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ while (true) {
+ int ret = yylex();
+ if (ret != ScilabDocument.ScilabLeafElement.BROKEN) {
+ return ret | broken;
+ }
+ Element elem = doc.getDefaultRootElement();
+ int start = end + 1;
+ elem = elem.getElement(elem.getElementIndex(end + 1));
+ end = elem.getEndOffset();
+ yyreset(new ScilabDocumentReader(doc, elem.getStartOffset(), end));
+ if (inRETS) {
+ inRETS = false;
+ yybegin(RETS);
+ } else {
+ yybegin(ARGS);
+ }
+ }
+ } catch (IOException e) {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ }
+
+ public FunctionInfo getFunctionInfo() {
+ return new FunctionInfo(functionName, returnValues, argsValues);
+ }
+
+ public class FunctionInfo {
+ public String functionName;
+ public List<String> returnValues;
+ public List<String> argsValues;
+
+ public FunctionInfo(String name, List ret, List args) {
+ this.functionName = name;
+ this.returnValues = ret;
+ this.argsValues = args;
+ }
+ }
+%}
+
+%eofval{
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+%eofval}
+
+/* main character classes */
+white = [ \t]+
+eol = \n
+
+comments = ("//".*)?{eol}
+break = ".."(".")*{white}*{comments}
+
+brokenline = ([^\.]* | ([^\.]*"."[^\.]+)+){break}
+
+id = [a-zA-Z%_#!$?][a-zA-Z0-9_#!$?]*
+spec = [^a-zA-Z0-9_#!$?]
+
+equal = {white}* "=" {white}*
+
+rpar = ")"[,; \t]*{comments}
+
+fun = {white}* "function" {white}
+funb = {white}* "function["
+endfun = {white}* "endfunction" {spec}
+
+%x FUNCTION, TYPEID, FUNNAME, RETS, ARGS, BROKEN
+
+%%
+
+<YYINITIAL> {
+ {funb} {
+ yybegin(RETS);
+ }
+
+ {fun} {
+ yybegin(FUNCTION);
+ }
+
+ {endfun} {
+ return ScilabDocument.ScilabLeafElement.ENDFUN;
+ }
+
+ . |
+ {eol} {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
+
+<BROKEN> {
+ {brokenline} {
+ return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+
+ . |
+ {eol} {
+ return 0;
+ }
+}
+
+<FUNCTION> {
+ "[" {
+ yybegin(RETS);
+ }
+
+ {id} {
+ id = yytext();
+ yybegin(TYPEID);
+ }
+
+ . |
+ {eol} {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
+
+<TYPEID> {
+ {equal} {
+ returnValues.add(id);
+ yybegin(FUNNAME);
+ }
+
+ "(" {
+ functionName = id;
+ yybegin(ARGS);
+ }
+
+ {white} { }
+
+ {comments} {
+ functionName = id;
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+
+ . {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
+
+<FUNNAME> {
+ {id} {
+ functionName = yytext();
+ }
+
+ [ \t]*"(" {
+ yybegin(ARGS);
+ }
+
+ {comments} {
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+
+ . {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
+
+<RETS> {
+ {id} {
+ returnValues.add(yytext());
+ }
+
+ "," |
+ {white} { }
+
+ "]"{equal} {
+ yybegin(FUNNAME);
+ }
+
+ {break} {
+ inRETS = true;
+ return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+
+ . |
+ {eol} {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
+
+<ARGS> {
+ {id} {
+ argsValues.add(yytext());
+ }
+
+ "," |
+ {white} { }
+
+ {break} {
+ return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+
+ {rpar} {
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+
+ . |
+ {eol} {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+}
diff --git a/modules/scinotes/src/java/jflex/indentation.jflex b/modules/scinotes/src/java/jflex/indentation.jflex
new file mode 100755
index 000000000..d99972ca9
--- /dev/null
+++ b/modules/scinotes/src/java/jflex/indentation.jflex
@@ -0,0 +1,196 @@
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import javax.swing.text.Element;
+import javax.swing.text.BadLocationException;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+%%
+
+%public
+%class IndentScanner
+%final
+%unicode
+%char
+%type int
+
+%switch
+
+%{
+ private ScilabDocument doc;
+ private Element elem;
+
+ public IndentScanner(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ }
+
+ public int getIndentNumber(int lineNumber, char type) {
+ if (lineNumber < 0) {
+ return 0;
+ }
+ try {
+ Element line = elem.getElement(lineNumber);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ switch (type) {
+ case ' ':
+ yybegin(WHITE);
+ break;
+ case '\t':
+ yybegin(TAB);
+ break;
+ default:
+ yybegin(WHITE);
+ }
+ return yylex();
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+
+ public int getTabsAtBeginning(int pos) {
+ Element line = elem.getElement(pos);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(BEG);
+ if (yylex() == 1) {
+ return yylength();
+ }
+ } catch (IOException e) {
+ return 0;
+ }
+ return 0;
+ }
+
+ public void getIndentLevel(int pos, int[] level) {
+ Element line = elem.getElement(elem.getElementIndex(pos));
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ level[0] = 0;
+ level[1] = 0;
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(INDENT);
+ do {
+ switch (yylex()) {
+ case 0:
+ break;
+ case 1:
+ level[1]++;
+ break;
+ case 2:
+ if (level[1] > 0) {
+ level[1]--;
+ } else {
+ level[0]++;
+ }
+ break;
+ case 3:
+ if (level[1] == 0) {
+ level[0]++;
+ level[1]++;
+ }
+ }
+ } while (zzMarkedPos != 0);
+ } catch (IOException e) { }
+ }
+%}
+
+%eofval{
+ return 0;
+%eofval}
+
+/* main character classes */
+
+eol = \n
+
+comment = "//".*{eol}
+
+spec = [a-zA-Z0-9%_#!$?0-9]
+
+string = (([^\'\"\r\n]*)|([\'\"]{2}))+
+qstring = (\"|\'){string}(\"|\')
+transp = ({spec} | ")" | "]" | "}") "'"
+
+indentP = ("function" | "if" | "for" | "while" | "try" | "select")
+indentPx = {indentP}{spec}+
+xindentP = {spec}{indentP}
+
+indentM = ("endfunction" | "end")
+indentMx = {indentM}{spec}+
+xindentM = {spec}{indentM}
+indentMP = ("else" | "elseif" | "catch" | "case")
+indentMPx = {indentMP}{spec}+
+xindentMP = {spec}{indentMP}
+
+%x INDENT, WHITE, TAB, BEG
+
+%%
+
+<INDENT> {
+ {transp} |
+ {comment} |
+ {indentPx} |
+ {qstring} { }
+
+ {indentP} {
+ return 1;
+ }
+
+ {indentM} {
+ return 2;
+ }
+
+ {indentMP} {
+ return 3;
+ }
+
+ . |
+ {xindentP} |
+ {xindentM} |
+ {xindentMP} |
+ {indentMPx} |
+ {indentMx} { }
+
+ {eol} {
+ return 0;
+ }
+}
+
+<WHITE> {
+ " "* {
+ return yylength();
+ }
+
+ . |
+ {eol} {
+ return 0;
+ }
+}
+
+<TAB> {
+ "\t"* {
+ return yylength();
+ }
+
+ . |
+ {eol} {
+ return 0;
+ }
+}
+
+<BEG> {
+ ^[ \t]+ {
+ return 1;
+ }
+
+ . |
+ {eol} { }
+} \ No newline at end of file
diff --git a/modules/scinotes/src/java/jflex/matchingblock.jflex b/modules/scinotes/src/java/jflex/matchingblock.jflex
new file mode 100755
index 000000000..cdfec5554
--- /dev/null
+++ b/modules/scinotes/src/java/jflex/matchingblock.jflex
@@ -0,0 +1,286 @@
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import javax.swing.text.Element;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+%%
+
+%public
+%class MatchingBlockScanner
+%final
+%unicode
+%char
+%type int
+%buffer 256
+
+%switch
+
+%{
+ private ScilabDocument doc;
+ private Element elem;
+ private boolean transp = false;
+ private ScilabLexer scilabLexer;
+ private int start;
+ private int end;
+ private int savePos;
+
+ public MatchingBlockScanner(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ this.scilabLexer = doc.createLexer();
+ }
+
+ public MatchingPositions getNextBlock(int pos, boolean lr) {
+ int s = 1;
+ transp = false;
+ try {
+ if (lr) {
+ start = pos;
+ end = doc.getEndPosition().getOffset();
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ yybegin(LR);
+ } else {
+ start = pos - 1;
+ end = 0;
+ yyreset(new ScilabDocumentReader(doc, true, start, end));
+ yybegin(RL);
+ }
+ do {
+ if (yylex() == 0) {
+ s--;
+ } else {
+ s++;
+ }
+ } while (zzMarkedPos != 0 && s != 0);
+ } catch (IOException e) {
+ return null;
+ }
+ if (s == 0) {
+ if (lr) {
+ return new MatchingPositions(pos, pos, pos + yychar, pos + yychar + (transp?(yylength()-1):yylength()));
+ } else {
+ return new MatchingPositions(pos, pos, pos - yychar - yylength(), pos - yychar);
+ }
+ }
+
+ return null;
+ }
+
+ public MatchingPositions getMatchingBlock(int pos, boolean lr) {
+ int p1, s = 1;
+ transp = false;
+ try {
+ if (lr) {
+ start = pos;
+ end = doc.getEndPosition().getOffset();
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ yybegin(OPENCLOSE);
+ if (yylex() != 1) {
+ return null;
+ }
+
+ p1 = pos + yylength();
+ yybegin(LR);
+ } else {
+ start = pos - 1;
+ end = 0;
+ yyreset(new ScilabDocumentReader(doc, true, start, end));
+ yybegin(CLOSEOPEN);
+ if (yylex() != 1) {
+ return null;
+ }
+ p1 = pos - yylength();
+ yybegin(RL);
+ }
+
+ do {
+ if (yylex() == 0) {
+ s--;
+ } else {
+ s++;
+ }
+ } while (zzMarkedPos != 0 && s != 0);
+ } catch (IOException e) {
+ return null;
+ }
+ if (s == 0) {
+ if (lr) {
+ return new MatchingPositions(pos, p1, pos + yychar, pos + yychar + (transp?(yylength()-1):yylength()));
+ } else {
+ return new MatchingPositions(p1, pos, pos - yychar - yylength(), pos - yychar);
+ }
+ }
+
+ return null;
+ }
+
+ public final class MatchingPositions {
+ public int firstB;
+ public int firstE;
+ public int secondB;
+ public int secondE;
+
+ private MatchingPositions(int x1, int x2, int y1, int y2) {
+ firstB = x1;
+ firstE = x2;
+ secondB = y1;
+ secondE = y2;
+ }
+ }
+%}
+
+%eofval{
+ return -1;
+%eofval}
+
+/* main character classes */
+eol = \n
+
+comment = "//".*{eol}
+
+tnemmoc = {eol}([^\r\n]*"//")+
+
+spec = [a-zA-Z0-9_#!$?]
+
+id = [a-zA-Z%_#!?][a-zA-Z0-9_#!$?]*
+
+string = (([^\'\"\r\n]*)|([\'\"]{2}))*
+qstring = (\"|\'){string}(\"|\')
+gnirtsq = \"{string}(\"|\')
+transp = ({spec} | ")" | "]" | "}") "'"
+
+openK = ("if" | "for" | "while" | "select" | "try" | "function")
+openKx = {openK}{spec}+
+
+elseif = "elseif" | "else"
+
+openS = "(" | "[" | "{"
+closeK = ("end" | "endfunction")
+closeKx = {closeK}{spec}+
+xcloseK = ({spec} | "%" ){closeK}
+closeS = ")" | "]" | "}"
+
+esolcK = ("fi" | "rof" | "elihw" | "tceles" | "yrt" | "noitcnuf")
+esolcKx = {spec}{esolcK}
+xesolcK = {esolcK}{spec}
+nepoK = ("dne" | "noitcnufdne")
+nepoKx = {spec}{nepoK}
+
+%x LR, RL, OPENCLOSE, CLOSEOPEN, PSNART, SPEC
+
+%%
+
+<LR> {
+ {transp} {
+ char c = yycharat(yylength() - 2);
+ if (c == ')' || c == ']' || c == '}') {
+ transp = true;
+ return 0;
+ }
+ }
+
+ "elseif" |
+ {comment} |
+ {openKx} |
+ {qstring} { }
+
+ {openS} |
+ {openK} {
+ return 1;
+ }
+
+ {closeS} |
+ {closeK} {
+ return 0;
+ }
+
+ {id} |
+ {closeKx} |
+ {xcloseK} |
+ . |
+ {eol} { }
+}
+
+<RL> {
+ \' {
+ yypushback(1);
+ yybegin(PSNART);
+ }
+
+ "fiesle" |
+ {tnemmoc} |
+ {esolcKx} |
+ {xesolcK} |
+ {gnirtsq} { }
+
+ {closeS} |
+ {nepoK} {
+ return 1;
+ }
+
+ {openS} |
+ {esolcK} {
+ return 0;
+ }
+
+ {nepoKx} |
+ . |
+ {eol} { }
+}
+
+<PSNART> {
+ \' {
+ if (scilabLexer.getKeyword(start - yychar, false) == ScilabLexerConstants.STRING) {
+ savePos = start - yychar - scilabLexer.beginString - scilabLexer.start;
+ yybegin(SPEC);
+ } else {
+ yybegin(RL);
+ }
+ }
+}
+
+<SPEC> {
+ . |
+ {eol} {
+ if (--savePos == 0) {
+ yybegin(RL);
+ }
+ }
+}
+
+<OPENCLOSE> {
+ {openKx} {
+ return 0;
+ }
+
+ {elseif} |
+ {openS} |
+ {openK} {
+ return 1;
+ }
+
+ . |
+ {eol} {
+ return 0;
+ }
+}
+
+<CLOSEOPEN> {
+ {nepoKx} {
+ return 0;
+ }
+
+ {closeS} |
+ {nepoK} {
+ return 1;
+ }
+
+ . |
+ {eol} {
+ return 0;
+ }
+}
diff --git a/modules/scinotes/src/java/jflex/scilab.jflex b/modules/scinotes/src/java/jflex/scilab.jflex
new file mode 100755
index 000000000..5ece120cb
--- /dev/null
+++ b/modules/scinotes/src/java/jflex/scilab.jflex
@@ -0,0 +1,557 @@
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.io.IOException;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.commons.ScilabCommonsUtils;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+
+%%
+
+%public
+%class ScilabLexer
+%extends ScilabLexerConstants
+%final
+%unicode
+%char
+%type int
+%switch
+%pack
+
+%{
+ public int start;
+ public int end;
+ public int beginString;
+ public static Set<String> commands = new HashSet<String>();
+ public static Set<String> macros = new HashSet<String>();
+ public static Set<String> variables = new HashSet<String>();
+ public Set<String> infile;
+
+ private ScilabDocument doc;
+ private boolean transposable;
+ private Element elem;
+ private boolean breakstring;
+
+ static {
+ // For SciNotes colors in preferences
+ commands.add("cos");
+ macros.add("cosh");
+ }
+
+ public ScilabLexer(ScilabDocument doc) {
+ this(doc, true);
+ }
+
+ public ScilabLexer(ScilabDocument doc, boolean update) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ this.infile = doc.getFunctionsInDoc();
+ if (update) {
+ update();
+ }
+ }
+
+ public static void update() {
+ if (ScilabCommonsUtils.isScilabThread()) {
+ String[] vars = ScilabKeywords.GetVariablesName();
+ String[] funs = ScilabKeywords.GetFunctionsName();
+ String[] macs = ScilabKeywords.GetMacrosName();
+ variables.clear();
+ commands.clear();
+ macros.clear();
+ if (vars != null) {
+ variables.addAll(Arrays.asList(vars));
+ }
+ if (funs != null) {
+ commands.addAll(Arrays.asList(funs));
+ }
+ if (macs != null) {
+ macros.addAll(Arrays.asList(macs));
+ }
+ }
+ }
+
+ public void setRange(int p0, int p1) {
+ start = p0;
+ end = p1;
+ transposable = false;
+ breakstring = false;
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ int currentLine = elem.getElementIndex(start);
+ if (currentLine != 0 && ((ScilabDocument.ScilabLeafElement) elem.getElement(currentLine - 1)).isBrokenString()) {
+ yybegin(QSTRING);
+ }
+ }
+
+ public int yychar() {
+ return yychar;
+ }
+
+ public int scan() throws IOException {
+ int ret = yylex();
+ if (start + yychar + yylength() == end - 1) {
+ ((ScilabDocument.ScilabLeafElement) elem.getElement(elem.getElementIndex(start))).setBrokenString(breakstring);
+ breakstring = false;
+ }
+ return ret;
+ }
+
+ public int getKeyword(int pos, boolean strict) {
+ Element line = elem.getElement(elem.getElementIndex(pos));
+ int end = line.getEndOffset();
+ int tok = -1;
+ start = line.getStartOffset();
+ int startL = start;
+ int s = -1;
+
+ try {
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ if (!strict) {
+ pos++;
+ }
+
+ while (startL < pos && (s != startL || yystate() == BREAKSTRING)) {
+ s = startL;
+ tok = yylex();
+ startL = start + yychar + yylength();
+ }
+
+ return tok;
+ } catch (IOException e) {
+ return ScilabLexerConstants.DEFAULT;
+ }
+ }
+
+ public static ScilabTokens getScilabTokens(String str) {
+ ScilabDocument doc = new ScilabDocument(false);
+ try {
+ doc.insertString(0, str, null);
+ } catch (BadLocationException e) { }
+ return getScilabTokens(doc);
+ }
+
+ public static ScilabTokens getScilabTokens(ScilabDocument doc) {
+ ScilabLexer lexer = new ScilabLexer(doc);
+ lexer.yyreset(new ScilabDocumentReader(doc, 0, doc.getLength()));
+ ScilabTokens tokens = new ScilabTokens();
+ int tok = -1;
+ try {
+ while (tok != ScilabLexerConstants.EOF) {
+ tok = lexer.yylex();
+ tokens.add(tok, lexer.yychar + lexer.yylength());
+ }
+ } catch (IOException e) { }
+
+ return tokens;
+ }
+
+ public static class ScilabTokens {
+ private List<Integer> tokenType = new ArrayList<Integer>();
+ private List<Integer> tokenPos = new ArrayList<Integer>();
+
+ ScilabTokens() { }
+
+ void add(final int type, final int pos) {
+ tokenType.add(type);
+ tokenPos.add(pos);
+ }
+
+ public final List<Integer> getTokenType() {
+ return tokenType;
+ }
+
+ public final List<Integer> getTokenPos() {
+ return tokenPos;
+ }
+ }
+%}
+
+/* main character classes */
+eol = \n
+
+open = "[" | "(" | "{"
+close = "]" | ")" | "}"
+
+comment = "//"
+
+quote = "'"
+
+dquote = "\""
+
+cstes = "%t" | "%T" | "%f" | "%F" | "%e" | "%pi" | "%inf" | "%i" | "%z" | "%s" | "%nan" | "%eps" | "SCI" | "WSCI" | "SCIHOME" | "TMPDIR"
+
+operator = ".'" | ".*" | "./" | ".\\" | ".^" | ".**" | "+" | "-" | "/" | "\\" | "*" | "^" | "**" | "==" | "~=" | "<>" | "<" | ">" | "<=" | ">=" | ".*." | "./." | ".\\." | "/." | "=" | "&" | "|" | "@" | "@=" | "~"
+
+functionKwds = "function" | "endfunction"
+
+structureKwds = "then" | "do" | "catch" | "case"
+
+elseif = "elseif" | "else"
+
+openCloseStructureKwds = "if" | "for" | "while" | "try" | "select" | "end"
+
+controlKwds = "abort" | "break" | "quit" | "return" | "resume" | "pause" | "continue" | "exit"
+
+authors = "Calixte Denizet" | "Calixte DENIZET" | "Sylvestre Ledru" | "Sylvestre LEDRU" | "Antoine Elias" | "Antoine ELIAS" | "Bruno Jofret" | "Bruno JOFRET" | "Claude Gomez" | "Claude GOMEZ" | "Clement David" | "Clement DAVID" | "Manuel Juliachs" | "Manuel JULIACHS" | "Sheldon Cooper" | "Leonard Hofstadter" | "Serge Steer" | "Serge STEER" | "Vincent Couvert" | "Vincent COUVERT" | "Adeline Carnis" | "Adeline CARNIS" | "Charlotte Hecquet" | "Charlotte HECQUET" | "Paul Bignier" | "Paul BIGNIER" | "Alexandre Herisse" | "Alexandre HERISSE" | "Simon Marchetto" | "Simon MARCHETTO" | "Vladislav Trubkin" | "Vladislav TRUBKIN" | "Cedric Delamarre" | "Cedric DELAMARRE" | "Inria" | "INRIA" | "DIGITEO" | "Digiteo" | "Scilab Enterprises" | "ENPC"
+
+error = "Scilab Entreprises" | "Scilab Entreprise" | "Scilab Enterprise"
+todo = ("TODO" | "todo" | "Todo")[ \t]*:[^\n]*
+
+break = ".."(".")*
+breakinstring = {break}[ \t]*({comment} | {eol})
+
+special = "$" | ":" | {break}
+
+string = (([^ \t\'\"\r\n\.]*)|([\'\"]{2}))+
+
+id = ([a-zA-Z%_#!?][a-zA-Z0-9_#!$?]*)|("$"[a-zA-Z0-9_#!$?]+)
+
+badid = ([0-9$][a-zA-Z0-9_#!$?]+)
+whitabs = (" "+"\t" | "\t"+" ")[ \t]*
+badop = [+-]([\*\/\\\^] | "."[\*\+\-\/\\\^]) | ":=" | "->" | ("="[ \t]*">") | ("="[ \t]*"<") | " !=" | "&&" | "||" | ([*+-/\\\^]"=")
+
+dot = "."
+
+url = ("http://"|"https://"|"ftp://"|"dav://"|"davs://"|"sftp://"|"ftps://"|"smb:///"|"file://")[^ \t\f\n\r\'\"]+
+mailaddr = [ \t]*[a-zA-Z0-9_\.\-]+"@"([a-zA-Z0-9\-]+".")+[a-zA-Z]{2,5}[ \t]*
+mail = ("<" {mailaddr} ">") | ("mailto:" {mailaddr})
+
+latex = "$$"(([^$]*|"\\$")+)"$$"
+latexinstring = (\"|\')"$"(([^$\'\"]*|"\\$"|([\'\"]{2}))+)"$"(\"|\')
+
+digit = [0-9]
+exp = [dDeE][+-]?{digit}*
+number = ({digit}+"."?{digit}*{exp}?)|("."{digit}+{exp}?)
+
+arabic_char = [\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]
+hebrew_char = [\u0590-\u05FF\uFB1D-\uFB4F]
+nko_char = [\u07C0-\u07FF]
+thaana_char = [\u0780-\u07BF]
+rtl_char = {arabic_char}|{hebrew_char}|{nko_char}|{thaana_char}
+rtl_comment = {rtl_char}[^\n]*
+rtl_in_string = {rtl_char}(([^\'\"\r\n\.]*)|([\'\"]{2}))+
+
+%x QSTRING, COMMENT, FIELD, COMMANDS, COMMANDSWHITE, BREAKSTRING
+
+%%
+
+<YYINITIAL> {
+ {comment} {
+ transposable = false;
+ yypushback(2);
+ yybegin(COMMENT);
+ }
+
+ {operator} {
+ transposable = false;
+ return ScilabLexerConstants.OPERATOR;
+ }
+
+ {functionKwds} {
+ transposable = false;
+ return ScilabLexerConstants.FKEYWORD;
+ }
+
+ {openCloseStructureKwds} {
+ transposable = false;
+ return ScilabLexerConstants.OSKEYWORD;
+ }
+
+ {structureKwds} {
+ transposable = false;
+ return ScilabLexerConstants.SKEYWORD;
+ }
+
+ {elseif} {
+ transposable = false;
+ return ScilabLexerConstants.ELSEIF;
+ }
+
+ {controlKwds} {
+ transposable = false;
+ return ScilabLexerConstants.CKEYWORD;
+ }
+
+ {cstes} {
+ transposable = true;
+ return ScilabLexerConstants.CONSTANTES;
+ }
+
+ {id} {
+ transposable = true;
+ String str = yytext();
+ if (commands.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.COMMANDS;
+ } else if (macros.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.MACROS;
+ } else if (infile.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.MACROINFILE;
+ } else {
+ List<String>[] arr = doc.getInOutArgs(start + yychar);
+ if (arr != null && (arr[0].contains(str) || arr[1].contains(str))) {
+ return ScilabLexerConstants.INPUTOUTPUTARGS;
+ } else if (variables.contains(str)) {
+ return ScilabLexerConstants.VARIABLES;
+ }
+ }
+ return ScilabLexerConstants.ID;
+ }
+
+ {number} {
+ transposable = true;
+ return ScilabLexerConstants.NUMBER;
+ }
+
+ {special} {
+ transposable = false;
+ return ScilabLexerConstants.SPECIAL;
+ }
+
+ {dot} {
+ transposable = false;
+ yybegin(FIELD);
+ return ScilabLexerConstants.OPERATOR;
+ }
+
+ {latexinstring} {
+ return ScilabLexerConstants.LATEXINSTRING;
+ }
+
+ {quote} {
+ if (transposable) {
+ return ScilabLexerConstants.TRANSP;
+ } else {
+ beginString = zzStartRead;
+ yybegin(QSTRING);
+ return ScilabLexerConstants.STRING;
+ }
+ }
+
+ {open} {
+ transposable = false;
+ return ScilabLexerConstants.OPENCLOSE;
+ }
+
+ {close} {
+ transposable = true;
+ return ScilabLexerConstants.OPENCLOSE;
+ }
+
+ {dquote} {
+ transposable = false;
+ beginString = zzStartRead;
+ yybegin(QSTRING);
+ return ScilabLexerConstants.STRING;
+ }
+
+ {badid} |
+ {badop} |
+ {whitabs} {
+ return ScilabLexerConstants.ERROR;
+ }
+
+ " " {
+ transposable = false;
+ return ScilabLexerConstants.WHITE;
+ }
+
+ "\t" {
+ transposable = false;
+ return ScilabLexerConstants.TAB;
+ }
+
+ . |
+ {eol} {
+ transposable = false;
+ return ScilabLexerConstants.DEFAULT;
+ }
+}
+
+<COMMANDS> {
+ [ \t]*"(" {
+ yypushback(yylength());
+ yybegin(YYINITIAL);
+ }
+
+ " " {
+ yybegin(COMMANDSWHITE);
+ return ScilabLexerConstants.WHITE;
+ }
+
+ "\t" {
+ yybegin(COMMANDSWHITE);
+ return ScilabLexerConstants.TAB;
+ }
+ .
+ {
+ yypushback(1);
+ yybegin(YYINITIAL);
+ }
+
+ {eol} { }
+}
+
+<COMMANDSWHITE> {
+ {comment} {
+ transposable = false;
+ yypushback(2);
+ yybegin(COMMENT);
+ }
+
+ ([^ \t,;/]*) | ("/"[^ /]*) {
+ return ScilabLexerConstants.STRING;
+ }
+
+ " " {
+ return ScilabLexerConstants.WHITE;
+ }
+
+ "\t" {
+ return ScilabLexerConstants.TAB;
+ }
+
+ . |
+ {eol} {
+ yypushback(1);
+ yybegin(YYINITIAL);
+ }
+}
+
+<FIELD> {
+ {id} {
+ transposable = true;
+ return ScilabLexerConstants.FIELD;
+ }
+
+ . |
+ {eol} {
+ yypushback(1);
+ yybegin(YYINITIAL);
+ }
+}
+
+<QSTRING> {
+ {breakinstring} {
+ yypushback(yylength());
+ yybegin(BREAKSTRING);
+ transposable = false;
+ return ScilabLexerConstants.STRING;
+ }
+
+ " " {
+ return ScilabLexerConstants.WHITE_STRING;
+ }
+
+ "\t" {
+ return ScilabLexerConstants.TAB_STRING;
+ }
+
+ {rtl_in_string} |
+ {string} |
+ "." {
+ return ScilabLexerConstants.STRING;
+ }
+
+ (\'|\") {
+ transposable = false;
+ yybegin(YYINITIAL);
+ return ScilabLexerConstants.STRING;
+ }
+
+ . |
+ {eol} {
+ return ScilabLexerConstants.DEFAULT;
+ }
+}
+
+<COMMENT> {
+ {todo} {
+ return ScilabLexerConstants.TODO;
+ }
+
+ {error} {
+ return ScilabLexerConstants.ERROR;
+ }
+
+
+ {authors} {
+ return ScilabLexerConstants.AUTHORS;
+ }
+
+ {url} {
+ return ScilabLexerConstants.URL;
+ }
+
+ {mail} {
+ return ScilabLexerConstants.MAIL;
+ }
+
+ {latex} {
+ return ScilabLexerConstants.LATEX;
+ }
+
+ " " {
+ return ScilabLexerConstants.WHITE_COMMENT;
+ }
+
+ "\t" {
+ return ScilabLexerConstants.TAB_COMMENT;
+ }
+
+ {rtl_comment} {
+ return ScilabLexerConstants.COMMENT;
+ }
+
+ [^ \t\n]+ {
+ return ScilabLexerConstants.COMMENT;
+ }
+
+ {eol} {
+ yybegin(YYINITIAL);
+ return ScilabLexerConstants.DEFAULT;
+ }
+}
+
+<BREAKSTRING> {
+ {break} {
+ breakstring = true;
+ return ScilabLexerConstants.SPECIAL;
+ }
+
+ " " {
+ return ScilabLexerConstants.WHITE;
+ }
+
+ "\t" {
+ return ScilabLexerConstants.TAB;
+ }
+
+ {comment} {
+ transposable = false;
+ yypushback(2);
+ yybegin(COMMENT);
+ }
+
+ . |
+ {eol} {
+ return ScilabLexerConstants.DEFAULT;
+ }
+}
+
+<<EOF>> {
+ return ScilabLexerConstants.EOF;
+ }
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/CommentManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/CommentManager.java
new file mode 100755
index 000000000..71b2bfa97
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/CommentManager.java
@@ -0,0 +1,160 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+/**
+ * Class Comment Manager
+ * @author Calixte DENIZET
+ */
+public class CommentManager {
+
+ private static final String COM = "//";
+ private static final char DEMICOM = '/';
+ private static final String EOL = "\n";
+
+ private ScilabDocument doc;
+ private Element elem;
+
+ /**
+ * Constructor
+ * @param doc the document to comment
+ */
+ public CommentManager(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ }
+
+
+ /**
+ * Comment a line
+ * @param line the line number
+ */
+ public void commentLine(int line) {
+ Element startL = elem.getElement(line);
+ int sstart = startL.getStartOffset();
+
+ try {
+ doc.insertString(sstart, COM, null);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return;
+ }
+ }
+
+ /**
+ * Uncomment a line
+ * @param line the line number
+ * @return true if the line has been uncommented
+ */
+ public boolean uncommentLine(int line) {
+ Element startL = elem.getElement(line);
+ int sstart = startL.getStartOffset();
+ int send = startL.getEndOffset() - 1;
+
+ try {
+ String str = doc.getText(sstart, send - sstart);
+ Pattern pat = Pattern.compile("([ \t]*)//");
+ Matcher matcher = pat.matcher(str);
+ if (matcher.find()) {
+ str = matcher.replaceFirst("$1");
+ doc.replace(sstart, send - sstart, str, null);
+ return true;
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+
+ return false;
+ }
+
+ /**
+ * Comment several lines
+ * @param start the beginning position in the doc
+ * @param end the ending position in the doc
+ * @return an array of length 2 containing the new positions
+ */
+ public int[] commentLines(int start, int end) {
+ int first = elem.getElementIndex(start);
+ int last = elem.getElementIndex(end);
+ int[] ret = new int[] {start, end};
+
+ for (int i = first; i <= last; i++) {
+ commentLine(i);
+ ret[1] += 2;
+ }
+
+ ret[0] += 2;
+
+ return ret;
+ }
+
+ /**
+ * Comment a part of a line
+ * @param position in the doc
+ */
+ public void commentText(int position) {
+ try {
+ doc.insertString(position, COM, null);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Un-Comment several lines
+ * @param start the beginning position in the doc
+ * @param end the ending position in the doc
+ * @return an array of length 2 containing the new positions
+ */
+ public int[] uncommentLines(int start, int end) {
+ int first = elem.getElementIndex(start);
+ int last = elem.getElementIndex(end);
+ int[] ret = new int[] {start, end};
+
+ boolean unc = uncommentLine(first);
+ if (unc) {
+ ret[0] -= 2;
+ ret[1] -= 2;
+ }
+
+ for (int i = first + 1; i <= last; i++) {
+ unc = uncommentLine(i);
+ if (unc) {
+ ret[1] -= 2;
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * UnComment a part of a line
+ * @param start position start
+ */
+ public void uncommentText(int start) {
+ try {
+ int end = elem.getElement(elem.getElementIndex(start)).getEndOffset();
+ if (end - start >= 2 && COM.equals(doc.getText(start, 2))) {
+ doc.remove(start, 2);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/CompoundUndoManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/CompoundUndoManager.java
new file mode 100755
index 000000000..6d17f9d4a
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/CompoundUndoManager.java
@@ -0,0 +1,238 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.UndoableEditEvent;
+import javax.swing.text.AbstractDocument;
+import javax.swing.text.Segment;
+import javax.swing.text.BadLocationException;
+import javax.swing.undo.CompoundEdit;
+import javax.swing.undo.UndoManager;
+import javax.swing.undo.CannotUndoException;
+import javax.swing.undo.CannotRedoException;
+
+/**
+ * Class CompoundUndoManager
+ * @author Bernard Hugueney
+ * @author Calixte DENIZET
+ *
+ */
+public class CompoundUndoManager extends UndoManager {
+
+ private static final long serialVersionUID = 2400488911410627080L;
+
+ private CompoundEdit compoundEdit;
+ private ScilabDocument sdoc;
+ private Segment seg = new Segment();
+ private boolean remove;
+ private int nbEdits;
+ private char[] breaks;
+ private int prevLine;
+ private boolean oneShot;
+
+ /**
+ * Constructor
+ * @param sdoc the ScilabDocument where we want to make undo/redo
+ */
+ public CompoundUndoManager(ScilabDocument sdoc) {
+ super();
+ this.sdoc = sdoc;
+ setLimit(-1);
+ setBreakingChars(" \n");
+ }
+
+ /**
+ * setBreakingChars defines the breaking chars which break a compound when they are encountered.
+ * @param breaks the breaking chars
+ */
+ public void setBreakingChars(String breaks) {
+ this.breaks = breaks.toCharArray();
+ }
+
+ /**
+ * getBreakingChars returns the breaking chars
+ * @return the breaking chars
+ */
+ public String getBreakingChars() {
+ return new String(breaks);
+ }
+
+ /**
+ * startCompoundEdit
+ */
+ public void startCompoundEdit() {
+ if (compoundEdit == null && sdoc.getEditorPane() != null) {
+ compoundEdit = new CompoundEdit();
+ addEdit(compoundEdit);
+ ++nbEdits;
+ if (sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableUndoButton(true);
+ }
+ }
+ }
+
+ /**
+ * endCompoundEdit
+ */
+ public void endCompoundEdit() {
+ if (compoundEdit != null && sdoc.getEditorPane() != null) {
+ compoundEdit.end();
+ compoundEdit = null;
+ }
+ }
+
+ /**
+ * Enable one shot, i.e. if several modifs on one char occurred then they
+ * can be added in the same CompoundEdit.
+ * @param b true if one shot must be enabled
+ */
+ public void enableOneShot(boolean b) {
+ this.oneShot = b;
+ }
+
+ /**
+ * undo
+ */
+ public void undo() {
+ endCompoundEdit();
+ try {
+ super.undo();
+ if (sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableRedoButton(true);
+ }
+ --nbEdits;
+ if (nbEdits == 0) {
+ sdoc.setContentModified(false);
+ }
+ if (!canUndo() && sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableUndoButton(false);
+ }
+ } catch (CannotUndoException e) {
+ return;
+ }
+ }
+
+ /**
+ * redo
+ */
+ public void redo() {
+ endCompoundEdit();
+ try {
+ super.redo();
+ if (sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableUndoButton(true);
+ }
+ ++nbEdits;
+ if (nbEdits == 0) {
+ sdoc.setContentModified(false);
+ }
+ if (!canRedo() && sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableRedoButton(false);
+ }
+ } catch (CannotRedoException e) {
+ return;
+ }
+ }
+
+ /**
+ * Enable or not the Undo and Redo buttons
+ */
+ public void enableUndoRedoButtons() {
+ endCompoundEdit();
+ if (sdoc.getEditorPane().getEditor() != null) {
+ sdoc.getEditorPane().getEditor().enableRedoButton(canRedo());
+ sdoc.getEditorPane().getEditor().enableUndoButton(canUndo());
+ }
+ }
+
+ /**
+ * isAtReference
+ * @return boolean
+ */
+ public boolean isAtReference() {
+ return nbEdits == 0;
+ }
+
+ /**
+ * setReference
+ */
+ public void setReference() {
+ nbEdits = 0;
+ }
+
+ /**
+ * discardAllEdits
+ */
+ public void discardAllEdits() {
+ endCompoundEdit();
+ super.discardAllEdits();
+ }
+
+ /**
+ * undoableEditHappened handles an undo-strategy :
+ * - single chars are grouped in a same Edit but if this char is in breaks (e.g. ' ' or '\n')
+ * - removed chars are grouped too
+ * - if several modifs are made in different lines, then these are considered like several groups
+ * - if a modif contains more than one char, then it is considered like one group.
+ * @param e UndoableEditEvent
+ */
+ public void undoableEditHappened(UndoableEditEvent e) {
+ DocumentEvent event = (AbstractDocument.DefaultDocumentEvent) e.getEdit();
+ if (sdoc.getEditorPane() != null) {
+ if (!oneShot && event.getLength() == 1) {
+ if (!remove && event.getType() == DocumentEvent.EventType.REMOVE) {
+ endCompoundEdit();
+ remove = true;
+ }
+
+ if (remove && event.getType() == DocumentEvent.EventType.INSERT) {
+ endCompoundEdit();
+ remove = false;
+ }
+
+ try {
+ sdoc.getText(event.getOffset(), 1, seg);
+ boolean br = false;
+ for (int i = 0; i < breaks.length && !br; i++) {
+ br = seg.array[seg.offset] == breaks[i];
+ }
+ if (!remove && br) {
+ // there is a problem when the window is splitted
+ // two compoundEdits are created !
+ endCompoundEdit();
+ startCompoundEdit();
+ compoundEdit.addEdit(e.getEdit());
+ endCompoundEdit();
+ return;
+ } else {
+ if (sdoc.getDefaultRootElement().getElementIndex(event.getOffset()) != prevLine) {
+ prevLine = sdoc.getDefaultRootElement().getElementIndex(event.getOffset());
+ endCompoundEdit();
+ }
+ startCompoundEdit();
+ compoundEdit.addEdit(e.getEdit());
+ return;
+ }
+ } catch (BadLocationException ex) {
+ ex.printStackTrace();
+ }
+ } else {
+ startCompoundEdit();
+ compoundEdit.addEdit(e.getEdit());
+ }
+ }
+ }
+}
+
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/EditorComponent.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/EditorComponent.java
new file mode 100755
index 000000000..c2c3e20dc
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/EditorComponent.java
@@ -0,0 +1,108 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+
+import org.scilab.modules.scinotes.utils.ScilabScrollPane;
+
+/**
+ * @author Calixte DENIZET
+ */
+public class EditorComponent extends JPanel {
+
+ private static final long serialVersionUID = -1466505151043279504L;
+
+ private ScilabEditorPane editor;
+ private JScrollPane scroll;
+ private JSplitPane split;
+ private Component bottom;
+
+ /**
+ * Default constructor
+ * @param the EditorPane to display
+ */
+ public EditorComponent(ScilabEditorPane editor) {
+ super(new BorderLayout());
+ this.editor = editor;
+ scroll = new ScilabScrollPane(editor);
+ add(scroll);
+ }
+
+ /**
+ * @return the scrollpane
+ */
+ public JScrollPane getScrollPane() {
+ return scroll;
+ }
+
+ /**
+ * @return the editorpane
+ */
+ public ScilabEditorPane getEditorPane() {
+ return editor;
+ }
+
+ /**
+ * @param split the split to use
+ */
+ public void setSplitPane(JSplitPane split) {
+ this.split = split;
+ remove(scroll);
+ add(split, BorderLayout.CENTER);
+ split.setVisible(true);
+ setVisible(true);
+ revalidate();
+ }
+
+ /**
+ * @return the splitpane
+ */
+ public JSplitPane getSplitPane() {
+ return split;
+ }
+
+ /**
+ * @return true if the view is splited
+ */
+ public boolean isSplited() {
+ return split != null;
+ }
+
+ /**
+ * @param comp the component to insert at the bottom of this panel
+ */
+ public void insertBottomComponent(Component comp) {
+ if (comp == null) {
+ if (bottom != null) {
+ remove(bottom);
+ }
+ } else {
+ bottom = comp;
+ add(comp, BorderLayout.PAGE_END);
+ }
+ revalidate();
+ }
+
+ /**
+ * @return the component at the bottom
+ */
+ public Component getBottom() {
+ return bottom;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/FunctionScanner.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/FunctionScanner.java
new file mode 100755
index 000000000..473eedff7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/FunctionScanner.java
@@ -0,0 +1,1524 @@
+/* The following code was generated by JFlex 1.4.3 on 05/04/13 17:28 */
+
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import javax.swing.text.Element;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 05/04/13 17:28 from the specification file
+ * <tt>function.jflex</tt>
+ */
+public final class FunctionScanner {
+
+ /** 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 RETS = 8;
+ public static final int TYPEID = 4;
+ public static final int BROKEN = 12;
+ public static final int YYINITIAL = 0;
+ public static final int ARGS = 10;
+ public static final int FUNNAME = 6;
+ public static final int FUNCTION = 2;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\11\0\1\1\1\2\25\0\1\1\1\7\1\0\2\7\1\5\2\0" +
+ "\1\25\1\11\2\0\1\26\1\0\1\4\1\3\12\6\1\0\1\12" +
+ "\1\0\1\10\1\0\1\7\1\0\32\7\1\22\1\0\1\27\1\0" +
+ "\1\7\1\0\2\7\1\16\1\24\1\23\1\13\2\7\1\20\4\7" +
+ "\1\15\1\21\4\7\1\17\1\14\5\7\uff85\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 =
+ "\7\0\4\1\1\2\1\3\1\4\1\5\1\1\1\6" +
+ "\1\7\1\1\1\10\1\1\1\11\1\12\1\4\1\1" +
+ "\1\13\1\4\2\1\1\14\1\1\2\15\12\0\1\16" +
+ "\10\0\1\17\2\0\1\20\15\0\1\21\3\0\1\22";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[74];
+ 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;
+ }
+
+
+ /* 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"
+ };
+
+ /** 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;
+
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
+
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
+
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
+
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
+
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
+
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /* user code: */
+ List<String> returnValues;
+ List<String> argsValues;
+ String functionName;
+ int end;
+
+ private ScilabDocument doc;
+ private String id;
+ private boolean inRETS;
+
+ public FunctionScanner(ScilabDocument doc) {
+ this.doc = doc;
+ returnValues = new ArrayList();
+ argsValues = new ArrayList();
+ }
+
+ public String getFunctionName() {
+ return functionName;
+ }
+
+ public List<String> getReturnValues() {
+ return returnValues;
+ }
+
+ public List<String> getArgsValues() {
+ return argsValues;
+ }
+
+ public int getLineType(int p0, int p1) {
+ try {
+ returnValues = new ArrayList();
+ argsValues = new ArrayList();
+ end = p1;
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ yybegin(BROKEN);
+ int broken = yylex();
+
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ while (true) {
+ int ret = yylex();
+ if (ret != ScilabDocument.ScilabLeafElement.BROKEN) {
+ return ret | broken;
+ }
+ Element elem = doc.getDefaultRootElement();
+ int start = end + 1;
+ elem = elem.getElement(elem.getElementIndex(end + 1));
+ end = elem.getEndOffset();
+ yyreset(new ScilabDocumentReader(doc, elem.getStartOffset(), end));
+ if (inRETS) {
+ inRETS = false;
+ yybegin(RETS);
+ } else {
+ yybegin(ARGS);
+ }
+ }
+ } catch (IOException e) {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ }
+
+ public FunctionInfo getFunctionInfo() {
+ return new FunctionInfo(functionName, returnValues, argsValues);
+ }
+
+ public class FunctionInfo {
+ public String functionName;
+ public List<String> returnValues;
+ public List<String> argsValues;
+
+ public FunctionInfo(String name, List ret, List args) {
+ this.functionName = name;
+ this.returnValues = ret;
+ this.argsValues = args;
+ }
+ }
+
+
+ /**
+ * 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 FunctionScanner(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 FunctionScanner(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;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
+ }
+
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzCurrentPos * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ }
+
+ /* finally: fill the buffer with new input */
+ int numRead = zzReader.read(zzBuffer, zzEndRead,
+ zzBuffer.length - zzEndRead);
+
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ return false;
+ }
+ // unlikely but not impossible: read 0 characters, but not at end of stream
+ if (numRead == 0) {
+ int c = zzReader.read();
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char) c;
+ return false;
+ }
+ }
+
+ // numRead < 0
+ return true;
+ }
+
+
+ /**
+ * 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();
+ }
+ }
+
+
+ /**
+ * 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
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ 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 <tt>pos</tt> 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 int 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;
+
+
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
+
+ yychar += zzMarkedPosL - zzStartRead;
+
+ zzAction = -1;
+
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ zzState = ZZ_LEXSTATE[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++];
+ }
+ }
+ zzInput = zzCMapL[zzInput];
+
+ boolean zzIsFinal = false;
+ boolean zzNoLookAhead = false;
+
+ zzForNext: {
+ switch (zzState) {
+ case 0:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ zzState = 8;
+ break zzForNext;
+ case 11:
+ zzIsFinal = true;
+ zzState = 9;
+ break zzForNext;
+ case 19:
+ zzIsFinal = true;
+ zzState = 10;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ }
+
+ case 1:
+ switch (zzInput) {
+ case 5:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ zzIsFinal = true;
+ zzState = 11;
+ break zzForNext;
+ case 18:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 12;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ }
+
+ case 2:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ zzState = 13;
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 14;
+ break zzForNext;
+ case 3:
+ zzIsFinal = true;
+ zzState = 15;
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 16;
+ break zzForNext;
+ case 21:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 17;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ }
+
+ case 3:
+ switch (zzInput) {
+ case 0:
+ case 4:
+ case 6:
+ case 8:
+ case 9:
+ case 10:
+ case 18:
+ case 22:
+ case 23:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ case 1:
+ zzIsFinal = true;
+ zzState = 18;
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 19;
+ break zzForNext;
+ case 3:
+ zzIsFinal = true;
+ zzState = 20;
+ break zzForNext;
+ case 21:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 22;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzState = 21;
+ break zzForNext;
+ }
+
+ case 4:
+ switch (zzInput) {
+ case 0:
+ case 2:
+ case 3:
+ case 6:
+ case 8:
+ case 9:
+ case 10:
+ case 18:
+ case 21:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ case 1:
+ zzIsFinal = true;
+ zzState = 23;
+ break zzForNext;
+ case 4:
+ zzIsFinal = true;
+ zzState = 24;
+ break zzForNext;
+ case 22:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 26;
+ break zzForNext;
+ case 23:
+ zzIsFinal = true;
+ zzState = 27;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzState = 25;
+ break zzForNext;
+ }
+
+ case 5:
+ switch (zzInput) {
+ case 0:
+ case 2:
+ case 3:
+ case 6:
+ case 8:
+ case 10:
+ case 18:
+ case 21:
+ case 23:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ case 1:
+ zzIsFinal = true;
+ zzState = 23;
+ break zzForNext;
+ case 22:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 26;
+ break zzForNext;
+ case 4:
+ zzIsFinal = true;
+ zzState = 28;
+ break zzForNext;
+ case 9:
+ zzIsFinal = true;
+ zzState = 30;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzState = 29;
+ break zzForNext;
+ }
+
+ case 6:
+ switch (zzInput) {
+ case 4:
+ zzIsFinal = true;
+ zzState = 32;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzState = 31;
+ break zzForNext;
+ }
+
+ case 8:
+ switch (zzInput) {
+ case 1:
+ zzState = 33;
+ break zzForNext;
+ case 11:
+ zzState = 34;
+ break zzForNext;
+ case 19:
+ zzState = 35;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 9:
+ switch (zzInput) {
+ case 12:
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 10:
+ switch (zzInput) {
+ case 13:
+ zzState = 37;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 11:
+ switch (zzInput) {
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 13:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 16;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 15:
+ switch (zzInput) {
+ case 3:
+ zzState = 38;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 16:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 18:
+ switch (zzInput) {
+ case 21:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 22;
+ break zzForNext;
+ case 1:
+ zzState = 39;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 20:
+ switch (zzInput) {
+ case 3:
+ zzState = 40;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 21:
+ switch (zzInput) {
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 23:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 24:
+ switch (zzInput) {
+ case 4:
+ zzState = 41;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 25:
+ switch (zzInput) {
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 27:
+ switch (zzInput) {
+ case 1:
+ zzState = 42;
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 43;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 28:
+ switch (zzInput) {
+ case 4:
+ zzState = 44;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 29:
+ switch (zzInput) {
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 30:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 19;
+ break zzForNext;
+ case 1:
+ case 10:
+ case 22:
+ zzState = 45;
+ break zzForNext;
+ case 3:
+ zzState = 46;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 31:
+ switch (zzInput) {
+ case 4:
+ zzState = 48;
+ break zzForNext;
+ default:
+ zzState = 47;
+ break zzForNext;
+ }
+
+ case 32:
+ switch (zzInput) {
+ case 4:
+ zzState = 44;
+ break zzForNext;
+ default:
+ zzState = 47;
+ break zzForNext;
+ }
+
+ case 33:
+ switch (zzInput) {
+ case 1:
+ break zzForNext;
+ case 11:
+ zzState = 34;
+ break zzForNext;
+ case 19:
+ zzState = 35;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 34:
+ switch (zzInput) {
+ case 12:
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 35:
+ switch (zzInput) {
+ case 13:
+ zzState = 37;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 36:
+ switch (zzInput) {
+ case 13:
+ zzState = 49;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 37:
+ switch (zzInput) {
+ case 20:
+ zzState = 50;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 38:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 14;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 39:
+ switch (zzInput) {
+ case 21:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 22;
+ break zzForNext;
+ case 1:
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 40:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 19;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 41:
+ switch (zzInput) {
+ case 4:
+ break zzForNext;
+ case 1:
+ zzState = 51;
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 52;
+ break zzForNext;
+ case 3:
+ zzState = 53;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 42:
+ switch (zzInput) {
+ case 1:
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 43;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 43:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 44:
+ switch (zzInput) {
+ case 4:
+ break zzForNext;
+ case 1:
+ zzState = 54;
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 55;
+ break zzForNext;
+ case 3:
+ zzState = 56;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 45:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 19;
+ break zzForNext;
+ case 1:
+ case 10:
+ case 22:
+ break zzForNext;
+ case 3:
+ zzState = 46;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 46:
+ switch (zzInput) {
+ case 3:
+ zzState = 40;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 47:
+ switch (zzInput) {
+ case 4:
+ zzState = 48;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 48:
+ switch (zzInput) {
+ case 4:
+ zzState = 44;
+ break zzForNext;
+ default:
+ zzState = 47;
+ break zzForNext;
+ }
+
+ case 49:
+ switch (zzInput) {
+ case 14:
+ zzState = 57;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 50:
+ switch (zzInput) {
+ case 11:
+ zzState = 58;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 51:
+ switch (zzInput) {
+ case 1:
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 52;
+ break zzForNext;
+ case 3:
+ zzState = 53;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 53:
+ switch (zzInput) {
+ case 3:
+ zzState = 59;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 54:
+ switch (zzInput) {
+ case 1:
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 55;
+ break zzForNext;
+ case 3:
+ zzState = 56;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 56:
+ switch (zzInput) {
+ case 3:
+ zzState = 60;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 57:
+ switch (zzInput) {
+ case 15:
+ zzState = 61;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 58:
+ switch (zzInput) {
+ case 12:
+ zzState = 62;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 59:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 52;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 60:
+ switch (zzInput) {
+ case 2:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 55;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 61:
+ switch (zzInput) {
+ case 16:
+ zzState = 63;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 62:
+ switch (zzInput) {
+ case 13:
+ zzState = 64;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 63:
+ switch (zzInput) {
+ case 17:
+ zzState = 65;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 64:
+ switch (zzInput) {
+ case 14:
+ zzState = 66;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 65:
+ switch (zzInput) {
+ case 13:
+ zzState = 67;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 66:
+ switch (zzInput) {
+ case 15:
+ zzState = 68;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 67:
+ switch (zzInput) {
+ case 18:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 12;
+ break zzForNext;
+ case 1:
+ zzIsFinal = true;
+ zzState = 69;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 68:
+ switch (zzInput) {
+ case 16:
+ zzState = 70;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 69:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 70:
+ switch (zzInput) {
+ case 17:
+ zzState = 71;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 71:
+ switch (zzInput) {
+ case 13:
+ zzState = 72;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 72:
+ switch (zzInput) {
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 19:
+ case 20:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 73;
+ break zzForNext;
+ }
+
+ default:
+ // if this is ever reached, there is a serious bug in JFlex
+ zzScanError(ZZ_UNKNOWN_ERROR);
+ break;
+ }
+ }
+
+ if ( zzIsFinal ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( zzNoLookAhead ) {
+ break zzForAction;
+ }
+ }
+
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 5 :
+ {
+ functionName = id;
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+ case 19:
+ break;
+ case 15: {
+ inRETS = true;
+ return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+ case 20:
+ break;
+ case 9: {
+ functionName = yytext();
+ }
+ case 21:
+ break;
+ case 13: {
+ return 0;
+ }
+ case 22:
+ break;
+ case 6: {
+ returnValues.add(id);
+ yybegin(FUNNAME);
+ }
+ case 23:
+ break;
+ case 1: {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ case 24:
+ break;
+ case 16: {
+ return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+ case 25:
+ break;
+ case 12: {
+ argsValues.add(yytext());
+ }
+ case 26:
+ break;
+ case 2: {
+ id = yytext();
+ yybegin(TYPEID);
+ }
+ case 27:
+ break;
+ case 10: {
+ yybegin(ARGS);
+ }
+ case 28:
+ break;
+ case 18: {
+ return ScilabDocument.ScilabLeafElement.ENDFUN;
+ }
+ case 29:
+ break;
+ case 3: {
+ yybegin(RETS);
+ }
+ case 30:
+ break;
+ case 8: {
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+ case 31:
+ break;
+ case 7: {
+ functionName = id;
+ yybegin(ARGS);
+ }
+ case 32:
+ break;
+ case 17: {
+ yybegin(FUNCTION);
+ }
+ case 33:
+ break;
+ case 11: {
+ returnValues.add(yytext());
+ }
+ case 34:
+ break;
+ case 14: {
+ yybegin(FUNNAME);
+ }
+ case 35:
+ break;
+ case 4: {
+ }
+ case 36:
+ break;
+ default:
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ {
+ return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ } else {
+ zzScanError(ZZ_NO_MATCH);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/HelpOnTypingManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/HelpOnTypingManager.java
new file mode 100755
index 000000000..c9b610cde
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/HelpOnTypingManager.java
@@ -0,0 +1,249 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.event.KeyListener;
+import java.awt.event.KeyEvent;
+
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.commons.xml.XConfiguration;
+
+/**
+ * This class handles the help on typing
+ * @author Calixte DENIZET
+ */
+public final class HelpOnTypingManager implements KeyListener {
+
+ private static HelpOnTypingManager instance;
+ private boolean openers;
+ private boolean keywords;
+
+ /**
+ * Constructor
+ */
+ private HelpOnTypingManager() {
+ super();
+ instance = this;
+ openers = SciNotesOptions.getSciNotesDisplay().autoCompleteOpeners;
+ keywords = SciNotesOptions.getSciNotesDisplay().autoCompleteKeywords;
+ }
+
+ /**
+ * Clean
+ */
+ public static void close() {
+ instance = null;
+ }
+
+ /**
+ * @return the singleton instance of HelpOnTypingManager
+ */
+ public static HelpOnTypingManager getInstance() {
+ if (instance == null) {
+ instance = new HelpOnTypingManager();
+ }
+
+ return instance;
+ }
+
+ /**
+ * @param b true if autocompletion on '(', '{', ...
+ */
+ public void enableOpeners(boolean b) {
+ openers = b;
+ SciNotesOptions.getSciNotesDisplay().autoCompleteOpeners = b;
+ XConfiguration.set(XConfiguration.getXConfigurationDocument(), SciNotesOptions.DISPLAYPATH + "/@auto-complete-openers", Boolean.toString(b));
+ }
+
+ /**
+ * @param b true if autocompletion on 'if', 'function', ...
+ */
+ public void enableKeywords(boolean b) {
+ keywords = b;
+ SciNotesOptions.getSciNotesDisplay().autoCompleteKeywords = b;
+ XConfiguration.set(XConfiguration.getXConfigurationDocument(), SciNotesOptions.DISPLAYPATH + "/@auto-complete-keywords", Boolean.toString(b));
+ }
+
+ /**
+ * @return true if help on typing is active
+ */
+ public boolean isActive() {
+ return openers || keywords;
+ }
+
+ /**
+ * @return true if help on typing for the openers is active
+ */
+ public boolean isOpenersActive() {
+ return openers;
+ }
+
+ /**
+ * @return true if help on typing for the openers is active
+ */
+ public boolean isKeywordsActive() {
+ return keywords;
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void keyPressed(KeyEvent e) { }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void keyReleased(KeyEvent e) { }
+
+ /**
+ * Called when a key is typed
+ * @param e the event
+ */
+ public void keyTyped(KeyEvent e) {
+ char c = e.getKeyChar();
+ ScilabEditorPane textPane = ScilabEditorPane.getFocusedPane();
+ ScilabDocument doc = (ScilabDocument) textPane.getDocument();
+ if (isActive() && c != KeyEvent.CHAR_UNDEFINED && textPane.getSelectionStart() == textPane.getSelectionEnd()) {
+ int pos = textPane.getCaretPosition();
+ if (c == ' ' && e.getModifiers() == 0) {
+ int end = doc.getDefaultRootElement().getElement(doc.getDefaultRootElement().getElementIndex(pos)).getEndOffset() - 1;
+ /* the following test is used to know if an insertion in the line is done */
+ if (pos == end) {
+ try {
+ doc.insertString(pos, " ", null);
+ e.consume();
+ KeywordEvent kwe = textPane.getKeywordEvent(pos);
+ int[] ret;
+ String kw;
+ switch (kwe.getType()) {
+ case ScilabLexerConstants.OSKEYWORD :
+ kw = doc.getText(kwe.getStart(), kwe.getLength());
+ if ("if".equals(kw)) {
+ if (complete("end", textPane, doc, pos)) {
+ doc.insertString(pos + 1, " then\nend", null);
+ ret = textPane.getIndentManager().indentDoc(pos + 1, pos + 9);
+ textPane.setCaretPosition(ret[0]);
+ }
+ } else if (!"end".equals(kw)) {
+ if (complete("end", textPane, doc, pos)) {
+ doc.insertString(pos + 1, "\nend", null);
+ ret = textPane.getIndentManager().indentDoc(pos + 1, pos + 4);
+ textPane.setCaretPosition(ret[0]);
+ }
+ }
+ break;
+ case ScilabLexerConstants.SKEYWORD :
+ kw = doc.getText(kwe.getStart(), kwe.getLength());
+ if ("elseif".equals(kw)) {
+ doc.insertString(pos + 1, " then", null);
+ textPane.setCaretPosition(pos + 1);
+ }
+ break;
+ case ScilabLexerConstants.FKEYWORD :
+ /* We have 'function' or 'endfunction' */
+ if ("f".equals(doc.getText(kwe.getStart(), 1)) && complete("endfunction", textPane, doc, pos)) {
+ doc.insertString(pos + 1, "()\nendfunction", null);
+ textPane.getIndentManager().indentDoc(pos + 3, pos + 14);
+ textPane.setCaretPosition(pos + 1);
+ }
+ break;
+ default :
+ }
+ } catch (BadLocationException exc) {
+ System.err.println(exc);
+ }
+ }
+ } else if (openers) {
+ if (SciNotesOptions.getSciNotesPreferences().completeAtEOL) {
+ int end = doc.getDefaultRootElement().getElement(doc.getDefaultRootElement().getElementIndex(pos)).getEndOffset() - 1;
+ if (pos != end) {
+ return;
+ }
+ }
+
+ try {
+ String str;
+ switch (c) {
+ case '(' :
+ if (complete(')', textPane, doc, pos)) {
+ str = "()";
+ } else {
+ return;
+ }
+ break;
+ case '[' :
+ if (complete(']', textPane, doc, pos)) {
+ str = "[]";
+ } else {
+ return;
+ }
+ break;
+ case '{' :
+ if (complete('}', textPane, doc, pos)) {
+ str = "{}";
+ } else {
+ return;
+ }
+ break;
+ case '\"' :
+ str = "\"\"";
+ break;
+ default :
+ return;
+ }
+
+ doc.insertString(pos, str, null);
+ e.consume();
+ textPane.setCaretPosition(pos + 1);
+ } catch (BadLocationException exc) {
+ System.err.println(exc);
+ }
+ }
+ }
+ }
+
+ private static boolean complete(char next, ScilabEditorPane pane, ScilabDocument doc, int pos) throws BadLocationException {
+ MatchingBlockManager matchLR = pane.getMatchingBlockManager(true);
+ MatchingBlockScanner scanner = matchLR.getScanner();
+ MatchingBlockScanner.MatchingPositions mpos = scanner.getNextBlock(pos, true);
+ if (mpos != null) {
+ char mc = doc.getText(mpos.secondB, 1).charAt(0);
+ if (mc != next) {
+ return true;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private static boolean complete(String next, ScilabEditorPane pane, ScilabDocument doc, int pos) throws BadLocationException {
+ MatchingBlockManager matchLR = pane.getMatchingBlockManager(true);
+ MatchingBlockScanner scanner = matchLR.getScanner();
+ MatchingBlockScanner.MatchingPositions mpos = scanner.getNextBlock(pos, true);
+ if (mpos != null) {
+ String ms = doc.getText(mpos.secondB, mpos.secondE - mpos.secondB);
+ if (!next.equals(ms)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentManager.java
new file mode 100755
index 000000000..7c4948a6a
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentManager.java
@@ -0,0 +1,246 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import javax.swing.text.Element;
+import javax.swing.text.Segment;
+import javax.swing.text.BadLocationException;
+
+/**
+ * This class handle the indentation level
+ * @author Calixte DENIZET
+ */
+public class IndentManager {
+
+ private ScilabDocument doc;
+ private Element elem;
+ private IndentScanner scanner;
+ private char indentChar = ' ';
+ private int num = 4;
+ private boolean isPsychoRigid = true;
+
+ /**
+ * Constructor.
+ * @param doc the doc to indent
+ */
+ public IndentManager(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ scanner = new IndentScanner(doc);
+ }
+
+ /**
+ * Set the character to use to indent and if the indentChar is not '\t', then
+ * num represents the number of whites to indent. If the variable isPsychoRigid
+ * is true, then the indent level is strict and the indentation of a line doesn't
+ * depend of the difference the two previous. For example (with isPsychoRigid false):
+ * if a == 1 then
+ * -----if b == 1 then
+ * -----c = 1 ...
+ *
+ * If isPsychoRigid is true and num equals to 3 :
+ * if a == 1 then
+ * -------if b == 1 then
+ * ---c = 1 ...
+ *
+ * The user decided to increase the indent but the PsychoRigid mode says that the
+ * indent level is 3.
+ *
+ * @param indentChar the char use to indent
+ * @param num the number of chars use to indent
+ * @param isPsychoRigid for the psycho-rigid mode
+ */
+ public void setProperties(char indentChar, int num, boolean isPsychoRigid) {
+ this.indentChar = indentChar;
+ if (indentChar != '\t') {
+ this.num = num;
+ } else {
+ this.num = 1;
+ }
+ this.isPsychoRigid = isPsychoRigid;
+ }
+
+ /**
+ * The same as setProperties in keeping the same psycho-rigid mode
+ * @param indentChar the char use to indent
+ * @param num the number of chars use to indent
+ */
+ public void setProperties(char indentChar, int num) {
+ setProperties(indentChar, num, isPsychoRigid);
+ }
+
+ /**
+ * Set the psycho-rigid mode or not
+ * @param b the mode
+ */
+ public void setPsychoRigidMode(boolean b) {
+ this.isPsychoRigid = b;
+ }
+
+ /**
+ * Indent the lines of this doc containing start and end.
+ * @param start the start
+ * @param end the end
+ * @return an array of length 2 containing the new start and the new end of the indented text
+ */
+ public int[] indentDoc(int start, int end) {
+ try {
+ if (start > end ) {
+ end = start;
+ }
+ int[] level = new int[2];
+ int lineStart = elem.getElementIndex(start);
+ int lineEnd = elem.getElementIndex(end);
+ int[] tabs = new int[lineEnd - lineStart + 1];
+ int[] ret = new int[2];
+
+ int[] ind = new int[2];
+
+ getNums(lineStart - 1, ind);
+ if (lineStart > 0) {
+ scanner.getIndentLevel(elem.getElement(lineStart - 1).getStartOffset(), level);
+ tabs[0] = ind[1] + level[1] * num;
+ }
+
+ for (int lineNumber = 0; lineNumber <= lineEnd - lineStart; lineNumber++) {
+ int pos = elem.getElement(lineNumber + lineStart).getEndOffset() - 1;
+ scanner.getIndentLevel(pos, level);
+ tabs[lineNumber] = Math.max(tabs[lineNumber] - level[0] * num, 0);
+ if (lineNumber != lineEnd - lineStart) {
+ tabs[lineNumber + 1] = tabs[lineNumber] + level[1] * num;
+ }
+ }
+
+ Segment seg = new Segment();
+ StringBuffer buffer = new StringBuffer();
+ int e = start;
+
+ for (int lineNumber = lineStart; lineNumber <= lineEnd; lineNumber++) {
+ if (lineNumber < lineEnd) {
+ e = elem.getElement(lineNumber).getEndOffset();
+ } else {
+ e = elem.getElement(lineNumber).getEndOffset() - 1;
+ }
+ int t = elem.getElement(lineNumber).getStartOffset() + scanner.getTabsAtBeginning(lineNumber);
+ if (e - t + 1 == 0) {
+ e = t;
+ }
+ doc.getText(t, e - t, seg);
+ ret[0] = start;
+ if (e > t + 1) {
+ char[] str = new char[tabs[lineNumber - lineStart]];
+ for (int i = 0; i < str.length; i++) {
+ str[i] = indentChar;
+ }
+ buffer.append(str);
+ if (lineNumber == lineStart) {
+ ret[0] = start + str.length - scanner.getTabsAtBeginning(lineNumber);
+ }
+ }
+ buffer.append(seg.array, seg.offset, seg.count);
+ }
+
+ int sstart = elem.getElement(lineStart).getStartOffset();
+ doc.replace(sstart, e - sstart, buffer.toString(), null);
+ ret[1] = sstart + buffer.length() - (e - end - 1);
+ return ret;
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ return null;
+ }
+ }
+
+ /**
+ * Indent the line of this doc containing position.
+ * @param position the position in the doc
+ */
+ public void indentDoc(int position) {
+ if (doc.getAutoIndent()) {
+ int[] level = new int[2];
+ int[] ind = new int[2];
+
+ try {
+ int lineNumber = elem.getElementIndex(position);
+ int pos = elem.getElement(lineNumber).getEndOffset() - 1;
+
+ /* - level[0] is the left shift (else, elseif, ...) for the current line
+ - level[1] is the right shift for the next line */
+ scanner.getIndentLevel(pos, level);
+
+ int remove = 0;
+ if (lineNumber >= 0) {
+ /* - ind[0] is equal to the number of "\t" or " " of the previous line
+ - ind[1] for the current line */
+ getNums(lineNumber, ind);
+ if (level[0] > 0 && ind[0] <= ind[1]) {
+ remove = level[0] * num;
+
+ if (lineNumber > 0 && ind[0] == ind[1]) {
+ /* Bug 7550 :
+ prev and cur line are at the same level
+ if cur should be indented, then we don't remove tabs */
+ int posp = elem.getElement(lineNumber - 1).getEndOffset() - 1;
+ int[] levelp = new int[2];
+ scanner.getIndentLevel(posp, levelp);
+ if (levelp[1] != 0) {
+ remove = 0;
+ }
+ }
+
+ if (ind[1] < remove) {
+ remove = ind[1];
+ }
+ if (remove != 0) {
+ int startL = elem.getElement(lineNumber).getStartOffset();
+ doc.remove(startL, remove);
+ }
+ }
+ }
+
+ int len = ind[1] + level[1] * num - remove;
+ char[] str = new char[len];
+ for (int i = 0; i < len; i++) {
+ str[i] = indentChar;
+ }
+
+ doc.insertString(pos + 1 - remove, new String(str), null);
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+ }
+
+ /**
+ * @return the scanner used by this IndentManager
+ */
+ public IndentScanner getIndentScanner() {
+ return scanner;
+ }
+
+ /**
+ * Calculate the indentation of the two previous lines and the number of chars
+ * used to indent is modified if we are not in psycho-rigid mode
+ * @param lineNumber the number of the line
+ * @param ind an array of length 2 which will contain the indent level of the line and the previous
+ */
+ private void getNums(int lineNumber, int[] ind) {
+ ind[1] = scanner.getIndentNumber(lineNumber, indentChar);
+ ind[0] = scanner.getIndentNumber(lineNumber - 1, indentChar);
+ if (!isPsychoRigid) {
+ int m = ind[1] - ind[0];
+ if (m > 0) {
+ num = m;
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentScanner.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentScanner.java
new file mode 100755
index 000000000..c5d09edee
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/IndentScanner.java
@@ -0,0 +1,1925 @@
+/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:23 */
+
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import javax.swing.text.Element;
+import javax.swing.text.BadLocationException;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 23/05/12 15:23 from the specification file
+ * <tt>./jflex/indentation.jflex</tt>
+ */
+public final class IndentScanner {
+
+ /** 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 BEG = 8;
+ public static final int TAB = 6;
+ public static final int WHITE = 4;
+ public static final int YYINITIAL = 0;
+ public static final int INDENT = 2;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 5
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\11\0\1\31\1\1\2\0\1\4\22\0\1\30\1\3\1\6\3\3" +
+ "\1\0\1\5\1\0\1\7\5\0\1\2\12\3\5\0\1\3\1\0" +
+ "\32\3\2\0\1\7\1\0\1\3\1\0\1\27\1\3\1\13\1\26" +
+ "\1\23\1\10\1\3\1\21\1\15\2\3\1\22\1\3\1\12\1\16" +
+ "\2\3\1\17\1\25\1\14\1\11\1\3\1\20\1\3\1\24\1\3" +
+ "\2\0\1\7\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 =
+ "\2\0\2\1\2\0\1\2\1\3\13\2\2\1\1\4" +
+ "\11\0\1\2\4\0\1\4\17\0\1\2\1\0\1\5" +
+ "\6\0\1\2\4\0\1\6\1\0\1\2\1\6\4\0" +
+ "\1\2\2\0\2\2\4\0\1\2\2\0\1\2\1\0" +
+ "\3\2\1\5";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[92];
+ 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;
+ }
+
+
+ /* 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"
+ };
+
+ /** 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;
+
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
+
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
+
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
+
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
+
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
+
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /* user code: */
+ private ScilabDocument doc;
+ private Element elem;
+
+ public IndentScanner(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ }
+
+ public int getIndentNumber(int lineNumber, char type) {
+ if (lineNumber < 0) {
+ return 0;
+ }
+ try {
+ Element line = elem.getElement(lineNumber);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ switch (type) {
+ case ' ':
+ yybegin(WHITE);
+ break;
+ case '\t':
+ yybegin(TAB);
+ break;
+ default:
+ yybegin(WHITE);
+ }
+ return yylex();
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+
+ public int getTabsAtBeginning(int pos) {
+ Element line = elem.getElement(pos);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(BEG);
+ if (yylex() == 1) {
+ return yylength();
+ }
+ } catch (IOException e) {
+ return 0;
+ }
+ return 0;
+ }
+
+ public void getIndentLevel(int pos, int[] level) {
+ Element line = elem.getElement(elem.getElementIndex(pos));
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ level[0] = 0;
+ level[1] = 0;
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(INDENT);
+ do {
+ switch (yylex()) {
+ case 0:
+ break;
+ case 1:
+ level[1]++;
+ break;
+ case 2:
+ if (level[1] > 0) {
+ level[1]--;
+ } else {
+ level[0]++;
+ }
+ break;
+ case 3:
+ if (level[1] == 0) {
+ level[0]++;
+ level[1]++;
+ }
+ }
+ } while (zzMarkedPos != 0);
+ } catch (IOException e) { }
+ }
+
+
+ /**
+ * 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 IndentScanner(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 IndentScanner(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 < 106) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do {
+ map[j++] = value;
+ } while (--count > 0);
+ }
+ return map;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
+ }
+
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzCurrentPos * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ }
+
+ /* finally: fill the buffer with new input */
+ int numRead = zzReader.read(zzBuffer, zzEndRead,
+ zzBuffer.length - zzEndRead);
+
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ return false;
+ }
+ // unlikely but not impossible: read 0 characters, but not at end of stream
+ if (numRead == 0) {
+ int c = zzReader.read();
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char) c;
+ return false;
+ }
+ }
+
+ // numRead < 0
+ return true;
+ }
+
+
+ /**
+ * 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();
+ }
+ }
+
+
+ /**
+ * 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
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ 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 <tt>pos</tt> 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 occurred 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 int 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;
+
+
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
+
+ yychar += zzMarkedPosL - zzStartRead;
+
+ if (zzMarkedPosL > zzStartRead) {
+ switch (zzBufferL[zzMarkedPosL - 1]) {
+ case '\n':
+ case '\u000B':
+ case '\u000C':
+ case '\u0085':
+ case '\u2028':
+ case '\u2029':
+ zzAtBOL = true;
+ break;
+ case '\r':
+ if (zzMarkedPosL < zzEndReadL) {
+ zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
+ } else if (zzAtEOF) {
+ zzAtBOL = false;
+ } else {
+ boolean eof = zzRefill();
+ zzMarkedPosL = zzMarkedPos;
+ zzEndReadL = zzEndRead;
+ zzBufferL = zzBuffer;
+ if (eof) {
+ zzAtBOL = false;
+ } else {
+ zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
+ }
+ }
+ break;
+ default:
+ zzAtBOL = false;
+ }
+ }
+ zzAction = -1;
+
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ if (zzAtBOL) {
+ zzState = ZZ_LEXSTATE[zzLexicalState + 1];
+ } else {
+ zzState = ZZ_LEXSTATE[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++];
+ }
+ }
+ zzInput = zzCMapL[zzInput];
+
+ boolean zzIsFinal = false;
+ boolean zzNoLookAhead = false;
+
+ zzForNext: {
+ switch (zzState) {
+ case 1:
+ switch (zzInput) {
+ case 0:
+ case 4:
+ case 24:
+ case 25:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 1:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ case 2:
+ zzIsFinal = true;
+ zzState = 8;
+ break zzForNext;
+ case 5:
+ case 6:
+ zzIsFinal = true;
+ zzState = 10;
+ break zzForNext;
+ case 7:
+ zzIsFinal = true;
+ zzState = 11;
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 12;
+ break zzForNext;
+ case 11:
+ zzIsFinal = true;
+ zzState = 13;
+ break zzForNext;
+ case 12:
+ zzIsFinal = true;
+ zzState = 14;
+ break zzForNext;
+ case 13:
+ zzIsFinal = true;
+ zzState = 15;
+ break zzForNext;
+ case 16:
+ zzIsFinal = true;
+ zzState = 16;
+ break zzForNext;
+ case 19:
+ zzIsFinal = true;
+ zzState = 17;
+ break zzForNext;
+ case 21:
+ zzIsFinal = true;
+ zzState = 18;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzState = 9;
+ break zzForNext;
+ }
+
+ case 2:
+ switch (zzInput) {
+ case 24:
+ zzIsFinal = true;
+ zzState = 19;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ }
+
+ case 3:
+ switch (zzInput) {
+ case 25:
+ zzIsFinal = true;
+ zzState = 20;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 7;
+ break zzForNext;
+ }
+
+ case 4:
+ switch (zzInput) {
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ }
+
+ case 5:
+ switch (zzInput) {
+ case 24:
+ case 25:
+ zzIsFinal = true;
+ zzState = 21;
+ break zzForNext;
+ default:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ }
+
+ case 8:
+ switch (zzInput) {
+ case 2:
+ zzState = 22;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 9:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 10:
+ switch (zzInput) {
+ case 5:
+ case 6:
+ zzIsFinal = true;
+ zzState = 31;
+ break zzForNext;
+ case 1:
+ case 4:
+ break zzForAction;
+ default:
+ zzState = 30;
+ break zzForNext;
+ }
+
+ case 11:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 12:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 9:
+ zzState = 32;
+ break zzForNext;
+ case 14:
+ zzState = 33;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 13:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 23:
+ zzState = 34;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 14:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 15:
+ zzState = 35;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 15:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 8:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 16:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 17:
+ zzState = 37;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 17:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 19:
+ zzState = 28;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 10:
+ zzState = 38;
+ break zzForNext;
+ case 18:
+ zzState = 39;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 18:
+ switch (zzInput) {
+ case 5:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ case 8:
+ zzState = 23;
+ break zzForNext;
+ case 11:
+ zzState = 24;
+ break zzForNext;
+ case 12:
+ zzState = 25;
+ break zzForNext;
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ case 16:
+ zzState = 27;
+ break zzForNext;
+ case 21:
+ zzState = 29;
+ break zzForNext;
+ case 19:
+ zzState = 40;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 19:
+ switch (zzInput) {
+ case 24:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 20:
+ switch (zzInput) {
+ case 25:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 21:
+ switch (zzInput) {
+ case 24:
+ case 25:
+ zzIsFinal = true;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 22:
+ switch (zzInput) {
+ case 1:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForNext;
+ }
+
+ case 23:
+ switch (zzInput) {
+ case 9:
+ zzState = 41;
+ break zzForNext;
+ case 14:
+ zzState = 42;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 24:
+ switch (zzInput) {
+ case 23:
+ zzState = 43;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 25:
+ switch (zzInput) {
+ case 15:
+ zzState = 44;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 26:
+ switch (zzInput) {
+ case 8:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 27:
+ switch (zzInput) {
+ case 17:
+ zzState = 45;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 28:
+ switch (zzInput) {
+ case 10:
+ zzState = 46;
+ break zzForNext;
+ case 18:
+ zzState = 47;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 29:
+ switch (zzInput) {
+ case 19:
+ zzState = 48;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 30:
+ switch (zzInput) {
+ case 5:
+ case 6:
+ zzIsFinal = true;
+ zzState = 31;
+ break zzForNext;
+ case 1:
+ case 4:
+ break zzForAction;
+ default:
+ break zzForNext;
+ }
+
+ case 31:
+ switch (zzInput) {
+ case 5:
+ case 6:
+ zzState = 30;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 32:
+ switch (zzInput) {
+ case 10:
+ zzState = 49;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 33:
+ switch (zzInput) {
+ case 15:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 34:
+ switch (zzInput) {
+ case 12:
+ zzState = 50;
+ break zzForNext;
+ case 21:
+ zzState = 51;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 35:
+ switch (zzInput) {
+ case 20:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 36:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 37:
+ switch (zzInput) {
+ case 13:
+ zzState = 53;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 38:
+ switch (zzInput) {
+ case 22:
+ zzIsFinal = true;
+ zzState = 54;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 39:
+ switch (zzInput) {
+ case 21:
+ zzState = 55;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 40:
+ switch (zzInput) {
+ case 10:
+ zzState = 46;
+ break zzForNext;
+ case 18:
+ zzState = 56;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 41:
+ switch (zzInput) {
+ case 10:
+ zzState = 57;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 42:
+ switch (zzInput) {
+ case 15:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 43:
+ switch (zzInput) {
+ case 12:
+ zzState = 58;
+ break zzForNext;
+ case 21:
+ zzState = 59;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 44:
+ switch (zzInput) {
+ case 20:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 45:
+ switch (zzInput) {
+ case 13:
+ zzState = 60;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 46:
+ switch (zzInput) {
+ case 22:
+ zzIsFinal = true;
+ zzState = 61;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 47:
+ switch (zzInput) {
+ case 21:
+ zzState = 62;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 48:
+ switch (zzInput) {
+ case 18:
+ zzState = 63;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 49:
+ switch (zzInput) {
+ case 11:
+ zzState = 64;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 50:
+ switch (zzInput) {
+ case 11:
+ zzState = 65;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 51:
+ switch (zzInput) {
+ case 19:
+ zzIsFinal = true;
+ zzState = 66;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 52:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ break zzForNext;
+ }
+
+ case 53:
+ switch (zzInput) {
+ case 18:
+ zzState = 67;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 54:
+ switch (zzInput) {
+ case 8:
+ zzIsFinal = true;
+ zzState = 68;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 55:
+ switch (zzInput) {
+ case 19:
+ zzIsFinal = true;
+ zzState = 69;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 56:
+ switch (zzInput) {
+ case 21:
+ zzState = 62;
+ break zzForNext;
+ case 19:
+ zzState = 70;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 57:
+ switch (zzInput) {
+ case 11:
+ zzState = 71;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 58:
+ switch (zzInput) {
+ case 11:
+ zzState = 72;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 59:
+ switch (zzInput) {
+ case 19:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 60:
+ switch (zzInput) {
+ case 18:
+ zzState = 59;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 61:
+ switch (zzInput) {
+ case 8:
+ zzState = 73;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 62:
+ switch (zzInput) {
+ case 19:
+ zzIsFinal = true;
+ zzState = 74;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 63:
+ switch (zzInput) {
+ case 19:
+ zzState = 75;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 64:
+ switch (zzInput) {
+ case 12:
+ zzState = 76;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 65:
+ switch (zzInput) {
+ case 17:
+ zzIsFinal = true;
+ zzState = 66;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 66:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 67:
+ switch (zzInput) {
+ case 19:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 68:
+ switch (zzInput) {
+ case 9:
+ zzIsFinal = true;
+ zzState = 77;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 69:
+ switch (zzInput) {
+ case 13:
+ zzIsFinal = true;
+ zzState = 78;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 70:
+ switch (zzInput) {
+ case 11:
+ zzState = 79;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 71:
+ switch (zzInput) {
+ case 12:
+ zzState = 80;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 72:
+ switch (zzInput) {
+ case 17:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 73:
+ switch (zzInput) {
+ case 9:
+ zzState = 41;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 74:
+ switch (zzInput) {
+ case 13:
+ zzState = 26;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 75:
+ switch (zzInput) {
+ case 11:
+ zzState = 81;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 76:
+ switch (zzInput) {
+ case 13:
+ zzState = 82;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 77:
+ switch (zzInput) {
+ case 10:
+ zzIsFinal = true;
+ zzState = 83;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 78:
+ switch (zzInput) {
+ case 8:
+ zzIsFinal = true;
+ zzState = 66;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 79:
+ switch (zzInput) {
+ case 12:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 80:
+ switch (zzInput) {
+ case 13:
+ zzState = 84;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 81:
+ switch (zzInput) {
+ case 12:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 82:
+ switch (zzInput) {
+ case 14:
+ zzState = 85;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 83:
+ switch (zzInput) {
+ case 11:
+ zzIsFinal = true;
+ zzState = 86;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 84:
+ switch (zzInput) {
+ case 14:
+ zzState = 87;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 85:
+ switch (zzInput) {
+ case 10:
+ zzIsFinal = true;
+ zzState = 36;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 86:
+ switch (zzInput) {
+ case 12:
+ zzIsFinal = true;
+ zzState = 88;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 87:
+ switch (zzInput) {
+ case 10:
+ zzIsFinal = true;
+ zzNoLookAhead = true;
+ zzState = 6;
+ break zzForNext;
+ default:
+ break zzForAction;
+ }
+
+ case 88:
+ switch (zzInput) {
+ case 13:
+ zzIsFinal = true;
+ zzState = 89;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 89:
+ switch (zzInput) {
+ case 14:
+ zzIsFinal = true;
+ zzState = 90;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 90:
+ switch (zzInput) {
+ case 10:
+ zzIsFinal = true;
+ zzState = 91;
+ break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ case 91:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 24:
+ case 25:
+ break zzForAction;
+ default:
+ zzIsFinal = true;
+ zzState = 52;
+ break zzForNext;
+ }
+
+ default:
+ // if this is ever reached, there is a serious bug in JFlex
+ zzScanError(ZZ_UNKNOWN_ERROR);
+ break;
+ }
+ }
+
+ if ( zzIsFinal ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( zzNoLookAhead ) {
+ break zzForAction;
+ }
+ }
+
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 5 :
+ {
+ return 2;
+ }
+ case 7:
+ break;
+ case 6: {
+ return 3;
+ }
+ case 8:
+ break;
+ case 1: {
+ return yylength();
+ }
+ case 9:
+ break;
+ case 3: {
+ return 0;
+ }
+ case 10:
+ break;
+ case 4: {
+ return 1;
+ }
+ case 11:
+ break;
+ case 2: {
+ }
+ case 12:
+ break;
+ default:
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ {
+ return 0;
+ }
+ } else {
+ zzScanError(ZZ_NO_MATCH);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordAdapter.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordAdapter.java
new file mode 100755
index 000000000..a4636d5a3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordAdapter.java
@@ -0,0 +1,69 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+/**
+ * An adaptater for the interface KeywordListener
+ * @author Calixte DENIZET
+ */
+public abstract class KeywordAdapter implements KeywordListener {
+
+ private int type;
+
+ /**
+ * Constructor
+ * @param type the type of listener (ONMOUSECLICKED or ONMOUSEOVER)
+ */
+ protected KeywordAdapter(int type) {
+ this.type = type;
+ }
+
+ /**
+ * @return the type of this listener
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * Called when a keyword is caught
+ * @param e a KeywordEvent
+ */
+ public abstract void caughtKeyword(KeywordEvent e);
+
+ /**
+ * Class to have a KeywordListener attached to a MouseClicked event
+ */
+ public abstract static class MouseClickedAdapter extends KeywordAdapter {
+
+ /**
+ * Constructor
+ */
+ public MouseClickedAdapter() {
+ super(ONMOUSECLICKED);
+ }
+ }
+
+ /**
+ * Class to have a KeywordListener attached to a MouseOver event
+ */
+ public abstract static class MouseOverAdapter extends KeywordAdapter {
+
+ /**
+ * Constructor
+ */
+ public MouseOverAdapter() {
+ super(ONMOUSEOVER);
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordEvent.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordEvent.java
new file mode 100755
index 000000000..eacd5f87f
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordEvent.java
@@ -0,0 +1,90 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.util.EventObject;
+
+import javax.swing.text.Document;
+import javax.swing.text.BadLocationException;
+
+/**
+ * Used to handle an event generated on a keyword
+ * @author Calixte DENIZET
+ */
+public class KeywordEvent extends EventObject {
+
+ private static final long serialVersionUID = 4505744754595572108L;
+
+ private int start;
+ private int length;
+ private int type;
+ private EventObject event;
+
+ /**
+ * Constructor
+ * @param source the Object where the event occurred
+ * @param event the MouseEvent which generated this event
+ * @param type the type of the keyword
+ * @param start the position of the keyword in the doc
+ * @param length the length of the keyword
+ */
+ public KeywordEvent(Object source, EventObject event, int type, int start, int length) {
+ super(source);
+ this.start = start;
+ this.length = length;
+ this.type = type;
+ this.event = event;
+ }
+
+ /**
+ * @return the position of the keyword in the doc
+ */
+ public int getStart() {
+ return start;
+ }
+
+ /**
+ * @return the length of the keyword
+ */
+ public int getLength() {
+ return length;
+ }
+
+ /**
+ * @return the type of the keyword
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * @return the event which generated this event
+ */
+ public EventObject getEvent() {
+ return event;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ ScilabEditorPane sep = (ScilabEditorPane) getSource();
+ Document doc = sep.getDocument();
+ try {
+ return doc.getText(start, length) + " at position " + start + " with type " + type;
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ return "";
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordListener.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordListener.java
new file mode 100755
index 000000000..62ef32386
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/KeywordListener.java
@@ -0,0 +1,43 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.util.EventListener;
+
+/**
+ * The interface KeywordListener is useful to listen to a keyword event.
+ * @author Calixte DENIZET
+ */
+public interface KeywordListener extends EventListener {
+
+ /**
+ * ONMOUSECLICKED
+ */
+ int ONMOUSECLICKED = 1;
+
+ /**
+ * ONMOUSEOVER
+ */
+ int ONMOUSEOVER = 2;
+
+ /**
+ * Called when a keyword is caught
+ * @param e a KeywordEvent
+ */
+ void caughtKeyword(KeywordEvent e);
+
+ /**
+ * @return the type of the listener
+ */
+ int getType();
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockManager.java
new file mode 100755
index 000000000..d1bfaeace
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockManager.java
@@ -0,0 +1,522 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.util.Set;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultHighlighter;
+import javax.swing.text.Element;
+import javax.swing.text.Highlighter;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.Position;
+import javax.swing.text.View;
+
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * Useful to match opening and closing keywords from left to right or from right to left
+ * @author Calixte DENIZET
+ */
+public class MatchingBlockManager {
+
+ private ScilabDocument doc;
+ private ScilabEditorPane pane;
+ private MatchingBlockScanner scanner;
+ private Highlighter highlighter;
+ private MatchingBlockScanner.MatchingPositions smpos;
+ private Highlighter.HighlightPainter kwPainter;
+ private Highlighter.HighlightPainter ocPainter;
+ private Object first;
+ private Object second;
+ private boolean insideOc;
+ private boolean insideKw;
+ private boolean ocIncluded;
+ private boolean kwIncluded;
+ private boolean lr;
+ private boolean isOCMouseover;
+ private boolean isKWMouseover;
+ private MouseOverMatcher mouseover;
+
+ /**
+ * Constructor
+ * @param doc the doc to highlight
+ * @param pane the ScilabEditorPane associated with this Manager
+ * @param lr if true the matching is from left to right
+ * @param highlighter the highlighter to use
+ */
+ public MatchingBlockManager(ScilabDocument doc, ScilabEditorPane pane, boolean lr, Highlighter highlighter) {
+ this.doc = doc;
+ this.pane = pane;
+ this.scanner = new MatchingBlockScanner(doc);
+ this.highlighter = highlighter;
+ this.lr = lr;
+ }
+
+ /**
+ * @return the scanner used by thhis manager
+ */
+ public MatchingBlockScanner getScanner() {
+ return scanner;
+ }
+
+ /**
+ * Set the painter for the matching open/close keywords (such as '('/')' or '['/']').
+ * The contents between the matchings is highlighted.
+ * @param filled true if a filled rectangle must be used to highlight
+ * @param color the color of the painter
+ **/
+ public void setPainterForOpenClose(boolean filled, boolean included, Color color) {
+ this.insideOc = true;
+ this.ocIncluded = included;
+ update();
+ ocPainter = new InsideLinePainter(filled, false, color);
+ }
+
+ /**
+ * Set the painter for the matching open/close keywords (such as '('/')' or '['/']').
+ * The matchings are highlighted.
+ * @param type one of the three values : ScilabKeywordsPainter.FILLED
+ * ScilabKeywordsPainter.UNDERLINED
+ * ScilabKeywordsPainter.FRAMED
+ * @param color the color of the painter
+ **/
+ public void setPainterForOpenClose(int type, Color color) {
+ this.insideOc = false;
+ update();
+ ocPainter = new ScilabKeywordsPainter(color, type);
+ }
+
+ /**
+ * Set the painter for the matching open/close keywords (such as '('/')' or '['/']').
+ * Properties are found in the file scinotesConfiguration.xml
+ * The contents between the matchings is highlighted.
+ **/
+ public void setPainterForOpenClose() {
+ setPainterForOpenClose(SciNotesOptions.getSciNotesDisplay().bracketsHighlightment, SciNotesOptions.getSciNotesDisplay().bracketsColor);
+ if (SciNotesOptions.getSciNotesDisplay().bracketsOnmouseover) {
+ isOCMouseover = true;
+ activateMouseOver();
+ } else {
+ isOCMouseover = false;
+ disableMouseOver();
+ }
+ }
+
+ /**
+ * Set the painter for the matching keywords (such as 'function' and 'endfunction').
+ * The contents between the matchings is highlighted.
+ * @param filled true if a filled rectangle must be used to highlight
+ * @param color the color of the painter
+ **/
+ public void setPainterForKeywords(boolean filled, boolean strict, boolean included, Color color) {
+ this.insideKw = true;
+ this.kwIncluded = included;
+ update();
+ kwPainter = new InsideLinePainter(filled, strict, color);
+ }
+
+ /**
+ * Set the painter for the matching keywords (such as 'function' and 'endfunction').
+ * The matchings are highlighted.
+ * @param type one of the three values : ScilabKeywordsPainter.FILLED
+ * ScilabKeywordsPainter.UNDERLINED
+ * ScilabKeywordsPainter.FRAMED
+ * @param color the color of the painter
+ **/
+ public void setPainterForKeywords(int type, Color color) {
+ this.insideKw = false;
+ update();
+ kwPainter = new ScilabKeywordsPainter(color, type);
+ }
+
+ /**
+ * Set the painter for the matching keywords.
+ * Properties are found in the file scinotesConfiguration.xml
+ * The contents between the matchings is highlighted.
+ **/
+ public void setPainterForKeywords() {
+ setPainterForKeywords(SciNotesOptions.getSciNotesDisplay().keywordsHighlightment == ScilabKeywordsPainter.FILLED, true, false, SciNotesOptions.getSciNotesDisplay().keywordsColor);
+ if (SciNotesOptions.getSciNotesDisplay().keywordsOnmouseover) {
+ isKWMouseover = true;
+ activateMouseOver();
+ } else {
+ isKWMouseover = false;
+ disableMouseOver();
+ }
+ }
+
+ /**
+ * Set the defaults from scinotesConfiguration.xml
+ */
+ public void setDefaults() {
+ if (SciNotesOptions.getSciNotesDisplay().highlightKeywords) {
+ setPainterForKeywords();
+ }
+ if (SciNotesOptions.getSciNotesDisplay().highlightBrackets) {
+ setPainterForOpenClose();
+ }
+ }
+
+ public void configurationChanged(SciNotesConfiguration.Conf conf) {
+ if (conf.display) {
+ setDefaults();
+ }
+ }
+
+ /**
+ * Activate this MatchingBlockManager to listen to the KeywordEvent generate by a MouseOver.
+ */
+ public void activateMouseOver() {
+ if (mouseover == null) {
+ mouseover = new MouseOverMatcher();
+ }
+ pane.addKeywordListener(mouseover);
+ }
+
+ /**
+ * Activate this MatchingBlockManager to listen to the KeywordEvent generate by a MouseOver.
+ */
+ public void disableMouseOver() {
+ if (mouseover != null && !isOCMouseover && !isKWMouseover) {
+ pane.removeKeywordListener(mouseover);
+ mouseover = null;
+ }
+ }
+
+ /**
+ * Desactivate this MatchingBlockManager to listen to the KeywordEvent generate by a MouseOver.
+ */
+ public void desactivateMouseOver() {
+ if (mouseover != null) {
+ pane.removeKeywordListener(mouseover);
+ mouseover = null;
+ }
+ }
+
+ /**
+ * Remove the highlights if they exist.
+ */
+ public synchronized void update() {
+ if (first != null) {
+ highlighter.removeHighlight(first);
+ first = null;
+ }
+ if (second != null) {
+ highlighter.removeHighlight(second);
+ second = null;
+ }
+ }
+
+ /**
+ * Search the matching keywords
+ * @param tok the type of the token at the position pos in the document
+ * @param pos the positon in the doc
+ */
+ public synchronized void searchMatchingBlock(boolean isMouse, int tok, int pos) {
+ MatchingBlockScanner.MatchingPositions mpos = null;
+ if (ScilabLexerConstants.isMatchable(tok)) {
+ mpos = scanner.getMatchingBlock(pos, lr);
+ }
+ if (mpos != this.smpos) {
+ this.smpos = mpos;
+ try {
+ if (first != null) {
+ highlighter.removeHighlight(first);
+ if (second != null) {
+ highlighter.removeHighlight(second);
+ }
+ }
+ if (mpos != null) {
+ if (ScilabLexerConstants.isOpenClose(tok) && ocPainter != null && (!isMouse || isOCMouseover)) {
+ createHighlights(mpos, insideOc, ocIncluded, ocPainter);
+ } else if (kwPainter != null && (!isMouse || isKWMouseover)) {
+ createHighlights(mpos, insideKw, kwIncluded, kwPainter);
+ }
+ }
+ } catch (NullPointerException e) { }
+ }
+ }
+
+ /**
+ * Create the highlights
+ * @param mpos the position of the matching keywords
+ * @param inside true if we look at the contents between the keywords
+ * @param hp the painter to use
+ */
+ private void createHighlights(MatchingBlockScanner.MatchingPositions mpos,
+ boolean inside, boolean included, Highlighter.HighlightPainter hp) {
+ try {
+ if (!inside) {
+ first = highlighter.addHighlight(mpos.firstB, mpos.firstE, hp);
+ second = highlighter.addHighlight(mpos.secondB, mpos.secondE, hp);
+ } else {
+ if (lr) {
+ if (included) {
+ first = highlighter.addHighlight(mpos.firstB, mpos.secondE, hp);
+ } else {
+ first = highlighter.addHighlight(mpos.firstE, mpos.secondB, hp);
+ }
+ } else {
+ if (included) {
+ first = highlighter.addHighlight(mpos.secondB, mpos.firstE, hp);
+ } else {
+ first = highlighter.addHighlight(mpos.secondE, mpos.firstB, hp);
+ }
+ }
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+
+ /**
+ * Inner class used to retriev infos from scinotesConfiguration.xml
+ */
+ public static class Parameters {
+
+ /**
+ * The color
+ */
+ public Color color;
+
+ /**
+ * Inside or not
+ */
+ public boolean inside;
+
+ /**
+ * Strict or not
+ */
+ public boolean strict;
+
+ /**
+ * Included or not
+ */
+ public boolean included;
+
+ /**
+ * The type
+ */
+ public int type;
+
+ /**
+ * The onmouseover
+ */
+ public boolean onmouseover;
+
+ /**
+ * Constructor
+ * @param color the color
+ * @param inside inside or not
+ * @param type the type
+ * @param onmouseover a boolean
+ */
+ public Parameters(Color color, boolean inside, boolean strict, boolean included, int type, boolean onmouseover) {
+ this.color = color;
+ this.inside = inside;
+ this.type = type;
+ this.strict = strict;
+ this.included = included;
+ this.onmouseover = onmouseover;
+ }
+ }
+
+ /**
+ * Inner class to highlight matching keywords
+ */
+ public class ScilabKeywordsPainter extends DefaultHighlighter.DefaultHighlightPainter {
+
+ /**
+ * FILLED
+ */
+ public static final int FILLED = 0;
+
+ /**
+ * UNDERLINED
+ */
+ public static final int UNDERLINED = 1;
+
+ /**
+ * FRAMED
+ */
+ public static final int FRAMED = 2;
+
+ private Color color;
+ private int type;
+
+ /**
+ * Constructor
+ * @param color the color to paint
+ * @param type must be FILLED, UNDERLINED or FRAMED
+ */
+ public ScilabKeywordsPainter(Color color, int type) {
+ super(color);
+ this.color = color;
+ this.type = type;
+ }
+
+ /**
+ * paintLayer
+ * @param g Graphics
+ * @param offs0 the beginning
+ * @param offs1 the end
+ * @param bounds the bounds
+ * @param c the text component where to paint
+ * @param view the view to use
+ * @return the shape containg the highlighted text
+ */
+ public Shape paintLayer(Graphics g, int offs0, int offs1,
+ Shape bounds, JTextComponent c, View view) {
+ try {
+ Rectangle r = (Rectangle) view.modelToView(offs0, Position.Bias.Forward,
+ offs1, Position.Bias.Backward, bounds);
+ g.setColor(color);
+
+ switch (type) {
+ case UNDERLINED :
+ g.drawLine(r.x, r.y + r.height - 1, r.x + r.width - 1, r.y + r.height - 1);
+ return r;
+ case FRAMED :
+ g.drawRect(r.x, r.y, r.width - 1, r.height - 1);
+ return r;
+ case FILLED :
+ default :
+ g.fillRect(r.x, r.y, r.width, r.height);
+ return r;
+ }
+ } catch (BadLocationException e) {
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Inner class to highlight the content inside two keywords.
+ * The highlight depends on the position of the content.
+ */
+ class InsideLinePainter implements Highlighter.HighlightPainter {
+
+ private boolean filled;
+ private boolean strict;
+ private Color color;
+
+ /**
+ * Constructor
+ * @param filled if the highlighted rectangle must be filled
+ * @param color the color to paint
+ */
+ protected InsideLinePainter(boolean filled, boolean strict, Color color) {
+ this.filled = filled;
+ this.strict = strict;
+ this.color = color;
+ }
+
+ /**
+ * Implements a strategy to render contents depending on the position of these
+ * @param g Graphics
+ * @param pos0 the beginning
+ * @param pos1 the end
+ * @param bounds the bounds
+ * @param c the text component where to paint
+ */
+ public void paint(Graphics g, int pos0, int pos1, Shape bounds, JTextComponent c) {
+ try {
+ Rectangle alloc = bounds.getBounds();
+ Rectangle p0 = c.modelToView(pos0);
+ Rectangle p1 = c.modelToView(pos1);
+ g.setColor(color);
+
+ if (p0.y == p1.y) {
+ Rectangle r = p0.union(p1);
+ if (filled) {
+ g.fillRect(r.x, r.y, r.width, r.height);
+ } else {
+ g.drawRect(r.x, r.y, r.width - 1, r.height - 1);
+ }
+ } else {
+ Element root = doc.getDefaultRootElement();
+ int line0 = root.getElementIndex(pos0);
+ int line1 = root.getElementIndex(pos1);
+ Rectangle r0 = c.modelToView(root.getElement(line0).getEndOffset());
+ Rectangle r1 = c.modelToView(root.getElement(line1).getStartOffset());
+ if (line0 != line1) {
+ if (!strict) {
+ if (filled) {
+ g.fillRect(p0.x, p0.y, alloc.width, p0.height);
+ g.fillRect(alloc.x, p0.y + p0.height, alloc.width, r0.y - p0.y - p0.height);
+
+ if (r1.y != p1.y) {
+ g.fillRect(r1.x, r1.y, alloc.width, r1.height);
+ }
+ g.fillRect(r1.x, p1.y, p1.x, r1.height);
+ } else {
+ g.drawRect(p0.x, p0.y, alloc.width - 1, p0.height - 1);
+ g.drawRect(alloc.x, p0.y + p0.height, alloc.width - 1, r0.y - p0.y - p0.height - 1);
+
+ if (r1.y != p1.y) {
+ g.drawRect(r1.x, r1.y, alloc.width, r1.height - 1);
+ }
+ g.drawRect(r1.x, p1.y, p1.x, r1.height - 1);
+ }
+ }
+
+ if (filled) {
+ g.fillRect(alloc.x, r0.y, alloc.width, r1.y - r0.y);
+ } else {
+ g.drawRect(alloc.x, r0.y, alloc.width - 1, r1.y - r0.y - 1);
+ }
+ } else {
+ /* This part of the code has been copied (for the filling) from DefaultHighlighter.java */
+ int w = alloc.x + alloc.width - p0.x;
+ if (filled) {
+ g.fillRect(p0.x, p0.y, w, p0.height);
+ if ((p0.y + p0.height) != p1.y) {
+ g.fillRect(alloc.x, p0.y + p0.height, alloc.width, p1.y - (p0.y + p0.height));
+ }
+ g.fillRect(alloc.x, p1.y, (p1.x - alloc.x), p1.height);
+ } else {
+ g.drawRect(p0.x, p0.y, w - 1, p0.height - 1);
+ if ((p0.y + p0.height) != p1.y) {
+ g.drawRect(alloc.x, p0.y + p0.height, alloc.width - 1, p1.y - (p0.y + p0.height) - 1);
+ }
+ g.drawRect(alloc.x, p1.y, (p1.x - alloc.x) - 1, p1.height - 1);
+ }
+ }
+ }
+ } catch (BadLocationException e) { }
+ }
+ }
+
+ /**
+ * Inner class to highlight on a KeywordEvent generated by a ONMOUSEOVER
+ */
+ class MouseOverMatcher extends KeywordAdapter.MouseOverAdapter {
+
+ /**
+ * What to do when the event occurred
+ * @param e the event
+ */
+ public void caughtKeyword(KeywordEvent e) {
+ if (lr) {
+ searchMatchingBlock(true, e.getType(), e.getStart());
+ } else {
+ searchMatchingBlock(true, e.getType(), e.getStart() + e.getLength());
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockScanner.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockScanner.java
new file mode 100755
index 000000000..b709f8c12
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/MatchingBlockScanner.java
@@ -0,0 +1,2085 @@
+/* The following code was generated by JFlex 1.4.3 on 28/04/14 15:53 */
+
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.io.IOException;
+import javax.swing.text.Element;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 28/04/14 15:53 from the specification file
+ * <tt>matchingblock.jflex</tt>
+ */
+public final class MatchingBlockScanner {
+
+ /** 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 = 256;
+
+ /** lexical states */
+ public static final int OPENCLOSE = 6;
+ public static final int LR = 2;
+ public static final int YYINITIAL = 0;
+ public static final int PSNART = 10;
+ public static final int CLOSEOPEN = 8;
+ public static final int SPEC = 12;
+ public static final int RL = 4;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\12\0\1\1\2\0\1\3\23\0\1\6\1\10\1\6\1\4\1\5"+
+ "\1\0\1\7\1\30\1\11\5\0\1\2\12\4\5\0\1\6\1\0"+
+ "\32\6\1\30\1\0\1\11\1\0\1\6\1\0\2\6\1\23\1\31"+
+ "\1\21\1\13\1\6\1\17\1\12\2\6\1\20\1\6\1\27\1\14"+
+ "\2\6\1\15\1\22\1\24\1\26\1\6\1\16\1\6\1\25\1\6"+
+ "\1\30\1\0\1\11\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 =
+ "\7\0\6\1\1\2\6\1\1\3\2\1\1\4\6\1"+
+ "\1\2\1\1\11\2\1\5\1\6\1\0\1\7\2\0"+
+ "\1\1\1\3\6\1\11\0\1\2\6\0\1\3\13\0"+
+ "\2\1\1\2\2\1\6\0\1\1\1\2\3\0\1\2"+
+ "\7\0\5\1\11\0\1\3\4\0\3\1\13\0\2\1"+
+ "\7\0\2\1\6\0\1\1\1\0\1\2\3\0\3\1"+
+ "\3\0\1\1\2\0\1\2";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[173];
+ 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;
+ }
+
+
+ /* 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"
+ };
+
+ /** 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;
+
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
+
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
+
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
+
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
+
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
+
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /* user code: */
+ private ScilabDocument doc;
+ private Element elem;
+ private boolean transp = false;
+ private ScilabLexer scilabLexer;
+ private int start;
+ private int end;
+ private int savePos;
+
+ public MatchingBlockScanner(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ this.scilabLexer = doc.createLexer();
+ }
+
+ public MatchingPositions getNextBlock(int pos, boolean lr) {
+ int s = 1;
+ transp = false;
+ try {
+ if (lr) {
+ start = pos;
+ end = doc.getEndPosition().getOffset();
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ yybegin(LR);
+ } else {
+ start = pos - 1;
+ end = 0;
+ yyreset(new ScilabDocumentReader(doc, true, start, end));
+ yybegin(RL);
+ }
+ do {
+ if (yylex() == 0) {
+ s--;
+ } else {
+ s++;
+ }
+ } while (zzMarkedPos != 0 && s != 0);
+ } catch (IOException e) {
+ return null;
+ }
+ if (s == 0) {
+ if (lr) {
+ return new MatchingPositions(pos, pos, pos + yychar, pos + yychar + (transp?(yylength()-1):yylength()));
+ } else {
+ return new MatchingPositions(pos, pos, pos - yychar - yylength(), pos - yychar);
+ }
+ }
+
+ return null;
+ }
+
+ public MatchingPositions getMatchingBlock(int pos, boolean lr) {
+ int p1, s = 1;
+ transp = false;
+ try {
+ if (lr) {
+ start = pos;
+ end = doc.getEndPosition().getOffset();
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ yybegin(OPENCLOSE);
+ if (yylex() != 1) {
+ return null;
+ }
+
+ p1 = pos + yylength();
+ yybegin(LR);
+ } else {
+ start = pos - 1;
+ end = 0;
+ yyreset(new ScilabDocumentReader(doc, true, start, end));
+ yybegin(CLOSEOPEN);
+ if (yylex() != 1) {
+ return null;
+ }
+ p1 = pos - yylength();
+ yybegin(RL);
+ }
+
+ do {
+ if (yylex() == 0) {
+ s--;
+ } else {
+ s++;
+ }
+ } while (zzMarkedPos != 0 && s != 0);
+ } catch (IOException e) {
+ return null;
+ }
+ if (s == 0) {
+ if (lr) {
+ return new MatchingPositions(pos, p1, pos + yychar, pos + yychar + (transp?(yylength()-1):yylength()));
+ } else {
+ return new MatchingPositions(p1, pos, pos - yychar - yylength(), pos - yychar);
+ }
+ }
+
+ return null;
+ }
+
+ public final class MatchingPositions {
+ public int firstB;
+ public int firstE;
+ public int secondB;
+ public int secondE;
+
+ private MatchingPositions(int x1, int x2, int y1, int y2) {
+ firstB = x1;
+ firstE = x2;
+ secondB = y1;
+ secondE = y2;
+ }
+ }
+
+
+ /**
+ * 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 MatchingBlockScanner(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 MatchingBlockScanner(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 < 108) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do map[j++] = value; while (--count > 0);
+ }
+ return map;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead-zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead-= zzStartRead;
+ zzCurrentPos-= zzStartRead;
+ zzMarkedPos-= zzStartRead;
+ zzStartRead = 0;
+ }
+
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzCurrentPos*2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ }
+
+ /* finally: fill the buffer with new input */
+ int numRead = zzReader.read(zzBuffer, zzEndRead,
+ zzBuffer.length-zzEndRead);
+
+ if (numRead > 0) {
+ zzEndRead+= numRead;
+ return false;
+ }
+ // unlikely but not impossible: read 0 characters, but not at end of stream
+ if (numRead == 0) {
+ int c = zzReader.read();
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char) c;
+ return false;
+ }
+ }
+
+ // numRead < 0
+ return true;
+ }
+
+
+ /**
+ * 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();
+ }
+
+
+ /**
+ * 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
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ 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 <tt>pos</tt> 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 int 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;
+
+
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
+
+ yychar+= zzMarkedPosL-zzStartRead;
+
+ zzAction = -1;
+
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ zzState = ZZ_LEXSTATE[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++];
+ }
+ }
+ zzInput = zzCMapL[zzInput];
+
+ boolean zzIsFinal = false;
+ boolean zzNoLookAhead = false;
+
+ zzForNext: { switch (zzState) {
+ case 1:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 3: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ case 2: zzIsFinal = true; zzState = 8; break zzForNext;
+ case 4: zzIsFinal = true; zzState = 9; break zzForNext;
+ case 5: zzIsFinal = true; zzState = 10; break zzForNext;
+ case 7:
+ case 8: zzIsFinal = true; zzState = 12; break zzForNext;
+ case 9: zzIsFinal = true; zzState = 13; break zzForNext;
+ case 10: zzIsFinal = true; zzState = 14; break zzForNext;
+ case 11: zzIsFinal = true; zzState = 15; break zzForNext;
+ case 14: zzIsFinal = true; zzState = 16; break zzForNext;
+ case 17: zzIsFinal = true; zzState = 17; break zzForNext;
+ case 18: zzIsFinal = true; zzState = 18; break zzForNext;
+ case 20: zzIsFinal = true; zzState = 19; break zzForNext;
+ case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ default: zzIsFinal = true; zzState = 11; break zzForNext;
+ }
+
+ case 2:
+ switch (zzInput) {
+ case 0:
+ case 2:
+ case 3:
+ case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ case 8: zzIsFinal = true; zzState = 12; break zzForNext;
+ case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ case 1: zzIsFinal = true; zzState = 21; break zzForNext;
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 23; break zzForNext;
+ case 11: zzIsFinal = true; zzState = 24; break zzForNext;
+ case 13: zzIsFinal = true; zzState = 25; break zzForNext;
+ case 17: zzIsFinal = true; zzState = 26; break zzForNext;
+ case 20: zzIsFinal = true; zzState = 27; break zzForNext;
+ case 21: zzIsFinal = true; zzState = 28; break zzForNext;
+ case 23: zzIsFinal = true; zzState = 29; break zzForNext;
+ case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
+ case 25: zzIsFinal = true; zzState = 31; break zzForNext;
+ default: zzIsFinal = true; zzState = 22; break zzForNext;
+ }
+
+ case 3:
+ switch (zzInput) {
+ case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ case 10: zzIsFinal = true; zzState = 32; break zzForNext;
+ case 11: zzIsFinal = true; zzState = 33; break zzForNext;
+ case 14: zzIsFinal = true; zzState = 34; break zzForNext;
+ case 17: zzIsFinal = true; zzState = 35; break zzForNext;
+ case 18: zzIsFinal = true; zzState = 36; break zzForNext;
+ case 20: zzIsFinal = true; zzState = 37; break zzForNext;
+ default: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
+ }
+
+ case 4:
+ switch (zzInput) {
+ case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
+ case 23: zzIsFinal = true; zzState = 39; break zzForNext;
+ case 25: zzIsFinal = true; zzState = 40; break zzForNext;
+ default: zzIsFinal = true; zzState = 38; break zzForNext;
+ }
+
+ case 5:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 41; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 6:
+ switch (zzInput) {
+ default: zzIsFinal = true; zzNoLookAhead = true; zzState = 42; break zzForNext;
+ }
+
+ case 8:
+ switch (zzInput) {
+ case 2: zzState = 43; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 9:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 17: zzState = 45; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 10:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; break zzForNext;
+ }
+
+ case 11:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 12:
+ switch (zzInput) {
+ case 7:
+ case 8: zzIsFinal = true; zzState = 47; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: zzState = 46; break zzForNext;
+ }
+
+ case 13:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 14:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 11: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 15:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 12: zzIsFinal = true; zzState = 49; break zzForNext;
+ case 22: zzIsFinal = true; zzState = 50; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 16:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 15: zzIsFinal = true; zzState = 51; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 17:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 23: zzIsFinal = true; zzState = 52; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 18:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 17: zzIsFinal = true; zzState = 53; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 19:
+ switch (zzInput) {
+ case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
+ case 13: zzIsFinal = true; zzState = 54; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 21:
+ switch (zzInput) {
+ case 2: zzState = 56; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: zzState = 55; break zzForNext;
+ }
+
+ case 22:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 24:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 10: zzIsFinal = true; zzState = 64; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 25:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 12: zzState = 65; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 26:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 16: zzState = 66; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 27:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 19: zzState = 67; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 28:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 13: zzState = 68; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 29:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 23: zzState = 62; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 12: zzState = 69; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 31:
+ switch (zzInput) {
+ case 11: zzState = 57; break zzForNext;
+ case 13: zzState = 58; break zzForNext;
+ case 17: zzState = 59; break zzForNext;
+ case 20: zzState = 60; break zzForNext;
+ case 21: zzState = 61; break zzForNext;
+ case 25: zzState = 63; break zzForNext;
+ case 23: zzState = 70; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 32:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 33:
+ switch (zzInput) {
+ case 12: zzState = 72; break zzForNext;
+ case 22: zzState = 73; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 34:
+ switch (zzInput) {
+ case 15: zzState = 74; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 35:
+ switch (zzInput) {
+ case 16: zzState = 75; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 36:
+ switch (zzInput) {
+ case 17: zzState = 76; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 37:
+ switch (zzInput) {
+ case 13: zzState = 77; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 38:
+ switch (zzInput) {
+ case 23: zzState = 78; break zzForNext;
+ case 25: zzState = 79; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 39:
+ switch (zzInput) {
+ case 23: zzState = 78; break zzForNext;
+ case 25: zzState = 79; break zzForNext;
+ case 12: zzState = 80; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 40:
+ switch (zzInput) {
+ case 25: zzState = 79; break zzForNext;
+ case 23: zzState = 81; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 43:
+ switch (zzInput) {
+ case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForNext;
+ }
+
+ case 45:
+ switch (zzInput) {
+ case 23: zzState = 82; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 46:
+ switch (zzInput) {
+ case 7:
+ case 8: zzIsFinal = true; zzState = 47; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: break zzForNext;
+ }
+
+ case 47:
+ switch (zzInput) {
+ case 7:
+ case 8: zzState = 46; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 48:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 49:
+ switch (zzInput) {
+ case 13: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 50:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzState = 83; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 51:
+ switch (zzInput) {
+ case 10: zzIsFinal = true; zzState = 84; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 52:
+ switch (zzInput) {
+ case 25: zzIsFinal = true; zzState = 85; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 53:
+ switch (zzInput) {
+ case 16: zzIsFinal = true; zzState = 86; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 54:
+ switch (zzInput) {
+ case 21: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 55:
+ switch (zzInput) {
+ case 2: zzState = 56; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: break zzForNext;
+ }
+
+ case 56:
+ switch (zzInput) {
+ case 2: zzIsFinal = true; zzState = 87; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: zzState = 55; break zzForNext;
+ }
+
+ case 57:
+ switch (zzInput) {
+ case 10: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 58:
+ switch (zzInput) {
+ case 12: zzState = 88; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 59:
+ switch (zzInput) {
+ case 16: zzState = 89; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 60:
+ switch (zzInput) {
+ case 19: zzState = 90; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 61:
+ switch (zzInput) {
+ case 13: zzState = 91; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 62:
+ switch (zzInput) {
+ case 12: zzState = 92; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 63:
+ switch (zzInput) {
+ case 23: zzState = 93; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 64:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzState = 94; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ }
+
+ case 65:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzState = 95; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 66:
+ switch (zzInput) {
+ case 10: zzState = 96; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 67:
+ switch (zzInput) {
+ case 17: zzState = 97; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 68:
+ switch (zzInput) {
+ case 12: zzState = 88; break zzForNext;
+ case 20: zzIsFinal = true; zzState = 95; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 69:
+ switch (zzInput) {
+ case 10: zzState = 98; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 70:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ case 12: zzState = 92; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 71:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 99; break zzForNext;
+ }
+
+ case 72:
+ switch (zzInput) {
+ case 13: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 73:
+ switch (zzInput) {
+ case 23: zzState = 100; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 74:
+ switch (zzInput) {
+ case 10: zzState = 101; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 75:
+ switch (zzInput) {
+ case 18: zzState = 102; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 76:
+ switch (zzInput) {
+ case 16: zzState = 103; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 77:
+ switch (zzInput) {
+ case 21: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 78:
+ switch (zzInput) {
+ case 12: zzState = 104; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 79:
+ switch (zzInput) {
+ case 23: zzState = 105; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 80:
+ switch (zzInput) {
+ case 10: zzState = 106; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 81:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ case 12: zzState = 104; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 82:
+ switch (zzInput) {
+ case 25: zzIsFinal = true; zzState = 107; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 83:
+ switch (zzInput) {
+ case 19: zzIsFinal = true; zzState = 108; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 84:
+ switch (zzInput) {
+ case 16: zzIsFinal = true; zzState = 109; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 85:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzState = 110; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 86:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzState = 111; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 87:
+ switch (zzInput) {
+ case 2: zzIsFinal = true; break zzForNext;
+ case 1:
+ case 3: break zzForAction;
+ default: zzState = 55; break zzForNext;
+ }
+
+ case 88:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 89:
+ switch (zzInput) {
+ case 10: zzState = 112; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 90:
+ switch (zzInput) {
+ case 17: zzState = 113; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 91:
+ switch (zzInput) {
+ case 20: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 92:
+ switch (zzInput) {
+ case 10: zzState = 114; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 93:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 94:
+ switch (zzInput) {
+ case 18: zzState = 115; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 95:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ }
+
+ case 96:
+ switch (zzInput) {
+ case 15: zzState = 116; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 97:
+ switch (zzInput) {
+ case 16: zzState = 117; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 98:
+ switch (zzInput) {
+ case 20: zzState = 118; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 99:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; break zzForNext;
+ }
+
+ case 100:
+ switch (zzInput) {
+ case 19: zzState = 119; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 101:
+ switch (zzInput) {
+ case 16: zzState = 120; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 102:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzState = 121; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 103:
+ switch (zzInput) {
+ case 17: zzState = 122; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 104:
+ switch (zzInput) {
+ case 10: zzState = 123; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 105:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 106:
+ switch (zzInput) {
+ case 20: zzState = 124; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 107:
+ switch (zzInput) {
+ case 11: zzState = 125; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 108:
+ switch (zzInput) {
+ case 20: zzIsFinal = true; zzState = 126; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 109:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 110:
+ switch (zzInput) {
+ case 22: zzIsFinal = true; zzState = 127; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 111:
+ switch (zzInput) {
+ case 19: zzIsFinal = true; zzState = 128; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 112:
+ switch (zzInput) {
+ case 15: zzState = 129; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 113:
+ switch (zzInput) {
+ case 16: zzState = 130; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 114:
+ switch (zzInput) {
+ case 20: zzState = 131; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 115:
+ switch (zzInput) {
+ case 16: zzState = 93; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 116:
+ switch (zzInput) {
+ case 14: zzIsFinal = true; zzState = 95; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 117:
+ switch (zzInput) {
+ case 17: zzState = 132; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 118:
+ switch (zzInput) {
+ case 19: zzState = 133; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 119:
+ switch (zzInput) {
+ case 20: zzState = 134; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 120:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 121:
+ switch (zzInput) {
+ case 10: zzState = 135; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 122:
+ switch (zzInput) {
+ case 19: zzState = 136; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 123:
+ switch (zzInput) {
+ case 20: zzState = 137; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 124:
+ switch (zzInput) {
+ case 19: zzState = 138; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 125:
+ switch (zzInput) {
+ case 22: zzState = 139; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 126:
+ switch (zzInput) {
+ case 10: zzIsFinal = true; zzState = 140; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 127:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzState = 141; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 128:
+ switch (zzInput) {
+ case 20: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 129:
+ switch (zzInput) {
+ case 14: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 130:
+ switch (zzInput) {
+ case 17: zzState = 142; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 131:
+ switch (zzInput) {
+ case 19: zzState = 143; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 132:
+ switch (zzInput) {
+ case 18: zzIsFinal = true; zzState = 95; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 133:
+ switch (zzInput) {
+ case 23: zzState = 144; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 134:
+ switch (zzInput) {
+ case 10: zzState = 145; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 135:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 136:
+ switch (zzInput) {
+ case 20: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 137:
+ switch (zzInput) {
+ case 19: zzState = 146; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 138:
+ switch (zzInput) {
+ case 23: zzState = 147; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 139:
+ switch (zzInput) {
+ case 23: zzState = 148; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 140:
+ switch (zzInput) {
+ case 12: zzIsFinal = true; zzState = 149; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 141:
+ switch (zzInput) {
+ case 19: zzIsFinal = true; zzState = 150; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 142:
+ switch (zzInput) {
+ case 18: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 143:
+ switch (zzInput) {
+ case 23: zzState = 151; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 144:
+ switch (zzInput) {
+ case 22: zzState = 152; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 145:
+ switch (zzInput) {
+ case 12: zzState = 153; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 146:
+ switch (zzInput) {
+ case 23: zzState = 154; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 147:
+ switch (zzInput) {
+ case 22: zzState = 155; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 148:
+ switch (zzInput) {
+ case 19: zzState = 156; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 149:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzState = 48; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 150:
+ switch (zzInput) {
+ case 20: zzIsFinal = true; zzState = 157; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 151:
+ switch (zzInput) {
+ case 22: zzState = 158; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 152:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzState = 159; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 153:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzState = 71; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 154:
+ switch (zzInput) {
+ case 22: zzState = 160; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 155:
+ switch (zzInput) {
+ case 11: zzState = 161; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 156:
+ switch (zzInput) {
+ case 20: zzState = 162; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 157:
+ switch (zzInput) {
+ case 10: zzIsFinal = true; zzState = 163; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 158:
+ switch (zzInput) {
+ case 11: zzIsFinal = true; zzState = 164; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 159:
+ switch (zzInput) {
+ case 25: zzIsFinal = true; zzState = 165; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ }
+
+ case 160:
+ switch (zzInput) {
+ case 11: zzState = 166; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 161:
+ switch (zzInput) {
+ case 25: zzState = 167; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 162:
+ switch (zzInput) {
+ case 10: zzState = 168; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 163:
+ switch (zzInput) {
+ case 12: zzIsFinal = true; zzState = 169; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 164:
+ switch (zzInput) {
+ case 25: zzState = 63; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 165:
+ switch (zzInput) {
+ case 23: zzState = 170; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 166:
+ switch (zzInput) {
+ case 25: zzState = 79; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 167:
+ switch (zzInput) {
+ case 23: zzState = 170; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 168:
+ switch (zzInput) {
+ case 12: zzState = 171; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 169:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzState = 172; break zzForNext;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ case 170:
+ switch (zzInput) {
+ case 17: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 171:
+ switch (zzInput) {
+ case 23: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
+ default: break zzForAction;
+ }
+
+ case 172:
+ switch (zzInput) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 8:
+ case 9:
+ case 24: break zzForAction;
+ default: zzIsFinal = true; zzState = 10; break zzForNext;
+ }
+
+ default:
+ // if this is ever reached, there is a serious bug in JFlex
+ zzScanError(ZZ_UNKNOWN_ERROR);
+ break;
+ } }
+
+ if ( zzIsFinal ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( zzNoLookAhead ) break zzForAction;
+ }
+
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 7:
+ { char c = yycharat(yylength() - 2);
+ if (c == ')' || c == ']' || c == '}') {
+ transp = true;
+ return 0;
+ }
+ }
+ case 8: break;
+ case 5:
+ { if (scilabLexer.getKeyword(start - yychar, false) == ScilabLexerConstants.STRING) {
+ savePos = start - yychar - scilabLexer.beginString - scilabLexer.start;
+ yybegin(SPEC);
+ } else {
+ yybegin(RL);
+ }
+ }
+ case 9: break;
+ case 4:
+ { yypushback(1);
+ yybegin(PSNART);
+ }
+ case 10: break;
+ case 2:
+ { return 0;
+ }
+ case 11: break;
+ case 6:
+ { if (--savePos == 0) {
+ yybegin(RL);
+ }
+ }
+ case 12: break;
+ case 3:
+ { return 1;
+ }
+ case 13: break;
+ case 1:
+ {
+ }
+ case 14: break;
+ default:
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ { return -1;
+ }
+ }
+ else {
+ zzScanError(ZZ_NO_MATCH);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotes.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotes.java
new file mode 100755
index 000000000..adde0f2aa
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotes.java
@@ -0,0 +1,2641 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.UUID;
+import java.util.logging.Logger;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
+import javax.swing.SwingUtilities;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.EditorKit;
+import javax.swing.text.View;
+import javax.swing.undo.UndoManager;
+
+import org.w3c.dom.Document;
+
+import org.flexdock.docking.event.DockingEvent;
+import org.scilab.modules.commons.CommonFileUtils;
+import org.scilab.modules.commons.gui.ScilabKeyStroke;
+import org.scilab.modules.commons.xml.ScilabXMLUtilities;
+import org.scilab.modules.commons.xml.XConfiguration;
+import static org.scilab.modules.commons.xml.XConfiguration.XConfAttribute;
+import org.scilab.modules.core.Scilab;
+import org.scilab.modules.gui.bridge.filechooser.SwingScilabFileChooser;
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
+import org.scilab.modules.gui.filechooser.Juigetfile;
+import org.scilab.modules.gui.filechooser.ScilabFileChooser;
+import org.scilab.modules.gui.menubar.MenuBar;
+import org.scilab.modules.gui.messagebox.MessageBox;
+import org.scilab.modules.gui.messagebox.ScilabMessageBox;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.gui.tab.SimpleTab;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.textbox.TextBox;
+import org.scilab.modules.gui.toolbar.ToolBar;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.ConfigManager;
+import org.scilab.modules.gui.utils.Position;
+import org.scilab.modules.gui.utils.SciFileFilter;
+import org.scilab.modules.gui.utils.Size;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+
+import org.scilab.modules.scinotes.actions.DoubleQuoteStringAction;
+import org.scilab.modules.scinotes.actions.EncodingAction;
+import org.scilab.modules.scinotes.actions.EndOfLineAction;
+import org.scilab.modules.scinotes.actions.ExitAction;
+import org.scilab.modules.scinotes.actions.FindAction;
+import org.scilab.modules.scinotes.actions.IncrementalSearchAction;
+import org.scilab.modules.scinotes.actions.IndentAction;
+import org.scilab.modules.scinotes.actions.InsertOverwriteAction;
+import org.scilab.modules.scinotes.actions.LineBeautifierAction;
+import org.scilab.modules.scinotes.actions.OpenSourceFileOnKeywordAction;
+import org.scilab.modules.scinotes.actions.RecentFileAction;
+import org.scilab.modules.scinotes.actions.RegisterFavoriteDirsAction;
+import org.scilab.modules.scinotes.actions.RemoveTrailingWhiteAction;
+import org.scilab.modules.scinotes.actions.RestoreOpenedFilesAction;
+import org.scilab.modules.scinotes.actions.SciNotesCompletionAction;
+import org.scilab.modules.scinotes.actions.SearchWordInFilesAction;
+import org.scilab.modules.scinotes.tabfactory.CodeNavigatorTab;
+import org.scilab.modules.scinotes.tabfactory.SciNotesTab;
+import org.scilab.modules.scinotes.tabfactory.SciNotesTabFactory;
+import org.scilab.modules.scinotes.tabfactory.SearchInFilesTab;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.DropFilesListener;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+import org.scilab.modules.scinotes.utils.SaveFile;
+import org.scilab.modules.scinotes.utils.SciNotesContents;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+import org.scilab.modules.scinotes.utils.ScilabTabbedPane;
+import org.scilab.modules.scinotes.utils.SearchFile;
+
+/**
+ * Main SciNotes class.
+ *
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public class SciNotes extends SwingScilabDockablePanel {
+
+ private static final long serialVersionUID = -6410183357490518676L;
+
+ private static final String XPATH_SCINOTES_KEY = "//general/shortcuts/body/actions/action-folder[@name='Scinotes']/action";
+ private static final String XPATH_SCINOTES_ACTION = "/map/scinotes/entry";
+
+ private static final String SCINOTES = "SciNotes";
+ private static final String SCI_EXTENSION = ".sci";
+ private static final String SCE_EXTENSION = ".sce";
+ private static final String TST_EXTENSION = ".tst";
+ private static final String QUIT_EXTENSION = ".quit";
+ private static final String DEM_EXTENSION = ".dem";
+ private static final String START_EXTENSION = ".start";
+ private static final String ALL_TST_FILES = "*.tst";
+ private static final String ALL_QUIT_FILES = "*.quit";
+ private static final String ALL_START_FILES = "*.start";
+ private static final String ALL_SCI_FILES = "*.sci";
+ private static final String ALL_SCE_FILES = "*.sce";
+ private static final String ALL_DEM_FILES = "*.dem";
+ private static final String ALL_SCX_FILES = "*.sc*";
+ private static final String ALL_SCILAB = "all";
+ private static final String ALL_FILES = "*.*";
+ private static final String DOT = ".";
+
+ private static final String DEFAULTACTIONPATH = "org.scilab.modules.scinotes.actions";
+
+ private static final Map<String, String> actionToName;
+ private static Map<String, KeyStroke> actionKeys;
+
+ private static List<SciNotes> scinotesList = new ArrayList<SciNotes>();
+ private static SciNotes editor;
+ private static boolean mustWrapLines;
+
+ private SwingScilabWindow parentWindow;
+ private UUID uuid;
+
+ private ScilabTabbedPane tabPane;
+ private final SciNotesContents contentPane;
+ private NavigatorWindow navigator;
+ private SearchFile searchInFiles;
+
+ private int numberOfUntitled;
+ private EditorKit editorKit;
+
+ private JButton undoButton;
+ private JButton redoButton;
+
+ private boolean protectOpenFileList;
+ private boolean restored;
+ private boolean firstOpen = true;
+
+ private final List<Integer> tabList = new ArrayList<Integer>();
+ private final List<Integer> closedTabList = new ArrayList<Integer>();
+
+ static {
+ ConfigSciNotesManager.createUserCopy();
+ ScilabTabFactory.getInstance().addTabFactory(SciNotesTabFactory.getInstance());
+ Scilab.registerInitialHook(new Runnable() {
+ @Override
+ public void run() {
+ updateSciNotes();
+ }
+ });
+
+ Document doc = ScilabXMLUtilities.readDocument(System.getenv("SCI") + "/modules/console/etc/Actions-Configuration.xml");
+ actionToName = XConfiguration.get(doc, "name", String.class, "action", String.class, XPATH_SCINOTES_ACTION);
+ XConfiguration.addXConfigurationListener(new SciNotesConfiguration());
+ }
+
+ /**
+ * Create SciNotes instance
+ */
+ public SciNotes(String uuid) {
+ super(SCINOTES, uuid);
+ setWindowIcon("accessories-text-editor");
+ setAssociatedXMLIDForHelp("scinotes");
+ this.uuid = UUID.fromString(uuid);
+ SciNotesAutosave.autosave();
+ editor = this;
+ scinotesList.add(this);
+ numberOfUntitled = 0;
+ mustWrapLines = SciNotesOptions.getSciNotesDisplay().wrapLines;
+ editorKit = new ScilabEditorKit(!mustWrapLines);
+ protectOpenFileList = false;
+ contentPane = new SciNotesContents(this);
+ tabPane = contentPane.getScilabTabbedPane();
+ tabPane.addChangeListener(new ChangeListener() {
+ @Override
+ public void stateChanged(ChangeEvent e) {
+ if (getTextPane() != null) {
+ // updateUI();
+ getTextPane().updateInfosWhenFocused();
+ getTextPane().requestFocus();
+ getTextPane().highlightWords(IncrementalSearchAction.getWord(SciNotes.this), IncrementalSearchAction.getExact(SciNotes.this));
+
+ // Update encoding menu
+ EncodingAction.updateEncodingMenu((ScilabDocument) getTextPane().getDocument());
+
+ // Update End Of Line menu
+ EndOfLineAction.updateEolMenu((ScilabDocument) getTextPane().getDocument());
+ setTitle(getTextPane().getTitle());
+ }
+ }
+ });
+ this.setContentPane(contentPane);
+ }
+
+ /**
+ * Default constructor
+ */
+ public SciNotes() {
+ this(UUID.randomUUID().toString());
+ }
+
+ public static void configurationChanged(SciNotesConfiguration.Conf conf) {
+ setWhereamiLineNumbering();
+ setAutoIndent();
+ setHorizontalWrap();
+ setDefaultTabulation();
+ if (conf.keymap) {
+ actionKeys = null;
+ setKeyStrokeActions();
+ setAllMenus();
+ }
+ if (conf.autosave) {
+ SciNotesAutosave.stopAutosave();
+ SciNotesAutosave.autosave();
+ }
+ if (conf.preferences) {
+ RecentFileAction.updateRecentOpenedFilesMenu();
+ }
+
+ updatePanes(conf);
+ }
+
+ public static Map<String, KeyStroke> getActionKeys() {
+ if (actionKeys == null) {
+ Document doc = XConfiguration.getXConfigurationDocument();
+ actionKeys = XConfiguration.get(doc, "name", String.class, "key", KeyStroke.class, XPATH_SCINOTES_KEY);
+ }
+
+ return actionKeys;
+ }
+
+ public static Map<String, String> getActionName() {
+ return actionToName;
+ }
+
+ /**
+ * Get an opened editor from its uuid
+ *
+ * @param uuid
+ * the uuid
+ * @return the corresponding editor
+ */
+ public static SciNotes getEditorFromUUID(String uuid) {
+ for (SciNotes ed : scinotesList) {
+ if (ed.getPersistentId().equals(uuid)) {
+ return ed;
+ }
+ }
+
+ return null;
+ }
+
+ public void setParentWindow() {
+ this.parentWindow = SwingScilabWindow.createWindow(true);
+ parentWindow.setLocation(150, 50);
+ parentWindow.setSize(650, 550);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setTitle(String title) {
+ super.setTitle(title);
+ SwingScilabWindow window = (SwingScilabWindow) SwingUtilities.getAncestorOfClass(SwingScilabWindow.class, tabPane);
+ if (window != null) {
+ window.setTitle(title);
+ }
+ }
+
+ public void insertBottomComponent(Component c) {
+ contentPane.insertBottomComponent(c);
+ }
+
+ /**
+ * @return the SwingScilabWindow containing this editor
+ */
+ public SwingScilabWindow getSwingParentWindow() {
+ return (SwingScilabWindow) SwingUtilities.getAncestorOfClass(SwingScilabWindow.class, this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void undockingComplete(DockingEvent evt) {
+ super.undockingComplete(evt);
+ if (navigator != null) {
+ navigator.addToolBar(null);
+ }
+ if (searchInFiles != null) {
+ searchInFiles.addToolBar(null);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dockingComplete(DockingEvent evt) {
+ super.dockingComplete(evt);
+ if (navigator != null) {
+ navigator.changeToolBar();
+ }
+ if (searchInFiles != null) {
+ searchInFiles.changeToolBar();
+ }
+ }
+
+ /**
+ * Add a code navigator
+ */
+ public void addNavigator() {
+ if (navigator == null) {
+ String navUUID = ConfigSciNotesManager.getCodeNavigatorStateForEditor(getPersistentId());
+ boolean success = WindowsConfigurationManager.restoreUUID(navUUID);
+ if (!success) {
+ navigator = CodeNavigatorTab.getCodeNavigatorInstance(this, null);
+ navigator.setParentWindow();
+ }
+ int count = getTabPane().getTabCount();
+ for (int i = 0; i < count; i++) {
+ navigator.addEditorPane(getTextPane(i));
+ }
+ }
+ }
+
+ /**
+ * Add a code navigator
+ */
+ public void addNavigator(NavigatorWindow navigator) {
+ this.navigator = navigator;
+ }
+
+ /**
+ * Remove the navigator
+ */
+ public void removeNavigator() {
+ navigator = null;
+ }
+
+ /**
+ * @return the navigator associated with this editor
+ */
+ public NavigatorWindow getNavigator() {
+ return navigator;
+ }
+
+ /**
+ * Add a Search in files
+ */
+ public void addSearchInFiles() {
+ if (searchInFiles == null) {
+ String sfUUID = ConfigSciNotesManager.getSearchInFilesStateForEditor(getPersistentId());
+ boolean success = WindowsConfigurationManager.restoreUUID(sfUUID);
+ if (!success) {
+ searchInFiles = SearchInFilesTab.getSearchInFilesTabInstance(this, null);
+ searchInFiles.setParentWindow();
+ }
+ }
+ }
+
+ /**
+ * Add a Search In Files
+ */
+ public void addSearchInFiles(SearchFile sf) {
+ this.searchInFiles = sf;
+ }
+
+ /**
+ * Remove Search in Files
+ */
+ public void removeSearchInFiles() {
+ searchInFiles = null;
+ }
+
+ /**
+ * @return the Search In Files associated with this editor
+ */
+ public SearchFile getSearchInFiles() {
+ return searchInFiles;
+ }
+
+ /**
+ * Update the editor
+ */
+ public static void updateSciNotes() {
+ ScilabLexer.update();
+ for (SciNotes editor : scinotesList) {
+ if (editor.getTextPane() != null) {
+ editor.getTextPane().repaint();
+ }
+ }
+ }
+
+ /**
+ * Launch SciNotes with an empty file
+ *
+ * This method *must not* be called on the EDT thread.
+ */
+ public static void scinotes() {
+ ScilabLexer.update();
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ launchSciNotes();
+ // Open an empty file if no tabs were opened at launch.
+ if (editor.getTabPane().getTabCount() == 0) {
+ editor.openFile(null, 0, null);
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Launch SciNotes with a file name to open.
+ *
+ * @param filePath
+ * the name of the file to open
+ *
+ * This method *must not* be called on the EDT thread.
+ */
+ public static void scinotes(final String filePath) {
+ ScilabLexer.update();
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ launchSciNotes();
+ editor.openFile(filePath, 0, null);
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Launch SciNotes with a file name to open and a line to highlight.
+ *
+ * @param filePath
+ * the name of the file to open
+ * @param lineNumber
+ * the line to highlight
+ *
+ * This method *must not* be called on the EDT thread.
+ */
+ public static void scinotes(final String filePath, final int lineNumber, final String functionName) {
+ ScilabLexer.update();
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ launchSciNotes();
+ editor.openFile(filePath, lineNumber, functionName);
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Launch SciNotes with a file name to open and a line to highlight.
+ *
+ * @param filePath
+ * the name of the file to open
+ * @param option
+ * such as 'readonly'
+ *
+ * This method *must not* be called on the EDT thread.
+ */
+ public static void scinotes(final String filePath, final String[] options) throws Exception {
+ boolean hasAction = false;
+ if (options != null && options.length != 0) {
+ try {
+ hasAction = executeAction(filePath, options);
+ } catch (FileNotFoundException e) {
+ throw new Exception(String.format(SciNotesMessages.INVALID_FILE, filePath));
+ } catch (IOException e) {
+ throw new Exception(String.format(SciNotesMessages.IO_EXCEPTION, e.getLocalizedMessage()));
+ }
+ }
+
+ if (hasAction) {
+ return;
+ }
+
+ ScilabLexer.update();
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ launchSciNotes();
+ if (options != null && options.length != 0) {
+ editor.openFile(filePath, 0, options[0]);
+ } else {
+ editor.openFile(filePath, 0, "");
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Launch SciNotes with a provided text (from the help for example).
+ *
+ * @param text
+ * the text which should be modified
+ */
+ public static void scinotesWithText(String text) {
+ ScilabLexer.update();
+ launchSciNotes();
+ ScilabEditorPane theTextPane;
+ if (editor.getTabPane().getTabCount() != 0 && editor.getTextPane(0) != null) {
+ String name = editor.getTextPane(0).getName();
+ if (name == null) {
+ theTextPane = editor.getTextPane(0);
+ } else {
+ theTextPane = editor.addEmptyTab();
+ }
+ } else {
+ theTextPane = editor.addEmptyTab();
+ }
+
+ ScilabDocument styleDocument = (ScilabDocument) theTextPane.getDocument();
+ try {
+ editor.getEditorKit().read(new StringReader(text), styleDocument, theTextPane.getCaretPosition());
+ } catch (IOException e) {
+ System.err.println(SciNotesMessages.ERROR_WITH_STRING);
+ } catch (BadLocationException e) {
+ System.err.println(SciNotesMessages.ERROR_WITH_STRING);
+ }
+ }
+
+ /**
+ * Clone the current tab and if b is true close the tab
+ *
+ * @param ed
+ * the editor where the tab is
+ * @param b
+ * a boolean
+ */
+ public static void cloneAndCloseCurrentTab(SciNotes ed, boolean b) {
+ ScilabDocument cdoc = (ScilabDocument) ed.getTextPane().getDocument();
+ String title = ed.getTabPane().getScilabTitleAt(ed.getTabPane().getSelectedIndex());
+ ScilabEditorPane currentSep = ed.getTextPane();
+ String winTitle = ed.getTitle();
+
+ if (b) {
+ ed.closeTabAtWithoutConfirmation(ed.getTabPane().getSelectedIndex());
+ if (ed.getTabPane().getTabCount() == 0) {
+ ClosingOperationsManager.startClosingOperationWithoutSave((SwingScilabDockablePanel) ed);
+ ConfigSciNotesManager.removeEditorUUID(ed.uuid.toString());
+ }
+ }
+
+ editor = null;
+
+ scinotesWithText(cdoc.getText());
+ ScilabEditorPane sep = editor.getTextPane();
+
+ if (currentSep.getName() != null) {
+ sep.setTitle(title);
+ editor.setTitle(winTitle);
+ }
+
+ currentSep.copyProps(sep);
+ ScilabDocument sdoc = (ScilabDocument) sep.getDocument();
+ sdoc.setContentModified(cdoc.isContentModified());
+ sdoc.getUndoManager().discardAllEdits();
+ sep.setCaretPosition(0);
+ editor.enableUndoButton(false);
+ editor.enableRedoButton(false);
+ ConfigSciNotesManager.saveToOpenFiles(sep.getName(), editor, editor.getTextPane());
+
+ editor.activeRestoreTab();
+ }
+
+ /**
+ * Clone the current tab and if b is true close the tab
+ *
+ * @param ed
+ * the editor where the tab is
+ * @param b
+ * a boolean
+ */
+ public static void cloneAndCloseCurrentTab(SciNotes ed, boolean b, int x, int y) {
+ cloneAndCloseCurrentTab(ed, b);
+ editor.getSwingParentWindow().setLocation(x, y);
+ }
+
+ /**
+ * Execute after when the restoration is finished
+ */
+ @Override
+ public void endedRestoration() {
+ if (!SwingUtilities.isEventDispatchThread()) {
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ restorePreviousSession();
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ throw new RuntimeException(e);
+ }
+ } else {
+ restorePreviousSession();
+ }
+ }
+
+ /**
+ * Restore the previous session
+ */
+ public void restorePreviousSession() {
+ restored = true;
+ if (!SciNotesOptions.getSciNotesPreferences().restartOpen || !ConfigSciNotesManager.getRestoreOpenedFiles() || ConfigSciNotesManager.countExistingOpenFiles(getUUID()) == 0) {
+ if (getTabPane().getTabCount() == 0) {
+ openFile(null, 0, null);
+ }
+
+ WindowsConfigurationManager.restorationFinished(this);
+
+ return;
+ }
+
+ addRestoreTab();
+ WindowsConfigurationManager.restorationFinished(SciNotes.this);
+ }
+
+ /**
+ * Create SciNotes instance
+ *
+ * @return the instance
+ */
+ public static void launchSciNotes() {
+ if (editor == null) {
+ List<String> uuids = ConfigSciNotesManager.getEditorsUUID();
+ boolean success = false;
+ if (!uuids.isEmpty()) {
+ for (String uuid : uuids) {
+ boolean exists = false;
+ for (SciNotes ed : scinotesList) {
+ if (ed.uuid.toString().equals(uuid)) {
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ success = WindowsConfigurationManager.restoreUUID(uuid);
+ if (success) {
+ break;
+ }
+ ConfigSciNotesManager.removeEditorUUID(uuid);
+ }
+ }
+ }
+ if (!success) {
+ editor = SciNotesTab.getEditorInstance(null);
+ editor.setParentWindow();
+ ConfigSciNotesManager.saveEditorUUID(editor.getPersistentId());
+ SciNotesGUI.init(editor.getParentWindow(), editor, SCINOTES);
+ WindowsConfigurationManager.unregisterEndedRestoration(editor);
+ }
+ }
+
+ if (!editor.restored) {
+ editor.restorePreviousSession();
+ }
+ }
+
+ /**
+ * Open a file.
+ *
+ * This method *must* be called on the EDT thread.
+ *
+ * @param filePath
+ * the file path (may be null)
+ * @param lineNumber
+ * the line number (use 0 for unspecified)
+ * @param option
+ * the options (may be null)
+ */
+ public void openFile(String filePath, int lineNumber, String option) {
+ if (!SwingUtilities.isEventDispatchThread()) {
+ throw new RuntimeException("called outside the EDT thread.");
+ }
+
+ if (filePath == null) {
+ addEmptyTab();
+ activeRestoreTab();
+ return;
+ }
+
+ File f = fileToCanonicalFile(new File(filePath));
+ if (!f.getParentFile().exists()) {
+ JOptionPane.showMessageDialog(SciNotes.this, SciNotesMessages.OPEN_ERROR);
+ addEmptyTab();
+ activeRestoreTab();
+ return;
+ }
+
+ if (f.isDirectory()) { /* Bug 5131 */
+ ConfigManager.saveLastOpenedDirectory(f.getPath());
+ addEmptyTab();
+ activeRestoreTab();
+ return;
+ }
+
+ readFileAndWait(f);
+ if (option == null || option.length() == 0 || "readonly".equals(option.toLowerCase())) {
+ getTextPane().scrollTextToLineNumber(lineNumber, true);
+ } else {
+ getTextPane().scrollTextToLineNumberInWhereami(lineNumber, option, true);
+ }
+ if ((option != null && "readonly".equals(option.toLowerCase()))) {
+ getTextPane().setReadOnly(true);
+ getInfoBar().setText(getTextPane().getInfoBarText());
+ ConfigSciNotesManager.removeFromOpenFiles(this, getTextPane());
+ } else {
+ ConfigSciNotesManager.saveToRecentOpenedFiles(filePath);
+ RecentFileAction.updateRecentOpenedFilesMenu(this);
+ }
+
+ activeRestoreTab();
+ }
+
+ public void activeRestoreTab() {
+ if (getTextPane(0) == null) {
+ tabPane.setSelectedIndex(0);
+ getInfoBar().setText("");
+ }
+ }
+
+ /**
+ * Close SciNotes instance including all tabs.
+ */
+ public void closeSciNotes() {
+ for (int i = 0; i < getTabPane().getTabCount(); i++) {
+ ScilabEditorPane textPaneAt = getTextPane(i);
+ if (textPaneAt != null) {
+ textPaneAt.destroy();
+ }
+ }
+
+ FindAction.close();
+ IncrementalSearchAction.close(this);
+ RecentFileAction.close(this);
+ OpenSourceFileOnKeywordAction.closeOpenSourceWindow();
+ SearchWordInFilesAction.closeWindow();
+
+ /*
+ * setProtectOpenFileList(true); while (getTabPane().getTabCount() > 0)
+ * { closeTabAt(0, true); } setProtectOpenFileList(false);
+ */
+
+ scinotesList.remove(this);
+ if (scinotesList.size() == 0) {
+ SciNotesAutosave.stopAutosave();
+ ScilabEditorPane.clean();
+ RegisterFavoriteDirsAction.close();
+ OpenSourceFileOnKeywordAction.close();
+ EncodingAction.close();
+ EndOfLineAction.close();
+ HelpOnTypingManager.close();
+ }
+
+ editor = null;
+ SciNotesGUI.clean(this);
+ close();
+ ConfigSciNotesManager.resetDocument();
+ }
+
+ public boolean canClose() {
+ int numberOfTab = getTabPane().getTabCount();
+ setProtectOpenFileList(true);
+
+ for (int i = 0; i < numberOfTab; i++) {
+ boolean ans = checkToCloseTabAt(i);
+ if (!ans) {
+ setProtectOpenFileList(false);
+ return false;
+ }
+ }
+ setProtectOpenFileList(false);
+
+ return true;
+ }
+
+ public String askForClosing() {
+ int numberOfTab = getTabPane().getTabCount();
+ boolean isContentModified = false;
+ for (int i = 0; i < getTabPane().getTabCount(); i++) {
+ ScilabEditorPane textPaneAt = getTextPane(i);
+ if (textPaneAt != null && ((ScilabDocument) textPaneAt.getDocument()).isContentModified()) {
+ isContentModified = true;
+ break;
+ }
+ }
+
+ if (isContentModified) {
+ return "SciNotes";
+ }
+
+ return null;
+ }
+
+ public static void closeEditor(SciNotes ed) {
+ if (scinotesList.size() > 1) {
+ ClosingOperationsManager.startClosingOperationWithoutSave((SwingScilabDockablePanel) ed);
+ } else {
+ ClosingOperationsManager.startClosingOperation((SwingScilabDockablePanel) ed);
+ }
+ }
+
+ /**
+ * Close a tab using its index.
+ *
+ * @param indexTab
+ * the index of the tab
+ * @return if the tab has been really closed
+ */
+ public boolean closeTabAtWithoutConfirmation(int indexTab) {
+ return closeTabAt(indexTab, false, false);
+ }
+
+ /**
+ * Close a tab using its index.
+ *
+ * @param indexTab
+ * the index of the tab
+ * @return if the tab has been really closed
+ */
+ public boolean closeTabAt(int indexTab) {
+ return closeTabAt(indexTab, false, true);
+ }
+
+ /**
+ * Close a tab using its index.
+ *
+ * @param indexTab
+ * the index of the tab
+ * @param scilabClose
+ * if true, save dialog confirmation cannot be canceled
+ * @return if the tab has been really closed
+ */
+ public boolean closeTabAt(int indexTab, boolean scilabClose, boolean confirmation) {
+ ScilabEditorPane textPaneAt = getTextPane(indexTab);
+
+ /*
+ * Test for modification added after bug 5103 fix: do not ask the user
+ * for an Untitled not-modified file saving when closing SciNotes
+ */
+ if (confirmation && ((ScilabDocument) textPaneAt.getDocument()).isContentModified()) {
+ if (!save(indexTab, false, scilabClose)) {
+ return false;
+ }
+ }
+
+ textPaneAt.close();
+
+ if (textPaneAt.getName() == null) {
+ String closedTabName = tabPane.getScilabTitleAt(indexTab);
+ String closedTabNameIndex = closedTabName.substring(closedTabName.length() - 1, closedTabName.length());
+ tabList.remove(Integer.valueOf(closedTabNameIndex));
+ closedTabList.add(Integer.valueOf(closedTabNameIndex));
+ }
+
+ // correction for bug 5404, closing the last tabPane generate an
+ // exception
+ // that's why we need to remove ChangeListeners before closing
+ if ((indexTab == 0) && (getTabPane().getTabCount() == 1)) {
+ for (int i = 0; i < tabPane.getChangeListeners().length; i++) {
+ tabPane.removeChangeListener(tabPane.getChangeListeners()[i]);
+ }
+ }
+
+ // Remove the filename associated with the tab from the list of open
+ // files.
+ if (!protectOpenFileList) {
+ ConfigSciNotesManager.removeFromOpenFiles(this, textPaneAt);
+ }
+
+ if (navigator != null) {
+ navigator.removePane(textPaneAt);
+ }
+
+ tabPane.remove(indexTab);
+
+ textPaneAt = getTextPane();
+ if (textPaneAt != null) {
+ if (navigator != null) {
+ navigator.update((ScilabDocument) textPaneAt.getDocument());
+ }
+ }
+ return true;
+ }
+
+ public boolean checkToCloseTabAt(int index) {
+ ScilabEditorPane textPaneAt = getTextPane(index);
+
+ /*
+ * Test for modification added after bug 5103 fix: do not ask the user
+ * for an Untitled not-modified file saving when closing SciNotes
+ */
+ if (textPaneAt != null && ((ScilabDocument) textPaneAt.getDocument()).isContentModified()) {
+ if (!save(index, false, false)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Set or unset protection of the currently open file list. Call before
+ * closing tabs if the tabs should be restored when scinotes restarts.
+ *
+ * @param protect
+ * Enables protection of the open file list if true.
+ */
+ public void setProtectOpenFileList(boolean protect) {
+ protectOpenFileList = protect;
+ }
+
+ /**
+ * Determines if this editor is the only editor instance.
+ *
+ * @return true if this is the last editor instance.
+ */
+ public boolean isOnlyInstance() {
+ if (scinotesList.size() > 1) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @return the list of the different openened editors
+ */
+ public static List<SciNotes> getSciNotesList() {
+ return scinotesList;
+ }
+
+ /**
+ * Save a file.
+ *
+ * @param indexTab
+ * the textPane index containing the file contents
+ * @return execution status
+ */
+ public boolean save(int indexTab) {
+ return save(indexTab, false, false);
+ }
+
+ /**
+ * Save a file.
+ *
+ * @param indexTab
+ * the textPane index containing the file contents
+ * @param force
+ * : force save without confirmation dialog ( SaveAction )
+ * @return execution status
+ */
+ public boolean save(int indexTab, boolean force) {
+ return save(indexTab, force, false);
+ }
+
+ /**
+ * Save a file.
+ *
+ * @param indexTab
+ * the textPane index containing the file contents
+ * @param force
+ * : force save without confirmation dialog ( SaveAction )
+ * @param scilabClose
+ * : if true, save dialog confirmation cannot be canceled
+ * @return execution status
+ */
+ public boolean save(int indexTab, boolean force, boolean scilabClose) {
+ ScilabEditorPane textPaneAt = getTextPane(indexTab);
+ getTabPane().setSelectedIndex(indexTab);
+
+ // if the file ( empty, new or loaded ) is not modified, exit save
+ // process and return true
+ if (!textPaneAt.checkExternalModif() && !((ScilabDocument) textPaneAt.getDocument()).isContentModified() && (textPaneAt.getName() != null)) {
+ /*
+ * Bug
+ * 5103
+ * fix
+ */
+ return true;
+ }
+
+ if (!force) {
+ AnswerOption answer;
+ if (scilabClose) {
+ answer = ScilabModalDialog.show(this, String.format(SciNotesMessages.MODIFIED, textPaneAt.getShortName()), SciNotesMessages.SCILAB_EDITOR,
+ IconType.QUESTION_ICON, ButtonType.YES_NO);
+ } else {
+ answer = ScilabModalDialog.show(this, String.format(SciNotesMessages.MODIFIED, textPaneAt.getShortName()), SciNotesMessages.SCILAB_EDITOR,
+ IconType.QUESTION_ICON, ButtonType.YES_NO_CANCEL);
+ }
+
+ switch (answer) {
+ case YES_OPTION: // Yes, continue
+ break;
+ case NO_OPTION:// No, exit and returns true
+ return true;
+ case CANCEL_OPTION: // Cancel, exit and return false
+ return false;
+ default:
+ break;
+ }
+ }
+
+ String fileToSave = textPaneAt.getName();
+ if (fileToSave == null) {
+ // need a filename, call chooseFileToSave
+ fileToSave = chooseFileToSave(SciNotesMessages.SAVE);
+ } else {
+ // check if the file has been modified by external software
+ fileToSave = checkExternalModification(fileToSave);
+ }
+
+ if (fileToSave == null || fileToSave.length() == 0) {
+ return true; /*
+ * Bug 5189: The user cancels ==> do not want an error
+ * message
+ */
+ }
+
+ File newSavedFile = new File(fileToSave);
+
+ if (!SaveFile.doSave(textPaneAt, indexTab, newSavedFile, editorKit)) {
+ return false;
+ }
+
+ ScilabDocument styledDocument = (ScilabDocument) textPaneAt.getDocument();
+ styledDocument.setContentModified(false);
+
+ textPaneAt.setLastModified(newSavedFile.lastModified());
+
+ if (textPaneAt.getName() == null) {
+ String name = getTabPane().getScilabTitleAt(indexTab);
+ String index = name.substring(name.length() - 1, name.length());
+ tabList.remove(Integer.valueOf(index));
+ closedTabList.add(Integer.valueOf(index));
+ }
+
+ textPaneAt.setName(fileToSave);
+ getTabPane().setTitleAt(indexTab, newSavedFile.getName());
+
+ setTitle(textPaneAt.getTitle());
+ ConfigSciNotesManager.saveToOpenFiles(fileToSave, this, textPaneAt);
+
+ return true;
+ }
+
+ /**
+ * Overwrite the file at a given index.
+ *
+ * @param indexTab
+ * the textPane index containing the file contents
+ * @return execution status
+ */
+ public boolean overwrite(int indexTab) {
+ ScilabEditorPane textPaneAt = getTextPane(indexTab);
+ String fileToSave = textPaneAt.getName();
+ if (fileToSave == null) {
+ return true;
+ }
+
+ File newSavedFile = new File(fileToSave);
+ if (!newSavedFile.exists()) {
+ return true;
+ }
+
+ if (!SaveFile.doSave(textPaneAt, indexTab, newSavedFile, editorKit)) {
+ return false;
+ }
+
+ ScilabDocument styledDocument = (ScilabDocument) textPaneAt.getDocument();
+ styledDocument.setContentModified(false);
+
+ getTabPane().setTitleAt(getTabPane().getSelectedIndex(), newSavedFile.getName());
+
+ // Get current file path for Execute file into Scilab
+ getTextPane().setLastModified(newSavedFile.lastModified());
+
+ textPaneAt.setName(fileToSave);
+ setTitle(textPaneAt.getTitle());
+
+ return true;
+ }
+
+ /**
+ * Check for external modification. If it is the case, propose to select a
+ * new file name.
+ *
+ * @param filename
+ * The name of the file
+ * @return the filename where to save
+ */
+ public String checkExternalModification(String filename) {
+ File newSavedFile = new File(filename);
+ if (newSavedFile.lastModified() > getTextPane().getLastModified()) {
+ if (ScilabModalDialog.show(this, String.format(SciNotesMessages.EXTERNAL_MODIFICATION, newSavedFile.getPath()),
+ SciNotesMessages.REPLACE_FILE_TITLE, IconType.QUESTION_ICON, ButtonType.YES_NO) == AnswerOption.NO_OPTION) {
+ return chooseFileToSave(SciNotesMessages.SAVE);
+ }
+ }
+ return filename;
+ }
+
+ /**
+ * Return through a file selector the name of the selected file.
+ *
+ * @param title
+ * the title for JFileChooser
+ * @return the file picked up by the user
+ */
+ public String chooseFileToSave(String title) {
+ return chooseFileToSave(title, null);
+ }
+
+ /**
+ * Return through a file selector the name of the selected file.
+ *
+ * @param title
+ * the title for JFileChooser
+ * @param path
+ * the path where to open the filechooser
+ * @return the file picked up by the user
+ */
+ public String chooseFileToSave(String title, String path) {
+ String extension = new String();
+
+ String initialDirectoryPath = path;
+ if (initialDirectoryPath == null) {
+ initialDirectoryPath = getTextPane().getName();
+ }
+ if (initialDirectoryPath == null) {
+ if (firstOpen) {
+ initialDirectoryPath = CommonFileUtils.getCWD();
+ firstOpen = false;
+ } else {
+ initialDirectoryPath = ConfigManager.getLastOpenedDirectory();
+ }
+ }
+
+ SciFileFilter sceFilter = new SciFileFilter(ALL_SCE_FILES, null, 0);
+ SciFileFilter sciFilter = new SciFileFilter(ALL_SCI_FILES, null, 1);
+ SciFileFilter scxFilter = new SciFileFilter(ALL_SCX_FILES, null, 2);
+ SciFileFilter tstFilter = new SciFileFilter(ALL_TST_FILES, null, 3);
+ SciFileFilter startFilter = new SciFileFilter(ALL_START_FILES, null, 4);
+ SciFileFilter quitFilter = new SciFileFilter(ALL_QUIT_FILES, null, 5);
+ SciFileFilter demFilter = new SciFileFilter(ALL_DEM_FILES, null, 6);
+ SciFileFilter allFilter = new SciFileFilter(ALL_FILES, null, 7);
+ SciFileFilter allScilabFilter = new SciFileFilter(ALL_SCILAB, null, 8);
+
+ SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+
+ fileChooser.setAcceptAllFileFilterUsed(false);
+ fileChooser.setInitialDirectory(initialDirectoryPath);
+ fileChooser.setUiDialogType(Juigetfile.SAVE_DIALOG);
+
+ // order is also important here
+ fileChooser.addChoosableFileFilter(sceFilter);
+ fileChooser.addChoosableFileFilter(sciFilter);
+ fileChooser.addChoosableFileFilter(scxFilter);
+ fileChooser.addChoosableFileFilter(tstFilter);
+ fileChooser.addChoosableFileFilter(startFilter);
+ fileChooser.addChoosableFileFilter(quitFilter);
+ fileChooser.addChoosableFileFilter(demFilter);
+ fileChooser.addChoosableFileFilter(allFilter);
+ fileChooser.addChoosableFileFilter(allScilabFilter);
+
+ // select default file type
+ fileChooser.setFileFilter(sceFilter);
+ fileChooser.setTitle(title);
+
+ String name = getTextPane().getName();
+ if (name == null) {
+ name = ((ScilabDocument) getTextPane().getDocument()).getFirstFunctionName();
+ if (name != null) {
+ name += SCI_EXTENSION;
+ }
+ }
+
+ if (name != null) {
+ fileChooser.setSelectedFile(new File(name));
+ }
+
+ int retval = fileChooser.showSaveDialog(this);
+
+ if (retval == JFileChooser.APPROVE_OPTION) {
+ File f = fileToCanonicalFile(fileChooser.getSelectedFile());
+ initialDirectoryPath = f.getPath();
+ if (f.exists()) {
+ if (ScilabModalDialog.show(this, SciNotesMessages.REPLACE_FILE_TITLE, SciNotesMessages.FILE_ALREADY_EXIST, IconType.QUESTION_ICON,
+ ButtonType.YES_NO) == AnswerOption.NO_OPTION) {
+ return chooseFileToSave(SciNotesMessages.SAVE);
+ }
+ }
+
+ /* we test if the file has already a scilab extension */
+ boolean hasNoExtension = true;
+
+ // if the file name is like this : any character , a dot , then
+ // 2,3or 4 characters, then
+ // we consider the file has already an extension
+ // we previously only check for .sci and .sce extension, but what if
+ // the user open a txt file
+ String fileName = f.getName();
+ if (fileName.lastIndexOf(DOT) != -1) {
+ if (fileName.substring(fileName.lastIndexOf(DOT), fileName.length()).length() >= 2
+ && fileName.substring(fileName.lastIndexOf(DOT), fileName.length()).length() <= 4) {
+ hasNoExtension = false;
+ }
+ }
+
+ /* if no extension , we add it */
+ if (hasNoExtension) {
+ if (fileChooser.getFileFilter() == sciFilter) {
+ extension = SCI_EXTENSION;
+ } else if (fileChooser.getFileFilter() == sceFilter) {
+ extension = SCE_EXTENSION;
+ } else if (fileChooser.getFileFilter() == scxFilter) {
+ extension = SCE_EXTENSION;
+ } else if (fileChooser.getFileFilter() == tstFilter) {
+ extension = TST_EXTENSION;
+ } else if (fileChooser.getFileFilter() == startFilter) {
+ extension = START_EXTENSION;
+ } else if (fileChooser.getFileFilter() == quitFilter) {
+ extension = QUIT_EXTENSION;
+ } else if (fileChooser.getFileFilter() == demFilter) {
+ extension = DEM_EXTENSION;
+ } else {
+ extension = "";
+ }
+ return f.getPath() + extension;
+ }
+
+ if (initialDirectoryPath != null) {
+ ConfigManager.saveLastOpenedDirectory(initialDirectoryPath);
+ }
+
+ return f.getPath();
+ } else if (retval == JFileChooser.CANCEL_OPTION) {
+ return "";
+ }
+
+ return null;
+ }
+
+ /**
+ * Save a file.
+ *
+ * @param path
+ * the initial path where the filechooser will be open
+ * @return execution status
+ */
+ public boolean saveAs(String path) {
+ String filename = chooseFileToSave(SciNotesMessages.SAVE_AS, path);
+ if (filename == null || filename.length() == 0) {
+ return true;
+ }
+
+ File f = new File(filename);
+ ScilabDocument styledDocument = (ScilabDocument) getTextPane().getDocument();
+
+ if (!SaveFile.doSave(getTextPane(), getTabPane().getSelectedIndex(), f, editorKit)) {
+ return false;
+ }
+
+ if (getTextPane().getName() == null) {
+ String name = getTabPane().getScilabTitleAt(getTabPane().getSelectedIndex());
+ String index = name.substring(name.length() - 1, name.length());
+ tabList.remove(Integer.valueOf(index));
+ closedTabList.add(Integer.valueOf(index));
+ }
+
+ firstOpen = false;
+ ConfigManager.saveLastOpenedDirectory(f.getPath());
+ ConfigSciNotesManager.saveToRecentOpenedFiles(f.getPath());
+ ConfigSciNotesManager.renameOpenFilesItem(f.getPath(), this, getTextPane());
+ getTextPane().setName(f.getPath());
+ getTabPane().setTitleAt(getTabPane().getSelectedIndex(), f.getName());
+ setTitle(getTextPane().getTitle());
+
+ RecentFileAction.updateRecentOpenedFilesMenu(this);
+
+ if (navigator != null) {
+ navigator.update(styledDocument);
+ }
+
+ styledDocument.setContentModified(false);
+ getTextPane().setLastModified(f.lastModified());
+ getTextPane().setReadOnly(false);
+ getInfoBar().setText(getTextPane().getInfoBarText());
+
+ return true;
+ }
+
+ /**
+ * Create a new tab in SciNotes.
+ *
+ * @param title
+ * the title of the tab
+ * @return the text component inside the tab
+ */
+ public ScilabEditorPane addTab(String title) {
+ return addTab(title, Integer.MAX_VALUE);
+ }
+
+ /**
+ * Create a new tab in SciNotes.
+ *
+ * @param title
+ * the title of the tab
+ * @param index
+ * the index where to put the new tab
+ * @return the text component inside the tab
+ */
+ public ScilabEditorPane addTab(String title, int index) {
+ return addTab(title, index, 0);
+ }
+
+ /**
+ * Create a new tab in SciNotes.
+ *
+ * @param title
+ * the title of the tab
+ * @param index
+ * the index where to put the new tab
+ * @return the text component inside the tab
+ */
+ public ScilabEditorPane addTab(String title, int index, int caretPos) {
+ ScilabEditorPane sep = new ScilabEditorPane(this);
+ initPane(sep);
+ int ind = Math.min(Math.max(0, index), tabPane.getTabCount());
+ tabPane.insertTab(title, null, sep.getEditorComponent(), "", ind);
+ tabPane.setSelectedIndex(ind);
+ initInputMap(sep);
+ updateTabTitle();
+ getInfoBar().setText(sep.getInfoBarText());
+ repaint();
+ sep.init(caretPos);
+ return sep;
+ }
+
+ public void addRestoreTab() {
+ try {
+ JPanel panel = RestoreOpenedFilesAction.getTab(this, getUUID().toString());
+ if (panel != null) {
+ tabPane.addTab("Restore", panel);
+ }
+ } catch (Exception e) {
+ System.err.println(e);
+ }
+ }
+
+ /**
+ * Init a pane
+ *
+ * @param pane
+ * the pane to init
+ */
+ public void initPane(ScilabEditorPane pane) {
+ initPane(pane, !SciNotesOptions.getSciNotesDisplay().wrapLines);
+ }
+
+ /**
+ * Init the EditorPane.
+ *
+ * @param pane
+ * the EditorPane
+ * @param plain
+ * true for a plain view or false for a wrapped view
+ */
+ public void initPane(ScilabEditorPane pane, boolean plain) {
+ setHighlight(pane);
+ ScilabEditorKit kit = new ScilabEditorKit(plain);
+ pane.setEditorKit(kit);
+
+ // Panel of line number for the text pane
+ pane.getXln().setWhereamiLineNumbering(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
+ activateHelpOnTyping(pane);
+
+ pane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+ pane.setFont(kit.getStylePreferences().tokenFonts[0]);
+
+ pane.setBackground(SciNotesOptions.getSciNotesDisplay().backgroundColor);
+ pane.setCaretColor(SciNotesOptions.getSciNotesDisplay().caretColor);
+
+ pane.setFocusable(true);
+ pane.setRequestFocusEnabled(true);
+ pane.setDragEnabled(true); /* Bug 5497 */
+
+ DropFilesListener dndTarget = new DropFilesListener(pane);
+
+ pane.setComponentPopupMenu(SciNotesGUI.generateRightClickPopup(this));
+ }
+
+ /**
+ * Init the EditorPane with the InputMap found in ConfigSciNotesManager
+ *
+ * @param pane
+ * the EditorPane
+ */
+ public void initInputMap(ScilabEditorPane pane) {
+ setKeyStrokeAction(pane, this);
+ LineBeautifierAction.putInInputMap(pane);
+ InsertOverwriteAction.putInInputMap(pane);
+ }
+
+ /**
+ * Split the EditorPane
+ *
+ * @param vertical
+ * true for a vertical split
+ */
+ public void splitTab(boolean vertical) {
+ ScilabEditorPane pane = getTextPane();
+ Component bottom = pane.getEditorComponent().getBottom();
+ int state = pane.getXln().getState();
+ ScilabEditorPane leftPane = new ScilabEditorPane(editor);
+ ScilabEditorPane rightPane = new ScilabEditorPane(editor);
+ if (navigator != null) {
+ navigator.changePaneOnSplit(pane, leftPane);
+ }
+ initPane(leftPane, true);
+ initPane(rightPane, true);
+ leftPane.setOtherPaneInSplit(rightPane);
+ rightPane.setOtherPaneInSplit(leftPane);
+ pane.copyProps(leftPane);
+ pane.copyProps(rightPane);
+ ScilabDocument doc = (ScilabDocument) pane.getDocument();
+ leftPane.setDocument(doc);
+ rightPane.setDocument(doc);
+ leftPane.setCaretPosition(0);
+ rightPane.setCaretPosition(0);
+ JSplitPane split;
+ if (vertical) {
+ split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
+ } else {
+ split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+ }
+ leftPane.getXln().setWhereamiLineNumbering(state);
+ rightPane.getXln().setWhereamiLineNumbering(state);
+ split.setLeftComponent(leftPane.getScrollPane());
+ split.setRightComponent(rightPane.getScrollPane());
+ split.setResizeWeight(0.5);
+ rightPane.setEditorComponent(leftPane.getEditorComponent());
+ leftPane.setSplitPane(split);
+ rightPane.setSplitPane(split);
+
+ activateHelpOnTyping(leftPane);
+ activateHelpOnTyping(rightPane);
+ initInputMap(leftPane);
+ initInputMap(rightPane);
+ if (doc.getBinary()) {
+ leftPane.setBinary(true);
+ rightPane.setBinary(true);
+ }
+ getInfoBar().setText(leftPane.getInfoBarText());
+ updateTabTitle();
+ tabPane.setComponentAt(tabPane.getSelectedIndex(), leftPane.getEditorComponent());
+ leftPane.getEditorComponent().insertBottomComponent(bottom);
+ leftPane.requestFocus();
+ }
+
+ /**
+ * Remove a split
+ */
+ public void removeSplit() {
+ if (((EditorComponent) tabPane.getSelectedComponent()).isSplited()) {
+ ScilabEditorPane pane = new ScilabEditorPane(editor);
+ ScilabEditorPane textpane = getTextPane();
+ Component bottom = textpane.getEditorComponent().getBottom();
+ if (navigator != null) {
+ navigator.changePaneOnSplit(textpane, pane);
+ }
+ initPane(pane);
+ textpane.setOtherPaneInSplit(null);
+ textpane.copyProps(pane);
+ ScilabDocument doc = (ScilabDocument) textpane.getDocument();
+ pane.setDocument(doc);
+ pane.setCaretPosition(0);
+ activateHelpOnTyping(pane);
+ tabPane.setComponentAt(tabPane.getSelectedIndex(), pane.getEditorComponent());
+ initInputMap(pane);
+ if (doc.getBinary()) {
+ pane.setBinary(true);
+ }
+ getInfoBar().setText(pane.getInfoBarText());
+ updateTabTitle();
+ pane.getEditorComponent().insertBottomComponent(bottom);
+ pane.requestFocus();
+ }
+ }
+
+ /**
+ * Create an empty tab inside SciNotes.
+ *
+ * @return the text component inside the tab
+ */
+ public ScilabEditorPane addEmptyTab() {
+ ScilabEditorPane sep;
+ int n = getNumberForEmptyTab();
+ sep = addTab(SciNotesMessages.UNTITLED + n);
+ sep.setShortName(SciNotesMessages.UNTITLED + n);
+ sep.setTitle(SciNotesMessages.UNTITLED + n);
+ setTitle(sep.getTitle());
+ SciNotesOptions.Header header = SciNotesOptions.getSciNotesHeader();
+ if (header.header != null) {
+ ((ScilabDocument) sep.getDocument()).disableUndoManager();
+ try {
+ sep.getDocument().insertString(0, header.header, null);
+ } catch (BadLocationException e) { }
+ sep.init(header.header.length());
+ ((ScilabDocument) sep.getDocument()).setContentModified(false);
+ ((ScilabDocument) sep.getDocument()).enableUndoManager();
+ }
+
+ return sep;
+ }
+
+ /**
+ * Get an integer used for untitled document
+ */
+ public int getNumberForEmptyTab() {
+ if (closedTabList.size() > 0) {
+ Integer n = Collections.min(closedTabList);
+ closedTabList.remove(n);
+ return n.intValue();
+ } else {
+ numberOfUntitled++;
+ tabList.add(Integer.valueOf(numberOfUntitled));
+ return numberOfUntitled;
+ }
+ }
+
+ /**
+ * Add or remove '*' prefix in current tab tile according to
+ * isContentModified().
+ */
+ public void updateTabTitle() {
+ updateTabTitle(getTabPane().getSelectedIndex());
+ }
+
+ /**
+ * Add or remove '*' prefix in tab title (corresponding to the given index) according to
+ * isContentModified().
+ */
+ public void updateTabTitle(int index) {
+ StringBuffer newTitle = new StringBuffer();
+ ScilabEditorPane currentTextPane = getTextPane(index);
+ if (((ScilabDocument) currentTextPane.getDocument()).isContentModified()) {
+ newTitle.append('*');
+ }
+
+ String textPaneName = currentTextPane.getName();
+ try {
+ File f = new File(textPaneName);
+ newTitle.append(f.getName());
+ } catch (NullPointerException e) { // not a file name, no path prefix to
+ // remove, but maybe a '*'
+ textPaneName = getTabPane().getScilabTitleAt(index);
+ if (textPaneName.charAt(0) == '*') {
+ newTitle.append(textPaneName.substring(1, textPaneName.length()));
+ } else {
+ newTitle.append(textPaneName);
+ }
+ }
+ getTabPane().setTitleAt(index, newTitle.toString());
+ }
+
+ /**
+ * @param button
+ * the UndoButton used in this editor
+ */
+ public void setUndoButton(JButton button) {
+ undoButton = button;
+ enableUndoButton(false);
+ }
+
+ /**
+ * @param b
+ * true to enable the button
+ */
+ public void enableUndoButton(boolean b) {
+ if (undoButton != null) {
+ undoButton.setEnabled(b);
+ }
+ }
+
+ /**
+ * Undo last modification.
+ */
+ public void undo() {
+ ScilabDocument doc = (ScilabDocument) getTextPane().getDocument();
+ synchronized (doc) {
+ doc.getUndoManager().undo();
+ }
+ }
+
+ /**
+ * @param button
+ * the RedoButton used in this editor
+ */
+ public void setRedoButton(JButton button) {
+ redoButton = button;
+ enableRedoButton(false);
+ }
+
+ /**
+ * @param b
+ * true to enable the button
+ */
+ public void enableRedoButton(boolean b) {
+ if (redoButton != null) {
+ redoButton.setEnabled(b);
+ }
+ }
+
+ /**
+ * Redo last modification.
+ */
+ public void redo() {
+ ScilabDocument doc = (ScilabDocument) getTextPane().getDocument();
+ synchronized (doc) {
+ doc.getUndoManager().redo();
+ }
+ }
+
+ /**
+ * Reload a file inside SciNotes.
+ *
+ * @param index
+ * the index
+ */
+ public void reload(int index) {
+ ScilabEditorPane textPaneAt = getTextPane(index);
+ if (textPaneAt != null && textPaneAt.getName() != null) {
+ if ((index == 0) && (getTabPane().getTabCount() == 1)) {
+ for (int j = 0; j < tabPane.getChangeListeners().length; j++) {
+ tabPane.removeChangeListener(tabPane.getChangeListeners()[j]);
+ }
+ }
+ ConfigSciNotesManager.removeFromOpenFiles(this, textPaneAt);
+ tabPane.remove(index);
+ File f = new File(textPaneAt.getName());
+ if (f.exists()) {
+ loadFile(f, index);
+ } else {
+ createNewFile(f);
+ }
+ }
+ }
+
+ /**
+ * Load a file inside SciNotes.
+ *
+ * @param f
+ * the file to open
+ */
+ public void readFile(File f) {
+ /** Is this file already opened */
+ boolean alreadyOpened = false;
+ for (int i = 0; i < tabPane.getTabCount(); i++) {
+ ScilabEditorPane textPaneAt = getTextPane(i);
+ if (f.getAbsolutePath().equals(textPaneAt.getName())) {
+ /* File is already opnened */
+ tabPane.setSelectedIndex(i);
+ alreadyOpened = true;
+ break;
+ }
+ }
+
+ if (!alreadyOpened) {
+ if (f.exists()) {
+ loadFile(f);
+ } else {
+ createNewFile(f);
+ }
+ }
+ }
+
+ /**
+ * Load a file inside SciNotes.
+ *
+ * @param file
+ * the file to open
+ */
+ public void readFileAndWait(File file) {
+ /** Is this file already opened */
+ File f = file;
+ boolean alreadyOpened = false;
+ int index = -1;
+ for (int i = 0; i < tabPane.getTabCount(); i++) {
+ ScilabEditorPane textPaneAt = getTextPane(i);
+ if (textPaneAt != null && f.getAbsolutePath().equals(textPaneAt.getName())) {
+ /* File is already opened */
+ tabPane.setSelectedIndex(i);
+ if (f.lastModified() > textPaneAt.getLastModified()) {
+
+ /*
+ * Create a new messagebox to know what the user wants to do
+ * if the file has been modified outside SciNotes
+ */
+ MessageBox messageBox = ScilabMessageBox.createMessageBox();
+ messageBox.setTitle(SciNotesMessages.REPLACE_FILE_TITLE);
+ messageBox.setMessage(String.format(SciNotesMessages.EXTERNAL_MODIFICATION, textPaneAt.getName()));
+
+ String[] labels = new String[] { SciNotesMessages.RELOAD, SciNotesMessages.OVERWRITE, SciNotesMessages.IGNORE };
+ messageBox.setButtonsLabels(labels);
+
+ messageBox.setIcon("question"); // Question icon
+
+ messageBox.setParentForLocation(this); // Centered on
+ // SciNotes main
+ // window
+
+ messageBox.displayAndWait(); // Waits for a user action
+
+ switch (messageBox.getSelectedButton()) {
+ case 1: // Reload
+ if ((i == 0) && (getTabPane().getTabCount() == 1)) {
+ for (int j = 0; j < tabPane.getChangeListeners().length; j++) {
+ tabPane.removeChangeListener(tabPane.getChangeListeners()[j]);
+ }
+ }
+ tabPane.remove(i);
+ f = new File(textPaneAt.getName());
+ index = i;
+ break;
+ case 2: // Overwrite 2
+ overwrite(i);
+ alreadyOpened = true;
+ break;
+ default: // Ignore
+ alreadyOpened = true;
+ }
+ } else {
+ alreadyOpened = true;
+ }
+ break;
+ }
+ }
+
+ if (!alreadyOpened) {
+ if (f.exists()) {
+ loadFile(f, index);
+ } else {
+ createNewFile(f);
+ }
+ }
+ }
+
+ public int getTextPaneIndex(ScilabEditorPane sep) {
+ int n = tabPane.getTabCount();
+ for (int i = 0; i < n; ++i) {
+ ScilabEditorPane pane = getTextPane(i);
+ if (pane != null && (pane == sep || pane.getOtherPaneInSplit() == sep)) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Get current text component. If the window is splitted, then return the
+ * focused text component.
+ *
+ * @return the text component
+ */
+ public ScilabEditorPane getTextPane() {
+ try {
+ if (tabPane.getSelectedComponent() instanceof EditorComponent) {
+ EditorComponent c = (EditorComponent) tabPane.getSelectedComponent();
+ ScilabEditorPane pane = c.getEditorPane();
+ if (ScilabEditorPane.getFocusedPane() == pane.getOtherPaneInSplit()) {
+ return pane.getOtherPaneInSplit();
+ }
+
+ return pane;
+ }
+ } catch (NullPointerException e) {
+ } catch (ArrayIndexOutOfBoundsException e) {
+ }
+
+ return null;
+ }
+
+ /**
+ * Get text component at index.
+ *
+ * @param index
+ * the index of the textpane
+ * @return the text component
+ */
+ public ScilabEditorPane getTextPane(int index) {
+ try {
+ if (tabPane.getComponentAt(index) instanceof EditorComponent) {
+ EditorComponent c = (EditorComponent) tabPane.getComponentAt(index);
+ ScilabEditorPane pane = c.getEditorPane();
+ if (ScilabEditorPane.getFocusedPane() == pane.getOtherPaneInSplit()) {
+ return pane.getOtherPaneInSplit();
+ }
+
+ return pane;
+ }
+ } catch (NullPointerException e) {
+ } catch (ArrayIndexOutOfBoundsException e) {
+ }
+
+ return null;
+ }
+
+ /**
+ * Set the keystroke actions
+ */
+ public static void setAllMenus() {
+ for (SciNotes ed : scinotesList) {
+ SciNotesGUI.reinitMenus(ed);
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.setComponentPopupMenu(SciNotesGUI.generateRightClickPopup(ed));
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().setComponentPopupMenu(SciNotesGUI.generateRightClickPopup(ed));
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the keystroke actions
+ */
+ public static void setKeyStrokeActions() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ ed.initInputMap(sep);
+ if (sep.getOtherPaneInSplit() != null) {
+ ed.initInputMap(sep.getOtherPaneInSplit());
+ }
+ }
+ }
+ }
+
+ /**
+ * Enable the whereami-line numbering
+ *
+ * @param state
+ * int
+ */
+ public static void setWhereamiLineNumbering() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.getXln().setWhereamiLineNumbering(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().getXln().setWhereamiLineNumbering(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
+ }
+ }
+ ed.repaint();
+ }
+ }
+
+ /**
+ * Auto-indent mode management
+ *
+ * @param b
+ * true to activate auto-indent mode
+ */
+ public static void setAutoIndent() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ ((ScilabDocument) sep.getDocument()).setAutoIndent(SciNotesOptions.getSciNotesDisplay().automaticIndent);
+ if (sep.getOtherPaneInSplit() != null) {
+ ((ScilabDocument) sep.getOtherPaneInSplit().getDocument()).setAutoIndent(SciNotesOptions.getSciNotesDisplay().automaticIndent);
+ }
+ }
+ }
+ }
+
+ /**
+ * Horizontal Wrap mode management
+ *
+ * @param b
+ * true to activate horizontal wrapping mode
+ */
+ public static void setHorizontalWrap() {
+ if (SciNotesOptions.getSciNotesDisplay().wrapLines != mustWrapLines) {
+ mustWrapLines = SciNotesOptions.getSciNotesDisplay().wrapLines;
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ if (sep.getOtherPaneInSplit() == null) {
+ ScilabEditorPane pane = new ScilabEditorPane(editor);
+ ed.initPane(pane, !mustWrapLines);
+ sep.copyProps(pane);
+ pane.setDocument(sep.getDocument());
+ pane.setCaretPosition(sep.getCaretPosition());
+ pane.getXln().setWhereamiLineNumbering(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
+ ed.tabPane.setComponentAt(i, pane.getEditorComponent());
+ SciNotes.activateHelpOnTyping(pane);
+ ed.initInputMap(pane);
+ if (((ScilabDocument) sep.getDocument()).getBinary()) {
+ pane.setBinary(true);
+ }
+ ed.getInfoBar().setText(pane.getInfoBarText());
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Set a line numbering compatible with the whereami function
+ * @param state 0 for nothing, 1 for normal and 2 for whereami
+ */
+
+ /**
+ * Enable the highlighted line in this editor
+ *
+ * @param b
+ * boolean
+ */
+ public static void enableHighlightedLine(boolean b) {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.enableHighlightedLine(SciNotesOptions.getSciNotesDisplay().highlightCurrentLine);
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().enableHighlightedLine(SciNotesOptions.getSciNotesDisplay().highlightCurrentLine);
+ }
+ }
+ }
+ }
+
+ /**
+ * Enable the help on typing in the current textPane
+ *
+ * @param pane
+ * the pane
+ */
+ public static void activateHelpOnTyping(ScilabEditorPane pane) {
+ pane.activateHelpOnTyping();
+ }
+
+ /**
+ * Enable the help on typing in this editor
+ */
+ public static void activateHelpOnTyping() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.activateHelpOnTyping();
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().activateHelpOnTyping();
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the color of the highlighted line in this editor
+ *
+ * @param c
+ * Color
+ */
+ public static void setDefaultTabulation() {
+ TabManager.Tabulation tab = new TabManager.Tabulation();
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.getTabManager().setTabulation(tab);
+ View view = ((ScilabDocument) sep.getDocument()).getView();
+ if (view != null) {
+ if (view instanceof ScilabView) {
+ ((ScilabView) view).setTabRepresentation(tab);
+ ((ScilabView) view).reinitialize();
+ } else {
+ ((ScilabPlainView) view).setTabRepresentation(tab);
+ ((ScilabPlainView) view).reinitialize();
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the color of the highlighted line in this editor
+ *
+ * @param c
+ * Color
+ */
+ public static void updatePanes(SciNotesConfiguration.Conf conf) {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.configurationChanged(conf);
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().configurationChanged(conf);
+ }
+ sep.repaint();
+ }
+ }
+ }
+
+ public static void updateFontSize(int inc) {
+ Font baseFont = null;
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ ((ScilabEditorKit) sep.getEditorKit()).getStylePreferences().changeBaseFontSize(inc);
+ if (baseFont == null) {
+ baseFont = ((ScilabEditorKit) sep.getEditorKit()).getStylePreferences().getBaseFont();
+ }
+ if (sep.getOtherPaneInSplit() != null) {
+ ((ScilabEditorKit) sep.getOtherPaneInSplit().getEditorKit()).getStylePreferences().changeBaseFontSize(n);
+ sep.getOtherPaneInSplit().resetFont();
+ }
+ sep.resetFont();
+ }
+ }
+
+ if (baseFont != null) {
+ ScilabContext.saveFont(baseFont);
+ }
+ }
+
+ /**
+ * Set the color of the highlighted line in this editor
+ *
+ * @param c
+ * Color
+ */
+ public static void setHighlightedLineColor() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.setHighlightedLineColor(SciNotesOptions.getSciNotesDisplay().currentLineColor);
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().setHighlightedLineColor(SciNotesOptions.getSciNotesDisplay().currentLineColor);
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the color of the contour of the highlighted line in this editor
+ *
+ * @param c
+ * Color
+ */
+ public static void setHighlightedContourColor() {
+ for (SciNotes ed : scinotesList) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ sep.setHighlightedContourColor(null);
+ if (sep.getOtherPaneInSplit() != null) {
+ sep.getOtherPaneInSplit().setHighlightedContourColor(null);
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the highlighted line in this textPane
+ *
+ * @param sep
+ * ScilabEditorPane
+ */
+ public static void setHighlight(ScilabEditorPane sep) {
+ sep.enableHighlightedLine(SciNotesOptions.getSciNotesDisplay().highlightCurrentLine);
+ sep.setHighlightedLineColor(SciNotesOptions.getSciNotesDisplay().currentLineColor);
+ sep.setHighlightedContourColor(null);
+ }
+
+ /**
+ * Get SciNotes as a Tab.
+ *
+ * @return SciNotes instance
+ * @see org.scilab.modules.gui.tab.Tab#getAsSimpleTab()
+ */
+ public SimpleTab getAsSimpleTab() {
+ return this;
+ }
+
+ /**
+ * Get SciNotes parent Window.
+ *
+ * @return parent Window
+ * @see org.scilab.modules.gui.tab.Tab#getParentWindow()
+ */
+ public SwingScilabWindow getParentWindow() {
+ if (parentWindow == null) {
+ return super.getParentWindow();
+ }
+ return parentWindow;
+ }
+
+ /**
+ * Get the UUID associated with the editor instance.
+ *
+ * @return unique identifier
+ */
+ public UUID getUUID() {
+ return uuid;
+ }
+
+ /**
+ * Add a status bar to SciNotes.
+ *
+ * @param infoBarToAdd
+ * the status bar to be added
+ * @see org.scilab.modules.gui.uielement.UIElement#addInfoBar(org.scilab.modules.gui.textbox.TextBox)
+ */
+ public void addInfoBar(TextBox infoBarToAdd) {
+ setInfoBar(infoBarToAdd);
+ }
+
+ /**
+ * Add a menu bar to SciNotes.
+ *
+ * @param menuBarToAdd
+ * the menu bar to be added
+ * @see org.scilab.modules.gui.uielement.UIElement#addMenuBar(org.scilab.modules.gui.menubar.MenuBar)
+ */
+ public void addMenuBar(MenuBar menuBarToAdd) {
+ setMenuBar(menuBarToAdd);
+ }
+
+ /**
+ * Add a tool bar to SciNotes.
+ *
+ * @param toolBarToAdd
+ * the tool bar to be added
+ * @see org.scilab.modules.gui.uielement.UIElement#addToolBar(org.scilab.modules.gui.toolbar.ToolBar)
+ */
+ public void addToolBar(ToolBar toolBarToAdd) {
+ setToolBar(toolBarToAdd);
+ }
+
+ /**
+ * Get SciNotes main ScilabTabbedPane.
+ *
+ * @return SciNotes main ScilabTabbedPane
+ */
+ public ScilabTabbedPane getTabPane() {
+ return tabPane;
+ }
+
+ /**
+ * Set SciNotes main ScilabTabbedPane.
+ *
+ * @param tabPane
+ * SciNotes main ScilabTabbedPane
+ */
+ public void setTabPane(ScilabTabbedPane tabPane) {
+ this.tabPane = tabPane;
+ }
+
+ /**
+ * Load a file and add it at the end
+ *
+ * @param f
+ * the file to load
+ */
+ public void loadFile(File f) {
+ loadFile(f, -1);
+ }
+
+ /**
+ * Load a file and add it at the index
+ *
+ * @param f
+ * the file to load
+ * @param index
+ * the index where to put the file
+ */
+ public void loadFile(File f, int index) {
+ ScilabDocument styleDocument = null;
+ ScilabEditorPane theTextPane;
+
+ // File exist
+ if (f.exists()) {
+ if (!f.canRead()) {
+ ScilabModalDialog.show(this, SciNotesMessages.NOTREADABLE, SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ if (getTabPane().getTabCount() == 0) {
+ addEmptyTab();
+ }
+ return;
+ }
+
+ getInfoBar().setText(SciNotesMessages.LOADING);
+
+ if (index != -1) {
+ theTextPane = addTab(f.getName(), index);
+ } else {
+ theTextPane = addTab(f.getName());
+ }
+ styleDocument = (ScilabDocument) theTextPane.getDocument();
+ styleDocument.disableUndoManager();
+ theTextPane.setLastModified(f.lastModified());
+
+ try {
+ styleDocument.setUpdater(false);
+ boolean indentMode = styleDocument.getAutoIndent();
+ styleDocument.setAutoIndent(false);
+ try {
+ ((ScilabEditorKit) editorKit).read(this, f, styleDocument, 0);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ styleDocument.setAutoIndent(indentMode);
+ styleDocument.setUpdater(true);
+ } catch (IOException ioex) {
+ ioex.printStackTrace();
+ }
+
+ theTextPane.setName(f.getAbsolutePath());
+ getTabPane().setTitleAt(getTabPane().getSelectedIndex(), f.getName());
+ setTitle(theTextPane.getTitle());
+ styleDocument.setContentModified(false);
+ styleDocument.enableUndoManager();
+
+ if (styleDocument.getBinary()) {
+ theTextPane.setBinary(true);
+ }
+
+ if (!f.canWrite()) {
+ getTextPane().setReadOnly(true);
+ JOptionPane.showMessageDialog(SciNotes.this, SciNotesMessages.READONLY);
+ }
+
+ getInfoBar().setText(theTextPane.getInfoBarText());
+
+ EncodingAction.updateEncodingMenu((ScilabDocument) getTextPane().getDocument());
+
+ firstOpen = false;
+ ConfigManager.saveLastOpenedDirectory(f.getPath());
+ ConfigSciNotesManager.saveToRecentOpenedFiles(f.getPath());
+ ConfigSciNotesManager.saveToOpenFiles(f.getPath(), this, getTextPane());
+
+ // Empty the undo Manager
+ UndoManager undo = ((ScilabDocument) getTextPane().getDocument()).getUndoManager();
+ undo.discardAllEdits();
+
+ if (getTabPane().getTabCount() == 2) {
+ ScilabEditorPane pane = getTextPane(0);
+ if (pane != null && pane.getName() == null && !((ScilabDocument) pane.getDocument()).isContentModified()) {
+ closeTabAt(0);
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates a file if it doesn't exist
+ *
+ * @param f
+ * the file to create
+ */
+ public void createNewFile(File f) {
+ ScilabEditorPane theTextPane = addEmptyTab();
+ ScilabDocument styleDocument = null;
+ int choice = JOptionPane.showConfirmDialog(SciNotes.this, String.format(SciNotesMessages.FILE_DOESNT_EXIST, f.getName()), SCINOTES,
+ JOptionPane.YES_NO_OPTION);
+ if (choice == 0) { // OK
+ styleDocument = (ScilabDocument) theTextPane.getDocument();
+ styleDocument.disableUndoManager();
+
+ BufferedWriter bw = null;
+ OutputStreamWriter osw = null;
+ FileOutputStream fos = null;
+
+ try {
+ fos = new FileOutputStream(f);
+ osw = new OutputStreamWriter(fos, styleDocument.getEncoding());
+ bw = new BufferedWriter(osw);
+ editorKit.write(bw, styleDocument, 0, styleDocument.getLength());
+ bw.flush();
+ } catch (IOException e) {
+ System.err.println(e);
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ } finally {
+ try {
+ if (fos != null) {
+ fos.close();
+ }
+ if (osw != null) {
+ osw.close();
+ }
+ if (bw != null) {
+ bw.close();
+ }
+ } catch (IOException e) {
+ System.err.println(e);
+ }
+ }
+
+ firstOpen = false;
+ ConfigManager.saveLastOpenedDirectory(f.getPath());
+ ConfigSciNotesManager.saveToRecentOpenedFiles(f.getPath());
+ ConfigSciNotesManager.saveToOpenFiles(theTextPane.getName(), this, theTextPane);
+
+ theTextPane.setName(f.getPath());
+ getTabPane().setTitleAt(getTabPane().getSelectedIndex(), f.getName());
+ setTitle(theTextPane.getTitle());
+ RecentFileAction.updateRecentOpenedFilesMenu(this);
+
+ styleDocument.setContentModified(false);
+ styleDocument.enableUndoManager();
+ theTextPane.setLastModified(f.lastModified());
+ }
+
+ getInfoBar().setText("");
+ }
+
+ /**
+ * EditorKit Getter
+ *
+ * @return EditorKit
+ */
+ public EditorKit getEditorKit() {
+ return editorKit;
+ }
+
+ /**
+ * @param scinotes
+ * the focused editor
+ */
+ public static void setEditor(SciNotes scinotes) {
+ editor = scinotes;
+ }
+
+ /**
+ * @return the focused editor
+ */
+ public static SciNotes getEditor() {
+ return editor;
+ }
+
+ /**
+ * EditorKit Setter
+ *
+ * @param editorKit
+ * EditorKit
+ */
+ public void setEditorKit(EditorKit editorKit) {
+ this.editorKit = editorKit;
+ }
+
+ /**
+ * Close scinotes from scilab.
+ *
+ * This method can be called outside the EDT thread.
+ */
+ public static void closeSciNotesFromScilab() {
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ SciNotes[] arr = scinotesList.toArray(new SciNotes[0]);
+ for (int i = 0; i < arr.length; i++) {
+ arr[i].setProtectOpenFileList(true);
+ ExitAction.doExit(arr[i]);
+ }
+ scinotesList.clear();
+ }
+ });
+ } catch (InterruptedException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ } catch (InvocationTargetException e) {
+ Logger.getLogger(SciNotes.class.getName()).severe(e.toString());
+ }
+ }
+
+ /**
+ * @param f
+ * the file
+ * @return the canonical file if possible
+ */
+ public static File fileToCanonicalFile(File f) {
+ /* Fix bug 5648 */
+ try {
+ return f.getCanonicalFile();
+ } catch (IOException e) {
+ return f;
+ }
+ }
+
+ /**
+ * Set the shortcuts in the pane relatively to the file
+ * keysConfiguration.xml
+ *
+ * @param sep
+ * the textpane
+ * @param ed
+ * the SciNotes editor
+ */
+ private static void setKeyStrokeAction(ScilabEditorPane sep, SciNotes ed) {
+ ScilabEditorPane s = ed.getTextPane(0);
+ if (s != null && s != sep) {
+ sep.setInputMap(JComponent.WHEN_FOCUSED, s.getInputMap());
+ return;
+ }
+
+ Map<String, KeyStroke> map = getActionKeys();
+ ClassLoader loader = ClassLoader.getSystemClassLoader();
+
+ for (Map.Entry<String, KeyStroke> entry : map.entrySet()) {
+ String actionName = entry.getKey();
+ KeyStroke key = entry.getValue();
+ String action = actionToName.get(actionName);
+ if (key != null) {
+ if (!action.equals("SciNotesCompletionAction")) {
+ String className;
+ if (action.lastIndexOf(DOT) != -1) {
+ className = action;
+ } else {
+ className = DEFAULTACTIONPATH + DOT + action;
+ }
+ try {
+ Class clazz = loader.loadClass(className);
+ Constructor constructor = clazz.getConstructor(new Class[] { String.class, SciNotes.class });
+ Object act = constructor.newInstance(new Object[] { "", ed });
+ sep.getInputMap().put(key, act);
+ } catch (ClassNotFoundException e) {
+ System.err.println("No action: " + className);
+ } catch (InstantiationException e) {
+ System.err.println("Problem to instantiate in action: " + className);
+ } catch (NoSuchMethodException e) {
+ System.err.println("No valid constructor in action: " + className);
+ } catch (IllegalAccessException e) {
+ System.err.println("The constructor must be public: " + className);
+ } catch (InvocationTargetException e) {
+ System.err.println("The constructor in " + className + " threw an exception :");
+ e.printStackTrace();
+ }
+ } else {
+ sep.getInputMap().put(key, new SciNotesCompletionAction(sep, ed));
+ }
+ }
+ }
+
+ // Add default common shortcuts
+ sep.getInputMap().put(KeyStroke.getKeyStroke("shift DELETE"), sep.getInputMap().get(map.get("scinotes-cut")));
+ sep.getInputMap().put(KeyStroke.getKeyStroke("CUT"), sep.getInputMap().get(map.get("scinotes-cut")));
+ sep.getInputMap().put(ScilabKeyStroke.getKeyStroke("OSSCKEY INSERT"), sep.getInputMap().get(map.get("scinotes-copy")));
+ sep.getInputMap().put(KeyStroke.getKeyStroke("COPY"), sep.getInputMap().get(map.get("scinotes-copy")));
+ sep.getInputMap().put(KeyStroke.getKeyStroke("shift INSERT"), sep.getInputMap().get(map.get("scinotes-paste")));
+ sep.getInputMap().put(KeyStroke.getKeyStroke("PASTE"), sep.getInputMap().get(map.get("scinotes-paste")));
+ }
+
+ /**
+ * Execute an action on file
+ * @param fileName the name of the file
+ * @param action the action
+ */
+ public static void executeAction(String fileName, ActionOnDocument action) throws IOException {
+ Charset charset = null;
+ try {
+ charset = ScilabEditorKit.tryToGuessEncoding(new File(fileName));
+ } catch (CharacterCodingException e) {
+ throw new IOException(SciNotesMessages.CANNOT_GUESS_ENCODING + ": " + fileName);
+ }
+ FileInputStream fis = new FileInputStream(fileName);
+ InputStreamReader isr = new InputStreamReader(fis, charset);
+ BufferedReader reader = new BufferedReader(isr);
+ ScilabDocument doc = new ScilabDocument();
+ ScilabEditorKit kit = new ScilabEditorKit();
+ try {
+ kit.read(reader, doc, 0);
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+
+ doc.addDocumentListener(doc);
+ if (!doc.getBinary()) {
+ action.actionOn(doc);
+ }
+
+ reader.close();
+ if (doc.isContentModified()) {
+ SaveFile.doSave(doc, new File(fileName), kit);
+ }
+ }
+
+ /**
+ * Execute an action on file
+ * @param fileName the name of the file
+ * @param actionsName the actions as an array
+ */
+ public static boolean executeAction(String fileName, final String[] actionsName) throws IOException {
+ final boolean[] hasAction = new boolean[] { false };
+ ActionOnDocument action = new ActionOnDocument() {
+ public void actionOn(ScilabDocument doc) throws IOException {
+ for (String act : actionsName) {
+ if (act.equalsIgnoreCase("indent")) {
+ hasAction[0] = true;
+ org.scilab.modules.scinotes.actions.IndentAction.getActionOnDocument().actionOn(doc);
+ } else if (act.equalsIgnoreCase("trailing")) {
+ hasAction[0] = true;
+ org.scilab.modules.scinotes.actions.RemoveTrailingWhiteAction.getActionOnDocument().actionOn(doc);
+ } else if (act.equalsIgnoreCase("quote")) {
+ hasAction[0] = true;
+ org.scilab.modules.scinotes.actions.DoubleQuoteStringAction.getActionOnDocument().actionOn(doc);
+ }
+ }
+ }
+ };
+
+ executeAction(fileName, action);
+
+ return hasAction[0];
+ }
+
+ /**
+ * Execute an action on file
+ * @param fileName the name of the file
+ * @param acts actions separated with , or ;
+ */
+ public static void executeAction(String fileName, String acts) throws IOException {
+ StringTokenizer toks = new StringTokenizer(acts, ",;");
+ String[] actions = new String[toks.countTokens()];
+ for (int i = 0; i < actions.length; i++) {
+ actions[i] = toks.nextToken();
+ }
+ executeAction(fileName, actions);
+ }
+
+ /**
+ * An interface to implement to execute an action on a document
+ */
+ public static interface ActionOnDocument {
+
+ public void actionOn(ScilabDocument doc) throws IOException;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesAutosave.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesAutosave.java
new file mode 100755
index 000000000..94a9b785c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesAutosave.java
@@ -0,0 +1,213 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises -Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.swing.Timer;
+
+import org.scilab.modules.core.Scilab;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.utils.SaveFile;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+public class SciNotesAutosave implements ActionListener {
+
+ private static SciNotesAutosave instance;
+ private static Set<File> toRemove = new HashSet<File>();
+ private boolean isChecking = false;
+ private Object lock = new Object();
+
+ static {
+ Scilab.registerFinalHook(new Runnable() {
+ public void run() {
+ for (File f : toRemove) {
+ if (f.exists()) {
+ try {
+ f.delete();
+ } catch (Exception e) { }
+ }
+ }
+ }
+ });
+ }
+
+ private Timer timer;
+
+ private SciNotesAutosave() {
+ timer = new Timer(SciNotesOptions.getSciNotesAutosave().saveEvery * 60 * 1000, this);
+ timer.setRepeats(true);
+ timer.start();
+ }
+
+ public static void autosave() {
+ if (SciNotesOptions.getSciNotesAutosave().autoSave) {
+ startAutosave();
+ } else {
+ stopAutosave();
+ }
+ }
+
+ static void startAutosave() {
+ if (instance == null && SciNotesOptions.getSciNotesAutosave().autoSave) {
+ instance = new SciNotesAutosave();
+ }
+ }
+
+ static void stopAutosave() {
+ if (instance != null) {
+ instance.timer.stop();
+ instance = null;
+ }
+ }
+
+ private boolean isChecking() {
+ synchronized (lock) {
+ return isChecking;
+ }
+ }
+
+ private void isChecking(boolean b) {
+ synchronized (lock) {
+ isChecking = b ;
+ }
+ }
+
+ private boolean checkSaveDir() {
+ isChecking(true);
+ SciNotesOptions.Autosave as = SciNotesOptions.getSciNotesAutosave();
+ if (!as.singleDirectory.isEmpty()) {
+ File dir = new File(as.singleDirectory);
+ if (!dir.exists()) {
+ if (AnswerOption.YES_OPTION == ScilabModalDialog.show(null, String.format(SciNotesMessages.NO_EXISTING_DIR, as.singleDirectory), SciNotesMessages.AUTOSAVE, IconType.QUESTION_ICON, ButtonType.YES_NO_CANCEL)) {
+ if (dir.mkdir()) {
+ isChecking(false);
+
+ return true;
+ }
+ ScilabModalDialog.show(null, String.format(SciNotesMessages.UNABLE_TO_CREATE_DIR, as.singleDirectory), SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+
+ isChecking(false);
+
+ return false;
+ }
+
+ if (!dir.isDirectory()) {
+ ScilabModalDialog.show(null, String.format(SciNotesMessages.NOT_A_DIR, as.singleDirectory), SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ isChecking(false);
+
+ return false;
+ }
+
+ // we check if a file can be created in this directory
+ try {
+ File.createTempFile("autosave_test", null, dir).delete();
+ } catch (Exception e) {
+ System.err.println(e);
+ ScilabModalDialog.show(null, String.format(SciNotesMessages.NOT_WRITABLE_DIR, as.singleDirectory), SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ isChecking(false);
+
+ return false;
+ }
+ }
+
+ isChecking(false);
+
+ return true;
+ }
+
+ public static File getBackupFile(String name) {
+ SciNotesOptions.Autosave as = SciNotesOptions.getSciNotesAutosave();
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
+ if (as.appendFilename) {
+ name += as.appendWith.replaceAll("%date", dateFormat.format(new Date()));
+ } else {
+ int dotpos = name.lastIndexOf('.');
+ if (dotpos != -1) {
+ name = name.substring(0, dotpos + 1) + as.replaceWith;
+ }
+ }
+
+ File file = new File(name);
+ String filename = file.getName();
+ if (!as.sourceFlag) {
+ file = new File(as.singleDirectory, filename);
+ }
+
+ boolean identic = new File(name).equals(file);
+
+ if (identic) {
+ return null;
+ }
+
+ return file;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ SciNotesOptions.Autosave as = SciNotesOptions.getSciNotesAutosave();
+ if (!isChecking() && as.autoSave && checkSaveDir()) {
+ boolean saved = false;
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
+ for (SciNotes ed : SciNotes.getSciNotesList()) {
+ int n = ed.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane sep = ed.getTextPane(i);
+ if (sep != null && sep.getName() != null && !sep.getName().isEmpty() && !sep.checkExternalModif() && ((ScilabDocument) sep.getDocument()).isContentModified() && ((ScilabDocument) sep.getDocument()).isContentModifiedSinceBackup()) {
+ String name = sep.getName();
+ File file = getBackupFile(name);
+ boolean identic = false;
+ if (file == null) {
+ identic = true;
+ file = new File(name);
+ }
+
+ boolean success = SaveFile.doSave(sep, i, file, ed.getEditorKit(), false, true, false);
+ String filename = file.getName();
+ if (!saved) {
+ saved = true;
+ }
+ if (!success) {
+ ed.getInfoBar().setText(String.format(SciNotesMessages.AUTOSAVE_ERROR, filename));
+ return;
+ } else {
+ ((ScilabDocument) sep.getDocument()).setContentModifiedSinceBackup(false);
+ if (identic) {
+ ((ScilabDocument) sep.getDocument()).setContentModified(false);
+ sep.setLastModified(file.lastModified());
+ } else {
+ if (as.automaticDelete) {
+ toRemove.add(file);
+ }
+ }
+ }
+ }
+ }
+ if (saved) {
+ ed.getInfoBar().setText(SciNotesMessages.AUTOSAVE_FINISHED);
+ }
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesCaret.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesCaret.java
new file mode 100755
index 000000000..10f550b2c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesCaret.java
@@ -0,0 +1,293 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.StringSelection;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.SwingUtilities;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
+import javax.swing.text.Highlighter;
+import javax.swing.text.NavigationFilter;
+import javax.swing.text.Position;
+
+import org.scilab.modules.commons.gui.ScilabCaret;
+
+/**
+ * SciNotesCaret Class
+ * @author Calixte DENIZET
+ */
+public class SciNotesCaret extends ScilabCaret {
+
+ private static final long serialVersionUID = 2406847391415867003L;
+
+ private ScilabEditorPane pane;
+ private SciNotesNavigationFilter filter;
+ private NavigationFilter saveFilter;
+
+ private List<Object> selections = new ArrayList<Object>();
+ private int[][] positions;
+ private boolean protect;
+
+ /**
+ * Constructor
+ * @param pane the pane where the caret is displayed
+ */
+ public SciNotesCaret(ScilabEditorPane pane) {
+ super(pane);
+ this.pane = pane;
+ }
+
+ public void clean() {
+ pane = null;
+ filter = null;
+ saveFilter = null;
+ selections = null;
+ positions = null;
+ }
+
+ /**
+ * @param protect true to avoid the highlight removal
+ */
+ public void protectHighlights(boolean protect) {
+ this.protect = protect;
+ }
+
+ /**
+ * Update the highlights considering the new positions
+ */
+ public void updateHighlights() {
+ Highlighter h = pane.getHighlighter();
+ try {
+ for (int i = 0; i < positions.length; i++) {
+ Object obj = selections.get(i);
+ if (obj != null) {
+ h.changeHighlight(obj, positions[i][0], positions[i][1]);
+ }
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+
+ /**
+ * @return the positions of the column selection or null
+ */
+ public int[][] getSelectedPositions() {
+ return positions;
+ }
+
+ /**
+ * @return the positions of the column selection or null
+ */
+ public List<Object> getSelections() {
+ return selections;
+ }
+
+ /**
+ * @return true if something has been removed
+ */
+ public boolean removePositions() {
+ int[][] pos = positions;
+ if (pos != null) {
+ Document doc = pane.getDocument();
+ try {
+ int slen = 0;
+ int len;
+ for (int i = 0; i < pos.length; i++) {
+ len = pos[i][1] - pos[i][0];
+ doc.remove(pos[i][0] - slen, len);
+ slen += len;
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+
+ return pos != null;
+ }
+
+ /**
+ * @return the selected text in column mode
+ */
+ public String getSelectedText() {
+ if (positions != null) {
+ try {
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < positions.length; i++) {
+ buf.append(pane.getText(positions[i][0], positions[i][1] - positions[i][0]));
+ if (i < positions.length - 1) {
+ buf.append("\n");
+ }
+ }
+
+ return buf.toString();
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @return true if the column selection is empty
+ */
+ public boolean isEmptySelection() {
+ return positions == null;
+ }
+
+ /**
+ * @return true if something has been copied in the clipboard
+ */
+ public boolean copyPositionsInClipboard() {
+ if (positions != null) {
+ StringSelection sel = new StringSelection(getSelectedText());
+ Toolkit.getDefaultToolkit().getSystemClipboard().setContents(sel, sel);
+ }
+
+ return positions != null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void mouseReleased(MouseEvent e) {
+ if (filter != null) {
+ filter = null;
+ pane.setNavigationFilter(saveFilter);
+ }
+ super.mouseReleased(e);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void mouseDragged(MouseEvent e) {
+ if (!e.isConsumed() && SwingUtilities.isLeftMouseButton(e)) {
+ if (e.isControlDown()) {
+ if (filter == null) {
+ filter = new SciNotesNavigationFilter();
+ saveFilter = pane.getNavigationFilter();
+ pane.setNavigationFilter(filter);
+ }
+ } else if (filter != null) {
+ filter = null;
+ pane.setNavigationFilter(saveFilter);
+ }
+
+ super.mouseDragged(e);
+ }
+ }
+
+ /**
+ * Remove the highlights
+ */
+ public void removeHighlights() {
+ if (!protect) {
+ Highlighter h = pane.getHighlighter();
+ for (Object obj : selections) {
+ if (obj != null) {
+ h.removeHighlight(obj);
+ }
+ }
+ selections.clear();
+ positions = null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDot(int dot, Position.Bias dotBias) {
+ removeHighlights();
+ super.setDot(dot, dotBias);
+ }
+
+ /**
+ * Inner class to specify the portion of the text to select in column mode.
+ */
+ class SciNotesNavigationFilter extends NavigationFilter {
+
+ private int mark = -1;
+ private Element root = pane.getDocument().getDefaultRootElement();
+
+ /**
+ * Constructor
+ */
+ public SciNotesNavigationFilter() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void moveDot(NavigationFilter.FilterBypass fb, int sdot, Position.Bias bias) {
+ int dot = sdot;
+ if (mark == -1) {
+ mark = --dot;
+ }
+
+ pane.setCaretPosition(dot);
+
+ if (isSelectionVisible()) {
+ Highlighter h = pane.getHighlighter();
+ if (h != null) {
+ int p0 = Math.min(dot, mark);
+ int p1 = Math.max(dot, mark);
+
+ if (!selections.isEmpty()) {
+ removeHighlights();
+ }
+
+ int startL = root.getElementIndex(p0);
+ int endL = root.getElementIndex(p1);
+ int sC = p0 - root.getElement(startL).getStartOffset();
+ int eC = p1 - root.getElement(endL).getStartOffset();
+ int startC = Math.min(sC, eC);
+ int endC = Math.max(sC, eC);
+
+ Highlighter.HighlightPainter p = getSelectionPainter();
+ int delta = endC - startC;
+
+ if (p0 != p1) {
+ positions = new int[endL - startL + 1][2];
+
+ try {
+ for (int i = startL; i <= endL; i++) {
+ Element elem = root.getElement(i);
+ int end = elem.getEndOffset();
+ int index = i - startL;
+ p1 = Math.min(p0 + delta, end);
+ positions[index][0] = Math.min(elem.getStartOffset() + startC, end);
+ positions[index][1] = Math.min(positions[index][0] + delta, end);
+ if (positions[index][0] < positions[index][1]) {
+ selections.add(h.addHighlight(positions[index][0], positions[index][1], p));
+ } else {
+ selections.add(null);
+ }
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesConfiguration.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesConfiguration.java
new file mode 100755
index 000000000..33e911fdc
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesConfiguration.java
@@ -0,0 +1,74 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.util.Set;
+
+import org.scilab.modules.commons.xml.XConfigurationEvent;
+import org.scilab.modules.commons.xml.XConfigurationListener;
+
+public class SciNotesConfiguration implements XConfigurationListener {
+
+ public SciNotesConfiguration() { }
+
+ /**
+ * Prevent the listener that configuration has changed
+ *
+ * @param e the event
+ */
+ public void configurationChanged(XConfigurationEvent e) {
+ Conf conf = new Conf(e.getModifiedPaths());
+ if (conf.changed()) {
+ SciNotesOptions.invalidate(conf);
+ SciNotes.configurationChanged(conf);
+ }
+ }
+
+ public static class Conf {
+
+ public boolean preferences;
+ public boolean display;
+ public boolean autosave;
+ public boolean colors;
+ public boolean systemfont;
+ public boolean font;
+ public boolean keymap;
+ public boolean header;
+
+ public Conf(Set<String> path) {
+ if (path.contains("ALL")) {
+ preferences = true;
+ display = true;
+ autosave = true;
+ colors = true;
+ systemfont = true;
+ font = true;
+ keymap = true;
+ header = true;
+ } else {
+ preferences = path.contains(SciNotesOptions.PREFERENCESPATH);
+ display = path.contains(SciNotesOptions.DISPLAYPATH);
+ autosave = path.contains(SciNotesOptions.AUTOSAVEPATH);
+ colors = path.contains(ScilabContext.COLORSPATH);
+ systemfont = path.contains(ScilabContext.SYSTEMFONTPATH);
+ font = path.contains(ScilabContext.XCONFFONTPATH);
+ keymap = path.contains(SciNotesOptions.KEYMAPPATH);
+ header = path.contains(SciNotesOptions.HEADERPATH);
+ }
+ }
+
+ public boolean changed() {
+ return preferences || display || autosave || colors || systemfont || font || keymap || header;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesGUI.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesGUI.java
new file mode 100755
index 000000000..86ca9b042
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesGUI.java
@@ -0,0 +1,385 @@
+/* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.JButton;
+import javax.swing.JPopupMenu;
+import javax.swing.KeyStroke;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.scilab.modules.commons.gui.ScilabLAF;
+import org.scilab.modules.commons.xml.ScilabDocumentBuilderFactory;
+import org.scilab.modules.gui.bridge.checkboxmenuitem.SwingScilabCheckBoxMenuItem;
+import org.scilab.modules.gui.bridge.menu.SwingScilabMenu;
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+import org.scilab.modules.gui.bridge.toolbar.SwingScilabToolBar;
+import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
+import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.menubar.MenuBar;
+import org.scilab.modules.gui.menubar.ScilabMenuBar;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.textbox.ScilabTextBox;
+import org.scilab.modules.gui.textbox.TextBox;
+import org.scilab.modules.gui.toolbar.ScilabToolBar;
+import org.scilab.modules.gui.toolbar.ToolBar;
+import org.scilab.modules.localization.Messages;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Class SciNotesGUI handles menus, bar, ...
+ */
+public final class SciNotesGUI {
+
+ private static final String MENU_CONF = System.getenv("SCI") + "/modules/scinotes/etc/scinotesGUIConfiguration.xml";
+ private static final String ERROR_READ = "Could not load file: ";
+ private static final String MENUBAR = "MenuBar";
+ private static final String TOOLBAR = "ToolBar";
+ private static final String RIGHTCLICKMENU = "RightClickMenu";
+ private static final String MENU = "menu";
+ private static final String MNEMONIC = "mnemonic";
+ private static final String LABEL = "label";
+ private static final String MENUITEM = "menuitem";
+ private static final String ACTION = "action";
+ private static final String SEPARATOR = "separator";
+ private static final String TOOLTIP = "tooltip";
+ private static final String ICON = "icon";
+ private static final String BUTTON = "button";
+ private static final String DOT = ".";
+
+ private static final String DEFAULTACTIONPATH = "org.scilab.modules.scinotes.actions";
+
+ private static Document menuConf;
+
+ private static Map<SciNotes, MenuBar> mapMenuBar = new HashMap<SciNotes, MenuBar>();
+ private static Map<SciNotes, ToolBar> mapToolBar = new HashMap<SciNotes, ToolBar>();
+ private static Map<SciNotes, JPopupMenu> mapPopup = new HashMap<SciNotes, JPopupMenu>();
+ private static Map<SciNotes, TextBox> mapInfoBar = new HashMap<SciNotes, TextBox>();
+
+ /**
+ * initialize the window
+ * @param mainWindow Windows
+ * @param editorInstance SciNotes
+ * @param title the title
+ */
+ public static void init(SwingScilabWindow mainWindow, final SciNotes editorInstance, String title) {
+ mainWindow.setTitle(title);
+ mainWindow.addTab(editorInstance);
+
+ // Set SciNotes Window position /size
+ mainWindow.setTitle(title);
+ mainWindow.setVisible(true);
+
+ init(editorInstance);
+ }
+
+ /**
+ * Initialize SciNotes
+ * @param editorInstance SciNotes
+ */
+ public static void init(SciNotes editorInstance) {
+ editorInstance.setMenuBar(generateMenuBar(editorInstance));
+ editorInstance.setToolBar(generateToolBar(editorInstance));
+ editorInstance.setInfoBar(generateInfoBar(editorInstance));
+ }
+
+ public static void clean(SciNotes editorInstance) {
+ mapMenuBar.remove(editorInstance);
+ mapToolBar.remove(editorInstance);
+ mapPopup.remove(editorInstance);
+ mapInfoBar.remove(editorInstance);
+ }
+
+ /**
+ * Initialize SciNotes
+ * @param editorInstance SciNotes
+ */
+ public static void reinitMenus(SciNotes editorInstance) {
+ mapMenuBar.remove(editorInstance);
+ mapPopup.remove(editorInstance);
+ editorInstance.setMenuBar(generateMenuBar(editorInstance));
+ }
+
+ /**
+ * @param editor the editor
+ * @return the infobar of the editor
+ */
+ public static TextBox generateInfoBar(SciNotes editor) {
+ if (mapInfoBar.containsKey(editor)) {
+ return mapInfoBar.get(editor);
+ }
+
+ TextBox info = ScilabTextBox.createTextBox();
+ mapInfoBar.put(editor, info);
+
+ return info;
+ }
+
+ /**
+ * @param editor the editor
+ * @return the JPopupMenu read in the conf file
+ */
+ public static JPopupMenu generateRightClickPopup(SciNotes editor) {
+ if (mapPopup.containsKey(editor)) {
+ return mapPopup.get(editor);
+ }
+
+ readMenusConf();
+ JPopupMenu popup = new JPopupMenu();
+ Element root = menuConf.getDocumentElement();
+ Element rightmenu = (Element) root.getElementsByTagName(RIGHTCLICKMENU).item(0);
+ NodeList menus = rightmenu.getChildNodes();
+ for (int i = 0; i < menus.getLength(); i++) {
+ Node item = menus.item(i);
+ if (MENUITEM.equals(item.getNodeName())) {
+ Element elem = (Element) item;
+ Object menuitem = getMenuItem(elem.getAttribute(ACTION), elem.getAttribute(LABEL), editor);
+ if (menuitem != null) {
+ if (menuitem instanceof CheckBoxMenuItem) {
+ SwingScilabCheckBoxMenuItem checkbox = (SwingScilabCheckBoxMenuItem) ((CheckBoxMenuItem) menuitem).getAsSimpleCheckBoxMenuItem();
+ popup.add(checkbox);
+ } else if (menuitem instanceof MenuItem) {
+ SwingScilabMenuItem smi = (SwingScilabMenuItem) ((MenuItem) menuitem).getAsSimpleMenuItem();
+ popup.add(smi);
+ } else if (menuitem instanceof Menu) {
+ SwingScilabMenu sm = (SwingScilabMenu) ((Menu) menuitem).getAsSimpleMenu();
+ popup.add(sm);
+ }
+ }
+ } else if (SEPARATOR.equals(item.getNodeName())) {
+ popup.addSeparator();
+ } else if (MENU.equals(item.getNodeName())) {
+ SwingScilabMenu sm = (SwingScilabMenu) getMenu(editor, (Element) item).getAsSimpleMenu();
+ popup.add(sm);
+ }
+ }
+ mapPopup.put(editor, popup);
+
+ return popup;
+ }
+
+ /**
+ * @param editor the editor
+ * @return the ToolBar read in the conf file
+ */
+ public static ToolBar generateToolBar(SciNotes editor) {
+ if (mapToolBar.containsKey(editor)) {
+ return mapToolBar.get(editor);
+ }
+
+ readMenusConf();
+ ToolBar toolBar = ScilabToolBar.createToolBar();
+ Element root = menuConf.getDocumentElement();
+ Element toolbar = (Element) root.getElementsByTagName(TOOLBAR).item(0);
+ NodeList buttons = toolbar.getChildNodes();
+ for (int i = 0; i < buttons.getLength(); i++) {
+ Node node = buttons.item(i);
+ if (BUTTON.equals(node.getNodeName())) {
+ Element elem = (Element) node;
+ JButton button = getButton(elem.getAttribute(ACTION), elem.getAttribute(TOOLTIP), elem.getAttribute(ICON), editor);
+ ((SwingScilabToolBar) toolBar.getAsSimpleToolBar()).add(button);
+ } else if (SEPARATOR.equals(node.getNodeName())) {
+ toolBar.addSeparator();
+ }
+ }
+ mapToolBar.put(editor, toolBar);
+
+ return toolBar;
+ }
+
+ /**
+ * @param editor the editor
+ * @return the MenuBar read in the conf file
+ */
+ public static MenuBar generateMenuBar(SciNotes editor) {
+ if (mapMenuBar.containsKey(editor)) {
+ return mapMenuBar.get(editor);
+ }
+
+ readMenusConf();
+ MenuBar menuBar = ScilabMenuBar.createMenuBar();
+ Element root = menuConf.getDocumentElement();
+ Element menubar = (Element) root.getElementsByTagName(MENUBAR).item(0);
+ NodeList menus = menubar.getChildNodes();
+ for (int i = 0; i < menus.getLength(); i++) {
+ Node node = menus.item(i);
+ if (MENU.equals(node.getNodeName())) {
+ menuBar.add(getMenu(editor, (Element) node));
+ }
+ }
+ mapMenuBar.put(editor, menuBar);
+
+ return menuBar;
+ }
+
+ /**
+ * Read the conf file
+ */
+ private static void readMenusConf() {
+ File xml = null;
+ DocumentBuilder docBuilder = null;
+
+ try {
+ if (menuConf == null) {
+ DocumentBuilderFactory factory = ScilabDocumentBuilderFactory.newInstance();
+ docBuilder = factory.newDocumentBuilder();
+ xml = new File(MENU_CONF);
+ menuConf = docBuilder.parse(xml);
+ }
+ } catch (ParserConfigurationException pce) {
+ System.err.println(ERROR_READ + MENU_CONF);
+ } catch (SAXException se) {
+ System.err.println(ERROR_READ + MENU_CONF);
+ } catch (IOException ioe) {
+ System.err.println(ERROR_READ + MENU_CONF);
+ }
+ }
+
+ /**
+ * @param editor the editor
+ * @param node the node containing the information
+ * @return the Menu
+ */
+ private static Menu getMenu(SciNotes editor, Element node) {
+ Menu menu = ScilabMenu.createMenu();
+ menu.setText(Messages.gettext(node.getAttribute(LABEL)));
+ String mnemonic = node.getAttribute(MNEMONIC);
+ if (mnemonic != null && mnemonic.length() != 0) {
+ menu.setMnemonic(mnemonic.charAt(0));
+ }
+ NodeList elements = node.getChildNodes();
+ for (int i = 0; i < elements.getLength(); i++) {
+ Node item = elements.item(i);
+ if (MENUITEM.equals(item.getNodeName())) {
+ Element elem = (Element) item;
+ Object menuitem = getMenuItem(elem.getAttribute(ACTION), elem.getAttribute(LABEL), editor);
+ if (menuitem != null) {
+ if (menuitem instanceof CheckBoxMenuItem) {
+ menu.add((CheckBoxMenuItem) menuitem);
+ } else if (menuitem instanceof MenuItem) {
+ menu.add((MenuItem) menuitem);
+ } else if (menuitem instanceof Menu) {
+ menu.add((Menu) menuitem);
+ }
+ }
+ } else if (SEPARATOR.equals(item.getNodeName())) {
+ menu.addSeparator();
+ } else if (MENU.equals(item.getNodeName())) {
+ menu.add(getMenu(editor, (Element) item));
+ }
+ }
+
+ return menu;
+ }
+
+ /**
+ * @param action a string with the action associated with the button
+ * @param label the title of the menu
+ * @param editor the editor
+ * @return a MenuItem or a CheckBoxMenuItem or a Menu
+ */
+ private static Object getMenuItem(String action, String label, SciNotes editor) {
+ ClassLoader loader = ClassLoader.getSystemClassLoader();
+ String className = "";
+ Method method = null;
+ String actionClass = SciNotes.getActionName().get(action);
+ try {
+ if (action.lastIndexOf(DOT) != -1) {
+ className = actionClass;
+ } else {
+ className = DEFAULTACTIONPATH + DOT + actionClass;
+ }
+ Class clazz = loader.loadClass(className);
+ method = clazz.getMethod("createMenu", new Class[] {String.class, SciNotes.class, KeyStroke.class});
+ } catch (ClassNotFoundException e) {
+ System.err.println("No action: " + className);
+ } catch (NoSuchMethodException e) {
+ System.err.println("No valid method createMenu in action: " + className);
+ }
+
+ if (method == null) {
+ return null;
+ }
+
+ try {
+ return method.invoke(null, new Object[] {Messages.gettext(label), editor, SciNotes.getActionKeys().get(action)});
+ } catch (InvocationTargetException e) {
+ System.err.println("Warning: problem to create the menu for action: " + className);
+ System.err.println("The menu label is: " + Messages.gettext(label));
+ System.err.println("English version will be used instead.");
+ System.err.println("Please report a bug at: http://bugzilla.scilab.org");
+ try {
+ return method.invoke(null, new Object[] {label, editor, SciNotes.getActionKeys().get(action)});
+ } catch (InvocationTargetException ex) {
+ System.err.println("Problem to create menu of the action: " + className);
+ } catch (IllegalAccessException ex) {
+ System.err.println("The method createMenu must be public: " + className);
+ }
+ } catch (IllegalAccessException e) {
+ System.err.println("The method createMenu must be public: " + className);
+ }
+
+ return null;
+ }
+
+ /**
+ * @param action a string with the action associated with the button
+ * @param tooltip a string with the tooltip
+ * @param icon the icon name
+ * @param editor the editor
+ * @return the button
+ */
+ private static JButton getButton(String action, String tooltip, String icon, SciNotes editor) {
+ ClassLoader loader = ClassLoader.getSystemClassLoader();
+ String className = "";
+ String actionClass = SciNotes.getActionName().get(action);
+ try {
+ if (action.lastIndexOf(DOT) != -1) {
+ className = actionClass;
+ } else {
+ className = DEFAULTACTIONPATH + DOT + actionClass;
+ }
+ Class clazz = loader.loadClass(className);
+ Method method = clazz.getMethod("createButton", new Class[] {String.class, String.class, SciNotes.class});
+ JButton button = (JButton) method.invoke(null, new Object[] {Messages.gettext(tooltip), icon, editor});
+ ScilabLAF.setDefaultProperties(button);
+
+ return button;
+ } catch (ClassNotFoundException e) {
+ System.err.println("No action: " + className);
+ } catch (NoSuchMethodException e) {
+ System.err.println("No valid method createButton in action: " + className);
+ } catch (IllegalAccessException e) {
+ System.err.println("The method createButton must be public: " + className);
+ } catch (InvocationTargetException e) {
+ System.err.println("The method createButton in " + className + " threw an exception :");
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesLineNumberPanel.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesLineNumberPanel.java
new file mode 100755
index 000000000..97a2eaec7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesLineNumberPanel.java
@@ -0,0 +1,473 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Toolkit;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseEvent;
+import java.util.Map;
+import java.util.Stack;
+
+import javax.swing.JPanel;
+import javax.swing.border.Border;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.MatteBorder;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.text.Element;
+import javax.swing.text.View;
+
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * This class will display line numbers for a related text component. The text
+ * component must use the same line height for each line. TextLineNumber
+ * supports wrapped lines and will highlight the line number of the current
+ * line in the text component.
+ *
+ * This class was designed to be used as a component added to the row header
+ * of a JScrollPane.
+ * @author Calixte DENIZET
+ */
+public class SciNotesLineNumberPanel extends JPanel implements CaretListener, DocumentListener, MouseMotionListener {
+
+ private static final long serialVersionUID = -5302189665896954438L;
+ private static final int PANELGAPSIZE = 10;
+ private static final Border OUTER = new MatteBorder(0, 0, 0, 2, Color.GRAY);
+ private static final int HEIGHT = Integer.MAX_VALUE - 1000000;
+ private static Map desktopFontHints;
+
+ private ScilabEditorPane textPane;
+
+ private Color currentLineForeground;
+ private Color foreground = Color.BLACK;
+ private Color anchorColor = new Color(250, 251, 164);
+ private Color alternColor1 = new Color(246, 191, 246);
+ private Color alternColor2 = new Color(246, 101, 246);
+
+ private int numbers = 1;
+ private int lastLine;
+ private int state;
+
+ private ScilabDocument doc;
+ private FontMetrics metrics;
+ private int ascent;
+ private int availableWidth;
+
+ private int[] lineNumber;
+ private byte[] lineLevel;
+ private boolean whereami;
+ private boolean display;
+
+ /**
+ * Create a line number component for a text component.
+ * @param textPane the related text component
+ */
+ public SciNotesLineNumberPanel(ScilabEditorPane textPane) {
+ this.textPane = textPane;
+ this.doc = (ScilabDocument) textPane.getDocument();
+ setOpaque(true);
+ updateFont(textPane.getFont());
+ setBorderGap(PANELGAPSIZE);
+ setCurrentLineForeground(Color.RED);
+ setAlternColors(ConfigSciNotesManager.getAlternColors());
+ textPane.addCaretListener(this);
+ addMouseMotionListener(this);
+ }
+
+ /**
+ * Set a line numbering compatible with the whereami function
+ * @param state 0 for nothing, 1 for normal and 2 for whereami
+ */
+ public void setWhereamiLineNumbering(int state) {
+ if (state != this.state) {
+ if (state != 0) {
+ if (!display) {
+ textPane.getScrollPane().setRowHeaderView(this);
+ }
+ whereami = state == 2;
+ display = true;
+ } else {
+ textPane.getScrollPane().setRowHeaderView(null);
+ display = false;
+ }
+ updateLineNumber();
+ this.state = state;
+ }
+ }
+
+ public static int getState(boolean showLinesNumber, boolean whereami) {
+ if (!showLinesNumber) {
+ return 0;
+ } else if (!whereami) {
+ return 1;
+ } else {
+ return 2;
+ }
+ }
+
+ public static boolean[] getState(int state) {
+ switch (state) {
+ case 0:
+ return new boolean[] { false, false };
+ case 1:
+ return new boolean[] { true, false };
+ case 2:
+ return new boolean[] { true, true };
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Set a line numbering compatible with the whereami function
+ * @param state 0 for nothing, 1 for normal and 2 for whereami
+ */
+ public void setWhereamiLineNumbering(boolean showLinesNumber, boolean whereami) {
+ setWhereamiLineNumbering(getState(showLinesNumber, whereami));
+ }
+
+ /**
+ * Get the number of the lines used in the panel
+ * @return the lines number depending on whereami mode or none
+ */
+ public int[] getLineNumber() {
+ int[] ret = null;
+ if (display) {
+ if (whereami) {
+ updateLineNumber();
+ ret = lineNumber;
+ } else {
+ ret = new int[doc.getDefaultRootElement().getElementCount()];
+ for (int i = 0; i < ret.length; i++) {
+ ret[i] = i + 1;
+ }
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * @return the current state
+ */
+ public int getState() {
+ return state;
+ }
+
+ /**
+ * @return true if whereami-compatible
+ */
+ public boolean getWhereamiLineNumbering() {
+ return whereami;
+ }
+
+ /**
+ * @param colors an array of size 2 containing the two alternative colors for inner function
+ */
+ public void setAlternColors(Color[] colors) {
+ if (colors[0] == null) {
+ this.alternColor1 = getBackground();
+ } else {
+ this.alternColor1 = colors[0];
+ }
+ if (colors[1] == null) {
+ this.alternColor2 = getBackground();
+ } else {
+ this.alternColor2 = colors[1];
+ }
+ }
+
+ /**
+ * Update the font used in this component
+ * @param font the font to use
+ */
+ public void updateFont(Font font) {
+ setFont(font);
+ metrics = textPane.getFontMetrics(font);
+ ascent = metrics.getAscent();
+ updateWidth(false);
+ }
+
+ /**
+ * Gets the current line rendering Color
+ *
+ * @return the Color used to render the current line number
+ */
+ public Color getCurrentLineForeground() {
+ if (currentLineForeground == null) {
+ return getForeground();
+ } else {
+ return currentLineForeground;
+ }
+ }
+
+ /**
+ * The Color used to render the current line numbers. Default is Coolor.RED.
+ *
+ * @param currentLineForeground the Color used to render the current line
+ */
+ public void setCurrentLineForeground(Color currentLineForeground) {
+ this.currentLineForeground = currentLineForeground;
+ }
+
+ /**
+ * Update the width of this component in using the number of digits used
+ */
+ public void updateWidth(boolean inc) {
+ if (inc) {
+ ++numbers;
+ }
+ Insets insets = getInsets();
+ int width = metrics.charWidth('0') * numbers;
+ availableWidth = width;
+ Dimension d = getPreferredSize();
+ d.setSize(availableWidth, HEIGHT);
+ availableWidth = width;
+ setPreferredSize(d);
+ setSize(d);
+ }
+
+ /**
+ * Draw the line numbers
+ * @param g the graphics where to paint
+ */
+ public void paintComponent(Graphics g) {
+ super.paintComponent(g);
+
+ if (desktopFontHints == null) {
+ desktopFontHints = (Map) (Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints"));
+ } else {
+ ((Graphics2D) g).addRenderingHints(desktopFontHints);
+ }
+
+ synchronized (doc) {
+ Element root = doc.getDefaultRootElement();
+ View view = doc.getView();
+ Rectangle clip = g.getClipBounds();
+ Point pt = new Point(0, clip.y);
+ int rowStartOffset = textPane.viewToModel(pt);
+ pt.y += clip.height;
+ int endOffset = textPane.viewToModel(pt);
+ int lineEnd = root.getElementIndex(endOffset);
+ boolean colorChanged;
+
+ for (int line = root.getElementIndex(rowStartOffset); line <= lineEnd; line++) {
+ String str;
+ colorChanged = false;
+ if (whereami && lineNumber != null) {
+ if (lineNumber[line] != -1) {
+ str = Integer.toString(lineNumber[line]);
+ if ((lineLevel[line] % 3) == 1) {
+ g.setColor(alternColor1);
+ colorChanged = true;
+ } else if ((lineLevel[line] % 3) == 2) {
+ g.setColor(alternColor2);
+ colorChanged = true;
+ }
+ } else {
+ str = "";
+ }
+ } else {
+ str = Integer.toString(line + 1);
+ }
+
+ Element elem = root.getElement(line);
+ if (((ScilabDocument.ScilabLeafElement) elem).isAnchor()) {
+ g.setColor(anchorColor);
+ colorChanged = true;
+ }
+
+ if (colorChanged) {
+ if (view instanceof ScilabView) {
+ g.fillRect(0, ((ScilabView) view).getLineAllocation(line), availableWidth, metrics.getHeight());
+ } else {
+ g.fillRect(0, ((ScilabPlainView) view).getLineAllocation(line), availableWidth, metrics.getHeight());
+ }
+ }
+
+ if (line != lastLine) {
+ g.setColor(foreground);
+ } else {
+ g.setColor(currentLineForeground);
+ }
+
+ int diff = (availableWidth - metrics.stringWidth(str)) / 2;
+ if (diff <= 0) {
+ updateWidth(true);
+ diff = (availableWidth - metrics.stringWidth(str)) / 2;
+ }
+
+ if (view instanceof ScilabView) {
+ g.drawString(str, diff, ((ScilabView) view).getLineAllocation(line) + ascent);
+ } else {
+ g.drawString(str, diff, ((ScilabPlainView) view).getLineAllocation(line) + ascent);
+ }
+ }
+ }
+ }
+
+ /**
+ * Update this component if the caret changed of line
+ * @param e the event
+ */
+ public void caretUpdate(CaretEvent e) {
+ Element root = doc.getDefaultRootElement();
+ int currentLine = root.getElementIndex(textPane.getCaretPosition());
+
+ if (lastLine != currentLine) {
+ lastLine = currentLine;
+ repaint();
+ }
+ }
+
+ /**
+ * Useful method to determinate the number of the lines in being compatible
+ * with the whereami function
+ */
+ private void updateLineNumber() {
+ synchronized (doc) {
+ Stack<Integer> stk = new Stack<Integer>();
+ Element root = doc.getDefaultRootElement();
+ int nlines = root.getElementCount();
+ lineNumber = new int[nlines + 1];
+ lineLevel = new byte[nlines + 1];
+ lineNumber[0] = 1;
+ int current = 1;
+ boolean prevBroken = false;
+ ScilabDocument.ScilabLeafElement elem;
+ for (int i = 0; i < nlines; i++) {
+ elem = (ScilabDocument.ScilabLeafElement) root.getElement(i);
+ int type = elem.getType();
+ switch (type) {
+ case ScilabDocument.ScilabLeafElement.NOTHING :
+ if (prevBroken) {
+ lineNumber[i] = -1;
+ if (!elem.isBroken()) {
+ prevBroken = false;
+ }
+ } else {
+ lineNumber[i] = current++;
+ }
+ lineLevel[i] = (byte) stk.size();
+ break;
+ case ScilabDocument.ScilabLeafElement.FUN :
+ stk.push(new Integer(current));
+ lineLevel[i] = (byte) stk.size();
+ current = 2;
+ lineNumber[i] = 1;
+ if (elem.isBroken()) {
+ prevBroken = true;
+ }
+ break;
+ case ScilabDocument.ScilabLeafElement.ENDFUN :
+ lineNumber[i] = current++;
+ lineLevel[i] = (byte) stk.size();
+ if (!stk.empty()) {
+ current = stk.pop().intValue() + lineNumber[i];
+ }
+ break;
+ default :
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Implements mouseMoved in MouseMotionListener
+ * @param e event
+ */
+ public void mouseMoved(MouseEvent e) {
+ int pos = textPane.viewToModel(e.getPoint());
+ Element root = doc.getDefaultRootElement();
+ ScilabDocument.ScilabLeafElement line = (ScilabDocument.ScilabLeafElement) root.getElement(root.getElementIndex(pos));
+ if (line.isAnchor()) {
+ setToolTipText(SciNotesMessages.ANCHOR + line.toString());
+ } else {
+ setToolTipText(null);
+ }
+ }
+
+ /**
+ * Nothing !
+ * @param e event
+ */
+ public void mouseDragged(MouseEvent e) { }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void changedUpdate(DocumentEvent e) { }
+
+ /**
+ * Called when an insertion is made in the doc
+ * @param e the event
+ */
+ public void insertUpdate(DocumentEvent e) {
+ handleEvent(e);
+ }
+
+ /**
+ * Called when a remove is made in the doc
+ * @param e the event
+ */
+ public void removeUpdate(DocumentEvent e) {
+ handleEvent(e);
+ }
+
+ /**
+ * Update the line numbering on a change in the document
+ * @param e the document event
+ */
+ private void handleEvent(DocumentEvent e) {
+ if (whereami) {
+ Element root = doc.getDefaultRootElement();
+ DocumentEvent.ElementChange chg = e.getChange(root);
+ if (chg == null) {
+ // change occurred only in one line
+ ScilabDocument.ScilabLeafElement line = (ScilabDocument.ScilabLeafElement) root.getElement(root.getElementIndex(e.getOffset()));
+ if (line.needLineNumberRepaint()) {
+ updateLineNumber();
+ repaint();
+ }
+ } else {
+ updateLineNumber();
+ }
+ }
+ }
+
+ /**
+ * The border gap is used in calculating the left and right insets of the
+ * border. Default value is 5.
+ * @param borderGap the gap in pixels
+ */
+ private void setBorderGap(int borderGap) {
+ Border inner = new EmptyBorder(0, borderGap, 0, borderGap);
+ setBorder(new CompoundBorder(OUTER, inner));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesOptions.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesOptions.java
new file mode 100755
index 000000000..1b04857a5
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SciNotesOptions.java
@@ -0,0 +1,297 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises -Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.text.DateFormat;
+import java.util.Calendar;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+
+import org.scilab.modules.commons.OS;
+import static org.scilab.modules.commons.xml.XConfiguration.XConfAttribute;
+import org.scilab.modules.commons.xml.XConfiguration;
+
+/**
+ * The class ScilabContext provides a context to render a Scilab's document.
+ * @author Calixte DENIZET
+ */
+public class SciNotesOptions {
+
+ public static final String PREFERENCESPATH = "//scinotes/body/scinotes-preferences";
+ public static final String DISPLAYPATH = "//scinotes/display/body/scinotes-display";
+ public static final String AUTOSAVEPATH = "//scinotes/autosave/body/scinotes-autosave";
+ public static final String HEADERPATH = "//scinotes/header/body/scinotes-header";
+ public static final String KEYMAPPATH = "//general/shortcuts/body/actions/action-folder[@xconf-uid=\"scinotes\"]/action";
+
+ private static SciNotesOptions.Preferences prefs;
+ private static SciNotesOptions.Display display;
+ private static SciNotesOptions.Autosave autosave;
+ private static SciNotesOptions.Header header;
+
+ private static Document doc;
+
+ /* scinotes-preferences */
+ @XConfAttribute
+ public static class Preferences {
+
+ public boolean restartOpen;
+ public boolean addLineTermination;
+ public int numberOfRecentlyOpen;
+ public String encoding;
+ public String eol;
+ public boolean useScinotes;
+ public boolean externalCmd;
+ public String cmd;
+ public boolean completeAtEOL;
+
+ private Preferences() { }
+
+ @XConfAttribute(tag = "scinotes-preferences", attributes = {"restart-reopen", "add-line-termination", "number-of-recently-open", "encoding", "eol", "scinotes", "cmd", "external-cmd", "complete-at-eol"})
+ private void set(boolean restartOpen, boolean addLineTermination, int numberOfRecentlyOpen, String encoding, String eol, boolean useScinotes, String cmd, boolean externalCmd, boolean completeAtEOL) {
+ this.restartOpen = restartOpen;
+ this.addLineTermination = addLineTermination;
+ this.numberOfRecentlyOpen = numberOfRecentlyOpen > 0 ? numberOfRecentlyOpen : 1;
+ this.encoding = encoding.toLowerCase();
+
+ if (eol.equals("")) {
+ switch (OS.get()) {
+ case WINDOWS:
+ this.eol = ScilabDocument.EOLWIN;
+ break;
+ default:
+ this.eol = ScilabDocument.EOLUNIX;
+ break;
+ }
+ } else if (eol.startsWith("Windows")) {
+ this.eol = ScilabDocument.EOLWIN;
+ } else {
+ this.eol = ScilabDocument.EOLUNIX;
+ }
+
+ this.useScinotes = useScinotes;
+ this.externalCmd = externalCmd;
+ this.cmd = cmd;
+ this.completeAtEOL = completeAtEOL;
+ }
+ }
+
+ /* scinotes-display */
+ @XConfAttribute
+ public static class Display {
+
+ public boolean highlightCurrentLine;
+ public Color currentLineColor;
+ public boolean showLineNumbers;
+ public boolean wrapLines;
+ public boolean keywordsColorization;
+ public boolean highlightBrackets;
+ public Color bracketsColor;
+ public int bracketsHighlightment;
+ public boolean bracketsOnmouseover;
+ public boolean highlightKeywords;
+ public Color keywordsColor;
+ public int keywordsHighlightment;
+ public boolean keywordsOnmouseover;
+ public boolean whereami;
+ public int tabSize;
+ public int tabRepresentation;
+ public boolean useSpaces;
+ public int indentSize;
+ public boolean automaticIndent;
+ public boolean autoCompleteOpeners;
+ public boolean autoCompleteKeywords;
+ public Color backgroundColor;
+ public Color caretColor;
+
+ private Display() { }
+
+ @XConfAttribute(tag = "scinotes-display", attributes = {"highlight-current-line", "current-line-color", "show-line-numbers", "wrap-lines", "keywords-colorization", "highlight-brackets", "brackets-color", "brackets-highlightment", "brackets-onmouseover", "highlight-keywords", "keywords-color", "keywords-highlightment", "keywords-onmouseover", "whereami", "tab-size", "tab-representation", "use-spaces", "indent-size", "automatic-indent", "auto-complete-openers", "auto-complete-keywords", "background-color", "caret-color"})
+ private void set(boolean highlightCurrentLine, Color currentLineColor, boolean showLineNumbers, boolean wrapLines, boolean keywordsColorization, boolean highlightBrackets, Color bracketsColor, String bracketsHighlightment, boolean bracketsOnmouseover, boolean highlightKeywords, Color keywordsColor, String keywordsHighlightment, boolean keywordsOnmouseover, boolean whereami, int tabSize, String tabRepresentation, boolean useSpaces, int indentSize, boolean automaticIndent, boolean autoCompleteOpeners, boolean autoCompleteKeywords, Color backgroundColor, Color caretColor) {
+ this.highlightCurrentLine = highlightCurrentLine;
+ this.currentLineColor = currentLineColor;
+ this.showLineNumbers = showLineNumbers;
+ this.wrapLines = wrapLines;
+ this.keywordsColorization = keywordsColorization;
+
+ this.highlightBrackets = highlightBrackets;
+ this.bracketsColor = bracketsColor;
+ this.bracketsOnmouseover = bracketsOnmouseover;
+ this.highlightKeywords = highlightKeywords;
+ this.keywordsColor = keywordsColor;
+ this.keywordsOnmouseover = keywordsOnmouseover;
+ this.whereami = whereami;
+ this.tabSize = tabSize;
+ if (tabRepresentation.equalsIgnoreCase("chevrons")) {
+ this.tabRepresentation = ScilabView.TABDOUBLECHEVRONS;
+ } else if (tabRepresentation.equalsIgnoreCase("hrule")) {
+ this.tabRepresentation = ScilabView.TABHORIZONTAL;
+ } else if (tabRepresentation.equalsIgnoreCase("vrule")) {
+ this.tabRepresentation = ScilabView.TABVERTICAL;
+ } else {
+ this.tabRepresentation = ScilabView.TABNOTHING;
+ }
+ this.useSpaces = useSpaces;
+ this.indentSize = indentSize;
+ this.automaticIndent = automaticIndent;
+
+ if (bracketsHighlightment.equalsIgnoreCase("filled")) {
+ this.bracketsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.FILLED;
+ } else if (bracketsHighlightment.equalsIgnoreCase("framed")) {
+ this.bracketsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.FRAMED;
+ } else {
+ this.bracketsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.UNDERLINED;
+ }
+
+ if (keywordsHighlightment.equalsIgnoreCase("filled")) {
+ this.keywordsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.FILLED;
+ } else if (keywordsHighlightment.equalsIgnoreCase("framed")) {
+ this.keywordsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.FRAMED;
+ } else {
+ this.keywordsHighlightment = MatchingBlockManager.ScilabKeywordsPainter.UNDERLINED;
+ }
+
+ this.autoCompleteOpeners = autoCompleteOpeners;
+ this.autoCompleteKeywords = autoCompleteKeywords;
+ this.backgroundColor = backgroundColor;
+ this.caretColor = caretColor;
+ }
+ }
+
+ /* scinotes-autosave */
+ @XConfAttribute
+ public static class Autosave {
+
+ public boolean autoSave;
+ public int saveEvery;
+ public boolean automaticDelete;
+ public boolean appendFilename;
+ public String appendWith;
+ public String replaceWith;
+ public boolean sourceFlag;
+ public String singleDirectory;
+
+ private Autosave() { }
+
+ @XConfAttribute(tag = "scinotes-autosave", attributes = {"enable", "save-every", "automatic-delete", "append-filename", "append-with", "replace-with", "source-flag", "single-directory"})
+ private void set(boolean autoSave, int saveEvery, boolean automaticDelete, boolean appendFilename, String appendWith, String replaceWith, boolean sourceFlag, String singleDirectory) {
+ this.autoSave = autoSave;
+ this.saveEvery = saveEvery;
+ this.automaticDelete = automaticDelete;
+ this.appendFilename = appendFilename;
+ this.appendWith = appendWith;
+ this.replaceWith = replaceWith;
+ this.sourceFlag = sourceFlag;
+ this.singleDirectory = singleDirectory;
+ }
+ }
+
+ /* scinotes-header */
+ @XConfAttribute
+ public static class Header {
+
+ public String header;
+ public boolean enable;
+
+ @XConfAttribute(tag = "scinotes-header", attributes = {"enable"})
+ private void set(boolean enable) {
+ this.enable = enable;
+ if (enable) {
+ XPathFactory xpathFactory = XPathFactory.newInstance();
+ XPath xp = xpathFactory.newXPath();
+ try {
+ header = (String) xp.compile("string(" + HEADERPATH + ")").evaluate(doc, XPathConstants.STRING);
+ } catch (XPathExpressionException e) {
+ System.err.println(e);
+ }
+
+ if (header != null) {
+ Calendar cal = Calendar.getInstance();
+ DateFormat dateFormat = DateFormat.getDateInstance();
+ header = header.replaceAll("\\{\\$current-year\\}", Integer.toString(cal.get(Calendar.YEAR)));
+ header = header.replaceAll("\\{\\$current-date\\}", dateFormat.format(cal.getTime()));
+ }
+ }
+ }
+ }
+
+ public static void invalidate(SciNotesConfiguration.Conf conf) {
+ if (conf.preferences) {
+ prefs = null;
+ doc = null;
+ }
+ if (conf.display) {
+ display = null;
+ doc = null;
+ }
+ if (conf.autosave) {
+ autosave = null;
+ doc = null;
+ }
+ if (conf.header) {
+ header = null;
+ doc = null;
+ }
+ }
+
+ public static final SciNotesOptions.Preferences getSciNotesPreferences() {
+ if (prefs == null) {
+ if (doc == null) {
+ doc = XConfiguration.getXConfigurationDocument();
+ }
+ prefs = XConfiguration.get(SciNotesOptions.Preferences.class, doc, PREFERENCESPATH)[0];
+ }
+
+ return prefs;
+ }
+
+ public static final SciNotesOptions.Display getSciNotesDisplay() {
+ if (display == null) {
+ if (doc == null) {
+ doc = XConfiguration.getXConfigurationDocument();
+ }
+ display = XConfiguration.get(SciNotesOptions.Display.class, doc, DISPLAYPATH)[0];
+ }
+
+ return display;
+ }
+
+ public static final SciNotesOptions.Autosave getSciNotesAutosave() {
+ if (autosave == null) {
+ if (doc == null) {
+ doc = XConfiguration.getXConfigurationDocument();
+ }
+ autosave = XConfiguration.get(SciNotesOptions.Autosave.class, doc, AUTOSAVEPATH)[0];
+ }
+
+ return autosave;
+ }
+
+ public static final SciNotesOptions.Header getSciNotesHeader() {
+ if (header == null) {
+ if (doc == null) {
+ doc = XConfiguration.getXConfigurationDocument();
+ }
+
+ header = XConfiguration.get(SciNotesOptions.Header.class, doc, HEADERPATH)[0];
+ }
+
+
+ return header;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabContext.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabContext.java
new file mode 100755
index 000000000..641993a3f
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabContext.java
@@ -0,0 +1,425 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ * Copyright (C) 2011 - Scilab Enterprises -Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.swing.text.ViewFactory;
+import javax.swing.text.View;
+import javax.swing.text.Element;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
+import static org.scilab.modules.commons.xml.XConfiguration.XConfAttribute;
+
+import org.scilab.modules.commons.xml.XConfiguration;
+import org.scilab.modules.gui.utils.ScilabFontUtils;
+
+/**
+ * The class ScilabContext provides a context to render a Scilab's document.
+ * @author Calixte DENIZET
+ */
+public class ScilabContext implements ViewFactory {
+
+ public static final String COLORSPATH = "//colors/body/syntax-highlighting-colors/item";
+ public static final String SYSTEMFONTPATH = "//fonts/body/fonts";
+ public static final String FONTPATH = "//fonts/body/fonts/item";
+ public static final String XCONFFONTPATH = "//fonts/body/fonts/item[@xconf-uid=\"scinotes-font\"]";
+
+ /**
+ * Contains the colors of the different tokens
+ */
+ public Color[] tokenColors;
+
+ /**
+ * Contains the fonts of the different tokens
+ */
+ public Font[] tokenFonts;
+
+ /**
+ * Contains the attrib (underline or stroke) of the different tokens
+ */
+ public int[] tokenAttrib;
+
+ private Font baseFont;
+ private boolean isDesktop;
+ private boolean compatible;
+ private FontInfo[] scinotesInfos;
+ private FontInfo[] desktopInfos;
+
+ private View view;
+ private boolean plain;
+ private List<Integer> typeToDefault = new ArrayList<Integer>();
+
+ /**
+ * The constructor
+ */
+ public ScilabContext() {
+ super();
+ genAll();
+ }
+
+ /**
+ * Constructor
+ * @param plain boolean for a plain view
+ */
+ public ScilabContext(boolean plain) {
+ this();
+ this.plain = plain;
+ }
+
+
+ public static void saveFont(Font font) {
+ XPathFactory xpathFactory = XPathFactory.newInstance();
+ XPath xp = xpathFactory.newXPath();
+ NodeList nodes;
+ Document doc = XConfiguration.getXConfigurationDocument();
+
+ try {
+ nodes = (NodeList) xp.compile("//fonts/body/fonts/item[@xconf-uid='scinotes-font']").evaluate(doc, XPathConstants.NODESET);
+ } catch (XPathExpressionException e) {
+ System.err.println(e);
+ return;
+ }
+
+ org.w3c.dom.Element e = (org.w3c.dom.Element) nodes.item(0);
+ e.setAttribute("desktop", "false");
+ e.setAttribute("font-name", font.getName());
+ e.setAttribute("font-size", Integer.toString(font.getSize()));
+
+ XConfiguration.save();
+ }
+
+ /**
+ * @return the font used to render
+ */
+ public Font getBaseFont() {
+ return baseFont;
+ }
+
+ public void changeBaseFontSize(int n) {
+ float size = baseFont.getSize2D() + n;
+ baseFont = baseFont.deriveFont(size);
+ for (int i = 0; i < tokenFonts.length; i++) {
+ tokenFonts[i] = tokenFonts[i].deriveFont(size);
+ }
+ }
+
+ public void configurationChanged(SciNotesConfiguration.Conf conf) {
+ boolean modified = false;
+ FontInfo[] scinotes = null;
+ FontInfo[] desktop = null;
+ Document doc = null;
+ if (conf.colors) {
+ genAll();
+ modified = true;
+ }
+
+ if (!modified && conf.font) {
+ doc = XConfiguration.getXConfigurationDocument();
+ scinotes = XConfiguration.get(FontInfo.class, doc, FONTPATH + "[@name='Scinotes']");
+ if (!scinotes[0].equals(scinotesInfos)) {
+ genAll();
+ modified = true;
+ }
+ }
+
+ if (!modified && conf.systemfont) {
+ doc = XConfiguration.getXConfigurationDocument();
+ desktop = XConfiguration.get(FontInfo.class, doc, SYSTEMFONTPATH);
+ genAll();
+ }
+ }
+
+ public void genAll() {
+ tokenAttrib = new int[ScilabLexerConstants.NUMBEROFTOKENS];
+ tokenColors = new Color[ScilabLexerConstants.NUMBEROFTOKENS];
+ tokenFonts = new Font[ScilabLexerConstants.NUMBEROFTOKENS];
+
+ Document doc = XConfiguration.getXConfigurationDocument();
+ desktopInfos = XConfiguration.get(FontInfo.class, doc, SYSTEMFONTPATH);
+ scinotesInfos = XConfiguration.get(FontInfo.class, doc, FONTPATH + "[@name='Scinotes']");
+ Font font;
+ if (scinotesInfos[0].isDesktop()) {
+ font = desktopInfos[0].getFont();
+ isDesktop = true;
+ } else {
+ font = scinotesInfos[0].getFont();
+ isDesktop = false;
+ }
+
+ if (font != baseFont) {
+ compatible = ScilabFontUtils.isAllStylesSameWidths(font);
+ baseFont = font;
+ }
+
+ FontDecoration[] decorations = XConfiguration.get(FontDecoration.class, doc, COLORSPATH);
+ doc = null;
+
+ for (FontDecoration deco : decorations) {
+ tokenAttrib[deco.getType()] = deco.getValue();
+ tokenColors[deco.getType()] = deco.getColor();
+ tokenFonts[deco.getType()] = compatible ? baseFont.deriveFont(deco.getFontFace()) : baseFont;
+ }
+
+ // Default color and special case
+ typeToDefault.clear();
+ for (int i = 0; i < tokenColors.length; i++) {
+ if (tokenColors[i] == null) {
+ tokenColors[i] = tokenColors[0];
+ typeToDefault.add(i);
+ }
+ }
+
+ /* Special case : Scilab's developers in comments */
+ tokenColors[ScilabLexerConstants.AUTHORS] = tokenColors[ScilabLexerConstants.COMMENT];
+ tokenColors[ScilabLexerConstants.OSKEYWORD] = tokenColors[ScilabLexerConstants.SKEYWORD];
+ tokenColors[ScilabLexerConstants.ELSEIF] = tokenColors[ScilabLexerConstants.SKEYWORD];
+
+ // Default attributes
+ for (Integer i : typeToDefault) {
+ tokenAttrib[i] = tokenAttrib[0];
+ }
+ tokenAttrib[ScilabLexerConstants.OSKEYWORD] = tokenAttrib[ScilabLexerConstants.SKEYWORD];
+ tokenAttrib[ScilabLexerConstants.ELSEIF] = tokenAttrib[ScilabLexerConstants.SKEYWORD];
+
+ // Default fonts
+ for (int i = 0; i < tokenFonts.length; i++) {
+ if (tokenFonts[i] == null) {
+ tokenFonts[i] = tokenFonts[0];
+ }
+ }
+
+ /* Special case : Scilab's developers in comments */
+ Font c = tokenFonts[ScilabLexerConstants.COMMENT];
+ int style = c.getStyle();
+ if (compatible) {
+ if (c.isBold()) {
+ tokenFonts[ScilabLexerConstants.AUTHORS] = c.deriveFont(style ^ Font.BOLD);
+ } else {
+ tokenFonts[ScilabLexerConstants.AUTHORS] = c.deriveFont(style | Font.BOLD);
+ }
+ }
+
+ tokenFonts[ScilabLexerConstants.OSKEYWORD] = tokenFonts[ScilabLexerConstants.SKEYWORD];
+ tokenFonts[ScilabLexerConstants.ELSEIF] = tokenFonts[ScilabLexerConstants.SKEYWORD];
+ }
+
+ /**
+ * Generate an attribute for a type of keyword
+ * @param keyword the name can be found in scinotesConfiguration.xml
+ * @param type the type to use
+ */
+ public void genAttribute(String keyword, int type) {
+ tokenAttrib[ScilabLexerConstants.TOKENS.get(keyword)] = type;
+ tokenAttrib[ScilabLexerConstants.OSKEYWORD] = tokenAttrib[ScilabLexerConstants.SKEYWORD];
+ tokenAttrib[ScilabLexerConstants.ELSEIF] = tokenAttrib[ScilabLexerConstants.SKEYWORD];
+ if (ScilabLexerConstants.TOKENS.get(keyword) == ScilabLexerConstants.DEFAULT) {
+ for (Integer i : typeToDefault) {
+ tokenAttrib[i] = tokenAttrib[0];
+ }
+ }
+ }
+
+ /**
+ * Generate a color for a type of keyword
+ * @param name the name can be found in scinotesConfiguration.xml
+ * @param color the color to use
+ */
+ public void genColors(String name, Color color) {
+ tokenColors[ScilabLexerConstants.TOKENS.get(name)] = color;
+ tokenColors[ScilabLexerConstants.AUTHORS] = tokenColors[ScilabLexerConstants.COMMENT];
+ tokenColors[ScilabLexerConstants.OSKEYWORD] = tokenColors[ScilabLexerConstants.SKEYWORD];
+ tokenColors[ScilabLexerConstants.ELSEIF] = tokenColors[ScilabLexerConstants.SKEYWORD];
+
+ if (ScilabLexerConstants.TOKENS.get(name) == ScilabLexerConstants.DEFAULT) {
+ for (Integer i : typeToDefault) {
+ tokenColors[i] = tokenColors[0];
+ }
+ }
+ }
+
+ /**
+ * Generate a font for a type of keyword
+ * @param name the name can be found in scinotesConfiguration.xml
+ * @param type the type to use
+ */
+ public void genFont(String name, int type) {
+ Font font = tokenFonts[ScilabLexerConstants.TOKENS.get(name)];
+ int style = font.getStyle();
+ switch (type) {
+ case -2 :
+ font = font.deriveFont(style & ~Font.ITALIC);
+ break;
+ case -1 :
+ font = font.deriveFont(style & ~Font.BOLD);
+ break;
+ case 1 :
+ font = font.deriveFont(style | Font.BOLD);
+ break;
+ case 2 :
+ font = font.deriveFont(style | Font.ITALIC);
+ break;
+ default :
+ }
+
+ tokenFonts[ScilabLexerConstants.TOKENS.get(name)] = font;
+ tokenFonts[ScilabLexerConstants.OSKEYWORD] = tokenFonts[ScilabLexerConstants.SKEYWORD];
+ tokenFonts[ScilabLexerConstants.ELSEIF] = tokenFonts[ScilabLexerConstants.SKEYWORD];
+ if (ScilabLexerConstants.TOKENS.get(name) == ScilabLexerConstants.DEFAULT) {
+ for (Integer i : typeToDefault) {
+ tokenFonts[i] = tokenFonts[0];
+ }
+ }
+ }
+
+ /**
+ * @return the view to use to render the document
+ */
+ public View getCurrentView() {
+ return view;
+ }
+
+ /**
+ * Create a view with a given element
+ * @param elem the Element to view
+ * @return the view associated with the element
+ */
+ public View create(Element elem) {
+ if (plain) {
+ view = new ScilabPlainView(elem, this);
+ ((ScilabPlainView) view).setDefaultTabRepresentation();
+ } else {
+ view = new ScilabView(elem, this);
+ ((ScilabView) view).setDefaultTabRepresentation();
+ }
+ return view;
+ }
+
+ /**
+ * Inner class to retrieve configuration elements from configuration file
+ */
+ @XConfAttribute
+ private static class FontInfo {
+
+ String fontname;
+ int fontsize;
+ boolean desktop;
+
+ public FontInfo() { }
+
+ @XConfAttribute(attributes = {"font-name", "font-size", "desktop"})
+ public void set(String fontname, int fontsize, boolean desktop) {
+ this.fontname = fontname;
+ this.fontsize = fontsize;
+ this.desktop = desktop;
+ }
+
+ public boolean isDesktop() {
+ return desktop;
+ }
+
+ public Font getFont() {
+ return new Font(fontname, Font.PLAIN, fontsize);
+ }
+
+ public boolean equals(Object o) {
+ if (o instanceof FontInfo) {
+ FontInfo f = (FontInfo) o;
+ return fontname.equals(f.fontname) && fontsize == f.fontsize && desktop == f.desktop;
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * Inner class to retrieve configuration elements from configuration file
+ */
+ @XConfAttribute
+ private static class FontDecoration {
+
+ private boolean underline;
+ private boolean strikeThrough;
+ private boolean bold;
+ private boolean italic;
+ private Color color;
+ private int type;
+
+ public FontDecoration() { }
+
+ @XConfAttribute(attributes = {"underline", "strike-through", "name", "italic", "color", "bold"})
+ public void set(boolean underline, boolean strikeThrough, String name, boolean italic, Color color, boolean bold) {
+ this.underline = underline;
+ this.strikeThrough = strikeThrough;
+ this.type = ScilabLexerConstants.TOKENS.get(name);
+ this.color = color;
+ this.italic = italic;
+ this.bold = bold;
+ }
+
+ public int getFontFace() {
+ int fontface = Font.PLAIN;
+ if (bold) {
+ fontface = fontface | Font.BOLD;
+ }
+
+ if (italic) {
+ fontface = fontface | Font.ITALIC;
+ }
+
+ return fontface;
+ }
+
+ public Color getColor() {
+ return color;
+ }
+
+ public int getValue() {
+ int value = 0;
+ if (underline) {
+ value += 1;
+ }
+ if (strikeThrough) {
+ value += 2;
+ }
+
+ return value;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public boolean equals(Object o) {
+ if (o instanceof FontDecoration) {
+ FontDecoration f = (FontDecoration) o;
+ return underline == f.underline && strikeThrough == f.strikeThrough && bold == f.bold && italic == f.italic && color.equals(f.color) && type == f.type;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocument.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocument.java
new file mode 100755
index 000000000..78a3e72ee
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocument.java
@@ -0,0 +1,1118 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.nio.charset.Charset;
+
+import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Comparator;
+import java.util.Iterator;
+
+import javax.swing.text.GapContent;
+import javax.swing.text.PlainDocument;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.View;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+import org.scilab.modules.console.utils.ScilabLaTeXViewer;
+
+/**
+ * The class ScilabDocument is used to render a document .sci or .sce
+ * @author Calixte DENIZET
+ */
+public class ScilabDocument extends PlainDocument implements DocumentListener {
+
+ private static final long serialVersionUID = -1227880612912063687L;
+
+ /**
+ * The EOL in mac OS
+ */
+ public static final String EOLMAC = "\r";
+
+ /**
+ * The EOL in windows OS
+ */
+ public static final String EOLWIN = "\r\n";
+
+ /**
+ * The EOL in unix OS
+ */
+ public static final String EOLUNIX = "\n";
+
+ private static final int GAPBUFFERCAPACITY = 2;
+ private static final String LINE_SEPARATOR = "line.separator";
+ private static final int INITFUNCTIONSNUMBER = 128;
+
+ private View view;
+ private List<String> saved = new Vector<String>();
+ private FunctionScanner funScanner;
+
+ private Set<String> functions = new HashSet<String>(INITFUNCTIONSNUMBER);
+
+ private boolean contentModified;
+ private boolean contentModifiedSinceBackup;
+ private boolean alphaOrder;
+
+ // Editor's default encoding is UTF-8
+ private String encoding;
+ private boolean updater = true;
+ private boolean binary;
+ private boolean autoIndent;
+ private boolean shouldMergeEdits;
+ private boolean undoManagerEnabled;
+ private CompoundUndoManager undo;
+
+ private ScilabEditorPane pane;
+ private boolean focused;
+
+ private String eolStyle;
+
+ /**
+ * Constructor
+ */
+ public ScilabDocument() {
+ this(true);
+ }
+
+ /**
+ * Constructor
+ */
+ public ScilabDocument(boolean paned) {
+ super(new GapContent(GAPBUFFERCAPACITY));
+ contentModified = false;
+
+ if (paned) {
+ setAsynchronousLoadPriority(2);
+
+ autoIndent = SciNotesOptions.getSciNotesDisplay().automaticIndent;
+ encoding = Charset.forName(SciNotesOptions.getSciNotesPreferences().encoding).toString();
+ eolStyle = SciNotesOptions.getSciNotesPreferences().eol;
+
+ undo = new CompoundUndoManager(this);
+ addUndoableEditListener(undo);
+ undoManagerEnabled = true;
+
+ contentModifiedSinceBackup = false;
+ }
+ }
+
+ /**
+ * Set the ScilabEditorPane associated with this doc
+ * @param pane the ScilabEditorPane
+ */
+ public void setEditorPane(ScilabEditorPane pane) {
+ this.pane = pane;
+ }
+
+ /**
+ * Get the ScilabEditorPane associated with this doc
+ * @return pane the ScilabEditorPane
+ */
+ public ScilabEditorPane getEditorPane() {
+ return pane;
+ }
+
+ /**
+ * Set to true of the document is focused in the EditorPane
+ * @param b the boolean
+ */
+ public void setFocused(boolean b) {
+ focused = b;
+ }
+
+ /**
+ * Create a lexer used to colorize the text
+ * @return ScilabLexer the lexer
+ */
+ public ScilabLexer createLexer(boolean update) {
+ return new ScilabLexer(this, update);
+ }
+
+ /**
+ * Create a lexer used to colorize the text
+ * @param update true if the scilab vars must be updated
+ * @return ScilabLexer the lexer
+ */
+ public ScilabLexer createLexer() {
+ return new ScilabLexer(this, true);
+ }
+
+ /**
+ * @return the Set containing the functions name
+ */
+ public Set<String> getFunctionsInDoc() {
+ return functions;
+ }
+
+ /**
+ * Set the current view to render the code
+ * @param view the used view
+ */
+ public void setView(View view) {
+ this.view = view;
+ }
+
+ /**
+ * @return the current used view
+ */
+ public View getView() {
+ return view;
+ }
+
+ /**
+ * Get encoding
+ * @return String encoding
+ */
+ public String getEncoding() {
+ return encoding;
+ }
+
+ /**
+ * set Encoding
+ * @param encoding encoding
+ */
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ /**
+ * Set to true if it's a binary doc
+ * @param binary boolean
+ */
+ public void setBinary(boolean binary) {
+ this.binary = binary;
+ }
+
+ /**
+ * @return true if it's a binary file
+ */
+ public boolean getBinary() {
+ return binary;
+ }
+
+ /**
+ * set end of line value
+ * @param eol String
+ */
+ public void setEOL(String eol) {
+ this.eolStyle = eol;
+ }
+
+ /**
+ * get end of line
+ * @return end of line
+ */
+ public String getEOL() {
+ return this.eolStyle;
+ }
+
+ /**
+ * get end of line
+ * @return end of line
+ */
+ public String getDefaultEOL() {
+ return System.getProperty(LINE_SEPARATOR);
+ }
+
+ /**
+ * isUpdater
+ * @return boolean
+ */
+ public boolean isUpdater() {
+ return updater;
+ }
+
+ /**
+ * getAutoIndent
+ * @return boolean
+ */
+ public boolean getAutoIndent() {
+ return autoIndent;
+ }
+
+ /**
+ * setAutoIndent
+ * @param b boolean
+ */
+ public void setAutoIndent(boolean b) {
+ autoIndent = b;
+ }
+
+ /**
+ * setUpdater
+ * @param updaterDisabled boolean
+ */
+ public void setUpdater(boolean updaterDisabled) {
+ this.updater = updaterDisabled;
+ }
+
+ /**
+ * Get document text
+ * @return String
+ */
+ public String getText() {
+ try {
+ return getText(0, getLength());
+ } catch (BadLocationException e) {
+ return "";
+ }
+ }
+
+ public void addEOL() {
+ if (SciNotesOptions.getSciNotesPreferences().addLineTermination) {
+ int len = getLength();
+ if (getLength() >= 1) {
+ try {
+ String end = getText(len - 1, 1);
+ if (!end.equals("\n")) {
+ insertString(len, "\n", null);
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ } else {
+ try {
+ insertString(len, "\n", null);
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Begins a compound edit (for the undo)
+ */
+ public void mergeEditsBegin() {
+ undo.endCompoundEdit();
+ undo.startCompoundEdit();
+ }
+
+ /**
+ * Ends a compound edit (for the undo)
+ */
+ public void mergeEditsEnd() {
+ undo.endCompoundEdit();
+ }
+
+ /**
+ * getUndoManager
+ * @return CompoundUndoManager
+ */
+ public CompoundUndoManager getUndoManager() {
+ return undo;
+ }
+
+ /**
+ * disableUndoManager
+ */
+ public void disableUndoManager() {
+ if (undoManagerEnabled) {
+ this.removeUndoableEditListener(undo);
+ undoManagerEnabled = false;
+ }
+ }
+
+ /**
+ * enableUndoManager
+ */
+ public void enableUndoManager() {
+ if (!undoManagerEnabled) {
+ this.addUndoableEditListener(undo);
+ undoManagerEnabled = true;
+ }
+ }
+
+ /**
+ * isContentModified
+ * @return boolean
+ */
+ public boolean isContentModified() {
+ return contentModified;
+ }
+
+ /**
+ * isContentModifiedSinceBackup
+ * @return boolean
+ */
+ public boolean isContentModifiedSinceBackup() {
+ return contentModifiedSinceBackup;
+ }
+
+ /**
+ * setContentModified
+ * @param contentModified boolean
+ */
+ public void setContentModifiedSinceBackup(boolean contentModified) {
+ this.contentModifiedSinceBackup = contentModified;
+ }
+
+ /**
+ * setContentModified
+ * @param contentModified boolean
+ */
+ public void setContentModified(boolean contentModified) {
+ this.contentModified = contentModified;
+ if (pane != null && !contentModified) {
+ undo.setReference();
+ pane.updateTitle();
+ } else {
+ this.contentModifiedSinceBackup = true;
+ }
+ }
+
+ /**
+ * dump document on stderr with line positions
+ */
+ public void dump() {
+ readLock();
+ try {
+ Element root = getDefaultRootElement();
+ for (int i = 0; i != root.getElementCount(); ++i) {
+ Element e = root.getElement(i);
+ int start = e.getStartOffset();
+ int end = e.getEndOffset();
+ System.err.println("line " + i + " from: " + start + " to: " + end + ":|" + getText(start, end - start) + "|");
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ readUnlock();
+ }
+
+ /**
+ * Search the position of the function name in the Document
+ * @param name the name of the function
+ * @return the position where to go or -1 if not found
+ */
+ public int searchFunctionByName(String name) {
+ Element root = getDefaultRootElement();
+ for (int i = 0; i < root.getElementCount(); i++) {
+ Element e = root.getElement(i);
+ if (e instanceof ScilabLeafElement) {
+ ScilabLeafElement se = (ScilabLeafElement) e;
+ if (se.isFunction() && se.getFunctionInfo().functionName.equals(name)) {
+ return e.getStartOffset();
+ }
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * @return a list containing all the infos about functions available in this document
+ */
+ public List<FunctionScanner.FunctionInfo> getFunctionInfo() {
+ List<FunctionScanner.FunctionInfo> list = new ArrayList<FunctionScanner.FunctionInfo>();
+ Element root = getDefaultRootElement();
+ for (int i = 0; i < root.getElementCount(); i++) {
+ Element e = root.getElement(i);
+ if (e instanceof ScilabLeafElement) {
+ ScilabLeafElement se = (ScilabLeafElement) e;
+ if (se.isFunction()) {
+ list.add(se.getFunctionInfo());
+ }
+ }
+ }
+ return list;
+ }
+
+ /**
+ * @param alphaOrder is true if names must be sorted with alphabetic order
+ */
+ public void setAlphaOrderInTree(boolean alphaOrder) {
+ this.alphaOrder = alphaOrder;
+ }
+
+ /**
+ * Fill a tree with function's name according to alphabetic order or not
+ * @param base to fill
+ */
+ public synchronized void fillTreeFuns(DefaultMutableTreeNode base) {
+ Element root = getDefaultRootElement();
+ int nlines = root.getElementCount();
+ if (!alphaOrder) {
+ for (int i = 0; i < nlines; i++) {
+ Element elem = root.getElement(i);
+ if (elem instanceof ScilabDocument.ScilabLeafElement) {
+ int type = ((ScilabDocument.ScilabLeafElement) elem).getType();
+ switch (type) {
+ case ScilabDocument.ScilabLeafElement.NOTHING :
+ break;
+ case ScilabDocument.ScilabLeafElement.FUN :
+ base.add(new DefaultMutableTreeNode(elem));
+ break;
+ case ScilabDocument.ScilabLeafElement.ENDFUN :
+ break;
+ default :
+ break;
+ }
+ }
+ }
+ } else {
+ Set<DefaultMutableTreeNode> set = new TreeSet<DefaultMutableTreeNode>(new Comparator<DefaultMutableTreeNode>() {
+ public int compare(DefaultMutableTreeNode o1, DefaultMutableTreeNode o2) {
+ ScilabLeafElement l1 = (ScilabLeafElement) o1.getUserObject();
+ ScilabLeafElement l2 = (ScilabLeafElement) o2.getUserObject();
+ int n = l1.getFunctionName().compareTo(l2.getFunctionName());
+ if (n != 0) {
+ return n;
+ }
+ return l1.getStartOffset() - l2.getStartOffset();
+ }
+
+ public boolean equals(DefaultMutableTreeNode o1, DefaultMutableTreeNode o2) {
+ return false;
+ }
+ });
+ for (int i = 0; i < nlines; i++) {
+ Element elem = root.getElement(i);
+ if (elem instanceof ScilabDocument.ScilabLeafElement) {
+ int type = ((ScilabDocument.ScilabLeafElement) elem).getType();
+ switch (type) {
+ case ScilabDocument.ScilabLeafElement.NOTHING :
+ break;
+ case ScilabDocument.ScilabLeafElement.FUN :
+ set.add(new DefaultMutableTreeNode(elem));
+ break;
+ case ScilabDocument.ScilabLeafElement.ENDFUN :
+ break;
+ default :
+ break;
+ }
+ }
+ }
+ Iterator<DefaultMutableTreeNode> iter = set.iterator();
+ while (iter.hasNext()) {
+ base.add(iter.next());
+ }
+ }
+ }
+
+ /**
+ * Fill a tree with anchor's name according to alphabetic order or not
+ * @param base to fill
+ */
+ public synchronized void fillTreeAnchors(DefaultMutableTreeNode base) {
+ Element root = getDefaultRootElement();
+ int nlines = root.getElementCount();
+ if (!alphaOrder) {
+ for (int i = 0; i < nlines; i++) {
+ ScilabLeafElement elem = (ScilabLeafElement) root.getElement(i);
+ if (elem.isAnchor()) {
+ base.add(new DefaultMutableTreeNode(elem));
+ }
+ }
+ } else {
+ Set<DefaultMutableTreeNode> set = new TreeSet<DefaultMutableTreeNode>(new Comparator<DefaultMutableTreeNode>() {
+ public int compare(DefaultMutableTreeNode o1, DefaultMutableTreeNode o2) {
+ ScilabLeafElement l1 = (ScilabLeafElement) o1.getUserObject();
+ ScilabLeafElement l2 = (ScilabLeafElement) o2.getUserObject();
+ int n = l1.getAnchorName().compareTo(l2.getAnchorName());
+ if (n != 0) {
+ return n;
+ }
+ return l1.getStartOffset() - l2.getStartOffset();
+ }
+
+ public boolean equals(DefaultMutableTreeNode o1, DefaultMutableTreeNode o2) {
+ return false;
+ }
+ });
+ for (int i = 0; i < nlines; i++) {
+ ScilabLeafElement elem = (ScilabLeafElement) root.getElement(i);
+ if (elem.isAnchor()) {
+ set.add(new DefaultMutableTreeNode(elem));
+ }
+ }
+ Iterator<DefaultMutableTreeNode> iter = set.iterator();
+ while (iter.hasNext()) {
+ base.add(iter.next());
+ }
+ }
+ }
+
+ /**
+ * @return the first function name which appears in this doc or null
+ */
+ public String getFirstFunctionName() {
+ Element root = getDefaultRootElement();
+ for (int i = 0; i < root.getElementCount(); i++) {
+ Element e = root.getElement(i);
+ if (e instanceof ScilabLeafElement) {
+ ScilabLeafElement se = (ScilabLeafElement) e;
+ if (se.isFunction()) {
+ return se.getFunctionInfo().functionName;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @param line the number of the line where to begin the search
+ * @return the next anchor
+ */
+ public int nextAnchorFrom(int line) {
+ Element root = getDefaultRootElement();
+ for (int i = line + 1; i < root.getElementCount(); i++) {
+ ScilabLeafElement se = (ScilabLeafElement) root.getElement(i);
+ if (se.isAnchor()) {
+ return i;
+ }
+ }
+ for (int i = 0; i < line; i++) {
+ ScilabLeafElement se = (ScilabLeafElement) root.getElement(i);
+ if (se.isAnchor()) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * @param line the number of the line where to begin the search
+ * @return the previous anchor
+ */
+ public int previousAnchorFrom(int line) {
+ Element root = getDefaultRootElement();
+ for (int i = line - 1; i >= 0; i--) {
+ ScilabLeafElement se = (ScilabLeafElement) root.getElement(i);
+ if (se.isAnchor()) {
+ return i;
+ }
+ }
+ for (int i = root.getElementCount() - 1; i > line; i--) {
+ ScilabLeafElement se = (ScilabLeafElement) root.getElement(i);
+ if (se.isAnchor()) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Get the anchors between two positions
+ * @param start the beginning
+ * @param end the end
+ * @return a list of the anchors
+ */
+ public List<Anchor> getAnchorsBetween(int start, int end) {
+ Element root = getDefaultRootElement();
+ int lineS = root.getElementIndex(start);
+ int lineE = root.getElementIndex(end);
+ List<Anchor> list = new ArrayList<Anchor>();
+ for (int i = lineS; i <= lineE; i++) {
+ final ScilabLeafElement se = (ScilabLeafElement) root.getElement(i);
+ if (se.isAnchor()) {
+ list.add(new Anchor(i, se.getAnchorName()));
+ }
+ }
+
+ return list;
+ }
+
+ /**
+ * Get the lhs/rhs args used in a function declaration
+ * @param pos the position in the document
+ * @return the two lists containing args and returned values or null if we are not
+ * in a function
+ */
+ public List<String>[] getInOutArgs(int pos) {
+ Element root = getDefaultRootElement();
+ int index = root.getElementIndex(pos);
+ int compt = 0;
+ while (index != -1) {
+ ScilabLeafElement e = (ScilabLeafElement) root.getElement(index--);
+ switch (e.getType()) {
+ case ScilabLeafElement.NOTHING :
+ break;
+ case ScilabLeafElement.FUN :
+ if (compt == 0) {
+ FunctionScanner.FunctionInfo info = e.getFunctionInfo();
+ return new List[] {info.returnValues, info.argsValues};
+ } else {
+ compt++;
+ }
+ break;
+ case ScilabLeafElement.ENDFUN :
+ compt--;
+ break;
+ default :
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the function name where the caret is
+ * @param pos the position in the document
+ * @return the nearest function name
+ */
+ public String getCurrentFunction(int pos) {
+ Element root = getDefaultRootElement();
+ int index = root.getElementIndex(pos);
+ int line = index;
+ int compt = 0;
+ while (index != -1) {
+ ScilabLeafElement e = (ScilabLeafElement) root.getElement(index--);
+ switch (e.getType()) {
+ case ScilabLeafElement.NOTHING :
+ break;
+ case ScilabLeafElement.FUN :
+ if (compt == 0) {
+ String str = e.getFunctionInfo().functionName;
+ if (str == null) {
+ str = SciNotesMessages.UNKNOWN_FUNCTION;
+ }
+ return String.format(SciNotesMessages.POSFUN_IN_DOC, line + 1, pos - root.getElement(line).getStartOffset(), str, line - index);
+ } else {
+ compt++;
+ }
+ break;
+ case ScilabLeafElement.ENDFUN :
+ compt--;
+ break;
+ default :
+ }
+ }
+ return String.format(SciNotesMessages.POS_IN_DOC, line + 1, pos - root.getElement(line).getStartOffset());
+ }
+
+ /**
+ * lock
+ */
+ public void lock() {
+ super.writeLock();
+ }
+
+ /**
+ * unlock
+ */
+ public void unlock() {
+ super.writeUnlock();
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void changedUpdate(DocumentEvent e) { }
+
+ /**
+ * Called when an insertion is made in the doc
+ * @param e the event
+ */
+ public void insertUpdate(DocumentEvent e) {
+ handleEvent(e);
+ }
+
+ /**
+ * Called when a remove is made in the doc
+ * @param e the event
+ */
+ public void removeUpdate(DocumentEvent e) {
+ handleEvent(e);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void insertUpdate(DefaultDocumentEvent chng, AttributeSet attr) {
+ // Fix bug 8277 in putting attr=null
+ // Java, by default, highlights the chinese chars when entered on keyboard
+ super.insertUpdate(chng, null);
+ }
+
+ /**
+ * @param ev the DocumentEvent to handle
+ */
+ private void handleEvent(DocumentEvent ev) {
+ if (!contentModified) {
+ contentModified = true;
+ if (pane != null) {
+ pane.updateTitle();
+ }
+ }
+
+ contentModifiedSinceBackup = true;
+
+ DocumentEvent.ElementChange chg = ev.getChange(getDefaultRootElement());
+ if (chg != null) {
+ Element[] added = chg.getChildrenAdded();
+ Element[] removed = chg.getChildrenRemoved();
+ if ((added != null && added.length > 0) || (removed != null && removed.length > 0)) {
+ for (int i = 0; i < removed.length; i++) {
+ String name = ((ScilabLeafElement) removed[i]).getFunctionName();
+ if (name != null && name.length() != 0) {
+ functions.remove(name);
+ }
+ }
+ for (int i = 0; i < added.length; i++) {
+ ((ScilabLeafElement) added[i]).resetType();
+ ((ScilabLeafElement) added[i]).resetTypeWhenBroken();
+ String name = ((ScilabLeafElement) added[i]).getFunctionName();
+ if (name != null && name.length() != 0) {
+ functions.add(name);
+ }
+ }
+ }
+ } else {
+ // change occurred only on one line
+ Element root = getDefaultRootElement();
+ int index = root.getElementIndex(ev.getOffset());
+ ScilabLeafElement line = (ScilabLeafElement) root.getElement(index);
+ boolean broken = line.isBroken();
+ if (pane != null && (line.resetType() == ScilabLeafElement.FUN || broken != line.isBroken()
+ || (index > 0 && ((ScilabLeafElement) root.getElement(index - 1)).isBroken()))) {
+ pane.repaint();
+ }
+ }
+
+ if (pane != null) {
+ KeywordEvent e = pane.getKeywordEvent();
+
+ if (ScilabLexerConstants.isLaTeX(e.getType())) {
+ try {
+ int start = e.getStart();
+ int end = start + e.getLength();
+ String exp = getText(start, e.getLength());
+ int height = pane.getScrollPane().getHeight() + pane.getScrollPane().getVerticalScrollBar().getValue();
+ ScilabLaTeXViewer.displayExpressionIfVisible(pane, height, exp, start, end);
+ } catch (BadLocationException ex) { }
+ }
+ }
+ }
+
+ /**
+ * @overload #createDefaultRoot
+ * @return the element base
+ */
+ protected AbstractElement createDefaultRoot() {
+ funScanner = new FunctionScanner(this);
+ BranchElement map = (BranchElement) createBranchElement(null, null);
+ Element line = createLeafElement(map, null, 0, 1);
+ map.replace(0, 0, new Element[] {line});
+ return map;
+ }
+
+ /**
+ * @overload #createLeafElement
+ * @param parent the parent Element
+ * @param a an AttributeSet
+ * @param p0 start in the doc
+ * @param p1 end in the doc
+ * @return the created LeafElement
+ */
+ protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) {
+ return new ScilabLeafElement(parent, a, p0, p1);
+ }
+
+ /**
+ * Inner class to consider the type of a line :
+ * - FUN : function y=foo(x)
+ * - ENDFUN : endfunction
+ * - NOTHING : bla bla bla
+ * This inner class is useful to make a line numbering compatible with the whereami macro.
+ */
+ public class ScilabLeafElement extends LeafElement {
+
+ private static final long serialVersionUID = 4389590345677765643L;
+
+ /**
+ * Nothing in this line
+ */
+ public static final int NOTHING = 0;
+
+ /**
+ * function ... in this line
+ */
+ public static final int FUN = 1;
+
+ /**
+ * endfunction in this line
+ */
+ public static final int ENDFUN = 2;
+
+ /**
+ * broken line
+ */
+ public static final int BROKEN = 4;
+
+ private boolean visible = true;
+ private int previousType;
+ private int type;
+ private FunctionScanner.FunctionInfo info;
+ private boolean broken;
+ private boolean brokenString;
+
+ private boolean anchor;
+ private String anchorName;
+
+ /**
+ * The same constructor as in LeafElement.
+ * @param parent the parent Element
+ * @param a an AttributeSet
+ * @param p0 start in the doc
+ * @param p1 end in the doc
+ */
+ public ScilabLeafElement(Element parent, AttributeSet a, int p0, int p1) {
+ super(parent, a, p0, p1);
+ type = funScanner.getLineType(p0, p1);
+ if ((type & BROKEN) == BROKEN) {
+ broken = true;
+ type -= BROKEN;
+ }
+
+ if (type == FUN) {
+ info = funScanner.getFunctionInfo();
+ }
+ }
+
+ /**
+ * Reset type (normally called on a change in the document)
+ * @return the new type
+ */
+ public int resetType() {
+ String oldName = "";
+ if (type == FUN) {
+ oldName = info.functionName;
+ }
+
+ previousType = type;
+ type = funScanner.getLineType(getStartOffset(), getEndOffset());
+
+ if ((type & BROKEN) == BROKEN) {
+ broken = true;
+ type -= BROKEN;
+ } else {
+ broken = false;
+ }
+
+ if (type == FUN) {
+ info = funScanner.getFunctionInfo();
+ if (info.functionName != null) {
+ if (!info.functionName.equals(oldName)) {
+ functions.remove(oldName);
+ functions.add(info.functionName);
+ }
+ } else {
+ functions.remove(oldName);
+ }
+ }
+
+ resetTypeWhenBroken();
+
+ return type;
+ }
+
+ /**
+ * @return true if the Line number panel need to be refreshed (useful in whereami mode)
+ */
+ public boolean needLineNumberRepaint() {
+ return type == FUN || type == ENDFUN || type != previousType;
+ }
+
+ /**
+ * If the previous line is broken, then this line is a part of it
+ * so we need to resetType of the previous.
+ */
+ public void resetTypeWhenBroken() {
+ int p0 = getStartOffset();
+ if (p0 != 0) {
+ Element parent = getParentElement();
+ ScilabLeafElement elem = (ScilabLeafElement) parent.getElement(parent.getElementIndex(p0 - 1));
+ if (elem.broken) {
+ elem.resetType();
+ }
+ }
+ }
+
+ /**
+ * @return the type of this line (FUN,...)
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * @return the info about this line containing a function def
+ */
+ public FunctionScanner.FunctionInfo getFunctionInfo() {
+ return info;
+ }
+
+ /**
+ * @return if this line begins with function
+ */
+ public boolean isFunction() {
+ return type == FUN;
+ }
+
+ /**
+ * @return if this line begins with endfunction
+ */
+ public boolean isEndfunction() {
+ return type == ENDFUN;
+ }
+
+ /**
+ * @return if this line is visible
+ */
+ public boolean isVisible() {
+ return visible;
+ }
+
+ /**
+ * @param b true if this line is visible
+ */
+ public void setVisible(boolean b) {
+ visible = b;
+ }
+
+ /**
+ * @return if this line is broken
+ */
+ public boolean isBroken() {
+ return broken;
+ }
+
+ /**
+ * @param b true if this line is broken
+ */
+ public void setBroken(boolean b) {
+ broken = b;
+ }
+
+ /**
+ * @return if this line is broken
+ */
+ public boolean isBrokenString() {
+ return brokenString;
+ }
+
+ /**
+ * @param b true if this line is broken in a string
+ */
+ public void setBrokenString(boolean b) {
+ brokenString = b;
+ if (b) {
+ broken = true;
+ }
+ }
+
+ /**
+ * @return the function's name
+ */
+ public String getFunctionName() {
+ if (type == FUN) {
+ return info.functionName;
+ }
+ return "";
+ }
+
+ /**
+ * @return if this line is an anchor
+ */
+ public boolean isAnchor() {
+ return anchor;
+ }
+
+ /**
+ * @param name the name of the anchor, if null remove
+ * the anchor.
+ */
+ public void setAnchor(String name) {
+ if (name == null) {
+ anchor = false;
+ return;
+ }
+
+ anchor = true;
+ anchorName = name;
+ }
+
+ /**
+ * @return the name of the anchor if exists
+ */
+ public String getAnchorName() {
+ if (anchor) {
+ return anchorName;
+ } else {
+ return "";
+ }
+ }
+
+ /**
+ * @return String representation
+ */
+ public String toString() {
+ if (anchor) {
+ if (type == FUN) {
+ return "function: " + info.functionName + " & anchor: " + anchorName;
+ } else {
+ return anchorName;
+ }
+ }
+ return info.functionName;
+ }
+ }
+
+ /**
+ * Inner class to get infos on anchor
+ */
+ public class Anchor {
+
+ private int line;
+ private String name;
+
+ /**
+ * Default constructor
+ * @param line the line where the anchor is
+ * @param name the anchor's name
+ */
+ public Anchor(int line, String name) {
+ this.line = line;
+ this.name = name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return name;
+ }
+
+ /**
+ * @return the line number
+ */
+ public int getLine() {
+ return line;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocumentReader.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocumentReader.java
new file mode 100755
index 000000000..312896cba
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabDocumentReader.java
@@ -0,0 +1,122 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.io.Reader;
+import java.io.IOException;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Segment;
+
+/**
+ * Class ScilabDocumentReader provides a read method to read a part of the document
+ * from left to right and from right to left (useful to find matching keywords such
+ * as function...endfunction or noitcnufdne...noitcnuf)
+ * @author Calixte DENIZET
+ */
+public class ScilabDocumentReader extends Reader {
+
+ private static final String BADLOCATION = "Bad Location in document";
+
+ private int end;
+ private int pos;
+ private boolean fromEnd;
+ private ScilabDocument doc;
+ private Segment segment;
+
+ /**
+ * Constructor for a reader from left to right
+ * @param doc the doc to read
+ * @param start the start in the doc
+ * @param end the end in the doc
+ */
+ public ScilabDocumentReader(ScilabDocument doc, int start, int end) {
+ this(doc, false, start, end);
+ }
+
+ /**
+ * Constructor for a reader from left to right (fromEnd == false) or from right to left (fromEnd == true).
+ * @param doc the doc to read
+ * @param fromEnd LR or RL
+ * @param start the start in the doc
+ * @param end the end in the doc
+ */
+ public ScilabDocumentReader(ScilabDocument doc, boolean fromEnd, int start, int end) {
+ this.doc = doc;
+ this.segment = new Segment();
+ if (fromEnd) {
+ this.pos = Math.min(start, doc.getLength());
+ this.end = end;
+ } else {
+ this.pos = start;
+ this.end = Math.min(end, doc.getLength());
+ }
+ this.fromEnd = fromEnd;
+ }
+
+ /**
+ * The read method for a Reader.
+ * @param cbuf the buffer where to put the chars
+ * @param pos position in the doc
+ * @param len the number of chars to be read
+ * @return the number of read chars
+ * @throws IOException if a problem is encountered
+ */
+ public int read(char[] cbuf, int pos, int len) throws IOException {
+ if (doc == null) {
+ throw new IOException("Reader closed");
+ }
+ int length = len;
+
+ if (!fromEnd) {
+ if (this.pos < end) {
+ if (length > end - this.pos) {
+ length = end - this.pos;
+ }
+ try {
+ doc.getText(this.pos, length, segment);
+ System.arraycopy(segment.array, segment.offset, cbuf, pos, length);
+ this.pos += length;
+ return length;
+ } catch (BadLocationException e) {
+ throw new IOException(BADLOCATION);
+ }
+ }
+ } else {
+ if (this.pos > end) {
+ if (length > this.pos - end + 1) {
+ length = this.pos - end + 1;
+ }
+ try {
+ doc.getText(this.pos - length + 1, length, segment);
+ int ppos = segment.offset + segment.count - 1;
+ for (int i = 0; i < length; i++) {
+ cbuf[pos + i] = segment.array[ppos - i];
+ }
+ this.pos -= length;
+ return length;
+ } catch (BadLocationException e) {
+ throw new IOException(BADLOCATION);
+ }
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The close method of a Reader
+ * @throws IOException if a problem is encountered
+ */
+ public void close() throws IOException {
+ doc = null;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorKit.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorKit.java
new file mode 100755
index 000000000..110345dcd
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorKit.java
@@ -0,0 +1,302 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.nio.CharBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CodingErrorAction;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultEditorKit;
+import javax.swing.text.Document;
+import javax.swing.text.ViewFactory;
+
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.actions.EncodingAction;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * The class ScilabEditorKit provides the minimal things needed to render
+ * a Scilab's document.
+ * @author Calixte DENIZET
+ */
+public class ScilabEditorKit extends DefaultEditorKit {
+
+ private static final long serialVersionUID = 8005575461386086815L;
+
+ /**
+ * The mimetype for a scilab code
+ */
+ public static final String MIMETYPE = "text/scilab";
+ private static final int BUFFERCAPACITY = 8192;
+ public static final String[] ENCODINGS = new String[] {"utf-8", "windows-1252", "iso-8859-1"};
+ private static final Map<String, Integer> encPos = new HashMap<String, Integer>(ENCODINGS.length);
+
+ static {
+ for (int i = 0; i < ENCODINGS.length; i++) {
+ encPos.put(ENCODINGS[i], i);
+ }
+ }
+
+ private final char[] buffer = new char[BUFFERCAPACITY];
+
+ private ScilabContext preferences;
+ private boolean plain;
+
+ /**
+ * Default constructor
+ */
+ public ScilabEditorKit() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param plain is true to use a plain view (no line-wrapping)
+ */
+ public ScilabEditorKit(boolean plain) {
+ super();
+ this.plain = plain;
+ }
+
+ public boolean isPlain() {
+ return plain;
+ }
+
+ /**
+ * @return the mime type
+ */
+ public String getContentType() {
+ return MIMETYPE;
+ }
+
+ /**
+ * @return a new ScilabDocument
+ */
+ public Document createDefaultDocument() {
+ return new ScilabDocument();
+ }
+
+ /**
+ * @return the context associated with the ScilabDocument
+ */
+ public ScilabContext getStylePreferences() {
+ if (preferences == null) {
+ preferences = new ScilabContext(plain);
+ }
+
+ return preferences;
+ }
+
+ /**
+ * Set the context to render the document
+ * @param prefs the context to use
+ */
+ public void setStylePreferences(ScilabContext prefs) {
+ preferences = prefs;
+ }
+
+ /**
+ * @return the ViewFactory used to create a View to render a ScilabDocument
+ */
+ public ViewFactory getViewFactory() {
+ return getStylePreferences();
+ }
+
+ /**
+ * @param file the file to test
+ * @return the corresponding charset if exists
+ * @throws IOExecption if I/O problems are met
+ * @throws CharacterCodingException if no charset is found
+ */
+ public static Charset tryToGuessEncoding(File file) throws IOException, CharacterCodingException {
+ for (int i = 0; i < ENCODINGS.length; i++) {
+ if (tryToGuessEncoding(file, Charset.forName(ENCODINGS[i]))) {
+ return Charset.forName(ENCODINGS[i]);
+ }
+ }
+
+ throw new CharacterCodingException();
+ }
+
+ /**
+ * @param file the file to test
+ * @param charset the charset to test
+ * @return true if the file can be decoded with the charset
+ * @throws IOExecption if I/O problems are met
+ */
+ public static boolean tryToGuessEncoding(File file, Charset charset) throws IOException {
+ char[] cbuf = new char[BUFFERCAPACITY];
+ CharsetDecoder decoder = charset.newDecoder().onMalformedInput(CodingErrorAction.REPORT).onUnmappableCharacter(CodingErrorAction.REPORT);
+ FileInputStream fis = new FileInputStream(file);
+ InputStreamReader inReader = new InputStreamReader(fis, decoder);
+ BufferedReader bufReader = new BufferedReader(inReader);
+ try {
+ while (bufReader.read(cbuf) != -1) {
+ ;
+ }
+ fis.close();
+ inReader.close();
+ bufReader.close();
+ return true;
+ } catch (Exception e) { }
+
+ return false;
+ }
+
+ /**
+ * The read method is used to read the file and to write its contents
+ * in the document at position pos
+ * @param file the file to read
+ * @param doc the Document where to write
+ * @param pos position where to write
+ * @throws CharacterCodingException if an unreadable char is encountered
+ * @throws IOException if a problem is encountered in reading the stream
+ * @throws BadLocationException if the pos is invalid
+ */
+ public void read(SciNotes editor, File file, Document doc, int pos) throws IOException, BadLocationException {
+ Charset charset = Charset.forName(SciNotesOptions.getSciNotesPreferences().encoding);
+ try {
+ charset = tryToGuessEncoding(file);
+ } catch (CharacterCodingException e) {
+ ScilabModalDialog.show(editor, SciNotesMessages.CANNOT_GUESS_ENCODING, SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ ((ScilabDocument) doc).setEncoding(charset.toString());
+ EncodingAction.updateEncodingMenu((ScilabDocument) doc);
+ FileInputStream fis = new FileInputStream(file);
+ InputStreamReader isr = new InputStreamReader(fis, charset);
+ BufferedReader br = new BufferedReader(isr);
+ read(br, doc, pos);
+ try {
+ br.close();
+ } catch (IOException e) { }
+ }
+
+ /**
+ * The read method is used to read the Reader and to write its contents
+ * in the document at position pos
+ * @param in the Reader to read
+ * @param doc the Document where to write
+ * @param pos position where to write
+ * @throws IOException if a problem is encountered in reading the stream
+ * @throws BadLocationException if the pos is invalid
+ */
+ public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException {
+ DocString docString = read(in);
+ ((ScilabDocument) doc).setEOL(docString.eol);
+ ((ScilabDocument) doc).setBinary(docString.isBinary);
+ doc.insertString(pos, docString.content, null);
+ }
+
+ /**
+ * The read method is used to read the Reader and to write its contents
+ * in the document at position pos
+ * @param in the Reader to read
+ * @throws IOException if a problem is encountered in reading the stream
+ */
+ public DocString read(Reader in) throws IOException {
+ int nch;
+ int i;
+ int prev;
+ int inc = 0;
+ boolean win = false;
+ boolean mac = false;
+ boolean first = true;
+ boolean binary = false;
+ DocString docString = new DocString();
+ StringBuilder sbuf = new StringBuilder(buffer.length);
+ while ((nch = in.read(buffer, 0, buffer.length)) != -1) {
+ if (first) {
+ /* We try to know if we have a binary file
+ The rule is : two \0 in the first 8ko : it's binary ! */
+ CharBuffer cb = CharBuffer.wrap(buffer);
+ byte[] bytes = Charset.forName("utf-8").encode(cb).array();
+ for (i = 0; i < nch; i++) {
+ if (bytes[i] == 0 ) {
+ inc++;
+ if (inc == 2) {
+ binary = true;
+ break;
+ }
+ }
+ }
+ first = false;
+ }
+
+ prev = 0;
+ if (!binary) {
+ for (i = 0; i < nch - 1; i++) {
+ if (buffer[i] == '\r') {
+ buffer[i] = '\n';
+ sbuf.append(buffer, prev, i - prev + 1);
+ if (buffer[i + 1] == '\n') {
+ i++;
+ if (!win && !mac) {
+ docString.eol = ScilabDocument.EOLWIN;
+ win = true;
+ }
+ } else {
+ if (!win && !mac) {
+ docString.eol = ScilabDocument.EOLMAC;
+ mac = true;
+ }
+ }
+
+ prev = i + 1;
+ }
+ }
+
+ if (i == nch - 1) {
+ if (buffer[i] == '\r') {
+ if (!win && !mac) {
+ docString.eol = ScilabDocument.EOLMAC;
+ }
+ buffer[i] = '\n';
+ }
+ sbuf.append(buffer, prev, i - prev + 1);
+ }
+ } else {
+ sbuf.append(buffer, 0, nch);
+ }
+ }
+ if (!win && !mac) {
+ docString.eol = ScilabDocument.EOLUNIX;
+ }
+
+ docString.isBinary = inc == 2;
+ docString.content = sbuf.toString();
+
+ return docString;
+ }
+
+ public static class DocString {
+
+ public String eol;
+ public boolean isBinary;
+ public String content;
+
+ DocString() { }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorPane.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorPane.java
new file mode 100755
index 000000000..44ca5dfd2
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabEditorPane.java
@@ -0,0 +1,1758 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Color;
+import java.awt.Cursor;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JEditorPane;
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.SwingUtilities;
+import javax.swing.Timer;
+import javax.swing.UIManager;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.event.EventListenerList;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Caret;
+import javax.swing.text.DefaultHighlighter;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
+import javax.swing.text.Highlighter;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.View;
+
+import org.scilab.modules.commons.OS;
+import org.scilab.modules.commons.gui.ScilabCaret;
+import org.scilab.modules.console.utils.ScilabLaTeXViewer;
+import org.scilab.modules.gui.messagebox.MessageBox;
+import org.scilab.modules.gui.messagebox.ScilabMessageBox;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.gui.utils.WebBrowser;
+import org.scilab.modules.scinotes.actions.CopyAsHTMLAction;
+import org.scilab.modules.scinotes.actions.OpenSourceFileOnKeywordAction;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+import org.scilab.modules.scinotes.utils.ScilabScrollPane;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * Class ScilabEditorPane
+ * @author Calixte DENIZET
+ *
+ */
+public class ScilabEditorPane extends JEditorPane implements Highlighter.HighlightPainter,
+ CaretListener, MouseListener,
+ MouseMotionListener, Cloneable,
+ KeyListener {
+
+ private static final long serialVersionUID = 4322071415211939097L;
+
+ private static final String TIRET = " - ";
+ private static final Cursor HANDCURSOR = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
+ private static final Cursor TEXTCURSOR = Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR);
+ private static final DefaultHighlighter.DefaultHighlightPainter HIGHLIGHTER = new DefaultHighlighter.DefaultHighlightPainter(Color.YELLOW);
+
+ private static ScilabEditorPane focused;
+
+ private Color highlightColor;
+ private Color highlightContourColor;
+ private boolean highlightEnable;
+ private Object highlightCL;
+ private boolean matchingKeywordsEnable;
+ private boolean matchingOpenersEnable;
+ private boolean overwriteMode;
+ private ScilabLexer lexer;
+ private SciNotes editor;
+ private IndentManager indent;
+ private TabManager tab;
+ private CommentManager com;
+ private HelpOnTypingManager helpOnTyping;
+ private TrailingWhiteManager trailingWhite;
+ private boolean readonly;
+ private boolean binary;
+ private String infoBar = "";
+ private String shortName = "";
+ private String title = "";
+
+ private Timer selectionTimer;
+ private Timer matcherTimer;
+
+ private Point mousePoint;
+
+ private long lastModified;
+ private long lastExternalModification;
+
+ /* matchLR matches Left to Right ... */
+ private MatchingBlockManager matchLR;
+ private MatchingBlockManager matchRL;
+
+ private boolean suppressCom = true;
+
+ private SciNotesLineNumberPanel xln;
+ private ScilabEditorPane rightTextPane;
+ private UUID uuid;
+
+ private EditorComponent edComponent;
+
+ private boolean hand;
+ private boolean infoBarChanged;
+ private boolean ctrlHit;
+
+ private Color saveHighlightContourColor;
+ private Color saveHighlightColor;
+ private boolean hasBeenSaved;
+ private boolean saveHighlightEnable;
+
+ private EventListenerList kwListeners = new EventListenerList();
+ private Map<Integer, Object> highlightedWords = new HashMap<Integer, Object>();
+
+ //private List<Object> highlightedWords = new ArrayList<Object>();
+ //private List<Integer> highlightedWordsBegin = new ArrayList<Integer>();
+
+ /**
+ * Constructor
+ * @param editor which uses this pane
+ */
+ public ScilabEditorPane(SciNotes editor) {
+ super();
+ if (focused == null) {
+ focused = this;
+ }
+ this.editor = editor;
+ this.uuid = UUID.randomUUID();
+ edComponent = new EditorComponent(this);
+
+ /*
+ When SciNotes is docked and has two tabs, switching the tabs causes a focus loss.
+ The focus is gave to the other docked component and that generates a toolbar change.
+ The solution is to set FocusCycleRoot to false (set to true by default in JEditorPane).
+ */
+ setFocusCycleRoot(false);
+
+ addCaretListener(this);
+ addMouseMotionListener(this);
+ addMouseListener(this);
+ enableMatchingKeywords(SciNotesOptions.getSciNotesDisplay().highlightKeywords);
+ enableMatchingOpeners(SciNotesOptions.getSciNotesDisplay().highlightBrackets);
+ setFocusable(true);
+ addFocusListener(new FocusListener() {
+ public void focusGained(FocusEvent e) {
+ updateInfosWhenFocused();
+ if (ScilabEditorPane.this.editor != null) {
+ NavigatorWindow nav = ScilabEditorPane.this.editor.getNavigator();
+ if (nav != null) {
+ nav.update((ScilabDocument) getDocument());
+ }
+ }
+ setMustAdjustVisibility(true);
+ }
+
+ public void focusLost(FocusEvent e) {
+ ((ScilabDocument) getDocument()).setFocused(false);
+ if (e.getOppositeComponent() == getOtherPaneInSplit()) {
+ setMustAdjustVisibility(false);
+ }
+ }
+ });
+
+ addKeywordListener(new KeywordAdapter.MouseOverAdapter() {
+ public void caughtKeyword(KeywordEvent e) {
+ if (ScilabLexerConstants.isClickable(e.getType())) {
+ if (ctrlHit) {
+ setCursor(HANDCURSOR);
+ hand = true;
+ try {
+ String url = ((ScilabDocument) getDocument()).getText(e.getStart(), e.getLength());
+ if (ScilabLexerConstants.isClickable(e.getType())) {
+ String text;
+ switch (e.getType()) {
+ case ScilabLexerConstants.URL :
+ text = SciNotesMessages.OPENURL;
+ break;
+ case ScilabLexerConstants.MAIL :
+ text = SciNotesMessages.MAILTO;
+ break;
+ case ScilabLexerConstants.MACROS :
+ text = SciNotesMessages.OPENSOURCE;
+ break;
+ case ScilabLexerConstants.MACROINFILE :
+ text = SciNotesMessages.SHOWSOURCE;
+ break;
+ default :
+ text = null;
+ }
+
+ if (text != null && ScilabEditorPane.this.editor != null) {
+ ScilabEditorPane.this.editor.getInfoBar().setText(text + url);
+ infoBarChanged = true;
+ }
+ }
+ } catch (BadLocationException ex) { }
+ } else if (ScilabEditorPane.this.editor != null) {
+ ScilabEditorPane.this.editor.getInfoBar().setText(SciNotesMessages.CLICKABLE_URL);
+ infoBarChanged = true;
+ if (hand) {
+ setCursor(TEXTCURSOR);
+ hand = false;
+ }
+ }
+ } else {
+ if (hand) {
+ setCursor(TEXTCURSOR);
+ hand = false;
+ }
+ if (infoBarChanged && ScilabEditorPane.this.editor != null) {
+ ScilabEditorPane.this.editor.getInfoBar().setText(infoBar);
+ infoBarChanged = false;
+ }
+ if (ScilabLexerConstants.isLaTeX(e.getType())) {
+ try {
+ int start = e.getStart();
+ int end = start + e.getLength();
+ String exp = ((ScilabDocument) getDocument()).getText(start, e.getLength());
+ ScilabScrollPane ssp = getScrollPane();
+ int height;
+ if (ssp != null) {
+ height = ssp.getHeight() + ssp.getVerticalScrollBar().getValue();
+ } else {
+ height = edComponent.getHeight();
+ }
+ ScilabLaTeXViewer.displayExpression(ScilabEditorPane.this, height, exp, start, end);
+ } catch (BadLocationException ex) { }
+ } else {
+ ScilabLaTeXViewer.removeLaTeXViewer(ScilabEditorPane.this);
+ }
+ }
+ }
+ });
+
+ addKeywordListener(new KeywordAdapter.MouseClickedAdapter() {
+ public void caughtKeyword(KeywordEvent e) {
+ if (ctrlHit && ScilabLexerConstants.isClickable(e.getType())) {
+ try {
+ hand = false;
+ ctrlHit = false;
+ infoBarChanged = false;
+ setCursor(TEXTCURSOR);
+ if (ScilabEditorPane.this.editor != null) {
+ ScilabEditorPane.this.editor.getInfoBar().setText(infoBar);
+ }
+ String url = ((ScilabDocument) getDocument()).getText(e.getStart(), e.getLength());
+ if (ScilabLexerConstants.URL == e.getType() || ScilabLexerConstants.MAIL == e.getType()) {
+ WebBrowser.openUrl(url);
+ } else if (ScilabLexerConstants.isOpenable(e.getType())) {
+ OpenSourceFileOnKeywordAction.openSource(ScilabEditorPane.this, url);
+ }
+ } catch (BadLocationException ex) { }
+ }
+ }
+ });
+
+ getScrollPane().addMouseWheelListener(new MouseWheelListener() {
+ public void mouseWheelMoved(MouseWheelEvent e) {
+ if ((OS.get() == OS.MAC && e.isMetaDown()) || e.isControlDown()) {
+ int n = e.getWheelRotation();
+ SciNotes.updateFontSize(n);
+ e.consume();
+ }
+ }
+ });
+
+ addKeyListener(this);
+ setTransferHandler(new CopyAsHTMLAction.HTMLTransferHandler());
+
+ ((ScilabCaret) getCaret()).setMustAdjustVisibility(false);
+ }
+
+ public void enableColorization(boolean b) {
+ View view = ((ScilabDocument) getDocument()).getView();
+ if (view != null) {
+ if (view instanceof ScilabView) {
+ ((ScilabView) view).enable(b);
+ } else {
+ ((ScilabPlainView) view).enable(b);
+ }
+ }
+ }
+
+ public void configurationChanged(SciNotesConfiguration.Conf conf) {
+ ((ScilabEditorKit) getEditorKit()).getStylePreferences().configurationChanged(conf);
+
+ if (conf.font) {
+ resetFont();
+ }
+
+ if (conf.display) {
+ enableHighlightedLine(SciNotesOptions.getSciNotesDisplay().highlightCurrentLine);
+ setHighlightedLineColor(SciNotesOptions.getSciNotesDisplay().currentLineColor);
+ enableColorization(SciNotesOptions.getSciNotesDisplay().keywordsColorization);
+ setBackground(SciNotesOptions.getSciNotesDisplay().backgroundColor);
+ setCaretColor(SciNotesOptions.getSciNotesDisplay().caretColor);
+
+ boolean kw = SciNotesOptions.getSciNotesDisplay().highlightKeywords;
+ boolean op = SciNotesOptions.getSciNotesDisplay().highlightBrackets;
+
+ if ((kw || op) && (!matchingKeywordsEnable && !matchingOpenersEnable)) {
+ matchLR = new MatchingBlockManager((ScilabDocument) getDocument(), this, true, getHighlighter());
+ matchLR.setDefaults();
+ matchRL = new MatchingBlockManager((ScilabDocument) getDocument(), this, false, getHighlighter());
+ matchRL.setDefaults();
+ enableMatchingKeywords(kw);
+ enableMatchingOpeners(op);
+ return;
+ }
+
+ if ((kw || op) && (matchingKeywordsEnable || matchingOpenersEnable)) {
+ matchLR.configurationChanged(conf);
+ matchRL.configurationChanged(conf);
+ return;
+ }
+
+ if ((!kw && !op) && (matchingKeywordsEnable || matchingOpenersEnable)) {
+ matchLR.desactivateMouseOver();
+ matchLR = null;
+ matchRL.desactivateMouseOver();
+ matchRL = null;
+ return;
+ }
+ }
+ }
+
+ /**
+ * @return the lexer
+ */
+ public ScilabLexer getLexer() {
+ return lexer;
+ }
+
+ /**
+ * {@inheritDoc}
+ * When no split and in wrapped view , this method return true and the consequence is
+ * that there is no horizontal scrollbar.
+ */
+ public boolean getScrollableTracksViewportWidth() {
+ if (((ScilabDocument) getDocument()).getView() instanceof ScilabView) {
+ return !edComponent.isSplited();
+ } else {
+ return super.getScrollableTracksViewportWidth();
+ }
+ }
+
+ /**
+ * @return true if the pane is in OverWrite mode (insert)
+ */
+ public boolean getOverwriteMode() {
+ return this.overwriteMode;
+ }
+
+ /**
+ * @param overwriteMode true if the pane is in OverWrite mode (insert)
+ */
+ public void setOverwriteMode(boolean overwriteMode) {
+ this.overwriteMode = overwriteMode;
+ ((ScilabCaret) getCaret()).setOverwriteMode(overwriteMode);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void replaceSelection(String content) {
+ if (overwriteMode && getSelectionStart() == getSelectionEnd()) {
+ int pos = getCaretPosition();
+ select(pos, pos + content.length());
+ }
+
+ if (((SciNotesCaret) getCaret()).isEmptySelection()) {
+ super.replaceSelection(content);
+ } else {
+ SciNotesCaret caret = (SciNotesCaret) getCaret();
+ int[][] pos = caret.getSelectedPositions();
+ List<Object> sels = caret.getSelections();
+ int len = content.length();
+ int res = 0;
+ int sres;
+ ScilabDocument doc = (ScilabDocument) getDocument();
+ doc.getUndoManager().enableOneShot(true);
+ doc.mergeEditsBegin();
+ caret.protectHighlights(true);
+ for (int i = 0; i < pos.length; i++) {
+ if (sels.get(i) != null) {
+ sres = pos[i][0] + res;
+ try {
+ doc.replace(sres, pos[i][1] - pos[i][0], content, null);
+ } catch (BadLocationException e) { }
+ res = sres + len - pos[i][1];
+ pos[i][0] = sres + len;
+ pos[i][1] = sres + len;
+ }
+ }
+ doc.mergeEditsEnd();
+ doc.getUndoManager().enableOneShot(false);
+ caret.protectHighlights(false);
+ caret.updateHighlights();
+ }
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void keyPressed(KeyEvent e) {
+ // Workaround for bug 7238
+ if (e.getKeyLocation() == KeyEvent.KEY_LOCATION_NUMPAD
+ && e.getKeyCode() == KeyEvent.VK_DELETE
+ && e.getKeyChar() != KeyEvent.VK_DELETE) {
+ e.setKeyCode(KeyEvent.VK_DECIMAL);
+ ctrlHit = false;
+ } else if (mousePoint != null && e.getKeyCode() == KeyEvent.VK_CONTROL) {
+ ctrlHit = true;
+ preventConcernedKeywordListener(viewToModel(mousePoint), e, KeywordListener.ONMOUSEOVER);
+ } else {
+ ctrlHit = false;
+ }
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void keyReleased(KeyEvent e) {
+ if (mousePoint != null && e.getKeyCode() == KeyEvent.VK_CONTROL) {
+ ctrlHit = false;
+ preventConcernedKeywordListener(viewToModel(mousePoint), e, KeywordListener.ONMOUSEOVER);
+ }
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void keyTyped(KeyEvent e) { }
+
+ /**
+ * @overload #setDocument
+ * @param doc to set
+ */
+ public void setDocument(Document doc) {
+ super.setDocument(doc);
+ if (doc instanceof ScilabDocument) {
+ ((ScilabDocument) doc).getUndoManager().discardAllEdits();
+ initialize((ScilabDocument) doc);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setName(String name) {
+ setNameInSuper(name);
+ setShortNameAndTitle(name);
+ ScilabEditorPane pane = getOtherPaneInSplit();
+ if (pane != null) {
+ // I don't call pane.setName since we will enter in an infinite loop
+ pane.setNameInSuper(name);
+ pane.setShortNameAndTitle(name);
+ }
+ }
+
+ /**
+ * @param name the name
+ */
+ private void setNameInSuper(String name) {
+ super.setName(name);
+ }
+
+ /**
+ * @param name the name
+ */
+ private void setShortNameAndTitle(String name) {
+ if (name != null) {
+ File f = new File(name);
+ setShortName(f.getName());
+ title = shortName + " (" + f.getAbsolutePath() + ")" + TIRET + SciNotesMessages.SCILAB_EDITOR;
+ }
+ }
+
+ /**
+ * @param title the title
+ */
+ public void setTitle(String title) {
+ this.title = title + TIRET + SciNotesMessages.SCILAB_EDITOR;
+ }
+
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * @param name the short name
+ */
+ public void setShortName(String name) {
+ this.shortName = name;
+ }
+
+ /**
+ * @return the short name of the file (without the full path)
+ */
+ public String getShortName() {
+ return shortName;
+ }
+
+ /**
+ * Init the pane
+ */
+ public void init(final int pos) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ requestFocus();
+ if (getCaret() != null) {
+ setCaretPosition(pos);
+ }
+ }
+ });
+ }
+
+ /**
+ * Close this pane
+ */
+ public void close() {
+ FocusListener[] l = getFocusListeners();
+ for (int i = 0; i < l.length; i++) {
+ removeFocusListener(l[i]);
+ }
+ if (getCaret() instanceof SciNotesCaret) {
+ ((SciNotesCaret) getCaret()).clean();
+ super.setCaret(null);
+ if (selectionTimer != null && selectionTimer.isRunning()) {
+ selectionTimer.stop();
+ selectionTimer = null;
+ }
+ if (matcherTimer != null && matcherTimer.isRunning()) {
+ matcherTimer.stop();
+ matcherTimer = null;
+ }
+ }
+ }
+
+ /**
+ * Update infos
+ */
+ public void updateInfosWhenFocused() {
+ ScilabDocument doc = (ScilabDocument) getDocument();
+ doc.setFocused(true);
+ SciNotes.setEditor(editor);
+ focused = this;
+ doc.getUndoManager().enableUndoRedoButtons();
+
+ if (editor != null) {
+ if (checkExternalModif() && lastExternalModification < getLastModification()) {
+ editor.getInfoBar().setText(SciNotesMessages.EXTERNAL_MODIFICATION_INFO);
+ if (ScilabModalDialog.show(editor, String.format(SciNotesMessages.ASK_TO_RELOAD, getShortName()), SciNotesMessages.RELOAD, IconType.QUESTION_ICON, ButtonType.YES_NO) == AnswerOption.YES_OPTION) {
+ editor.reload(getEditor().getTabPane().indexOfComponent(getEditorComponent()));
+ editor.getTextPane().updateInfosWhenFocused();
+ }
+ lastExternalModification = getLastModification();
+ } else {
+ editor.getInfoBar().setText(getInfoBarText());
+ }
+ }
+ }
+
+ /**
+ * @return true if an external modif occurred
+ */
+ public boolean checkExternalModif() {
+ String path = getName();
+ if (path != null) {
+ File f = new File(path);
+ if (f != null && f.exists()) {
+ return lastModified < f.lastModified();
+ } else {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get last modification on file
+ * @return the lastModified value
+ */
+ public long getLastModification() {
+ String path = getName();
+ if (path != null) {
+ File f = new File(path);
+ if (f != null && f.exists()) {
+ return f.lastModified();
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * @return the String which must be displayed in the infobar
+ */
+ public String getInfoBarText() {
+ return infoBar;
+ }
+
+ /**
+ * @param text String which must be displayed in the infobar
+ */
+ public void setInfoBarText(String text) {
+ this.infoBar = text;
+ if (editor != null) {
+ editor.getInfoBar().setText(getInfoBarText());
+ }
+ }
+
+ /**
+ * @param readonly true to set Read-Only mode
+ */
+ public void setReadOnly(boolean readonly) {
+ this.readonly = readonly;
+ setEditable(!readonly);
+ setDragEnabled(!readonly);
+ if (readonly) {
+ infoBar = SciNotesMessages.READ_ONLY_MODE;
+ } else {
+ infoBar = "";
+ }
+ }
+
+ /**
+ * @param binary true to set binary mode
+ */
+ public void setBinary(boolean binary) {
+ this.binary = binary;
+ setEditable(!binary);
+ setDragEnabled(!binary);
+ if (binary) {
+ infoBar = SciNotesMessages.BINARY_FILE_MODE;
+ disableAll();
+ } else {
+ infoBar = "";
+ }
+ }
+
+ /**
+ * Copy the props of this textPane to pane
+ * @param pane the pane which receives the same props as this
+ */
+ public void copyProps(ScilabEditorPane pane) {
+ pane.lastModified = lastModified;
+ pane.highlightEnable = highlightEnable;
+ pane.matchingKeywordsEnable = matchingKeywordsEnable;
+ pane.matchingOpenersEnable = matchingOpenersEnable;
+ pane.suppressCom = suppressCom;
+ pane.setName(getName());
+ pane.setShortName(getShortName());
+ pane.setTitle(getTitle().substring(0, getTitle().lastIndexOf(TIRET)));
+ pane.setEditable(isEditable());
+ }
+
+ /**
+ * Get the UUID associated with the editor pane instance.
+ * @return unique identifier
+ */
+ public UUID getUUID() {
+ return uuid;
+ }
+
+ /**
+ * Get the time where the file associated with this pane
+ * has been modified.
+ * @return the last modified time or 0
+ */
+ public long getLastModified() {
+ return lastModified;
+ }
+
+ /**
+ * Set the last time where the file associated with this pane
+ * has been modified.
+ * @param time the time
+ */
+ public void setLastModified(long time) {
+ this.lastModified = time;
+ ScilabEditorPane pane = getOtherPaneInSplit();
+ if (pane != null) {
+ pane.lastModified = time;
+ }
+ }
+
+ /**
+ * @return the SciNotesLineNumberPanel used with this pane
+ */
+ public SciNotesLineNumberPanel getXln() {
+ return xln;
+ }
+
+ /**
+ * @return the editor
+ */
+ public SciNotes getEditor() {
+ return editor;
+ }
+
+ /**
+ * @param editor to set
+ */
+ public void setEditor(SciNotes editor) {
+ this.editor = editor;
+ }
+
+ /**
+ * Disable all
+ */
+ public void disableAll() {
+ indent = null;
+ tab = null;
+ com = null;
+ trailingWhite = null;
+ editor = null;
+ lexer = null;
+ helpOnTyping = null;
+ xln = null;
+ rightTextPane = null;
+ edComponent = null;
+ enableMatchingKeywords(false);
+ enableMatchingOpeners(false);
+ if (matchLR != null) {
+ matchLR.desactivateMouseOver();
+ matchLR = null;
+ }
+ if (matchRL != null) {
+ matchRL.desactivateMouseOver();
+ matchRL = null;
+ }
+ kwListeners = null;
+ }
+
+ /**
+ * Destroy this component
+ */
+ public void destroy() {
+ close();
+ disableAll();
+ }
+
+ /**
+ * @return the scrollPane or the splitpane associated with this textPane
+ */
+ public EditorComponent getEditorComponent() {
+ return edComponent;
+ }
+
+ /**
+ * @return the scrollPane or the splitpane associated with this textPane
+ */
+ public void setEditorComponent(EditorComponent ed) {
+ this.edComponent = ed;
+ }
+
+ /**
+ * @param split the split used
+ */
+ public void setSplitPane(JSplitPane split) {
+ edComponent.setSplitPane(split);
+ }
+
+ /**
+ * @param split the split used
+ */
+ public JSplitPane getSplitPane() {
+ return edComponent.getSplitPane();
+ }
+
+ /**
+ * Update the title of current tab
+ */
+ public void updateTitle() {
+ if (editor != null) {
+ int index = editor.getTextPaneIndex(this);
+ if (index != -1) {
+ editor.updateTabTitle(index);
+ }
+ }
+ }
+
+ public void setMustAdjustVisibility(boolean mustAdjustVisibility) {
+ ((ScilabCaret) getCaret()).setMustAdjustVisibility(mustAdjustVisibility);
+ }
+
+ public boolean getMustAdjustVisibility() {
+ return ((ScilabCaret) getCaret()).getMustAdjustVisibility();
+ }
+
+ /**
+ * Scroll the pane to have the line containing pos on the top of the pane
+ * @param pos the position in the document
+ */
+ public void scrollTextToPos(int pos) {
+ scrollTextToPos(pos, true, false);
+ }
+
+ /**
+ * Scroll the pane to have the line containing pos on the top or centered on the pane
+ * @param pos the position in the document
+ * @param setCaret, if true the caret is set at the given position
+ * @param centered, if true the line is centered
+ */
+ public void scrollTextToPos(final int pos, final boolean setCaret, final boolean centered) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ try {
+ if (setCaret) {
+ setCaretPosition(pos);
+ }
+ JScrollBar scrollbar = getScrollPane().getVerticalScrollBar();
+ Rectangle rect = modelToView(pos);
+ if (centered) {
+ int value = scrollbar.getValue();
+ int h = scrollbar.getHeight();
+ if (rect.y < value || rect.y > value + h) {
+ scrollbar.setValue(Math.max(0, rect.y - h / 2));
+ }
+ } else {
+ if (rect.y > scrollbar.getMaximum()) {
+ scrollbar.setMaximum(rect.y);
+ }
+ scrollbar.setValue(rect.y);
+ }
+ } catch (BadLocationException e) { }
+ }
+ });
+ }
+
+ /**
+ * Scroll the pane to have the line lineNumber on the top of the pane
+ * @param lineNumber the number of the line
+ * @param highlight true to highlight the line
+ */
+ public void scrollTextToLineNumber(int lineNumber, boolean highlight) {
+ scrollTextToLineNumber(lineNumber, highlight, true, false);
+ }
+
+ /**
+ * Scroll the pane to have the line lineNumber on the top or centered on the pane
+ * @param lineNumber the number of the line
+ * @param highlight true to highlight the line
+ * @param setCaret, if true the caret is set at the given line
+ * @param centered, if true the line is centered
+ */
+ public void scrollTextToLineNumber(int lineNumber, final boolean highlight, final boolean setCaret, final boolean centered) {
+ Element root = getDocument().getDefaultRootElement();
+ if (lineNumber >= 1 && lineNumber <= root.getElementCount()) {
+ final int pos = root.getElement(lineNumber - 1).getStartOffset();
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ scrollTextToPos(pos, setCaret, centered);
+ if (highlight) {
+ saveHighlightContourColor = highlightContourColor;
+ highlightContourColor = null;
+ saveHighlightColor = highlightColor;
+ highlightColor = Color.YELLOW;
+ saveHighlightEnable = highlightEnable;
+ hasBeenSaved = true;
+ enableHighlightedLine(false);
+ enableHighlightedLine(true);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Scroll the pane to have the line lineNumber on the top of the pane in whereami mode
+ * The line number is computed regarding the function named funname.
+ * @param lineNumber the number of the line
+ * @param funname the function name
+ * @param highlight true to highlight the line
+ */
+ public void scrollTextToLineNumberInWhereami(int lineNumber, String funname, boolean highlight) {
+ scrollTextToLineNumberInWhereami(lineNumber, funname, highlight, true, false);
+ }
+
+ /**
+ * Scroll the pane to have the line lineNumber on the top of the pane in whereami mode
+ * The line number is computed regarding the function named funname.
+ * @param lineNumber the number of the line
+ * @param funname the function name
+ * @param highlight true to highlight the line
+ * @param setCaret, if true the caret is set at the given line
+ * @param centered, if true the line is centered
+ */
+ public void scrollTextToLineNumberInWhereami(int lineNumber, String funname, boolean highlight, boolean setCaret, boolean centered) {
+ if (funname != null) {
+ Element root = getDocument().getDefaultRootElement();
+ int nlines = root.getElementCount();
+ ScilabDocument.ScilabLeafElement elem;
+ for (int i = 0; i < nlines; i++) {
+ elem = (ScilabDocument.ScilabLeafElement) root.getElement(i);
+ if (elem.getFunctionName().equals(funname)) {
+ lineNumber += i;
+ break;
+ }
+ }
+ }
+ scrollTextToLineNumber(lineNumber, highlight, setCaret, centered);
+ }
+
+ /**
+ * @return the width of a white
+ */
+ public int getWhiteWidth() {
+ View view = ((ScilabDocument) getDocument()).getView();
+ if (view != null) {
+ if (view instanceof ScilabView) {
+ return ((ScilabView) view).getWhiteWidth();
+ } else {
+ return ((ScilabPlainView) view).getWhiteWidth();
+ }
+ }
+
+ return 0;
+ }
+
+ public void resetFont() {
+ Font font = ((ScilabEditorKit) getEditorKit()).getStylePreferences().getBaseFont();
+ setFont(font);
+ xln.updateFont(font);
+ }
+
+ /**
+ * Set a new font
+ * @param keyword the type of keyword
+ * @param type an int : -2 to reset italic, -1 to reset bold, 1 to set bold and 2 to set italic
+ */
+ public void resetFont(String keyword, int type) {
+ ((ScilabEditorKit) getEditorKit()).getStylePreferences().genFont(keyword, type);
+ }
+
+ /**
+ * Set a new attribute
+ * @param keyword the type of keyword
+ * @param type an int : 0 nothing, 1 underline, 2 stroke, 3 underline and stroke
+ */
+ public void resetAttribute(String keyword, int type) {
+ ((ScilabEditorKit) getEditorKit()).getStylePreferences().genAttribute(keyword, type);
+ }
+
+ /**
+ * Set a new color
+ * @param keyword the kind of the keyword
+ * @param color the color
+ */
+ public void resetColor(String keyword, Color color) {
+ ((ScilabEditorKit) getEditorKit()).getStylePreferences().genColors(keyword, color);
+ }
+
+ /**
+ * Set to true if the comments must be suppressed when the code is executing in the console
+ * @param b boolean
+ */
+ public void suppressCommentsInExecutingCode(boolean b) {
+ suppressCom = b;
+ }
+
+ /**
+ * Execute the code in the console, the code is the selected text if exists
+ * or the text from beginning to actual position of the caret
+ * Comments are removed if suppressCom is set to true
+ * @return the code to be executed in the console.
+ */
+ public String getCodeToExecute() {
+ String selection;
+ int start, end;
+ start = getSelectionStart();
+ end = getSelectionEnd();
+
+ if (((SciNotesCaret) getCaret()).isEmptySelection()) {
+ try {
+ if (start == end) {
+ selection = getDocument().getText(0, start);
+ start = 0;
+ } else {
+ selection = getSelectedText();
+ }
+ } catch (BadLocationException e) {
+ selection = "";
+ }
+ } else {
+ selection = getSelectedText();
+ }
+
+ if (suppressCom) {
+ StringBuffer buf = new StringBuffer(selection.length());
+ ScilabLexer.ScilabTokens tokens = ScilabLexer.getScilabTokens(selection);
+ List<Integer> tokType = tokens.getTokenType();
+ List<Integer> tokPos = tokens.getTokenPos();
+ List<String> commands = new ArrayList<String>();
+ int prevPos = 0;
+ for (int i = 0; i < tokType.size(); i++) {
+ String str = selection.substring(prevPos, tokPos.get(i));
+ if ("\n".equals(str)) {
+ commands.add(buf.toString());
+ buf.setLength(0);
+ } else if (!ScilabLexerConstants.isComment(tokType.get(i))) {
+ buf.append(str);
+ }
+ prevPos = tokPos.get(i);
+ }
+
+ if (buf.length() != 0) {
+ commands.add(buf.toString());
+ }
+
+ buf.setLength(0);
+ Pattern pat = Pattern.compile("[ \t]*");
+ for (String command : commands) {
+ if (!pat.matcher(command).matches()) {
+ buf.append(command).append("\n");
+ }
+ }
+
+ return buf.toString();
+ }
+
+ return selection;
+ }
+
+ /**
+ * Add a new KeywordListener
+ * @param kw a KeywordListener
+ */
+ public void addKeywordListener(KeywordListener kw) {
+ kwListeners.add(KeywordListener.class, kw);
+ }
+
+ /**
+ * Remove a new KeywordListener
+ * @param kw a KeywordListener
+ */
+ public void removeKeywordListener(KeywordListener kw) {
+ kwListeners.remove(KeywordListener.class, kw);
+ }
+
+ /**
+ * @return an array of KeywordListener
+ */
+ public KeywordListener[] getKeywordListeners() {
+ return kwListeners.getListeners(KeywordListener.class);
+ }
+
+ /**
+ * Set a new color for the highlighting
+ * @param c the color, can be null (useful if setHighlightedContourColor is used with a
+ * non-null value)
+ */
+ public void setHighlightedLineColor(Color c) {
+ highlightColor = c;
+ }
+
+ /**
+ * Set a new color for the contour of the highlighting
+ * @param c the color, if null no contour is drawn
+ */
+ public void setHighlightedContourColor(Color c) {
+ highlightContourColor = c;
+ }
+
+ /**
+ * Activate or desactivate the help on typing
+ */
+ public void activateHelpOnTyping() {
+ boolean isActive = HelpOnTypingManager.getInstance().isActive();
+ if (isActive && helpOnTyping == null) {
+ helpOnTyping = HelpOnTypingManager.getInstance();
+ addKeyListener(helpOnTyping);
+ } else if (!isActive && helpOnTyping != null) {
+ removeKeyListener(helpOnTyping);
+ helpOnTyping = null;
+ }
+ }
+
+ /**
+ * Enable (active true) or disable (active false) the line-highlighting.
+ * @param active true or false
+ */
+ public void enableHighlightedLine(boolean active) {
+ if (active && !highlightEnable) {
+ try {
+ highlightCL = getHighlighter().addHighlight(0, 0, this);
+ } catch (BadLocationException e) { }
+ highlightEnable = true;
+ }
+
+ if (!active && highlightEnable) {
+ getHighlighter().removeHighlight(highlightCL);
+ highlightEnable = false;
+ }
+
+ repaint();
+ }
+
+ /**
+ * Enable (active true) or disable (active false) the matching keywords.
+ * @param active true or false
+ */
+ public void enableMatchingKeywords(boolean active) {
+ matchingKeywordsEnable = active;
+ }
+
+ /**
+ * Enable (active true) or disable (active false) the matching keywords.
+ * @param active true or false
+ */
+ public void enableMatchingOpeners(boolean active) {
+ matchingOpenersEnable = active;
+ }
+
+ /**
+ * Get a matching manager
+ * @param lr true if the LR matcher must be returned
+ * @return the MatchingBlockManager
+ */
+ public MatchingBlockManager getMatchingBlockManager(boolean lr) {
+ if (lr) {
+ return matchLR;
+ } else {
+ return matchRL;
+ }
+ }
+
+ /**
+ * This class listens to the caret event
+ * @param e event
+ */
+ public void caretUpdate(CaretEvent e) {
+ if (hasBeenSaved) {
+ removeHighlightForLine();
+ }
+
+ if (hasFocus()) {
+ final String str = getSelectedText();
+ if (str != null && str.length() != 0) {
+ if (selectionTimer == null) {
+ selectionTimer = new Timer(1000, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ try {
+ final String str = getSelectedText();
+ if (str != null && str.length() != 0) {
+ int tok = lexer.getKeyword(getSelectionStart(), false);
+ int s = lexer.start + lexer.yychar();
+ if (ScilabLexerConstants.isSearchable(tok) && getSelectionStart() == s && getSelectionEnd() == s + lexer.yylength()) {
+ highlightWords(tok, SearchManager.generatePattern(str, false, true, false), false);
+ } else {
+ highlightWords(str, false);
+ }
+
+ if (highlightedWords.size() > 1 && editor != null && editor.getInfoBar() != null) {
+ editor.getInfoBar().setText(String.format(SciNotesMessages.OCCURENCES_FOUND, Integer.toString(highlightedWords.size())));
+ }
+ removeHighlightOnPosition(getSelectionStart());
+ }
+ } catch (Exception ee) { }
+ selectionTimer = null;
+ }
+ });
+ selectionTimer.setRepeats(false);
+ selectionTimer.start();
+ } else {
+ selectionTimer.restart();
+ }
+ } else {
+ removeHighlightedWords();
+ }
+ }
+
+ if (highlightEnable) {
+ repaint();
+ }
+
+ if (matchingKeywordsEnable || matchingOpenersEnable) {
+ if (matcherTimer == null) {
+ matcherTimer = new Timer(100, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ int pos = getCaretPosition();
+ int tok = lexer.getKeyword(pos, false);
+ matchLR.searchMatchingBlock(false, tok, lexer.start + lexer.yychar());
+ tok = lexer.getKeyword(pos, true);
+ matchRL.searchMatchingBlock(false, tok, lexer.start + lexer.yychar() + lexer.yylength());
+ matcherTimer = null;
+ }
+ });
+ matcherTimer.setRepeats(false);
+ matcherTimer.start();
+ } else {
+ matcherTimer.restart();
+ matchLR.update();
+ matchRL.update();
+ }
+ }
+
+ if (!readonly && !binary && editor != null) {
+ editor.getInfoBar().setText(((ScilabDocument) getDocument()).getCurrentFunction(getCaretPosition()));
+ }
+ }
+
+ /**
+ * Used to paint the highlighted line
+ * @param g graphics to use
+ * @param p0 start
+ * @param p1 end
+ * @param bounds the shape representing the area
+ * @param c this pane
+ */
+ public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) {
+ if (highlightEnable) {
+ try {
+ Rectangle r = modelToView(getCaretPosition());
+ if (highlightColor != null) {
+ g.setColor(highlightColor);
+ g.fillRect(0, r.y, getWidth(), r.height);
+ }
+ if (highlightContourColor != null) {
+ g.setColor(highlightContourColor);
+ g.drawLine(0, r.y - 1, getWidth(), r.y - 1);
+ g.drawLine(0, r.y + r.height, getWidth(), r.y + r.height);
+ }
+
+ } catch (BadLocationException e) { }
+ }
+ }
+
+ /**
+ * @return the current TrailingWhiteManager
+ */
+ public TrailingWhiteManager getTrailingWhiteManager() {
+ return trailingWhite;
+ }
+
+ /**
+ * @return the current IndentManager
+ */
+ public IndentManager getIndentManager() {
+ return indent;
+ }
+
+ /**
+ * @return the current TabManager
+ */
+ public TabManager getTabManager() {
+ return tab;
+ }
+
+ /**
+ * @return the current CommentManager
+ */
+ public CommentManager getCommentManager() {
+ return com;
+ }
+
+ /**
+ * Get a keyword at a position in the document.
+ * @param position in the document
+ * @return the KeywordEvent containing infos about keyword.
+ */
+ public KeywordEvent getKeywordEvent(int position) {
+ int tok = lexer.getKeyword(position, true);
+ return new KeywordEvent(this, null, tok, lexer.start + lexer.yychar(), lexer.yylength());
+ }
+
+ /**
+ * Get a keyword at the current position in the document.
+ * @return the KeywordEvent containing infos about keyword.
+ */
+ public KeywordEvent getKeywordEvent() {
+ return getKeywordEvent(getCaretPosition());
+ }
+
+ /**
+ * Get a keyword at the current position in the document.
+ * @param caret if true the position is the current caret position in the doc else
+ * the position is the mouse pointer position projected in the document.
+ * @param strict if true the char just after the caret is ignored
+ * @return the KeywordEvent containing infos about keyword.
+ */
+ public KeywordEvent getKeywordEvent(boolean caret, boolean strict) {
+ int tok;
+ if (caret) {
+ tok = lexer.getKeyword(getCaretPosition(), strict);
+ } else {
+ tok = lexer.getKeyword(viewToModel(mousePoint), strict);
+ }
+ return new KeywordEvent(this, null, tok, lexer.start + lexer.yychar(), lexer.yylength());
+ }
+
+ /**
+ * Get an helpable keyword at the current position in the document.
+ * @param caret if true the position is the current caret position in the doc else
+ * the position is the mouse pointer position projected in the document.
+ * @return the helpable keyword.
+ */
+ public String getHelpableKeyword(boolean caret) {
+ int tok;
+ int pos;
+ if (caret) {
+ pos = getCaretPosition();
+ } else {
+ pos = viewToModel(mousePoint);
+ }
+
+ tok = lexer.getKeyword(pos, true);
+ if (!ScilabLexerConstants.isHelpable(tok)) {
+ tok = lexer.getKeyword(pos + 1, true);
+ }
+
+ if (ScilabLexerConstants.isHelpable(tok)) {
+ try {
+ return getDocument().getText(lexer.start + lexer.yychar(), lexer.yylength());
+ } catch (BadLocationException e) { }
+ }
+
+ return null;
+ }
+
+ /**
+ * Prevents the different KeywordListener that a MouseEvent occurred
+ * @param position of the mouse
+ * @param ev the event which occurred
+ * @param type of the event : KeywordListener.ONMOUSECLICKED or KeywordListener.ONMOUSEOVER
+ */
+ protected void preventConcernedKeywordListener(int position, EventObject ev, int type) {
+ KeywordEvent kev = null;
+ Object[] listeners = kwListeners.getListenerList();
+ for (int i = listeners.length - 2; i >= 0; i -= 2) {
+ if (listeners[i] == KeywordListener.class && type == ((KeywordListener) listeners[i + 1]).getType()) {
+ if (kev == null) {
+ int tok = lexer.getKeyword(position, true);
+ kev = new KeywordEvent(this, ev, tok, lexer.start + lexer.yychar(), lexer.yylength());
+ }
+
+ ((KeywordListener) listeners[i + 1]).caughtKeyword(kev);
+ }
+ }
+ }
+
+ /**
+ * Implements mouseClicked in MouseListener
+ * @param e event
+ */
+ public void mouseClicked(MouseEvent e) {
+ preventConcernedKeywordListener(getCaretPosition(), e, KeywordListener.ONMOUSECLICKED);
+ }
+
+ /**
+ * Implements mouseEntered in MouseListener
+ * @param e event
+ */
+ public void mouseEntered(MouseEvent e) {
+ this.mousePoint = e.getPoint();
+ }
+
+ /**
+ * Implements mouseExited in MouseListener
+ * @param e event
+ */
+ public void mouseExited(MouseEvent e) { }
+
+ /**
+ * Implements mousePressed in MouseListener
+ * @param e event
+ */
+ public void mousePressed(MouseEvent e) {
+ if (hasBeenSaved) {
+ removeHighlightForLine();
+ }
+
+ removeHighlightedWords();
+
+ if (highlightEnable) {
+ repaint();
+ }
+ }
+
+ /**
+ * Implements mouseReleseaed in MouseListener
+ * @param e event
+ */
+ public void mouseReleased(MouseEvent e) { }
+
+ /**
+ * Implements mouseMoved in MouseMotionListener
+ * @param e event
+ */
+ public void mouseMoved(MouseEvent e) {
+ this.mousePoint = e.getPoint();
+ preventConcernedKeywordListener(viewToModel(mousePoint), e, KeywordListener.ONMOUSEOVER);
+ }
+
+ /**
+ * Implements mouseDragged in MouseMotionListener
+ * @param e event
+ */
+ public void mouseDragged(MouseEvent e) {
+ if (hasBeenSaved) {
+ removeHighlightForLine();
+ }
+
+ removeHighlightedWords();
+
+ if (highlightEnable) {
+ repaint();
+ }
+ }
+
+ /**
+ * @return the current mouse poisition in this pane
+ */
+ public Point getMousePoint() {
+ return mousePoint;
+ }
+
+ /**
+ * @param pane the EditorPane associated with this EditorPane in a splitted view
+ */
+ public void setOtherPaneInSplit(ScilabEditorPane pane) {
+ if (pane == null) {
+ rightTextPane.rightTextPane = null;
+ }
+ rightTextPane = pane;
+ }
+
+ /**
+ * @return the EditorPane associated with this EditorPane in a splitted view
+ */
+ public ScilabEditorPane getOtherPaneInSplit() {
+ return rightTextPane;
+ }
+
+ public ScilabEditorPane getCurrent() {
+ if (focused == rightTextPane) {
+ return rightTextPane;
+ }
+
+ return this;
+ }
+
+
+ /**
+ * @return the scrollPane associated with this EditorPane
+ */
+ public ScilabScrollPane getScrollPane() {
+ return (ScilabScrollPane) SwingUtilities.getAncestorOfClass(ScilabScrollPane.class, this);
+ }
+
+ /**
+ * @return the current focused editorPane
+ */
+ public static ScilabEditorPane getFocusedPane() {
+ return focused;
+ }
+
+ /**
+ * clean
+ */
+ public static void clean() {
+ focused = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return shortName;
+ }
+
+ /**
+ * @return true if something has been copied
+ */
+ public boolean copyColumnSelectionInClipBoard() {
+ return ((SciNotesCaret) getCaret()).copyPositionsInClipboard();
+ }
+
+ /**
+ * @return true if something has been removed
+ */
+ public boolean removeColumnSelection() {
+ return ((SciNotesCaret) getCaret()).removePositions();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getSelectedText() {
+ if (getCaret() instanceof SciNotesCaret) {
+ String str = ((SciNotesCaret) getCaret()).getSelectedText();
+ if (str == null) {
+ return super.getSelectedText();
+ } else {
+ return str;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getCaretPosition() {
+ if (getCaret() != null) {
+ return super.getCaretPosition();
+ }
+
+ return 0;
+ }
+
+ /**
+ * @param pos the position int the text
+ * @return null if no column selection on the same line and an array of
+ * integer (of size 2) containing the position of the selection
+ */
+ public int[] isNearColumnSelection(int pos) {
+ if (!(getCaret() instanceof SciNotesCaret) || ((SciNotesCaret) getCaret()).isEmptySelection()) {
+ return null;
+ }
+
+ Element root = getDocument().getDefaultRootElement();
+ int[][] positions = ((SciNotesCaret) getCaret()).getSelectedPositions();
+ int line = root.getElementIndex(pos);
+ int min = root.getElementIndex(positions[0][0]);
+ int max = root.getElementIndex(positions[positions.length - 1][0]);
+
+ if (line >= min && line <= max) {
+ return positions[line - min];
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCaret(Caret c) {
+ if (!(c instanceof ScilabCaret)) {
+ final Caret caret = new SciNotesCaret(this);
+ setCaretColor(getCaretColor());
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ int blinkRate = 500;
+ Object o = UIManager.get("TextComponent.caretBlinkRate");
+ if ((o != null) && (o instanceof Integer)) {
+ Integer rate = (Integer) o;
+ blinkRate = rate.intValue();
+ }
+ caret.setBlinkRate(blinkRate);
+ caret.setVisible(true);
+ }
+ });
+ super.setCaret(caret);
+ } else {
+ super.setCaret(c);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void select(int start, int end) {
+ removeHighlightOnPosition(start);
+ int docLength = getDocument().getLength();
+ if (start > docLength) {
+ start = docLength;
+ }
+ if (end > docLength) {
+ end = docLength;
+ }
+ super.setCaretPosition(start);
+ super.moveCaretPosition(end);
+ }
+
+ /**
+ * Remove the highlight putted to show the line (for editor('foo',123))
+ */
+ private void removeHighlightForLine() {
+ highlightContourColor = saveHighlightContourColor;
+ highlightColor = saveHighlightColor;
+ enableHighlightedLine(false);
+ if (saveHighlightEnable) {
+ enableHighlightedLine(true);
+ }
+ hasBeenSaved = false;
+ }
+
+ /**
+ * Remove the highlight at position start
+ * @param start the beginning of the highlight
+ */
+ public void removeHighlightOnPosition(int start) {
+ Object h = highlightedWords.get(start);
+ if (h != null) {
+ getHighlighter().removeHighlight(h);
+ highlightedWords.remove(h);
+ }
+ }
+
+ /**
+ * Highlight a word in this textpane.
+ * @param word the word to highlight
+ * @param exact if true the search is case sensitive
+ */
+ public void highlightWords(String word, boolean exact) {
+ if (word != null && word.length() != 0) {
+ highlightWords(SearchManager.generatePattern(word, exact, false, false), false);
+ }
+ }
+
+ /**
+ * Highlight a word according to a pattern in this textpane.
+ * @param pattern the pattern to highlight
+ * @param centered, if true the pane is centered on the first occurence
+ */
+ public void highlightWords(Pattern pattern, boolean centered) {
+ highlightWords(-1, pattern, centered);
+ }
+
+ /**
+ * Highlight a word according to a pattern in this textpane.
+ * @param pattern the pattern to highlight
+ * @param centered, if true the pane is centered on the first occurence
+ */
+ public void highlightWords(int tok, Pattern pattern, boolean centered) {
+ if (pattern != null) {
+ removeHighlightedWords();
+ int first = -1;
+ String text = ((ScilabDocument) getDocument()).getText();
+ Matcher matcher = pattern.matcher(text);
+
+ Highlighter highlighter = getHighlighter();
+ List<Integer[]> positions = SearchManager.findToken((ScilabDocument) getDocument(), tok, lexer, pattern);
+
+ if (positions != null) {
+ List<Rectangle> marks = new ArrayList<Rectangle>();
+
+ for (Integer[] position : positions) {
+ try {
+ highlightedWords.put(position[0], highlighter.addHighlight(position[0], position[1], HIGHLIGHTER));
+ Rectangle r = modelToView(position[0]);
+ if (r != null && (marks.size() == 0 || marks.get(marks.size() - 1).y != r.y)) {
+ marks.add(r);
+ }
+ } catch (BadLocationException e) { }
+ }
+
+ ScilabScrollPane ssp = getScrollPane();
+ if (ssp != null) {
+ ssp.putMarks(marks);
+ }
+
+ if (centered && positions.size() != 0) {
+ scrollTextToPos(positions.get(0)[0], false, true);
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove all the highlighted words
+ */
+ public void removeHighlightedWords() {
+ Highlighter highlighter = getHighlighter();
+ for (Object obj : highlightedWords.values()) {
+ highlighter.removeHighlight(obj);
+ }
+ highlightedWords.clear();
+ ScilabScrollPane ssp = getScrollPane();
+ if (ssp != null) {
+ ssp.removeMarks();
+ }
+ }
+
+ /**
+ * Initialize the pane when the document is loaded
+ * @param doc used with this pane
+ */
+ private void initialize(ScilabDocument doc) {
+ indent = new IndentManager(doc);
+ tab = new TabManager(doc, indent);
+ tab.setDefaultTabulation();
+ com = new CommentManager(doc);
+ trailingWhite = new TrailingWhiteManager(doc);
+
+ if (matchingKeywordsEnable || matchingOpenersEnable) {
+ matchLR = new MatchingBlockManager(doc, this, true, getHighlighter());
+ matchLR.setDefaults();
+ matchRL = new MatchingBlockManager(doc, this, false, getHighlighter());
+ matchRL.setDefaults();
+ }
+
+ lexer = doc.createLexer();
+ xln = new SciNotesLineNumberPanel(this);
+
+ /* The order of the next two lines is important: the doc
+ as listener will be called before xln so the resetTypeWhenBroken
+ will be called before ! */
+ doc.addDocumentListener(xln);
+ doc.addDocumentListener(doc);
+
+ getScrollPane().setRowHeaderView(xln);
+ doc.setEditorPane(this);
+
+ if (editor != null) {
+ NavigatorWindow nav = editor.getNavigator();
+ if (nav != null) {
+ nav.addEditorPane(this);
+ }
+ }
+
+ resetFont();
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywords.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywords.java
new file mode 100755
index 000000000..6d5e992f5
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywords.java
@@ -0,0 +1,36 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.scilab.modules.scinotes;
+
+
+/**
+ * @author Allan CORNET - DIGITEO 2009
+ * @author Calixte DENIZET
+ */
+public class ScilabKeywords {
+
+ /**
+ * Constructor
+ */
+ protected ScilabKeywords() {
+ throw new UnsupportedOperationException();
+ }
+ public static String[] GetVariablesName() {
+ return ScilabKeywordsJNI.GetVariablesName();
+ }
+
+ public static String[] GetFunctionsName() {
+ return ScilabKeywordsJNI.GetFunctionsName();
+ }
+
+ public static String[] GetMacrosName() {
+ return ScilabKeywordsJNI.GetMacrosName();
+ }
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywordsJNI.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywordsJNI.java
new file mode 100755
index 000000000..86e754e76
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabKeywordsJNI.java
@@ -0,0 +1,46 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+package org.scilab.modules.scinotes;
+
+
+/* It is generated code. Disable checkstyle */
+//CHECKSTYLE:OFF
+/**
+ * @author Allan CORNET - DIGITEO 2009
+ * @author Calixte DENIZET
+ */
+public class ScilabKeywordsJNI {
+
+ /**
+ * Constructor
+ */
+ protected ScilabKeywordsJNI() {
+ throw new UnsupportedOperationException();
+ }
+
+ static {
+ try {
+ System.loadLibrary("sciscinotes");
+ } catch (SecurityException e) {
+ System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
+ System.err.println(e.getLocalizedMessage());
+ e.printStackTrace(System.err);
+ } catch (UnsatisfiedLinkError e) {
+ if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
+ System.err.println("The native library scinotes does not exist or cannot be found.");
+ System.err.println(e.getLocalizedMessage());
+ e.printStackTrace(System.err);
+ }
+ }
+ }
+
+ public final static native String[] GetVariablesName();
+ public final static native String[] GetFunctionsName();
+ public final static native String[] GetMacrosName();
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java
new file mode 100755
index 000000000..60ffdcef7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java
@@ -0,0 +1,1633 @@
+/* The following code was generated by JFlex 1.4.3 on 02/05/14 11:47 */
+
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.io.IOException;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.commons.ScilabCommonsUtils;
+
+@javax.annotation.Generated("JFlex")
+@SuppressWarnings("fallthrough")
+
+
+/**
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
+ * on 02/05/14 11:47 from the specification file
+ * <tt>scilab.jflex</tt>
+ */
+public final class ScilabLexer extends ScilabLexerConstants {
+
+ /** 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 BREAKSTRING = 12;
+ public static final int COMMANDSWHITE = 10;
+ public static final int YYINITIAL = 0;
+ public static final int COMMENT = 4;
+ public static final int FIELD = 6;
+ public static final int COMMANDS = 8;
+ public static final int QSTRING = 2;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\11\0\1\110\1\1\1\0\1\120\1\113\22\0\1\72\1\116\1\7" +
+ "\1\114\1\112\1\10\1\51\1\6\1\3\1\4\1\40\1\43\1\117" +
+ "\1\44\1\37\1\5\12\115\1\111\1\124\1\47\1\45\1\50\1\114" +
+ "\1\53\1\100\1\101\1\25\1\35\1\33\1\14\1\103\1\30\1\26" +
+ "\1\102\1\107\1\76\1\32\1\73\1\31\1\34\1\106\1\36\1\24" +
+ "\1\12\1\77\1\104\1\27\2\122\1\74\1\2\1\41\1\4\1\42" +
+ "\1\121\1\0\1\23\1\65\1\55\1\57\1\15\1\13\1\105\1\60" +
+ "\1\17\1\122\1\66\1\61\1\70\1\20\1\56\1\16\1\67\1\62" +
+ "\1\22\1\11\1\54\1\75\1\63\1\71\1\64\1\21\1\2\1\52" +
+ "\1\4\1\46\u0511\0\160\123\u0100\123\120\0\60\123\100\123\100\123\uf31d\0" +
+ "\63\123\u02b0\123\160\0\220\123\u0100\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\1\1\3\0\1\1\1\0\1\2\1\3\1\4" +
+ "\1\5\1\6\1\7\14\10\1\11\11\5\6\10\1\12" +
+ "\1\13\2\14\1\15\1\2\1\1\1\16\1\17\1\1" +
+ "\1\20\1\21\1\1\1\22\1\23\17\22\1\24\4\22" +
+ "\1\25\2\22\1\26\1\27\1\26\1\30\1\31\1\32" +
+ "\1\33\2\1\1\34\1\35\2\16\1\36\1\5\1\37" +
+ "\1\0\2\40\1\10\1\40\12\10\1\41\4\10\1\5" +
+ "\1\14\1\5\1\15\2\0\2\10\1\42\3\10\1\0" +
+ "\1\37\2\0\1\37\1\15\3\0\27\22\1\0\13\22" +
+ "\1\0\1\1\1\43\3\0\6\10\1\41\5\10\1\40" +
+ "\1\10\1\15\7\10\2\15\1\44\2\0\30\22\1\0" +
+ "\10\22\1\0\2\22\1\0\1\45\3\10\1\46\1\47" +
+ "\11\10\21\22\1\50\4\22\1\0\10\22\2\0\1\22" +
+ "\1\51\1\45\7\10\1\0\1\52\14\22\1\0\3\22" +
+ "\1\0\10\22\1\0\2\51\1\10\1\46\2\10\1\22" +
+ "\2\0\11\22\1\0\3\22\1\0\5\22\1\0\2\22" +
+ "\1\51\1\10\1\53\3\0\2\22\1\0\3\22\4\0" +
+ "\1\22\1\0\5\22\1\0\2\22\1\54\6\0\1\22" +
+ "\2\0\1\22\5\0\1\22\1\55\2\0\1\22\4\0" +
+ "\1\22\3\0\1\22\6\0\1\22\3\0\1\22\7\0" +
+ "\1\22\1\55\1\0\1\22\4\0\1\22\3\0\1\22" +
+ "\22\0\1\22\1\0\1\22\14\0\1\50\22\0\1\22" +
+ "\34\0\1\22\30\0\1\55\22\0\3\55\11\0\2\55" +
+ "\7\0\2\55\2\0\2\37\1\55";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[598];
+ 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\125\0\252\0\377\0\u0154\0\u01a9\0\u01fe\0\u0253" +
+ "\0\u0253\0\u0253\0\u02a8\0\u02fd\0\u02fd\0\u0352\0\u03a7\0\u03fc" +
+ "\0\u0451\0\u04a6\0\u04fb\0\u0550\0\u05a5\0\u05fa\0\u064f\0\u06a4" +
+ "\0\u06f9\0\u074e\0\u07a3\0\u07f8\0\u084d\0\u08a2\0\u08f7\0\u094c" +
+ "\0\u09a1\0\u09f6\0\u0a4b\0\u0aa0\0\u0af5\0\u0b4a\0\u0b9f\0\u0bf4" +
+ "\0\u0c49\0\u0c9e\0\u0cf3\0\u07f8\0\u04a6\0\u0d48\0\u07f8\0\u0d9d" +
+ "\0\u0253\0\u0df2\0\u0e47\0\u0253\0\u0253\0\u0e9c\0\u0ef1\0\u0253" +
+ "\0\u0f46\0\u0f9b\0\u0ff0\0\u1045\0\u109a\0\u10ef\0\u1144\0\u1199" +
+ "\0\u11ee\0\u1243\0\u1298\0\u12ed\0\u1342\0\u1397\0\u13ec\0\u0253" +
+ "\0\u1441\0\u1496\0\u14eb\0\u1540\0\u0253\0\u1595\0\u15ea\0\u0253" +
+ "\0\u163f\0\u163f\0\u0253\0\u0253\0\u1694\0\u1694\0\u16e9\0\u173e" +
+ "\0\u0253\0\u0253\0\u1793\0\u17e8\0\u0253\0\u0253\0\u0253\0\u183d" +
+ "\0\u04a6\0\u1892\0\u18e7\0\u193c\0\u1991\0\u19e6\0\u1a3b\0\u1a90" +
+ "\0\u1ae5\0\u1b3a\0\u1b8f\0\u1be4\0\u1c39\0\u1c8e\0\u04a6\0\u1ce3" +
+ "\0\u1d38\0\u1d8d\0\u1de2\0\u1e37\0\u1e8c\0\u1ee1\0\u1f36\0\u1f8b" +
+ "\0\u1fe0\0\u2035\0\u208a\0\u04a6\0\u20df\0\u2134\0\u2189\0\u21de" +
+ "\0\u2233\0\u07f8\0\u0cf3\0\u2288\0\u22dd\0\u0df2\0\u2332\0\u2387" +
+ "\0\u23dc\0\u2431\0\u2486\0\u24db\0\u2530\0\u2585\0\u25da\0\u262f" +
+ "\0\u2684\0\u26d9\0\u272e\0\u2783\0\u27d8\0\u282d\0\u2882\0\u28d7" +
+ "\0\u292c\0\u2981\0\u29d6\0\u2a2b\0\u2a80\0\u2ad5\0\u2b2a\0\u2b7f" +
+ "\0\u2bd4\0\u2c29\0\u2c7e\0\u2cd3\0\u2d28\0\u2d7d\0\u2dd2\0\u2e27" +
+ "\0\u2e7c\0\u2ed1\0\u2f26\0\u1694\0\u2f7b\0\u17e8\0\u2fd0\0\u3025" +
+ "\0\u307a\0\u30cf\0\u3124\0\u3179\0\u31ce\0\u3223\0\u3278\0\u32cd" +
+ "\0\u3322\0\u3377\0\u33cc\0\u3421\0\u3476\0\u34cb\0\u3520\0\u3575" +
+ "\0\u35ca\0\u361f\0\u3674\0\u36c9\0\u371e\0\u3773\0\u37c8\0\u381d" +
+ "\0\u3872\0\u0253\0\u38c7\0\u391c\0\u3971\0\u39c6\0\u3a1b\0\u3a70" +
+ "\0\u3ac5\0\u3b1a\0\u3b6f\0\u3bc4\0\u3c19\0\u3c6e\0\u3cc3\0\u3d18" +
+ "\0\u3d6d\0\u3dc2\0\u3e17\0\u3e6c\0\u3ec1\0\u3f16\0\u3f6b\0\u3fc0" +
+ "\0\u4015\0\u406a\0\u40bf\0\u4114\0\u4169\0\u41be\0\u4213\0\u4268" +
+ "\0\u42bd\0\u4312\0\u4367\0\u43bc\0\u4411\0\u4466\0\u44bb\0\u4510" +
+ "\0\u4565\0\u0253\0\u45ba\0\u460f\0\u4664\0\u46b9\0\u04a6\0\u470e" +
+ "\0\u4763\0\u47b8\0\u480d\0\u4862\0\u48b7\0\u490c\0\u4961\0\u49b6" +
+ "\0\u4a0b\0\u4a60\0\u4ab5\0\u4b0a\0\u4b5f\0\u4bb4\0\u4c09\0\u4c5e" +
+ "\0\u4cb3\0\u4d08\0\u4d5d\0\u4db2\0\u4e07\0\u4e5c\0\u4eb1\0\u4f06" +
+ "\0\u4f5b\0\u0ef1\0\u4fb0\0\u5005\0\u505a\0\u50af\0\u5104\0\u5159" +
+ "\0\u51ae\0\u5203\0\u5258\0\u52ad\0\u5302\0\u5357\0\u53ac\0\u5401" +
+ "\0\u5456\0\u54ab\0\u0ef1\0\u2fd0\0\u5500\0\u5555\0\u55aa\0\u55ff" +
+ "\0\u5654\0\u56a9\0\u56fe\0\u5753\0\u57a8\0\u57fd\0\u5852\0\u58a7" +
+ "\0\u58fc\0\u5951\0\u59a6\0\u59fb\0\u5a50\0\u5aa5\0\u5afa\0\u5b4f" +
+ "\0\u5ba4\0\u5bf9\0\u5c4e\0\u5ca3\0\u5cf8\0\u5d4d\0\u5da2\0\u5df7" +
+ "\0\u5e4c\0\u5ea1\0\u5ef6\0\u5f4b\0\u5fa0\0\u5ff5\0\u604a\0\u0253" +
+ "\0\u4510\0\u609f\0\u04a6\0\u60f4\0\u6149\0\u619e\0\u61f3\0\u6248" +
+ "\0\u629d\0\u62f2\0\u6347\0\u639c\0\u63f1\0\u6446\0\u649b\0\u64f0" +
+ "\0\u6545\0\u659a\0\u65ef\0\u6644\0\u6699\0\u66ee\0\u6743\0\u6798" +
+ "\0\u67ed\0\u6842\0\u6897\0\u68ec\0\u6941\0\u6996\0\u5456\0\u69eb" +
+ "\0\u619e\0\u6a40\0\u6a95\0\u6aea\0\u6b3f\0\u6b94\0\u6be9\0\u6c3e" +
+ "\0\u6c93\0\u6ce8\0\u6d3d\0\u6d92\0\u6de7\0\u6e3c\0\u6e91\0\u6ee6" +
+ "\0\u6f3b\0\u6f90\0\u6fe5\0\u703a\0\u708f\0\u70e4\0\u7139\0\u718e" +
+ "\0\u04a6\0\u71e3\0\u7238\0\u728d\0\u72e2\0\u7337\0\u738c\0\u73e1" +
+ "\0\u7436\0\u748b\0\u74e0\0\u7535\0\u758a\0\u75df\0\u7634\0\u7689" +
+ "\0\u76de\0\u0ef1\0\u7733\0\u7788\0\u77dd\0\u7832\0\u7887\0\u78dc" +
+ "\0\u7931\0\u7986\0\u79db\0\u7a30\0\u7a85\0\u7ada\0\u7b2f\0\u7b84" +
+ "\0\u7bd9\0\u7c2e\0\u7c83\0\u7cd8\0\u7d2d\0\u7d82\0\u7dd7\0\u7e2c" +
+ "\0\u7e81\0\u7ed6\0\u7f2b\0\u7f80\0\u7fd5\0\u802a\0\u807f\0\u80d4" +
+ "\0\u8129\0\u0253\0\u817e\0\u81d3\0\u8228\0\u827d\0\u82d2\0\u8327" +
+ "\0\u837c\0\u83d1\0\u8426\0\u847b\0\u84d0\0\u8525\0\u857a\0\u85cf" +
+ "\0\u8624\0\u8679\0\u86ce\0\u8723\0\u8778\0\u87cd\0\u8822\0\u8877" +
+ "\0\u88cc\0\u8921\0\u8976\0\u89cb\0\u8a20\0\u8a75\0\u8aca\0\u8b1f" +
+ "\0\u8b74\0\u8bc9\0\u8c1e\0\u8c73\0\u8cc8\0\u8d1d\0\u8d72\0\u8dc7" +
+ "\0\u8e1c\0\u8e71\0\u8ec6\0\u8f1b\0\u8f70\0\u8fc5\0\u0253\0\u901a" +
+ "\0\u906f\0\u90c4\0\u9119\0\u916e\0\u91c3\0\u9218\0\u926d\0\u92c2" +
+ "\0\u9317\0\u936c\0\u93c1\0\u9416\0\u946b\0\u94c0\0\u9515\0\u956a" +
+ "\0\u95bf\0\u9614\0\u9669\0\u96be\0\u9713\0\u9768\0\u97bd\0\u9812" +
+ "\0\u9867\0\u98bc\0\u9911\0\u9966\0\u99bb\0\u9a10\0\u9a65\0\u9aba" +
+ "\0\u9b0f\0\u9b64\0\u9bb9\0\u9c0e\0\u9c63\0\u9cb8\0\u9d0d\0\u9d62" +
+ "\0\u9db7\0\u9e0c\0\u9e61\0\u9eb6\0\u9f0b\0\u9f60\0\u9fb5\0\ua00a" +
+ "\0\ua05f\0\ua0b4\0\ua109\0\ua15e\0\ua1b3\0\ua208\0\ua25d\0\ua2b2" +
+ "\0\ua307\0\ua35c\0\ua3b1\0\ua406\0\ua45b\0\ua4b0\0\ua505\0\ua55a" +
+ "\0\ua5af\0\ua604\0\ua659\0\ua6ae\0\ua703\0\ua758\0\ua7ad\0\ua802" +
+ "\0\ua857\0\ua8ac\0\ua901\0\ua956\0\ua9ab\0\uaa00\0\uaa55\0\uaaaa" +
+ "\0\uaaff\0\uab54\0\uaba9\0\uabfe\0\uac53\0\uaca8\0\uacfd\0\uad52" +
+ "\0\uada7\0\uadfc\0\uae51\0\uaea6\0\uaefb\0\uaf50\0\uafa5\0\uaffa" +
+ "\0\ub04f\0\ub0a4\0\ub0f9\0\ub14e\0\ub1a3\0\ub1f8\0\ub24d\0\ub2a2" +
+ "\0\ub2f7\0\ub34c\0\ub3a1\0\ub3f6\0\ub44b\0\ub4a0\0\ub4f5\0\ub54a" +
+ "\0\ub59f\0\ub5f4\0\ub649\0\ua0b4\0\ub69e\0\ub6f3";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[598];
+ 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 =
+ "\2\10\2\11\1\12\1\13\1\14\1\15\1\16\1\17" +
+ "\1\20\1\21\1\22\1\23\1\24\1\25\2\22\1\26" +
+ "\1\27\1\30\2\22\1\31\7\22\1\32\1\33\2\34" +
+ "\1\35\1\36\1\37\1\40\1\41\1\40\1\42\1\43" +
+ "\1\40\1\22\1\44\1\22\1\45\2\22\1\46\1\47" +
+ "\1\22\1\50\1\22\1\51\2\22\1\52\15\22\1\53" +
+ "\1\54\1\55\1\10\1\22\1\56\1\22\1\57\1\10" +
+ "\2\22\2\10\1\60\1\61\4\60\2\62\27\60\1\63" +
+ "\32\60\1\64\15\60\1\65\2\60\1\61\7\60\1\66" +
+ "\1\60\1\67\1\70\7\67\1\71\1\72\1\73\6\67" +
+ "\1\74\1\67\1\75\1\76\1\77\3\67\1\100\1\101" +
+ "\1\102\1\103\11\67\1\104\7\67\1\105\1\106\7\67" +
+ "\1\107\1\67\1\110\3\67\1\111\1\67\1\112\1\113" +
+ "\2\67\1\114\3\67\1\115\1\67\1\116\10\67\1\117" +
+ "\1\67\10\120\27\121\15\120\16\121\1\120\15\121\2\120" +
+ "\1\122\1\120\1\121\1\120\1\121\2\120\2\121\3\120" +
+ "\1\123\1\120\1\124\66\120\1\125\15\120\1\126\14\120" +
+ "\5\127\1\130\64\127\1\131\15\127\1\132\6\127\1\120" +
+ "\4\127\1\120\5\61\1\133\31\61\1\134\32\61\1\131" +
+ "\15\61\1\132\14\61\132\0\1\135\31\0\1\136\5\0" +
+ "\1\137\171\0\1\140\23\0\4\141\1\142\1\143\1\144" +
+ "\1\145\2\141\14\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\26\22\15\0" +
+ "\4\22\1\146\1\22\1\147\7\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\21\22\1\150" +
+ "\4\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\1\151\1\22" +
+ "\1\152\13\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\13\0\26\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\7\22" +
+ "\1\153\16\22\15\0\5\22\1\154\7\22\1\155\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\12\22\1\156\13\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\2\22\1\157" +
+ "\23\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\4\22\1\160\21\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\11\22\1\161\4\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\14\22\1\162\11\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\13\22\1\163" +
+ "\12\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\7\0\1\164\1\136\30\0\1\165" +
+ "\1\166\1\164\1\136\2\0\1\137\47\0\1\167\47\0" +
+ "\1\136\4\0\1\137\124\0\1\137\64\0\1\137\31\0" +
+ "\1\170\3\137\2\0\1\137\64\0\1\137\31\0\1\170" +
+ "\3\137\2\0\1\137\2\0\1\137\121\0\1\136\1\0" +
+ "\2\137\21\0\1\171\15\0\1\171\61\0\1\136\124\0" +
+ "\1\136\2\0\1\136\125\0\1\137\125\0\1\137\63\0" +
+ "\12\22\1\172\13\22\15\0\2\22\1\173\13\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\26\22\15\0\2\22\1\174\13\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\4\22\1\175" +
+ "\21\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\4\22\1\176" +
+ "\11\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\6\22\1\177\7\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\26\22\15\0\1\155\15\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\74\0\1\200\15\0\1\201" +
+ "\5\0\1\202\100\0\1\201\15\0\1\203\25\0\4\204" +
+ "\1\205\15\204\1\205\1\204\1\205\1\204\1\167\14\0" +
+ "\3\204\1\205\12\204\1\0\15\204\2\0\1\204\1\0" +
+ "\1\204\1\56\1\204\2\0\2\204\2\0\1\60\1\0" +
+ "\4\60\2\206\27\60\1\0\32\60\1\0\15\60\1\0" +
+ "\2\60\1\0\11\60\6\0\2\60\154\0\1\207\65\0" +
+ "\1\66\1\0\4\66\2\210\27\66\1\0\53\66\1\0" +
+ "\11\66\1\67\1\0\70\67\1\0\15\67\1\0\15\67" +
+ "\1\0\54\67\1\211\13\67\1\0\15\67\1\0\15\67" +
+ "\1\0\27\67\1\212\24\67\1\211\13\67\1\0\15\67" +
+ "\1\0\15\67\1\0\7\67\1\213\5\67\1\214\52\67" +
+ "\1\0\15\67\1\0\15\67\1\0\11\67\1\215\54\67" +
+ "\1\216\1\67\1\0\15\67\1\0\15\67\1\0\13\67" +
+ "\1\217\1\67\1\220\35\67\1\221\2\67\1\222\3\67" +
+ "\1\223\5\67\1\0\15\67\1\0\15\67\1\0\13\67" +
+ "\1\224\5\67\1\225\34\67\1\226\1\227\10\67\1\0" +
+ "\15\67\1\0\15\67\1\0\16\67\1\230\51\67\1\0" +
+ "\1\231\14\67\1\0\15\67\1\0\21\67\1\232\46\67" +
+ "\1\0\15\67\1\0\15\67\1\0\70\67\1\0\1\233" +
+ "\14\67\1\0\15\67\1\0\21\67\1\234\46\67\1\0" +
+ "\15\67\1\0\15\67\1\0\15\67\1\235\6\67\1\236" +
+ "\43\67\1\0\15\67\1\0\15\67\1\0\7\67\27\237" +
+ "\4\67\1\237\7\67\16\237\1\240\15\237\1\240\4\67" +
+ "\1\237\3\67\2\237\3\67\1\0\21\67\1\241\46\67" +
+ "\1\0\15\67\1\0\15\67\1\0\7\67\1\242\60\67" +
+ "\1\0\15\67\1\0\15\67\1\0\21\67\1\243\46\67" +
+ "\1\0\15\67\1\0\15\67\1\0\13\67\1\244\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\16\67\1\245\36\67" +
+ "\1\246\1\67\1\247\10\67\1\0\15\67\1\0\15\67" +
+ "\1\0\60\67\1\250\7\67\1\0\15\67\1\0\15\67" +
+ "\1\0\15\67\1\251\41\67\1\252\10\67\1\0\15\67" +
+ "\1\0\15\67\1\0\70\67\1\0\15\67\1\0\1\67" +
+ "\1\253\12\67\1\117\1\0\123\117\11\0\26\121\15\0" +
+ "\16\121\1\0\15\121\2\0\1\121\1\0\3\121\2\0" +
+ "\2\121\5\0\1\124\66\0\1\254\15\0\1\254\14\0" +
+ "\5\127\1\0\64\127\1\0\15\127\1\0\6\127\1\0" +
+ "\4\127\1\0\5\255\1\135\64\255\1\0\32\255\5\0" +
+ "\1\135\156\0\1\256\65\0\6\140\2\257\31\140\1\260" +
+ "\50\140\1\261\12\140\11\0\5\22\1\262\20\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\6\22\1\141\17\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\7\22\1\263\16\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\12\22\1\264" +
+ "\13\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\4\22\1\265\21\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\10\22\1\157\5\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\23\22\1\266\2\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\7\22\1\267" +
+ "\16\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\6\22\1\157" +
+ "\7\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\3\22\1\270\12\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\11\22\1\271\14\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\6\22\1\272" +
+ "\17\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\1\273\15\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\26\22\15\0\5\22\1\274\10\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\26\22" +
+ "\15\0\2\22\1\275\13\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\15\22\1\276\10\22" +
+ "\15\0\16\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\13\0\14\22\1\277\11\22\15\0\16\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\41\0\1\136\124\0\1\165\124\0\2\136\101\0\1\300" +
+ "\15\0\1\300\1\0\1\300\21\0\1\300\35\0\1\167" +
+ "\14\0\1\137\32\0\5\137\127\0\2\137\21\0\1\171" +
+ "\15\0\1\171\25\0\1\301\10\22\1\302\14\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\7\22\1\303\16\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\1\304\10\22\1\305\14\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\6\22" +
+ "\1\306\17\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\4\22\1\307\21\22" +
+ "\15\0\16\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\74\0\1\200\15\0\1\201\106\0\1\201" +
+ "\15\0\1\201\25\0\26\204\15\0\16\204\1\0\15\204" +
+ "\2\0\1\204\1\0\3\204\2\0\2\204\13\0\26\204" +
+ "\4\0\2\310\7\0\16\204\1\0\15\204\2\0\1\204" +
+ "\1\0\1\204\1\311\1\204\2\0\2\204\3\0\1\312" +
+ "\3\0\1\313\31\0\1\207\32\0\1\314\15\0\1\314" +
+ "\22\0\2\66\115\0\1\67\1\0\55\67\1\315\12\67" +
+ "\1\0\15\67\1\0\15\67\1\0\33\67\1\316\34\67" +
+ "\1\0\15\67\1\0\15\67\1\0\14\67\1\317\53\67" +
+ "\1\0\15\67\1\0\15\67\1\0\57\67\1\320\10\67" +
+ "\1\0\15\67\1\0\15\67\1\0\7\67\1\321\60\67" +
+ "\1\0\15\67\1\0\15\67\1\0\63\67\1\322\4\67" +
+ "\1\0\15\67\1\0\15\67\1\0\60\67\1\323\7\67" +
+ "\1\0\15\67\1\0\15\67\1\0\66\67\1\324\1\67" +
+ "\1\0\15\67\1\0\15\67\1\0\15\67\1\325\52\67" +
+ "\1\0\15\67\1\0\15\67\1\0\13\67\1\326\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\57\67\1\327\10\67" +
+ "\1\0\15\67\1\0\15\67\1\0\55\67\1\330\12\67" +
+ "\1\0\15\67\1\0\15\67\1\0\57\67\1\331\10\67" +
+ "\1\0\15\67\1\0\15\67\1\0\21\67\1\332\46\67" +
+ "\1\0\15\67\1\0\15\67\1\0\13\67\1\333\5\67" +
+ "\1\334\46\67\1\0\15\67\1\0\15\67\1\0\60\67" +
+ "\1\335\7\67\1\0\15\67\1\0\15\67\1\0\34\67" +
+ "\1\336\33\67\1\0\15\67\1\0\15\67\1\0\16\67" +
+ "\1\337\51\67\1\0\15\67\1\0\15\67\1\0\32\67" +
+ "\1\340\35\67\1\0\15\67\1\0\15\67\1\0\52\67" +
+ "\1\341\15\67\1\0\15\67\1\0\15\67\1\0\70\67" +
+ "\1\0\12\67\1\342\2\67\1\0\15\67\1\0\70\67" +
+ "\1\0\10\67\1\343\4\67\1\0\15\67\1\0\7\67" +
+ "\27\237\4\67\1\237\6\67\1\344\16\237\1\0\15\237" +
+ "\1\0\4\67\1\237\3\67\2\237\2\67\11\0\27\345" +
+ "\4\0\1\345\7\0\16\345\1\240\15\345\1\240\4\0" +
+ "\1\345\3\0\2\345\2\0\1\67\1\0\70\67\1\0" +
+ "\2\67\1\317\12\67\1\0\15\67\1\0\7\67\1\213" +
+ "\60\67\1\0\15\67\1\0\15\67\1\0\15\67\1\346" +
+ "\52\67\1\0\15\67\1\0\15\67\1\0\54\67\1\347" +
+ "\13\67\1\0\15\67\1\0\15\67\1\0\7\67\1\350" +
+ "\60\67\1\0\15\67\1\0\15\67\1\0\13\67\1\351" +
+ "\54\67\1\0\15\67\1\0\15\67\1\0\13\67\1\352" +
+ "\54\67\1\0\15\67\1\0\15\67\1\0\52\67\1\353" +
+ "\15\67\1\0\15\67\1\0\15\67\1\0\16\67\1\354" +
+ "\51\67\1\0\15\67\1\0\15\67\1\0\21\67\1\355" +
+ "\46\67\1\0\15\67\1\0\14\67\1\253\1\356\37\253" +
+ "\1\357\30\253\1\356\15\253\1\356\1\253\1\360\12\253" +
+ "\5\255\1\0\64\255\1\0\32\255\6\0\2\140\115\0" +
+ "\6\140\2\257\31\140\1\260\50\140\1\361\12\140\6\0" +
+ "\2\362\126\0\11\22\1\141\14\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\2\22\1\141\23\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\7\22\1\141" +
+ "\16\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\7\22\1\174\16\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\24\22\1\363\1\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\26\22\15\0\1\22\1\364\14\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\2\22\1\365" +
+ "\23\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\4\22\1\366\21\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\1\367\25\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\11\22" +
+ "\1\370\14\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\4\22\1\371\21\22" +
+ "\15\0\16\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\13\0\26\22\15\0\6\22\1\272\7\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\17\22\1\372\6\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\15\22" +
+ "\1\141\10\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\45\0\2\310\50\0\1\310" +
+ "\20\0\26\22\15\0\1\22\1\373\14\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\4\22" +
+ "\1\174\21\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\1\374\25\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\1\375\15\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\26\22" +
+ "\15\0\1\376\15\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\5\22\1\377" +
+ "\10\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\12\22\1\u0100\13\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\117\0" +
+ "\1\310\20\0\26\204\15\0\16\204\1\0\15\204\2\0" +
+ "\1\204\1\0\1\204\1\311\1\204\2\0\2\204\7\0" +
+ "\1\312\120\0\1\312\3\0\1\313\64\0\1\314\15\0" +
+ "\1\314\14\0\1\67\1\0\54\67\1\u0101\13\67\1\0" +
+ "\15\67\1\0\15\67\1\0\27\67\1\u0101\40\67\1\0" +
+ "\15\67\1\0\15\67\1\0\20\67\1\u0102\47\67\1\0" +
+ "\15\67\1\0\1\u0103\14\67\1\0\13\67\1\u0102\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\14\67\1\u0102\53\67" +
+ "\1\0\15\67\1\0\15\67\1\0\70\67\1\0\15\67" +
+ "\1\0\1\u0104\14\67\1\0\70\67\1\0\12\67\1\u0105" +
+ "\2\67\1\0\15\67\1\0\54\67\1\u0106\13\67\1\0" +
+ "\15\67\1\0\15\67\1\0\57\67\1\u0107\10\67\1\0" +
+ "\15\67\1\0\15\67\1\0\57\67\1\u0108\10\67\1\0" +
+ "\15\67\1\0\15\67\1\0\70\67\1\0\2\67\1\u0109" +
+ "\12\67\1\0\15\67\1\0\60\67\1\u010a\7\67\1\0" +
+ "\15\67\1\0\15\67\1\0\15\67\1\u010b\52\67\1\0" +
+ "\15\67\1\0\15\67\1\0\60\67\1\u010c\7\67\1\0" +
+ "\15\67\1\0\15\67\1\0\66\67\1\u010d\1\67\1\0" +
+ "\15\67\1\0\15\67\1\0\52\67\1\u010e\15\67\1\0" +
+ "\15\67\1\0\15\67\1\0\15\67\1\u010f\52\67\1\0" +
+ "\15\67\1\0\15\67\1\0\24\67\1\u0110\43\67\1\0" +
+ "\15\67\1\0\15\67\1\0\52\67\1\u0111\15\67\1\0" +
+ "\15\67\1\0\15\67\1\0\23\67\1\u0112\44\67\1\0" +
+ "\15\67\1\0\15\67\1\0\57\67\1\u0113\10\67\1\0" +
+ "\15\67\1\0\15\67\1\0\15\67\1\u0114\52\67\1\0" +
+ "\15\67\1\0\15\67\1\0\24\67\1\u0115\43\67\1\0" +
+ "\15\67\1\0\15\67\1\0\7\67\26\u0116\5\67\1\u0116" +
+ "\7\67\16\u0116\1\0\15\u0116\1\0\4\67\1\u0116\4\67" +
+ "\1\u0116\2\67\11\0\27\345\4\0\1\345\6\0\1\u0117" +
+ "\16\345\1\0\15\345\5\0\1\345\3\0\2\345\2\0" +
+ "\1\67\1\0\57\67\1\u0118\10\67\1\0\15\67\1\0" +
+ "\15\67\1\0\16\67\1\u0119\51\67\1\0\15\67\1\0" +
+ "\15\67\1\0\54\67\1\u011a\13\67\1\0\15\67\1\0" +
+ "\15\67\1\0\57\67\1\u011b\10\67\1\0\15\67\1\0" +
+ "\15\67\1\0\67\67\1\u011c\1\0\15\67\1\0\15\67" +
+ "\1\0\16\67\1\u011d\51\67\1\0\15\67\1\0\15\67" +
+ "\1\0\53\67\1\u011e\14\67\1\0\15\67\1\0\15\67" +
+ "\1\0\55\67\1\u011f\12\67\1\0\15\67\1\0\14\67" +
+ "\41\356\1\u0120\50\356\1\u0121\12\356\1\253\1\356\37\253" +
+ "\1\357\30\253\1\356\15\253\1\356\1\253\1\u0122\12\253" +
+ "\1\67\1\0\70\67\1\0\15\67\1\0\1\67\1\u0123" +
+ "\12\67\6\140\2\u0124\31\140\1\260\50\140\1\261\12\140" +
+ "\11\0\15\22\1\u0125\10\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\1\u0126" +
+ "\25\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\26\22\15\0\1\151\15\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\6\22\1\u0127\17\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\4\22" +
+ "\1\367\21\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\26\22\15\0\1\22" +
+ "\1\u0128\14\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\13\0\20\22\1\u0129\5\22\15\0\16\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\26\22\15\0\4\22\1\174\11\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\6\22" +
+ "\1\u012a\17\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\26\22\15\0\6\22" +
+ "\1\u012b\7\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\13\0\26\22\15\0\14\22\1\370\1\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\4\22\1\157\21\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\26\22" +
+ "\15\0\12\22\1\367\3\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\2\0\1\67\1\0\70\67" +
+ "\1\u012c\15\67\1\u012c\1\u012d\14\67\1\0\70\67\1\0" +
+ "\15\67\1\0\1\u0103\14\67\1\0\3\67\1\u012e\64\67" +
+ "\1\0\15\67\1\0\15\67\1\0\3\67\1\u0103\64\67" +
+ "\1\0\15\67\1\0\15\67\1\0\13\67\1\u012f\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\16\67\1\u0130\51\67" +
+ "\1\0\15\67\1\0\15\67\1\0\21\67\1\u0131\46\67" +
+ "\1\0\15\67\1\0\15\67\1\0\55\67\1\u0132\12\67" +
+ "\1\0\15\67\1\0\15\67\1\0\13\67\1\u0133\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\15\67\1\u0134\52\67" +
+ "\1\0\15\67\1\0\15\67\1\0\67\67\1\u0135\1\0" +
+ "\15\67\1\0\15\67\1\0\57\67\1\u0136\10\67\1\0" +
+ "\15\67\1\0\15\67\1\0\13\67\1\u0137\54\67\1\0" +
+ "\15\67\1\0\15\67\1\0\55\67\1\u0138\12\67\1\0" +
+ "\15\67\1\0\15\67\1\0\21\67\1\u0112\46\67\1\0" +
+ "\15\67\1\0\15\67\1\0\70\67\1\0\5\67\1\u0112" +
+ "\7\67\1\0\15\67\1\0\13\67\1\u0139\54\67\1\0" +
+ "\15\67\1\0\15\67\1\0\70\67\1\u013a\15\67\1\0" +
+ "\15\67\1\0\7\67\1\u013b\60\67\1\0\15\67\1\0" +
+ "\15\67\1\0\10\67\1\u013c\57\67\1\0\15\67\1\0" +
+ "\15\67\1\0\7\67\26\u0116\1\u013d\4\67\1\u0116\7\67" +
+ "\16\u0116\1\0\15\u0116\1\0\4\67\1\u0116\4\67\1\u0116" +
+ "\2\67\11\0\26\u013e\5\0\1\u013e\7\0\16\u013e\1\0" +
+ "\15\u013e\5\0\1\u013e\4\0\1\u013e\2\0\1\67\1\0" +
+ "\7\67\1\u013f\60\67\1\0\15\67\1\0\15\67\1\0" +
+ "\21\67\1\u0140\46\67\1\0\15\67\1\0\15\67\1\0" +
+ "\15\67\1\u0141\52\67\1\0\15\67\1\0\15\67\1\0" +
+ "\15\67\1\u0142\52\67\1\0\15\67\1\0\15\67\1\0" +
+ "\21\67\1\u0143\46\67\1\0\15\67\1\0\15\67\1\0" +
+ "\54\67\1\u0144\13\67\1\0\15\67\1\0\15\67\1\0" +
+ "\13\67\1\u0145\54\67\1\0\15\67\1\0\15\67\1\0" +
+ "\15\67\1\u0146\52\67\1\0\15\67\1\0\14\67\41\356" +
+ "\1\u0120\50\356\1\u0147\12\356\112\0\1\u0148\12\0\1\253" +
+ "\1\356\37\253\1\357\30\253\1\356\15\253\1\356\1\253" +
+ "\1\u0149\12\253\11\0\25\22\1\141\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\6\22\1\u014a\17\22\15\0\16\22\1\0\15\22\2\0" +
+ "\1\22\1\0\3\22\2\0\2\22\13\0\2\22\1\u014b" +
+ "\23\22\15\0\16\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\1\157\25\22\15\0\16\22" +
+ "\1\0\15\22\2\0\1\22\1\0\3\22\2\0\2\22" +
+ "\13\0\21\22\1\u014c\4\22\15\0\16\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\13\0\7\22" +
+ "\1\u014d\16\22\15\0\16\22\1\0\15\22\2\0\1\22" +
+ "\1\0\3\22\2\0\2\22\13\0\7\22\1\367\16\22" +
+ "\15\0\16\22\1\0\15\22\2\0\1\22\1\0\3\22" +
+ "\2\0\2\22\74\0\1\u012c\15\0\1\u012c\1\u012d\13\0" +
+ "\1\u012d\1\0\123\u012d\1\67\1\0\3\67\1\u014e\64\67" +
+ "\1\0\15\67\1\0\15\67\1\0\70\67\1\u014f\15\67" +
+ "\1\0\15\67\1\0\70\67\1\u0150\15\67\1\0\15\67" +
+ "\1\0\63\67\1\u0151\4\67\1\0\15\67\1\0\15\67" +
+ "\1\0\54\67\1\u0152\13\67\1\0\15\67\1\0\15\67" +
+ "\1\0\20\67\1\u0153\47\67\1\0\15\67\1\0\15\67" +
+ "\1\0\53\67\1\u0154\14\67\1\0\15\67\1\0\15\67" +
+ "\1\0\7\67\1\u0155\60\67\1\0\15\67\1\0\15\67" +
+ "\1\0\54\67\1\u0156\13\67\1\0\15\67\1\0\15\67" +
+ "\1\0\16\67\1\u0157\51\67\1\0\15\67\1\0\15\67" +
+ "\1\0\13\67\1\u0158\54\67\1\0\15\67\1\0\15\67" +
+ "\1\0\57\67\1\u0159\10\67\1\0\15\67\1\0\14\67" +
+ "\101\0\1\u015a\23\0\1\67\1\0\13\67\1\u015b\54\67" +
+ "\1\0\15\67\1\0\15\67\1\0\31\67\1\u015c\36\67" +
+ "\1\0\15\67\1\0\15\67\1\0\7\67\26\u015d\5\67" +
+ "\1\u0116\7\67\16\u015d\1\0\15\u015d\1\0\4\67\1\u0116" +
+ "\4\67\1\u015d\2\67\11\0\26\u013e\1\u015e\4\0\1\u013e" +
+ "\7\0\16\u013e\1\0\15\u013e\5\0\1\u013e\4\0\1\u013e" +
+ "\2\0\1\67\1\0\54\67\1\u015f\13\67\1\0\15\67" +
+ "\1\0\15\67\1\0\60\67\1\u0160\7\67\1\0\15\67" +
+ "\1\0\15\67\1\0\16\67\1\u0161\51\67\1\0\15\67" +
+ "\1\0\15\67\1\0\16\67\1\u0162\51\67\1\0\15\67" +
+ "\1\0\15\67\1\0\16\67\1\u0163\51\67\1\0\15\67" +
+ "\1\0\15\67\1\0\70\67\1\u0164\15\67\1\0\15\67" +
+ "\1\0\16\67\1\u0165\51\67\1\0\15\67\1\0\15\67" +
+ "\1\0\20\67\1\u0166\47\67\1\0\15\67\1\0\14\67" +
+ "\41\356\1\u0120\50\356\1\u0167\12\356\11\0\26\22\15\0" +
+ "\2\22\1\u0168\13\22\1\0\15\22\2\0\1\22\1\0" +
+ "\3\22\2\0\2\22\13\0\22\22\1\141\3\22\15\0" +
+ "\16\22\1\0\15\22\2\0\1\22\1\0\3\22\2\0" +
+ "\2\22\13\0\26\22\15\0\1\370\15\22\1\0\15\22" +
+ "\2\0\1\22\1\0\3\22\2\0\2\22\2\0\1\u0169" +
+ "\1\0\4\u0169\2\67\62\u0169\1\0\15\u0169\1\0\2\u0169" +
+ "\1\67\4\u0169\1\67\4\u0169\24\0\1\u016a\132\0\1\u016b" +
+ "\72\0\1\67\1\0\70\67\1\u016c\15\67\1\0\15\67" +
+ "\1\0\16\67\1\u016d\51\67\1\0\15\67\1\0\15\67" +
+ "\1\0\7\67\1\u016e\60\67\1\0\15\67\1\0\15\67" +
+ "\1\0\70\67\1\u016f\15\67\1\0\15\67\1\0\13\67" +
+ "\1\u0170\54\67\1\0\15\67\1\0\15\67\1\0\7\67" +
+ "\1\u0171\60\67\1\0\15\67\1\0\15\67\1\0\7\67" +
+ "\1\u0172\60\67\1\0\15\67\1\0\15\67\1\0\70\67" +
+ "\1\u0173\15\67\1\0\15\67\1\0\70\67\1\u0174\15\67" +
+ "\1\0\14\67\17\0\1\u0175\6\0\1\u0176\76\0\1\67" +
+ "\1\0\54\67\1\u0112\13\67\1\0\15\67\1\0\15\67" +
+ "\1\0\27\67\1\u0112\40\67\1\0\15\67\1\0\15\67" +
+ "\1\0\7\67\26\u0177\1\u013d\4\67\1\u0116\7\67\16\u0177" +
+ "\1\0\15\u0177\1\0\4\67\1\u0116\4\67\1\u0177\2\67" +
+ "\11\0\26\u0178\5\0\1\u013e\7\0\16\u0178\1\0\15\u0178" +
+ "\5\0\1\u013e\4\0\1\u0178\2\0\1\67\1\0\70\67" +
+ "\1\0\15\67\1\0\1\u0179\14\67\1\0\55\67\1\u017a" +
+ "\12\67\1\0\15\67\1\0\15\67\1\0\13\67\1\u017b" +
+ "\54\67\1\0\15\67\1\0\15\67\1\0\13\67\1\u017c" +
+ "\54\67\1\0\15\67\1\0\15\67\1\0\55\67\1\u017d" +
+ "\12\67\1\0\15\67\1\0\14\67\102\0\1\u017e\22\0" +
+ "\1\67\1\0\7\67\1\u017f\60\67\1\0\15\67\1\0" +
+ "\15\67\1\0\57\67\1\u0180\10\67\1\0\15\67\1\0" +
+ "\14\67\11\0\7\22\1\u0181\16\22\15\0\16\22\1\0" +
+ "\15\22\2\0\1\22\1\0\3\22\2\0\2\22\13\0" +
+ "\1\u0182\1\u0183\135\0\1\u0184\54\0\1\u0185\57\0\1\u0186" +
+ "\71\0\1\67\1\0\70\67\1\u0187\15\67\1\0\15\67" +
+ "\1\0\60\67\1\u0188\7\67\1\0\15\67\1\0\14\67" +
+ "\35\0\1\u0189\67\0\1\67\1\0\70\67\1\u018a\15\67" +
+ "\1\0\15\67\1\0\7\67\1\u018b\60\67\1\0\15\67" +
+ "\1\0\15\67\1\0\70\67\1\u018c\15\67\1\0\14\67" +
+ "\103\0\1\u018d\123\0\1\u018e\127\0\1\u018f\122\0\1\u0190" +
+ "\21\0\1\67\1\0\7\67\26\u0191\1\u013d\4\67\1\u0116" +
+ "\3\67\1\u0192\3\67\16\u0191\1\u0193\15\u0191\1\u0193\4\67" +
+ "\1\u0116\4\67\1\u0191\2\67\11\0\26\u0194\1\u015e\4\0" +
+ "\1\u013e\7\0\16\u0194\1\0\15\u0194\5\0\1\u013e\4\0" +
+ "\1\u0194\2\0\1\67\1\0\7\67\27\u0195\4\67\1\u0195" +
+ "\7\67\16\u0195\1\u0196\15\u0195\1\u0196\4\67\1\u0195\3\67" +
+ "\2\u0195\3\67\1\0\70\67\1\u0197\15\67\1\0\15\67" +
+ "\1\0\70\67\1\u0198\15\67\1\0\15\67\1\0\70\67" +
+ "\1\u0199\15\67\1\0\15\67\1\0\60\67\1\u019a\7\67" +
+ "\1\0\15\67\1\0\14\67\31\0\1\u019b\24\0\1\u019c" +
+ "\46\0\1\67\1\0\70\67\1\u019d\15\67\1\0\15\67" +
+ "\1\0\21\67\1\u019e\46\67\1\0\15\67\1\0\14\67" +
+ "\15\0\1\u019f\142\0\1\u01a0\153\0\1\u01a1\100\0\1\u01a2" +
+ "\106\0\1\u01a3\131\0\1\u01a4\77\0\1\67\1\0\13\67" +
+ "\1\u01a5\54\67\1\0\15\67\1\0\14\67\15\0\1\u01a6" +
+ "\15\0\1\u01a7\126\0\1\u01a8\67\0\1\67\1\0\13\67" +
+ "\1\u01a9\54\67\1\0\15\67\1\0\14\67\35\0\1\u01aa" +
+ "\120\0\1\u01ab\24\0\1\u01ac\122\0\1\u01ad\22\0\1\u01ae" +
+ "\45\0\1\u01af\177\0\1\u01b0\31\0\1\67\1\0\7\67" +
+ "\26\u01b1\1\u013d\4\67\1\u0116\3\67\1\u0192\3\67\16\u01b1" +
+ "\1\u0193\15\u01b1\1\u0193\4\67\1\u0116\4\67\1\u01b1\2\67" +
+ "\50\0\1\u01b2\21\0\1\u0193\15\0\1\u0193\25\0\26\u01b3" +
+ "\1\u015e\4\0\1\u013e\3\0\1\u01b2\3\0\16\u01b3\1\u0193" +
+ "\15\u01b3\1\u0193\4\0\1\u013e\4\0\1\u01b3\2\0\1\67" +
+ "\1\0\7\67\27\u0195\4\67\1\u0195\6\67\1\u01b4\16\u0195" +
+ "\1\0\15\u0195\1\0\4\67\1\u0195\3\67\2\u0195\2\67" +
+ "\11\0\27\u01b5\4\0\1\u01b5\7\0\16\u01b5\1\u0196\15\u01b5" +
+ "\1\u0196\4\0\1\u01b5\3\0\2\u01b5\32\0\1\u01b6\127\0" +
+ "\1\u01b7\116\0\1\u01b8\77\0\1\67\1\0\13\67\1\u01b9" +
+ "\54\67\1\0\15\67\1\0\14\67\14\0\1\u01ba\123\0" +
+ "\1\u01bb\136\0\1\u01bc\77\0\1\67\1\0\70\67\1\0" +
+ "\2\67\1\u01bd\12\67\1\0\14\67\15\0\1\u01be\142\0" +
+ "\1\u01bf\146\0\1\u01c0\74\0\1\u01c1\110\0\1\u01c2\171\0" +
+ "\1\u01c3\46\0\1\67\1\0\70\67\1\u01c4\15\67\1\0" +
+ "\14\67\61\0\1\u01c5\141\0\1\u01c6\43\0\1\u01c7\15\0" +
+ "\1\u01c8\71\0\1\67\1\0\70\67\1\u01c9\15\67\1\0" +
+ "\14\67\23\0\1\u01ca\54\0\1\u01cb\56\0\1\u01cc\162\0" +
+ "\1\u01cd\115\0\1\u01ce\141\0\1\u01cf\45\0\1\u019f\133\0" +
+ "\1\u01a0\76\0\1\67\1\0\7\67\26\u01d0\1\u013d\4\67" +
+ "\1\u0116\3\67\1\u0192\3\67\16\u01d0\1\u0193\15\u01d0\1\u0193" +
+ "\4\67\1\u0116\4\67\1\u01d0\2\67\11\0\26\u01d1\1\u015e" +
+ "\4\0\1\u013e\3\0\1\u01b2\3\0\16\u01d1\1\u0193\15\u01d1" +
+ "\1\u0193\4\0\1\u013e\4\0\1\u01d1\2\0\1\67\1\0" +
+ "\7\67\26\u01d2\5\67\1\u01d2\7\67\16\u01d2\1\0\15\u01d2" +
+ "\1\0\4\67\1\u01d2\4\67\1\u01d2\2\67\11\0\27\u01b5" +
+ "\4\0\1\u01b5\6\0\1\u01d3\16\u01b5\1\0\15\u01b5\5\0" +
+ "\1\u01b5\3\0\2\u01b5\60\0\1\u01d4\127\0\1\u01d5\14\0" +
+ "\1\u01d6\51\0\1\u01d7\54\0\1\u01d8\24\0\1\67\1\0" +
+ "\70\67\1\u01d9\15\67\1\0\14\67\36\0\1\u01da\150\0" +
+ "\1\u01db\73\0\1\u01dc\24\0\1\u01dd\46\0\1\67\1\0" +
+ "\70\67\1\u01de\15\67\1\0\14\67\62\0\1\u01df\100\0" +
+ "\1\u01df\146\0\1\u01e0\74\0\1\u01e1\111\0\1\u01e2\44\0" +
+ "\1\u01e3\120\0\1\u01e4\144\0\1\u01e5\51\0\1\u01e6\201\0" +
+ "\1\u01e7\44\0\1\u01e8\177\0\1\u01e9\61\0\1\u01ea\171\0" +
+ "\1\u01eb\133\0\1\u01ec\53\0\1\u01ed\106\0\1\u01ee\126\0" +
+ "\1\u01ef\133\0\1\u01f0\76\0\1\67\1\0\7\67\26\u0116" +
+ "\1\u013d\4\67\1\u0116\3\67\1\u0192\3\67\16\u0116\1\u0193" +
+ "\15\u0116\1\u0193\4\67\1\u0116\4\67\1\u0116\2\67\11\0" +
+ "\26\u01f1\1\u015e\4\0\1\u013e\3\0\1\u01b2\3\0\16\u01f1" +
+ "\1\u0193\15\u01f1\1\u0193\4\0\1\u013e\4\0\1\u01f1\2\0" +
+ "\1\67\1\0\7\67\26\u01d2\1\u01f2\4\67\1\u01d2\7\67" +
+ "\16\u01d2\1\0\15\u01d2\1\0\4\67\1\u01d2\4\67\1\u01d2" +
+ "\2\67\11\0\26\u01f3\5\0\1\u01f3\7\0\16\u01f3\1\0" +
+ "\15\u01f3\5\0\1\u01f3\4\0\1\u01f3\15\0\1\u01f4\130\0" +
+ "\1\u01f5\133\0\1\u01f6\160\0\1\u01f7\100\0\1\u01f8\116\0" +
+ "\1\u01f9\127\0\1\u01fa\106\0\1\u01fb\206\0\1\u01fc\101\0" +
+ "\1\u01fd\62\0\1\u01fe\127\0\1\u01ff\142\0\1\u0200\153\0" +
+ "\1\u0201\57\0\1\u0202\125\0\1\u019f\123\0\1\u0203\15\0" +
+ "\1\u0204\161\0\1\u0205\66\0\1\u0206\111\0\1\u0207\133\0" +
+ "\1\u0208\113\0\1\u0209\15\0\1\u020a\110\0\1\u020b\133\0" +
+ "\1\u020c\172\0\1\u01df\51\0\1\u01df\126\0\1\u020d\201\0" +
+ "\1\u020e\35\0\26\u013e\1\u015e\4\0\1\u013e\3\0\1\u01b2" +
+ "\3\0\16\u013e\1\u0193\15\u013e\1\u0193\4\0\1\u013e\4\0" +
+ "\1\u013e\2\0\1\67\1\0\7\67\26\u020f\5\67\1\u01d2" +
+ "\7\67\16\u020f\1\0\15\u020f\1\0\4\67\1\u01d2\4\67" +
+ "\1\u020f\2\67\11\0\26\u01f3\1\u0210\4\0\1\u01f3\7\0" +
+ "\16\u01f3\1\0\15\u01f3\5\0\1\u01f3\4\0\1\u01f3\24\0" +
+ "\1\u0211\125\0\1\u0212\201\0\1\u0213\44\0\1\u0214\177\0" +
+ "\1\u0215\46\0\1\u0216\15\0\1\u0217\103\0\1\u01df\123\0" +
+ "\1\u01df\217\0\1\u0218\115\0\1\u0219\65\0\1\u021a\23\0" +
+ "\1\u021b\53\0\1\u021c\125\0\1\u021d\130\0\1\u021e\124\0" +
+ "\1\u021f\165\0\1\u0220\102\0\1\u0221\112\0\1\u0222\201\0" +
+ "\1\u0223\45\0\1\u01db\177\0\1\u01da\105\0\1\u0224\74\0" +
+ "\1\u0225\156\0\1\u01df\102\0\1\u01df\144\0\1\u0226\74\0" +
+ "\1\u0227\77\0\1\67\1\0\7\67\26\u0228\1\u01f2\4\67" +
+ "\1\u01d2\7\67\16\u0228\1\0\15\u0228\1\0\4\67\1\u01d2" +
+ "\4\67\1\u0228\2\67\11\0\26\u0229\5\0\1\u01f3\7\0" +
+ "\16\u0229\1\0\15\u0229\5\0\1\u01f3\4\0\1\u0229\13\0" +
+ "\1\u022a\135\0\1\u01df\126\0\1\u01df\117\0\1\u0212\133\0" +
+ "\1\u0213\160\0\1\u022b\100\0\1\u022c\121\0\1\u022d\106\0" +
+ "\1\u022e\206\0\1\u022f\101\0\1\u0230\61\0\1\u0231\125\0" +
+ "\1\u0232\174\0\1\u0233\124\0\1\u0234\124\0\1\u0235\100\0" +
+ "\1\u0236\150\0\1\u0237\100\0\1\u0238\155\0\1\u0239\143\0" +
+ "\1\u023a\76\0\1\u0212\74\0\1\u0213\74\0\1\67\1\0" +
+ "\7\67\26\u023b\1\u01f2\4\67\1\u01d2\7\67\16\u023b\1\u023c" +
+ "\15\u023b\1\u023c\4\67\1\u01d2\4\67\1\u023b\2\67\11\0" +
+ "\26\u023d\1\u0210\4\0\1\u01f3\7\0\16\u023d\1\0\15\u023d" +
+ "\5\0\1\u01f3\4\0\1\u023d\25\0\1\u023e\120\0\1\u023f" +
+ "\133\0\1\u0240\134\0\1\u01fa\150\0\1\u01fb\143\0\1\u0241" +
+ "\110\0\1\u0242\115\0\1\u01df\77\0\1\u01df\112\0\1\u0243" +
+ "\124\0\1\u0244\161\0\1\u01df\147\0\1\u01df\107\0\1\u0245" +
+ "\100\0\1\u0246\142\0\1\u01db\147\0\1\u01da\25\0\1\67" +
+ "\1\0\7\67\26\u0247\1\u01f2\4\67\1\u01d2\7\67\16\u0247" +
+ "\1\u023c\15\u0247\1\u023c\4\67\1\u01d2\4\67\1\u0247\2\67" +
+ "\72\0\1\u023c\15\0\1\u023c\25\0\26\u0248\1\u0210\4\0" +
+ "\1\u01f3\7\0\16\u0248\1\u023c\15\u0248\1\u023c\4\0\1\u01f3" +
+ "\4\0\1\u0248\61\0\1\u0249\67\0\1\u024a\126\0\1\u024b" +
+ "\207\0\1\u024c\103\0\1\u024d\60\0\1\u024e\124\0\1\u024f" +
+ "\117\0\1\u01df\142\0\1\u01df\71\0\1\67\1\0\7\67" +
+ "\26\u0250\1\u01f2\4\67\1\u01d2\7\67\16\u0250\1\u023c\15\u0250" +
+ "\1\u023c\4\67\1\u01d2\4\67\1\u0250\2\67\11\0\26\u0251" +
+ "\1\u0210\4\0\1\u01f3\7\0\16\u0251\1\u023c\15\u0251\1\u023c" +
+ "\4\0\1\u01f3\4\0\1\u0251\13\0\1\u019f\135\0\1\u0245" +
+ "\126\0\1\u0246\126\0\1\u0252\115\0\1\u0253\122\0\1\u0254" +
+ "\124\0\1\u0255\107\0\1\67\1\0\7\67\26\u01d2\1\u01f2" +
+ "\4\67\1\u01d2\7\67\16\u01d2\1\u023c\15\u01d2\1\u023c\4\67" +
+ "\1\u01d2\4\67\1\u01d2\2\67\11\0\26\u0256\1\u0210\4\0" +
+ "\1\u01f3\7\0\16\u0256\1\u023c\15\u0256\1\u023c\4\0\1\u01f3" +
+ "\4\0\1\u0256\75\0\1\u01df\51\0\1\u01df\126\0\1\137" +
+ "\113\0\26\u01f3\1\u0210\4\0\1\u01f3\7\0\16\u01f3\1\u023c" +
+ "\15\u01f3\1\u023c\4\0\1\u01f3\4\0\1\u01f3\2\0";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[46920];
+ 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 <code>aState</code>
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\1\0\1\1\3\0\1\1\1\0\3\11\46\1\1\11" +
+ "\2\1\2\11\2\1\1\11\17\1\1\11\4\1\1\11" +
+ "\2\1\1\11\2\1\2\11\4\1\2\11\2\1\3\11" +
+ "\1\0\27\1\2\0\6\1\1\0\1\1\2\0\2\1" +
+ "\3\0\27\1\1\0\13\1\1\0\2\1\3\0\30\1" +
+ "\1\11\2\0\30\1\1\0\10\1\1\0\2\1\1\0" +
+ "\1\11\44\1\1\0\10\1\2\0\12\1\1\0\15\1" +
+ "\1\0\3\1\1\0\10\1\1\0\1\11\6\1\2\0" +
+ "\11\1\1\0\3\1\1\0\5\1\1\0\5\1\3\0" +
+ "\2\1\1\0\3\1\4\0\1\1\1\0\5\1\1\0" +
+ "\3\1\6\0\1\1\2\0\1\1\5\0\2\1\2\0" +
+ "\1\1\4\0\1\1\3\0\1\1\6\0\1\1\3\0" +
+ "\1\1\7\0\1\1\1\11\1\0\1\1\4\0\1\1" +
+ "\3\0\1\1\22\0\1\1\1\0\1\1\14\0\1\11" +
+ "\22\0\1\1\34\0\1\1\30\0\1\1\22\0\3\1" +
+ "\11\0\2\1\7\0\2\1\2\0\3\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[598];
+ 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;
+
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
+
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
+
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
+
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
+
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
+
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /* user code: */
+ public int start;
+ public int end;
+ public int beginString;
+ public static Set<String> commands = new HashSet<String>();
+ public static Set<String> macros = new HashSet<String>();
+ public static Set<String> variables = new HashSet<String>();
+ public Set<String> infile;
+
+ private ScilabDocument doc;
+ private boolean transposable;
+ private Element elem;
+ private boolean breakstring;
+
+ static {
+ // For SciNotes colors in preferences
+ commands.add("cos");
+ macros.add("cosh");
+ }
+
+ public ScilabLexer(ScilabDocument doc) {
+ this(doc, true);
+ }
+
+ public ScilabLexer(ScilabDocument doc, boolean update) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ this.infile = doc.getFunctionsInDoc();
+ if (update) {
+ update();
+ }
+ }
+
+ public static void update() {
+ if (ScilabCommonsUtils.isScilabThread()) {
+ String[] vars = ScilabKeywords.GetVariablesName();
+ String[] funs = ScilabKeywords.GetFunctionsName();
+ String[] macs = ScilabKeywords.GetMacrosName();
+ variables.clear();
+ commands.clear();
+ macros.clear();
+ if (vars != null) {
+ variables.addAll(Arrays.asList(vars));
+ }
+ if (funs != null) {
+ commands.addAll(Arrays.asList(funs));
+ }
+ if (macs != null) {
+ macros.addAll(Arrays.asList(macs));
+ }
+ }
+ }
+
+ public void setRange(int p0, int p1) {
+ start = p0;
+ end = p1;
+ transposable = false;
+ breakstring = false;
+ yyreset(new ScilabDocumentReader(doc, p0, p1));
+ int currentLine = elem.getElementIndex(start);
+ if (currentLine != 0 && ((ScilabDocument.ScilabLeafElement) elem.getElement(currentLine - 1)).isBrokenString()) {
+ yybegin(QSTRING);
+ }
+ }
+
+ public int yychar() {
+ return yychar;
+ }
+
+ public int scan() throws IOException {
+ int ret = yylex();
+ if (start + yychar + yylength() == end - 1) {
+ ((ScilabDocument.ScilabLeafElement) elem.getElement(elem.getElementIndex(start))).setBrokenString(breakstring);
+ breakstring = false;
+ }
+ return ret;
+ }
+
+ public int getKeyword(int pos, boolean strict) {
+ Element line = elem.getElement(elem.getElementIndex(pos));
+ int end = line.getEndOffset();
+ int tok = -1;
+ start = line.getStartOffset();
+ int startL = start;
+ int s = -1;
+
+ try {
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ if (!strict) {
+ pos++;
+ }
+
+ while (startL < pos && (s != startL || yystate() == BREAKSTRING)) {
+ s = startL;
+ tok = yylex();
+ startL = start + yychar + yylength();
+ }
+
+ return tok;
+ } catch (IOException e) {
+ return ScilabLexerConstants.DEFAULT;
+ }
+ }
+
+ public static ScilabTokens getScilabTokens(String str) {
+ ScilabDocument doc = new ScilabDocument(false);
+ try {
+ doc.insertString(0, str, null);
+ } catch (BadLocationException e) { }
+ return getScilabTokens(doc);
+ }
+
+ public static ScilabTokens getScilabTokens(ScilabDocument doc) {
+ ScilabLexer lexer = new ScilabLexer(doc);
+ lexer.yyreset(new ScilabDocumentReader(doc, 0, doc.getLength()));
+ ScilabTokens tokens = new ScilabTokens();
+ int tok = -1;
+ try {
+ while (tok != ScilabLexerConstants.EOF) {
+ tok = lexer.yylex();
+ tokens.add(tok, lexer.yychar + lexer.yylength());
+ }
+ } catch (IOException e) { }
+
+ return tokens;
+ }
+
+ public static class ScilabTokens {
+ private List<Integer> tokenType = new ArrayList<Integer>();
+ private List<Integer> tokenPos = new ArrayList<Integer>();
+
+ ScilabTokens() { }
+
+ void add(final int type, final int pos) {
+ tokenType.add(type);
+ tokenPos.add(pos);
+ }
+
+ public final List<Integer> getTokenType() {
+ return tokenType;
+ }
+
+ public final List<Integer> getTokenPos() {
+ return tokenPos;
+ }
+ }
+
+
+ /**
+ * 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 ScilabLexer(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 ScilabLexer(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 < 210) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do {
+ map[j++] = value;
+ } while (--count > 0);
+ }
+ return map;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
+ }
+
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzCurrentPos * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ }
+
+ /* finally: fill the buffer with new input */
+ int numRead = zzReader.read(zzBuffer, zzEndRead,
+ zzBuffer.length - zzEndRead);
+
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ return false;
+ }
+ // unlikely but not impossible: read 0 characters, but not at end of stream
+ if (numRead == 0) {
+ int c = zzReader.read();
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char) c;
+ return false;
+ }
+ }
+
+ // numRead < 0
+ return true;
+ }
+
+
+ /**
+ * 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();
+ }
+ }
+
+
+ /**
+ * 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
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ 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 <tt>pos</tt> 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 int 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;
+
+ yychar += zzMarkedPosL - zzStartRead;
+
+ zzAction = -1;
+
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ zzState = ZZ_LEXSTATE[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 34: {
+ transposable = false;
+ return ScilabLexerConstants.SKEYWORD;
+ }
+ case 46:
+ break;
+ case 1: {
+ return ScilabLexerConstants.STRING;
+ }
+ case 47:
+ break;
+ case 28: {
+ return ScilabLexerConstants.WHITE;
+ }
+ case 48:
+ break;
+ case 42: {
+ return ScilabLexerConstants.TODO;
+ }
+ case 49:
+ break;
+ case 31: {
+ return ScilabLexerConstants.ERROR;
+ }
+ case 50:
+ break;
+ case 2: {
+ transposable = false;
+ return ScilabLexerConstants.DEFAULT;
+ }
+ case 51:
+ break;
+ case 3: {
+ transposable = false;
+ return ScilabLexerConstants.OPENCLOSE;
+ }
+ case 52:
+ break;
+ case 38: {
+ transposable = false;
+ return ScilabLexerConstants.ELSEIF;
+ }
+ case 53:
+ break;
+ case 26: {
+ yybegin(COMMANDSWHITE);
+ return ScilabLexerConstants.WHITE;
+ }
+ case 54:
+ break;
+ case 43: {
+ return ScilabLexerConstants.URL;
+ }
+ case 55:
+ break;
+ case 12: {
+ transposable = false;
+ return ScilabLexerConstants.SPECIAL;
+ }
+ case 56:
+ break;
+ case 39: {
+ transposable = false;
+ return ScilabLexerConstants.CKEYWORD;
+ }
+ case 57:
+ break;
+ case 21: {
+ return ScilabLexerConstants.TAB_COMMENT;
+ }
+ case 58:
+ break;
+ case 32: {
+ transposable = true;
+ return ScilabLexerConstants.CONSTANTES;
+ }
+ case 59:
+ break;
+ case 11: {
+ transposable = false;
+ return ScilabLexerConstants.TAB;
+ }
+ case 60:
+ break;
+ case 17: {
+ return ScilabLexerConstants.TAB_STRING;
+ }
+ case 61:
+ break;
+ case 41: {
+ return ScilabLexerConstants.LATEX;
+ }
+ case 62:
+ break;
+ case 23: {
+ transposable = true;
+ return ScilabLexerConstants.FIELD;
+ }
+ case 63:
+ break;
+ case 14: {
+ return ScilabLexerConstants.DEFAULT;
+ }
+ case 64:
+ break;
+ case 36: {
+ yypushback(yylength());
+ yybegin(BREAKSTRING);
+ transposable = false;
+ return ScilabLexerConstants.STRING;
+ }
+ case 65:
+ break;
+ case 44: {
+ transposable = false;
+ return ScilabLexerConstants.FKEYWORD;
+ }
+ case 66:
+ break;
+ case 7: {
+ transposable = false;
+ beginString = zzStartRead;
+ yybegin(QSTRING);
+ return ScilabLexerConstants.STRING;
+ }
+ case 67:
+ break;
+ case 35: {
+ breakstring = true;
+ return ScilabLexerConstants.SPECIAL;
+ }
+ case 68:
+ break;
+ case 20: {
+ return ScilabLexerConstants.WHITE_COMMENT;
+ }
+ case 69:
+ break;
+ case 37: {
+ return ScilabLexerConstants.LATEXINSTRING;
+ }
+ case 70:
+ break;
+ case 25: {
+ yypushback(yylength());
+ yybegin(YYINITIAL);
+ }
+ case 71:
+ break;
+ case 9: {
+ transposable = false;
+ yybegin(FIELD);
+ return ScilabLexerConstants.OPERATOR;
+ }
+ case 72:
+ break;
+ case 33: {
+ transposable = false;
+ return ScilabLexerConstants.OSKEYWORD;
+ }
+ case 73:
+ break;
+ case 45: {
+ return ScilabLexerConstants.MAIL;
+ }
+ case 74:
+ break;
+ case 13: {
+ transposable = true;
+ return ScilabLexerConstants.NUMBER;
+ }
+ case 75:
+ break;
+ case 40: {
+ return ScilabLexerConstants.AUTHORS;
+ }
+ case 76:
+ break;
+ case 16: {
+ return ScilabLexerConstants.WHITE_STRING;
+ }
+ case 77:
+ break;
+ case 22: {
+ yypushback(1);
+ yybegin(YYINITIAL);
+ }
+ case 78:
+ break;
+ case 8: {
+ transposable = true;
+ String str = yytext();
+ if (commands.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.COMMANDS;
+ } else if (macros.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.MACROS;
+ } else if (infile.contains(str)) {
+ yybegin(COMMANDS);
+ return ScilabLexerConstants.MACROINFILE;
+ } else {
+ List<String>[] arr = doc.getInOutArgs(start + yychar);
+ if (arr != null && (arr[0].contains(str) || arr[1].contains(str))) {
+ return ScilabLexerConstants.INPUTOUTPUTARGS;
+ } else if (variables.contains(str)) {
+ return ScilabLexerConstants.VARIABLES;
+ }
+ }
+ return ScilabLexerConstants.ID;
+ }
+ case 79:
+ break;
+ case 6: {
+ if (transposable) {
+ return ScilabLexerConstants.TRANSP;
+ } else {
+ beginString = zzStartRead;
+ yybegin(QSTRING);
+ return ScilabLexerConstants.STRING;
+ }
+ }
+ case 80:
+ break;
+ case 18: {
+ return ScilabLexerConstants.COMMENT;
+ }
+ case 81:
+ break;
+ case 30: {
+ transposable = false;
+ yypushback(2);
+ yybegin(COMMENT);
+ }
+ case 82:
+ break;
+ case 19: {
+ yybegin(YYINITIAL);
+ return ScilabLexerConstants.DEFAULT;
+ }
+ case 83:
+ break;
+ case 27: {
+ yybegin(COMMANDSWHITE);
+ return ScilabLexerConstants.TAB;
+ }
+ case 84:
+ break;
+ case 4: {
+ transposable = true;
+ return ScilabLexerConstants.OPENCLOSE;
+ }
+ case 85:
+ break;
+ case 15: {
+ transposable = false;
+ yybegin(YYINITIAL);
+ return ScilabLexerConstants.STRING;
+ }
+ case 86:
+ break;
+ case 10: {
+ transposable = false;
+ return ScilabLexerConstants.WHITE;
+ }
+ case 87:
+ break;
+ case 5: {
+ transposable = false;
+ return ScilabLexerConstants.OPERATOR;
+ }
+ case 88:
+ break;
+ case 29: {
+ return ScilabLexerConstants.TAB;
+ }
+ case 89:
+ break;
+ case 24: {
+ }
+ case 90:
+ break;
+ default:
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ {
+ return ScilabLexerConstants.EOF;
+ }
+ } else {
+ zzScanError(ZZ_NO_MATCH);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java
new file mode 100755
index 000000000..e37035f10
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java
@@ -0,0 +1,380 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * This class contains constants used in the lexer
+ * @author Calixte DENIZET
+ */
+public class ScilabLexerConstants {
+
+ /**
+ * Number of known tokens
+ */
+ public static final int NUMBEROFTOKENS = 36;
+
+ /**
+ * DEFAULT : tokens which are not recognized
+ */
+ public static final int DEFAULT = 0;
+
+ /**
+ * OPERATOR : tokens like '+', '-', ...
+ */
+ public static final int OPERATOR = 1;
+
+ /**
+ * SKEYWORD : Structure keywords like 'then', 'else' or 'catch' ...
+ */
+ public static final int SKEYWORD = 2;
+
+ /**
+ * OSKEYWORD : Structure keywords like 'if', 'for' or 'while'
+ */
+ public static final int OSKEYWORD = 3;
+
+ /**
+ * CKEYWORD : Control keywords like 'abort', 'break' or 'return'
+ */
+ public static final int CKEYWORD = 4;
+
+ /**
+ * CONSTANTES : Constantes like '%pi' or '%T'
+ */
+ public static final int CONSTANTES = 5;
+
+ /**
+ * ID : Identifiers like 'myvar' or 'myfun'
+ */
+ public static final int ID = 6;
+
+ /**
+ * NUMBER : I don't know ;)
+ */
+ public static final int NUMBER = 7;
+
+ /**
+ * SPECIAL : Special keywords like '$', ':' or '...'
+ */
+ public static final int SPECIAL = 8;
+
+ /**
+ * DOT : the dot in a field context, e.g. 'object.myfield'
+ */
+ public static final int DOT = 9;
+
+ /**
+ * TRANSP : just the transpose operator
+ */
+ public static final int TRANSP = 10;
+
+ /**
+ * OPENCLOSE : an opening char like '(', '[', '{' or ')'
+ */
+ public static final int OPENCLOSE = 11;
+
+ /**
+ * STRING : "bla bla bla" or 'bli bli bli' (or fucking exotic way to write a string)
+ */
+ public static final int STRING = 12;
+
+ /**
+ * COMMENT : Comments like // An interesting commentary
+ */
+ public static final int COMMENT = 13;
+
+ /**
+ * FKEYWORD : For keywords 'function' and 'endfunction'
+ */
+ public static final int FKEYWORD = 14;
+
+ /**
+ * COMMANDS : Built-in functions in Scilab
+ */
+ public static final int COMMANDS = 15;
+
+ /**
+ * MACROS : Macros in Scilab
+ */
+ public static final int MACROS = 16;
+
+ /**
+ * MACROINFILE : Macros in Scilab
+ */
+ public static final int MACROINFILE = 17;
+
+ /**
+ * FIELD : Field of an object, e.g. myobject.myfield
+ */
+ public static final int FIELD = 18;
+
+ /**
+ * AUTHORS : Authors in Scilab
+ */
+ public static final int AUTHORS = 19;
+
+ /**
+ * URL : http://...
+ */
+ public static final int URL = 20;
+
+ /**
+ * MAIL : <pierre.marechal@scilab.org>
+ */
+ public static final int MAIL = 21;
+
+ /**
+ * WHITE : A white char ' '
+ */
+ public static final int WHITE = 22;
+
+ /**
+ * TAB : A tabulation '\t'
+ */
+ public static final int TAB = 23;
+
+ /**
+ * LATEX : $\frac\pi\alpha$
+ */
+ public static final int LATEX = 24;
+
+ /**
+ * LATEXINSTRING : $\frac\pi\alpha$
+ */
+ public static final int LATEXINSTRING = 25;
+
+ /**
+ * VARIABLES : A variable in Scilab
+ */
+ public static final int VARIABLES = 26;
+
+ /**
+ * INPUTOUTPUTARGS : A variable as arg in function declaration
+ */
+ public static final int INPUTOUTPUTARGS = 27;
+
+ /**
+ * WHITE_COMMENT : A white char ' ' in comments
+ */
+ public static final int WHITE_COMMENT = 28;
+
+ /**
+ * TAB_COMMENT : A tabulation '\t' in comments
+ */
+ public static final int TAB_COMMENT = 29;
+
+ /**
+ * WHITE_STRING : A white char ' ' in strings
+ */
+ public static final int WHITE_STRING = 30;
+
+ /**
+ * TAB_STRING : A tabulation '\t' in strings
+ */
+ public static final int TAB_STRING = 31;
+
+ /**
+ * ELSEIF : elseif keyword
+ */
+ public static final int ELSEIF = 32;
+
+ /**
+ * ERROR : a syntax error for example
+ */
+ public static final int ERROR = 33;
+
+ /**
+ * EOF : End Of File
+ */
+ public static final int TODO = 34;
+
+ /**
+ * EOF : End Of File
+ */
+ public static final int EOF = 35;
+
+ /**
+ * TOKENS : A Map which contains the names of keywords (useful in scinotesConfiguration.xml)
+ */
+ public static final Map<String, Integer> TOKENS = new HashMap<String, Integer>(28);
+
+ private static Map<Integer, String> idTokens;
+
+ static {
+ TOKENS.put("Default", DEFAULT);
+ TOKENS.put("Special", SPECIAL);
+ TOKENS.put("Operator", OPERATOR);
+ TOKENS.put("Primitive", COMMANDS);
+ TOKENS.put("Macro", MACROS);
+ TOKENS.put("MacroInFile", MACROINFILE);
+ TOKENS.put("String", STRING);
+ TOKENS.put("ExternalVariable", VARIABLES);
+ TOKENS.put("InputOutputArgs", INPUTOUTPUTARGS);
+ TOKENS.put("Identifier", ID);
+ TOKENS.put("Comment", COMMENT);
+ TOKENS.put("Field", FIELD);
+ TOKENS.put("FunctionKwd", FKEYWORD);
+ TOKENS.put("Url", URL);
+ TOKENS.put("Mail", MAIL);
+ TOKENS.put("Number", NUMBER);
+ TOKENS.put("Control", CKEYWORD);
+ TOKENS.put("Structure", SKEYWORD);
+ TOKENS.put("Constantes", CONSTANTES);
+ TOKENS.put("White", WHITE);
+ TOKENS.put("WhiteInComment", WHITE_COMMENT);
+ TOKENS.put("WhiteInString", WHITE_STRING);
+ TOKENS.put("Tabulation", TAB);
+ TOKENS.put("TabulationInComment", TAB_COMMENT);
+ TOKENS.put("LaTeXInComment", LATEX);
+ TOKENS.put("LaTeXInString", LATEXINSTRING);
+ TOKENS.put("TabulationInString", TAB_STRING);
+ TOKENS.put("OpenClose", OPENCLOSE);
+ TOKENS.put("Todo", TODO);
+ }
+
+ /**
+ * getStringRep
+ * @param id the type of a token
+ * @return the string representation in config file of this token
+ */
+ public final static String getStringRep(int id) {
+ if (idTokens == null) {
+ idTokens = new HashMap<Integer, String>(TOKENS.size());
+ Iterator<String> iterator = TOKENS.keySet().iterator();
+ while (iterator.hasNext()) {
+ String key = iterator.next();
+ idTokens.put(TOKENS.get(key), key);
+ }
+ }
+
+ String rep = idTokens.get(id);
+ if (rep != null) {
+ return rep;
+ }
+ if (id == OSKEYWORD || id == ELSEIF) {
+ return "Structure";
+ }
+ return "Default";
+ }
+
+ /**
+ * Have we a LaTeX string ?
+ * @param type the type of the keyword
+ * @return true if the keyword is a LaTeX string
+ */
+ public static final boolean isLaTeX(final int type) {
+ return type == LATEX || type == LATEXINSTRING;
+ }
+
+ /**
+ * Have we a piece of a Scilab string ?
+ * @param type the type of the keyword
+ * @return true if the keyword is a piece of Scilab string
+ */
+ public static final boolean isString(final int type) {
+ return type == STRING || type == WHITE_STRING || type == TAB_STRING;
+ }
+
+ /**
+ * Have we a LaTeX string ?
+ * @param type the type of the keyword
+ * @return true if the keyword is a LaTeX string
+ */
+ public static final boolean isComment(final int type) {
+ return type == COMMENT || type == AUTHORS || type == URL || type == MAIL || type == LATEX || type == WHITE_COMMENT || type == TAB_COMMENT || type == TODO;
+ }
+
+ /**
+ * Can we have help on the keyword with type ?
+ * @param type the type of the keyword
+ * @return true if the keyword is helpable
+ */
+ public static final boolean isHelpable(final int type) {
+ return type == ID
+ || type == COMMANDS
+ || type == MACROS
+ || type == OPERATOR
+ || type == FKEYWORD
+ || type == CKEYWORD
+ || type == OSKEYWORD
+ || type == SKEYWORD
+ || type == ELSEIF
+ || type == CONSTANTES
+ || type == VARIABLES
+ || type == FIELD;
+ }
+
+ public static final boolean isSearchable(final int type) {
+ return type == ID
+ || type == COMMANDS
+ || type == MACROS
+ || type == MACROINFILE
+ || type == INPUTOUTPUTARGS
+ || type == OPERATOR
+ || type == FKEYWORD
+ || type == CKEYWORD
+ || type == OSKEYWORD
+ || type == SKEYWORD
+ || type == ELSEIF
+ || type == NUMBER
+ || type == CONSTANTES
+ || type == VARIABLES
+ || type == FIELD;
+ }
+
+ /**
+ * Can we open the source file of the keyword with type ?
+ * @param type the type of the keyword
+ * @return true if the keyword is openable
+ */
+ public static final boolean isOpenable(final int type) {
+ return type == MACROS || type == MACROINFILE;
+ }
+
+ /**
+ * To know if a keyword is a part of a matching keywords
+ * @param type the type of the keyword
+ * @return true if the keyword is a part of a matching block
+ */
+ public static final boolean isMatchable(final int type) {
+ return type == OPENCLOSE
+ || type == FKEYWORD
+ || type == OSKEYWORD
+ || type == ELSEIF;
+ }
+
+ /**
+ * To know if a keyword is a clickable
+ * @param type the type of the keyword
+ * @return true if the keyword is clickable
+ */
+ public static final boolean isClickable(final int type) {
+ return type == URL
+ || type == MAIL
+ || type == MACROS
+ || type == MACROINFILE;
+ }
+
+ /**
+ * To know if a keyword is a part of a matching keywords
+ * @param type the type of the keyword
+ * @return true if the keyword is a part of a matching block
+ */
+ public static final boolean isOpenClose(final int type) {
+ return type == OPENCLOSE;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabPlainView.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabPlainView.java
new file mode 100755
index 000000000..fd438ed76
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabPlainView.java
@@ -0,0 +1,469 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.geom.Rectangle2D;
+import java.awt.Toolkit;
+import java.awt.Component;
+import java.util.Map;
+
+import java.io.IOException;
+
+import javax.swing.text.Utilities;
+import javax.swing.text.PlainView;
+import javax.swing.text.Segment;
+import javax.swing.text.Element;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * This important class is mainly used to render a document in using a PlainView (no line-wrapping)
+ * @author Calixte DENIZET
+ */
+public class ScilabPlainView extends PlainView {
+
+ private static final String DESKTOPHINTS = "awt.font.desktophints";
+
+ private ScilabContext context;
+ private ScilabLexer lexer;
+ private ScilabDocument doc;
+ private Segment text = new Segment();
+ private boolean isTabViewable = true;
+ private boolean isWhiteViewable = true;
+ private boolean enable = SciNotesOptions.getSciNotesDisplay().keywordsColorization;
+
+ private int tabType;
+ private String tabCharacter = " ";
+ private int tabLength = 4;
+
+ private int numOfColumns = 80;
+ private Color lineColor = new Color(220, 220, 220);
+
+ private final Rectangle rect = new Rectangle();
+ private Map desktopFontHints;
+ private boolean enableDesktopFontHints = true;
+
+ private int whiteHeight;
+ private int whiteWidth;
+
+ private boolean unselected = true;
+
+ /**
+ * The constructor to set this view for an element with a context (containing infos
+ * such as colors or fonts of the keywords).
+ * @param elem the element to view
+ * @param context used to view the element
+ */
+ ScilabPlainView(Element elem, ScilabContext context) {
+ super(elem);
+ this.context = context;
+ doc = (ScilabDocument) getDocument();
+ if (doc.getBinary()) {
+ disable();
+ }
+ doc.setView(this);
+ lexer = doc.createLexer();
+ setTabRepresentation(ScilabView.TABVERTICAL);
+ }
+
+ /**
+ * A tabulation can be drawn with a mark
+ * @param b true if viewable or not
+ */
+ public void setTabViewable(boolean b) {
+ isTabViewable = b;
+ }
+
+ /**
+ * A white can be drawn with a mark
+ * @param b true if viewable or not
+ */
+ public void setWhiteViewable(boolean b) {
+ isWhiteViewable = b;
+ }
+
+ /**
+ * Disable this view
+ */
+ public void disable() {
+ enable = false;
+ }
+
+ /**
+ * Enable this view
+ */
+ public void enable() {
+ enable = true;
+ }
+
+ /**
+ * Enable this view
+ */
+ public void enable(boolean b) {
+ enable = b;
+ }
+
+ /**
+ * If n > 0, then a line will be drawn to see the maximum of chars recommanded in a line
+ * (80 by default).
+ * @param n the maximum of column recommanded in this view
+ */
+ public void setMaxColumns(int n) {
+ numOfColumns = n;
+ }
+
+ /**
+ * @return the width of a white
+ */
+ public int getWhiteWidth() {
+ return whiteWidth;
+ }
+
+ /**
+ * This method can be used to draw anything you want in the editor (such as
+ * the line of maximum recommanded chars).
+ * @param g the graphics where to draw
+ * @param a the shape bounding the visible area
+ * @overload paint method in WrappedPlainView
+ */
+ public void paint(Graphics g, Shape a) {
+ if (numOfColumns > 0) {
+ g.setColor(lineColor);
+ Component c = getContainer();
+ g.drawLine(numOfColumns * whiteWidth, 0, numOfColumns * whiteWidth, c.getHeight());
+ }
+ super.paint(g, a);
+ }
+
+ /**
+ * A trick to easily determine the y-coordinate of the line n (useful in SciNotesLineNumberPanel)
+ * @param n the line number
+ * @return the y-coordinate of the line
+ */
+ public int getLineAllocation(int n) {
+ rect.setLocation(0, 4); // Why 4 ?? Because it works with 4 !
+ try {
+ return lineToRect(rect, n).y;
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return 0;
+ }
+ }
+
+ /**
+ * Used when the font is changed in the pane
+ */
+ public void reinitialize() {
+ desktopFontHints = null;
+ enableDesktopFontHints = true;
+ }
+
+ /**
+ * Very important method since we draw the text in this method !!
+ * @param g the graphics where to draw
+ * @param sx the x-coordinate where to draw
+ * @param sy the y-coordinate ... (guess the end pf the sentence)
+ * @param p0 the start of the text in the doc
+ * @param p1 the end of the text in the doc
+ * @return the x-coordinate where to draw the next piece of text
+ * @throws BadLocationException if p0 and p1 are bad positions in the text
+ */
+ protected int drawUnselectedText(Graphics g, int sx, int sy, int p0, int p1) throws BadLocationException {
+ if (!enable) {
+ return super.drawUnselectedText(g, sx, sy, p0, p1);
+ }
+
+ if (enableDesktopFontHints && desktopFontHints == null) {
+ /* This hint is used to have antialiased fonts in the view in using
+ the same method (differents way to antialias with LCD screen) as the desktop. */
+ desktopFontHints = (Map) Toolkit.getDefaultToolkit().getDesktopProperty(DESKTOPHINTS);
+ calculateHeight(((Graphics2D) g).getFontRenderContext(), context.tokenFonts[0]);
+ enableDesktopFontHints = desktopFontHints != null;
+ }
+
+ if (enableDesktopFontHints) {
+ ((Graphics2D) g).addRenderingHints(desktopFontHints);
+ }
+
+ /* The lexer returns all tokens between the pos p0 and p1.
+ The value of the returned token determinates the color and the font.
+ The lines can be broken by the Pane so we must look at previous
+ and next chars to know if p0 or p1 is "inside" a token. */
+
+ Element elem = doc.getDefaultRootElement();
+ Element line = elem.getElement(elem.getElementIndex(p0));
+
+ int prevTok = -1;
+ int tok = -1;
+ int mark = p0;
+ int start = p0;
+ int x = sx;
+ int y = sy;
+ boolean isBroken = false;
+
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+
+ if (startL != start) {
+ //we are drawing a broken line
+ try {
+ lexer.setRange(startL, endL);
+ while (startL < start) {
+ tok = lexer.scan();
+ startL = lexer.start + lexer.yychar() + lexer.yylength();
+ }
+ isBroken = true;
+ } catch (IOException e) { }
+ }
+
+ if (!isBroken) {
+ lexer.setRange(start, endL);
+ }
+
+ while (start < p1 && tok != ScilabLexerConstants.EOF) {
+
+ try {
+ if (!isBroken) {
+ tok = lexer.scan();
+ } else {
+ isBroken = false;
+ }
+ } catch (IOException e) { }
+
+ start = lexer.start + lexer.yychar();
+
+ int end = Math.min(p1, start + lexer.yylength());
+
+ if (end != mark) {
+ if (tok != prevTok) {
+ if (unselected) {
+ g.setColor(context.tokenColors[tok]);
+ } else {
+ g.setColor(Color.WHITE);
+ }
+ g.setFont(context.tokenFonts[tok]);
+ prevTok = tok;
+ }
+
+ doc.getText(mark, end - mark, text);
+
+ int w;
+
+ if ((context.tokenAttrib[tok] & 1) != 0) {
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ g.drawLine(x, y + 1, x + w, y + 1);
+ }
+
+ if ((context.tokenAttrib[tok] & 2) != 0) {
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ g.drawLine(x, y - whiteHeight, x + w, y - whiteHeight);
+ }
+
+ switch (tok) {
+ case ScilabLexerConstants.WHITE :
+ case ScilabLexerConstants.WHITE_COMMENT :
+ case ScilabLexerConstants.WHITE_STRING :
+ if (isWhiteViewable) {
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ g.drawLine(x + (w - 1) / 2, y - whiteHeight, x + (w + 1) / 2, y - whiteHeight);
+ }
+ break;
+ case ScilabLexerConstants.TAB :
+ case ScilabLexerConstants.TAB_COMMENT :
+ case ScilabLexerConstants.TAB_STRING :
+ if (isTabViewable) {
+ paintTab(text, x, y, g, mark);
+ }
+ break;
+ case ScilabLexerConstants.ERROR :
+ if (unselected) {
+ g.setColor(Color.RED);
+ } else {
+ g.setColor(Color.WHITE);
+ }
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ for (int i = 0; i < w; i += 4) {
+ g.drawLine(x + i, y + 2, x + i + 1, y + 2);
+ }
+ for (int i = 2; i < w; i += 4) {
+ g.drawLine(x + i, y + 1, x + i + 1, y + 1);
+ }
+ break;
+ default :
+ break;
+ }
+
+ x = Utilities.drawTabbedText(text, x, y, g, this, mark);
+ mark = end;
+ }
+
+ start = end;
+ }
+
+ return x;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void drawLine(int lineIndex, Graphics g, int x, int y) {
+ Element elem = doc.getDefaultRootElement().getElement(lineIndex);
+ int p0 = elem.getStartOffset();
+ int p1 = elem.getEndOffset();
+ ScilabEditorPane pane = (ScilabEditorPane) getContainer();
+ int sel0 = pane.getSelectionStart();
+ int sel1 = pane.getSelectionEnd();
+ int[] selC = pane.isNearColumnSelection(p0);
+
+ try {
+ if (sel0 == sel1) {
+ if (selC == null) {
+ drawUnselectedText(g, x, y, p0, p1);
+ return;
+ }
+ sel0 = selC[0];
+ sel1 = selC[1];
+ if (sel0 == sel1) {
+ drawUnselectedText(g, x, y, p0, p1);
+ return;
+ }
+ }
+
+ if ((p0 >= sel0 && p0 <= sel1) && (p1 >= sel0 && p1 <= sel1)) {
+ drawSelectedText(g, x, y, p0, p1);
+ } else if (sel0 >= p0 && sel0 <= p1) {
+ if (sel1 >= p0 && sel1 <= p1) {
+ x = drawUnselectedText(g, x, y, p0, sel0);
+ x = drawSelectedText(g, x, y, sel0, sel1);
+ drawUnselectedText(g, x, y, sel1, p1);
+ } else {
+ x = drawUnselectedText(g, x, y, p0, sel0);
+ drawSelectedText(g, x, y, sel0, p1);
+ }
+ } else if (sel1 >= p0 && sel1 <= p1) {
+ x = drawSelectedText(g, x, y, p0, sel1);
+ drawUnselectedText(g, x, y, sel1, p1);
+ } else {
+ drawUnselectedText(g, x, y, p0, p1);
+ }
+ } catch (BadLocationException e) { }
+ }
+
+ /**
+ * Draw the selected text.
+ * @param g the graphics where to draw
+ * @param sx the x-coordinate where to draw
+ * @param sy the y-coordinate ... (guess the end pf the sentence)
+ * @param p0 the start of the text in the doc
+ * @param p1 the end of the text in the doc
+ * @return the x-coordinate where to draw the next piece of text
+ * @throws BadLocationException if p0 and p1 are bad positions in the text
+ */
+ protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {
+ unselected = false;
+ int z = drawUnselectedText(g, x, y, p0, p1);
+ unselected = true;
+ return z;
+ }
+
+ /**
+ * Used to give the way to represent a tabulation. By default TABVERTICAL is used.
+ * @param type must be TABVERTICAL or TABDOUBLECHEVRONS or TABHORIZONTAL
+ * If a bad value is given, then nothing will be drawn
+ */
+ public void setTabRepresentation(int type) {
+ this.tabType = type;
+ }
+
+ /**
+ * Used to represent a tabulation with the given character ('|' or '#' or...)
+ * @param rep the char representing a tab
+ */
+ public void setTabRepresentation(char rep) {
+ setTabRepresentation(ScilabView.TABCHARACTER);
+ this.tabCharacter = Character.toString(rep);
+ }
+
+ /**
+ * Used to represent a tabulation
+ * @param tabulation a Tabulation
+ */
+ public void setTabRepresentation(TabManager.Tabulation tabulation) {
+ if (tabulation.type == ScilabView.TABCHARACTER) {
+ setTabRepresentation(tabulation.rep);
+ } else {
+ setTabRepresentation(tabulation.type);
+ }
+ tabLength = tabulation.number;
+ }
+
+ /**
+ * Used to represent the default tabulation got with ConfigSciNotesManager
+ */
+ public void setDefaultTabRepresentation() {
+ setTabRepresentation(new TabManager.Tabulation());
+ }
+
+ /**
+ * Method to paint a tabulation according to the setTabRepresentation.
+ * @param text the segment of text representing a tabulation
+ * @param x the x-coordinate where to draw
+ * @param y the y-coordinate where to draw
+ * @param g the graphics ... (yeah ! once again)
+ * @param start the position in the document
+ */
+ protected void paintTab(Segment text, int x, int y, Graphics g, int start) {
+ FontMetrics fm = g.getFontMetrics();
+ int w = Utilities.getTabbedTextWidth(text, fm, x, this, start);
+ switch (tabType) {
+ case ScilabView.TABVERTICAL :
+ g.drawLine(x, y + 4, x, y + 4 - fm.getHeight());
+ break;
+ case ScilabView.TABDOUBLECHEVRONS :
+ g.drawString("\u00BB", x, y);
+ break;
+ case ScilabView.TABHORIZONTAL :
+ g.drawLine(x, y - whiteHeight, x + w - 1, y - whiteHeight);
+ break;
+ case ScilabView.TABCHARACTER :
+ g.drawString(tabCharacter, x, y);
+ break;
+ default :
+ }
+ }
+
+ /**
+ * Determinates the height of a '+' to have the vertical shift
+ * to draw a line which strokes the text or to draw the mark
+ * let by a white.
+ * @param frc a font context
+ * @param f the font where to take the '+'
+ */
+ private void calculateHeight(FontRenderContext frc, Font f) {
+ TextLayout layout = new TextLayout("+", f, frc);
+ Rectangle2D rectangle = layout.getBounds();
+ whiteHeight = (int) Math.round(-rectangle.getY() / 2);
+ layout = new TextLayout("w", f, frc);
+ rectangle = layout.getBounds();
+ whiteWidth = (int) Math.round(rectangle.getWidth());
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabView.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabView.java
new file mode 100755
index 000000000..04172b9f3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabView.java
@@ -0,0 +1,500 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.geom.Rectangle2D;
+import java.awt.Toolkit;
+import java.util.Map;
+
+import java.io.IOException;
+
+import javax.swing.text.Utilities;
+import javax.swing.text.WrappedPlainView;
+import javax.swing.text.Position;
+import javax.swing.text.Segment;
+import javax.swing.text.Element;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * This important class is mainly used to render a document
+ * @author Calixte DENIZET
+ */
+public class ScilabView extends WrappedPlainView {
+
+ /**
+ * A tabulation can be rendered with a vertical line.
+ */
+ public static final int TABVERTICAL = 0;
+
+ /**
+ * A tabulation can be rendered with a double-chevrons.
+ */
+ public static final int TABDOUBLECHEVRONS = 1;
+
+ /**
+ * A tabulation can be rendered with an horizontal line.
+ */
+ public static final int TABHORIZONTAL = 2;
+
+ /**
+ * A tabulation can be rendered with a character.
+ */
+ public static final int TABCHARACTER = 3;
+
+ /**
+ * A tabulation can be rendered with nothing.
+ */
+ public static final int TABNOTHING = 4;
+
+ private static final String DESKTOPHINTS = "awt.font.desktophints";
+
+ private ScilabContext context;
+ private ScilabLexer lexer;
+ private ScilabDocument doc;
+ private Segment text = new Segment();
+ private boolean isTabViewable = true;
+ private boolean isWhiteViewable = true;
+ private boolean enable = SciNotesOptions.getSciNotesDisplay().keywordsColorization;
+
+ private int tabType;
+ private String tabCharacter = " ";
+ private int tabLength = 4;
+
+ private int numOfColumns = 80;
+ private Color lineColor = new Color(220, 220, 220);
+
+ private final Rectangle rect = new Rectangle();
+ private Map desktopFontHints;
+ private boolean enableDesktopFontHints = true;
+
+ private int whiteHeight;
+ private int whiteWidth;
+
+ private boolean unselected = true;
+
+ /**
+ * The constructor to set this view for an element with a context (containing infos
+ * such as colors or fonts of the keywords).
+ * @param elem the element to view
+ * @param context used to view the element
+ */
+ ScilabView(Element elem, ScilabContext context) {
+ super(elem);
+ this.context = context;
+ doc = (ScilabDocument) getDocument();
+ if (doc.getBinary()) {
+ disable();
+ }
+ doc.setView(this);
+ lexer = doc.createLexer();
+ setTabRepresentation(TABVERTICAL);
+ }
+
+ /**
+ * A tabulation can be drawn with a mark
+ * @param b true if viewable or not
+ */
+ public void setTabViewable(boolean b) {
+ isTabViewable = b;
+ }
+
+ /**
+ * A white can be drawn with a mark
+ * @param b true if viewable or not
+ */
+ public void setWhiteViewable(boolean b) {
+ isWhiteViewable = b;
+ }
+
+ /**
+ * Disable this view
+ */
+ public void disable() {
+ enable = false;
+ }
+
+ /**
+ * Enable this view
+ */
+ public void enable() {
+ enable = true;
+ }
+
+ /**
+ * Enable this view
+ */
+ public void enable(boolean b) {
+ enable = b;
+ }
+
+ /**
+ * If n > 0, then a line will be drawn to see the maximum of chars recommanded in a line
+ * (80 by default).
+ * @param n the maximum of column recommanded in this view
+ */
+ public void setMaxColumns(int n) {
+ numOfColumns = n;
+ }
+
+ /**
+ * @return the width of a white
+ */
+ public int getWhiteWidth() {
+ return whiteWidth;
+ }
+
+ /**
+ * This method can be used to draw anything you want in the editor (such as
+ * the line of maximum recommanded chars).
+ * @param g the graphics where to draw
+ * @param a the shape bounding the visible area
+ * @overload paint method in WrappedPlainView
+ */
+ public void paint(Graphics g, Shape a) {
+ if (numOfColumns > 0) {
+ g.setColor(lineColor);
+ g.drawLine(numOfColumns * whiteWidth, 0, numOfColumns * whiteWidth, getHeight());
+ }
+ super.paint(g, a);
+ }
+
+ /**
+ * A trick to be sure that all the line is covered by an highlight
+ * {@inheritDoc}
+ */
+ public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException {
+ Rectangle r = (Rectangle) super.modelToView(p0, b0, p1, b1, a);
+ r.width = ((Rectangle) a).width;
+ return r;
+ }
+
+ /**
+ * A trick to easily determine the y-coordinate of the line n (useful in SciNotesLineNumberPanel)
+ * @param n the line number
+ * @return the y-coordinate of the line
+ */
+ public int getLineAllocation(int n) {
+ rect.setLocation(0, 4); // Why 4 ?? Because it works with 4 !
+ try {
+ childAllocation(n, rect);
+ } catch (ArrayIndexOutOfBoundsException e) { }
+ return rect.y;
+ }
+
+ /**
+ * Used when the font is changed in the pane
+ */
+ public void reinitialize() {
+ desktopFontHints = null;
+ enableDesktopFontHints = true;
+ }
+
+ /**
+ * Very important method since we draw the text in this method !!
+ * @param g the graphics where to draw
+ * @param sx the x-coordinate where to draw
+ * @param sy the y-coordinate ... (guess the end of the sentence)
+ * @param p0 the start of the text in the doc
+ * @param p1 the end of the text in the doc
+ * @return the x-coordinate where to draw the next piece of text
+ * @throws BadLocationException if p0 and p1 are bad positions in the text
+ */
+ protected int drawUnselectedText(Graphics g, int sx, int sy, int p0, int p1) throws BadLocationException {
+ if (!enable) {
+ return super.drawUnselectedText(g, sx, sy, p0, p1);
+ }
+
+ if (enableDesktopFontHints && desktopFontHints == null) {
+ /* This hint is used to have antialiased fonts in the view in using
+ the same method (differents way to antialias with LCD screen) as the desktop. */
+ desktopFontHints = (Map) Toolkit.getDefaultToolkit().getDesktopProperty(DESKTOPHINTS);
+ calculateHeight(((Graphics2D) g).getFontRenderContext(), context.tokenFonts[0]);
+ enableDesktopFontHints = desktopFontHints != null;
+ }
+
+ if (enableDesktopFontHints) {
+ ((Graphics2D) g).addRenderingHints(desktopFontHints);
+ }
+
+ /* The lexer returns all tokens between the pos p0 and p1.
+ The value of the returned token determinates the color and the font.
+ The lines can be broken by the Pane so we must look at previous
+ and next chars to know if p0 or p1 is "inside" a token. */
+
+ Element elem = doc.getDefaultRootElement();
+ Element line = elem.getElement(elem.getElementIndex(p0));
+
+ FontMetrics metrics = g.getFontMetrics();
+
+ int prevTok = -1;
+ int tok = -1;
+ int mark = p0;
+ int start = p0;
+ int x = sx;
+ int y = sy;
+ boolean isBroken = false;
+
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+
+ if (startL != start) {
+ //we are drawing a broken line
+ try {
+ lexer.setRange(startL, endL);
+ while (startL < start) {
+ tok = lexer.scan();
+ startL = lexer.start + lexer.yychar() + lexer.yylength();
+ }
+ isBroken = true;
+ } catch (IOException e) { }
+ }
+
+ if (!isBroken) {
+ lexer.setRange(start, endL);
+ }
+
+ while (start < p1 && tok != ScilabLexerConstants.EOF) {
+ try {
+ if (!isBroken) {
+ tok = lexer.scan();
+ } else {
+ isBroken = false;
+ }
+ } catch (IOException e) { }
+
+ start = lexer.start + lexer.yychar();
+ int end = Math.min(p1, start + lexer.yylength());
+
+ if (end != mark) {
+ if (tok != prevTok) {
+ if (unselected) {
+ g.setColor(context.tokenColors[tok]);
+ } else {
+ g.setColor(Color.WHITE);
+ }
+ g.setFont(context.tokenFonts[tok]);
+ prevTok = tok;
+ }
+
+ doc.getText(mark, end - mark, text);
+
+ int w;
+
+ if ((context.tokenAttrib[tok] & 1) != 0) {
+ w = Utilities.getTabbedTextWidth(text, metrics, x, this, mark);
+ g.drawLine(x, y + 1, x + w, y + 1);
+ }
+
+ if ((context.tokenAttrib[tok] & 2) != 0) {
+ w = Utilities.getTabbedTextWidth(text, metrics, x, this, mark);
+ g.drawLine(x, y - whiteHeight, x + w, y - whiteHeight);
+ }
+
+ switch (tok) {
+ case ScilabLexerConstants.WHITE :
+ case ScilabLexerConstants.WHITE_COMMENT :
+ case ScilabLexerConstants.WHITE_STRING :
+ if (isWhiteViewable) {
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ g.drawLine(x + (w - 1) / 2, y - whiteHeight, x + (w + 1) / 2, y - whiteHeight);
+ }
+ break;
+ case ScilabLexerConstants.TAB :
+ case ScilabLexerConstants.TAB_COMMENT :
+ case ScilabLexerConstants.TAB_STRING :
+ if (isTabViewable) {
+ paintTab(text, x, y, g, mark);
+ }
+ break;
+ case ScilabLexerConstants.ERROR :
+ if (unselected) {
+ g.setColor(Color.RED);
+ } else {
+ g.setColor(Color.WHITE);
+ }
+ w = Utilities.getTabbedTextWidth(text, g.getFontMetrics(), x, this, mark);
+ for (int i = 0; i < w; i += 4) {
+ g.drawLine(x + i, y + 2, x + i + 1, y + 2);
+ }
+ for (int i = 2; i < w; i += 4) {
+ g.drawLine(x + i, y + 1, x + i + 1, y + 1);
+ }
+ break;
+ default :
+ break;
+ }
+
+ x = Utilities.drawTabbedText(text, x, y, g, this, mark);
+ mark = end;
+ }
+
+ start = end;
+ }
+
+ return x;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void drawLine(int p0, int p1, Graphics g, int x, int y) {
+ ScilabEditorPane pane = (ScilabEditorPane) getContainer();
+ int sel0 = pane.getSelectionStart();
+ int sel1 = pane.getSelectionEnd();
+ int[] selC = pane.isNearColumnSelection(p0);
+ p1 = Math.min(doc.getLength(), p1);
+
+ try {
+ if (sel0 == sel1) {
+ if (selC == null) {
+ drawUnselectedText(g, x, y, p0, p1);
+ return;
+ }
+ sel0 = selC[0];
+ sel1 = selC[1];
+ if (sel0 == sel1) {
+ drawUnselectedText(g, x, y, p0, p1);
+ return;
+ }
+ }
+
+ if ((p0 >= sel0 && p0 <= sel1) && (p1 >= sel0 && p1 <= sel1)) {
+ drawSelectedText(g, x, y, p0, p1);
+ } else if (sel0 >= p0 && sel0 <= p1) {
+ if (sel1 >= p0 && sel1 <= p1) {
+ x = drawUnselectedText(g, x, y, p0, sel0);
+ x = drawSelectedText(g, x, y, sel0, sel1);
+ drawUnselectedText(g, x, y, sel1, p1);
+ } else {
+ x = drawUnselectedText(g, x, y, p0, sel0);
+ drawSelectedText(g, x, y, sel0, p1);
+ }
+ } else if (sel1 >= p0 && sel1 <= p1) {
+ x = drawSelectedText(g, x, y, p0, sel1);
+ drawUnselectedText(g, x, y, sel1, p1);
+ } else {
+ drawUnselectedText(g, x, y, p0, p1);
+ }
+ } catch (BadLocationException e) { }
+ }
+
+ /**
+ * Draw the selected text.
+ * @param g the graphics where to draw
+ * @param sx the x-coordinate where to draw
+ * @param sy the y-coordinate ... (guess the end pf the sentence)
+ * @param p0 the start of the text in the doc
+ * @param p1 the end of the text in the doc
+ * @return the x-coordinate where to draw the next piece of text
+ * @throws BadLocationException if p0 and p1 are bad positions in the text
+ */
+ protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {
+ unselected = false;
+ int z = drawUnselectedText(g, x, y, p0, p1);
+ unselected = true;
+ return z;
+ }
+
+ /**
+ * Used to give the way to represent a tabulation. By default TABVERTICAL is used.
+ * @param type must be TABVERTICAL or TABDOUBLECHEVRONS or TABHORIZONTAL
+ * If a bad value is given, then nothing will be drawn
+ */
+ public void setTabRepresentation(int type) {
+ this.tabType = type;
+ }
+
+ /**
+ * Used to represent a tabulation with the given character ('|' or '#' or...)
+ * @param rep the char representing a tab
+ */
+ public void setTabRepresentation(char rep) {
+ setTabRepresentation(TABCHARACTER);
+ this.tabCharacter = Character.toString(rep);
+ }
+
+ /**
+ * Used to represent a tabulation
+ * @param tabulation a Tabulation
+ */
+ public void setTabRepresentation(TabManager.Tabulation tabulation) {
+ if (tabulation.type == TABCHARACTER) {
+ setTabRepresentation(tabulation.rep);
+ } else {
+ setTabRepresentation(tabulation.type);
+ }
+ tabLength = tabulation.number;
+ }
+
+ /**
+ * Used to represent the default tabulation got with ConfigSciNotesManager
+ */
+ public void setDefaultTabRepresentation() {
+ setTabRepresentation(new TabManager.Tabulation());
+ }
+
+ /**
+ * Method to paint a tabulation according to the setTabRepresentation.
+ * @param text the segment of text representing a tabulation
+ * @param x the x-coordinate where to draw
+ * @param y the y-coordinate where to draw
+ * @param g the graphics ... (yeah ! once again)
+ * @param start the position in the document
+ */
+ protected void paintTab(Segment text, int x, int y, Graphics g, int start) {
+ FontMetrics fm = g.getFontMetrics();
+ int w = Utilities.getTabbedTextWidth(text, fm, x, this, start);
+ switch (tabType) {
+ case TABVERTICAL :
+ g.drawLine(x, y + 4, x, y + 4 - fm.getHeight());
+ break;
+ case TABDOUBLECHEVRONS :
+ g.drawString("\u00BB", x, y);
+ break;
+ case TABHORIZONTAL :
+ g.drawLine(x, y - whiteHeight, x + w - 1, y - whiteHeight);
+ break;
+ case TABCHARACTER :
+ g.drawString(tabCharacter, x, y);
+ break;
+ default :
+ }
+ }
+
+ /**
+ * Determinates the height of a '+' to have the vertical shift
+ * to draw a line which strokes the text or to draw the mark
+ * let by a white.
+ * @param frc a font context
+ * @param f the font where to take the '+'
+ */
+ private void calculateHeight(FontRenderContext frc, Font f) {
+ TextLayout layout = new TextLayout("+", f, frc);
+ Rectangle2D rectangle = layout.getBounds();
+ whiteHeight = (int) Math.round(-rectangle.getY() / 2);
+ layout = new TextLayout("w", f, frc);
+ rectangle = layout.getBounds();
+ whiteWidth = (int) Math.round(rectangle.getWidth());
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/SearchManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/SearchManager.java
new file mode 100755
index 000000000..27df6783e
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/SearchManager.java
@@ -0,0 +1,825 @@
+/* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.SwingWorker;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.commons.xml.ScilabXMLUtilities;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Class SearchManager
+ * @author Sylvestre Koumar
+ * @author Calixte DENIZET
+ */
+public class SearchManager {
+
+ private static final ImageIcon FILEIMAGE = new ImageIcon(FindIconHelper.findIcon("stock_search"));
+ private static final ImageIcon SCILABFILEIMAGE = new ImageIcon(FindIconHelper.findIcon("scilab_search"));
+ private static final ImageIcon FOLDERIMAGE = new ImageIcon(FindIconHelper.findIcon("folder-saved-search"));
+ private static final ImageIcon LINEICON = new ImageIcon(FindIconHelper.findIcon("line-found"));
+
+ /**
+ * FIND AND REPLACE START
+ * @param scilabDocument document
+ * @param word string
+ * @param start int
+ * @param end int
+ * @param caseSensitive boolean
+ * @param wholeWord boolean
+ * @param useRegexp boolean
+ * @return List
+ */
+ public static List<Integer[]> findWord(Document scilabDocument, String word,
+ int start, int end,
+ boolean caseSensitive, boolean wholeWord, boolean useRegexp) {
+ String fullText = "";
+ try {
+ fullText = scilabDocument.getText(start, end - start + 1);
+ } catch (BadLocationException ex) {
+ ex.printStackTrace();
+ }
+
+ if (fullText.length() == 0) {
+ return null;
+ }
+
+ List<Integer[]> offsetList = new ArrayList<Integer[]>();
+
+ //If we don't give any word to find
+ if (word != null && !word.equals("")) {
+ Pattern pattern = generatePattern(word, caseSensitive, wholeWord, useRegexp);
+ Matcher matcher = pattern.matcher(fullText);
+
+ while (matcher.find()) {
+ if (matcher.start() != matcher.end()) {
+ offsetList.add(new Integer[] {matcher.start() + start, matcher.end() + start});
+ }
+ }
+ }
+
+ return offsetList;
+ }
+
+ /**
+ * FIND AND REPLACE START
+ * @param scilabDocument document
+ * @param word string
+ * @param start int
+ * @param end int
+ * @param caseSensitive boolean
+ * @param wholeWord boolean
+ * @param useRegexp boolean
+ * @return List
+ */
+ public static List<Integer[]> findToken(ScilabDocument scilabDocument, int token, ScilabLexer lexer, Pattern pat) {
+ String fullText = scilabDocument.getText();
+
+ if (fullText.length() == 0) {
+ return null;
+ }
+
+ List<Integer[]> offsetList = new ArrayList<Integer[]>();
+
+ //If we don't give any word to find
+ Matcher matcher = pat.matcher(fullText);
+
+ while (matcher.find()) {
+ int start = matcher.start();
+ int end = matcher.end();
+ if (token == -1 || token == lexer.getKeyword(start, false)) {
+ offsetList.add(new Integer[] {start, end});
+ }
+ }
+
+ return offsetList;
+ }
+
+ /**
+ * Generate the good pattern according to the differents boolean
+ * @param exp the searched expression
+ * @param caseSensitive boolean
+ * @param wholeWord boolean
+ * @param useRegexp boolean
+ * @return the pattern
+ */
+ public static Pattern generatePattern(String exp, boolean caseSensitive, boolean wholeWord, boolean useRegexp) {
+ String word = exp;
+ if (word != null && !word.equals("")) {
+ if (!useRegexp) {
+ word = word.replace("\\E", "\\E\\\\E\\Q");
+ word = "\\Q" + word + "\\E";
+ if (wholeWord && exp.matches("\\b.*\\b")) {
+ word = "\\b" + word + "\\b";
+ }
+ }
+
+ if (!caseSensitive) {
+ word = "(?i)" + word;
+ }
+
+ if (useRegexp) {
+ word = "(?m)" + word;
+ }
+
+ return Pattern.compile(word);
+ } else {
+ return Pattern.compile("");
+ }
+ }
+
+ /**
+ * Search a word (with a pattern) in files selected according to their name.
+ * @param base the base directory
+ * @param recursive, if true then a recursive search is made
+ * @param ignoreCR, if true then the read file is considered as one line and regex pattern can include \n
+ * @param filePattern the pattern to use to select the files. * is equivalent to .* and ? to .?
+ * @param fileCaseSensitive, if true then the file pattern is case sensitive
+ * @param wordPattern the pattern of the word to search
+ * @param wordCaseSensitive, if true then the word pattern is case sensitive
+ * @param wholeWord, if true only whole word will be matched, e.g. in "foobar foo bar", if the pattern is "foo", then only the second "foo" will be matched
+ * @param regexp, if true the word pattern is considered as a regex
+ * @return infos with the matching positions
+ */
+ public static MatchingPositions searchInFiles(final BackgroundSearch bgs, String base, final boolean recursive, final boolean ignoreCR,
+ String filePattern, boolean fileCaseSensitive,
+ String wordPattern, boolean wordCaseSensitive, boolean wholeWord, boolean regexp) {
+ final File dir = new File(base);
+ Pattern word = null;
+ if (wordPattern != null && wordPattern.length() != 0) {
+ word = generatePattern(wordPattern, wordCaseSensitive, wholeWord, regexp);
+ }
+ filePattern = filePattern.replace(".", "\\.").replace("*", ".*").replace("?", ".?");
+ final Pattern file = generatePattern(filePattern, fileCaseSensitive, false, true);
+
+ final boolean[] killed = new boolean[] {false};
+ if (bgs == null) {
+ return searchInFiles(killed, dir, recursive, ignoreCR, file, word);
+ } else {
+ final Pattern fword = word;
+ SwingWorker worker = new SwingWorker<Object, Object>() {
+ @Override
+ public Object doInBackground() {
+ long begin = System.currentTimeMillis();
+ bgs.setResults(searchInFiles(killed, dir, recursive, ignoreCR, file, fword));
+ long end = System.currentTimeMillis();
+ bgs.setElapsedTime(end - begin);
+ return null;
+ }
+
+ @Override
+ public void done() {
+ bgs.done();
+ }
+ };
+ bgs.setKilled(killed);
+ bgs.setSwingWorker(worker);
+ worker.execute();
+ return null;
+ }
+ }
+
+ /**
+ * Search a word (with a pattern) in files selected according to their name.
+ * @param base the base directory
+ * @param recursive, if true then a recursive search is made
+ * @param ignoreCR, if true then the read file is considered as one line and regex pattern can include \n
+ * @param filePattern the pattern to use to select the files. * is equivalent to .* and ? to .?
+ * @param word the pattern of the word to search
+ * @param killed a boolean array with more than one element. It is used as a reference on a boolean set to true if the process is killed.
+ * @return infos with the matching positions
+ */
+ public static MatchingPositions searchInFiles(boolean[] killed, File base, boolean recursive, boolean ignoreCR, final Pattern file, final Pattern word) {
+ MatchingPositions pos = null;
+ if (base.exists() && base.isDirectory() && base.canRead() && !killed[0]) {
+ List<MatchingPositions> list = new ArrayList<MatchingPositions>();
+ pos = new MatchingPositions(base.getAbsolutePath(), list);
+ int occurences = 0;
+ File[] files = base.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ File f = new File(dir, name);
+ return f.isFile() && f.canRead() && file.matcher(name).matches();
+ }
+ });
+ Arrays.sort(files);
+
+ if (word != null) {
+ for (int i = 0; i < files.length && !killed[0]; i++) {
+ MatchingPositions wpos;
+ if (!ignoreCR) {
+ wpos = searchWordInFile(files[i], word);
+ } else {
+ wpos = searchWordInFileIgnoringCR(files[i], word);
+ }
+ if (wpos != null && wpos.getOccurences() != 0) {
+ list.add(wpos);
+ occurences += wpos.getOccurences();
+ }
+ }
+ } else {
+ for (int i = 0; i < files.length && !killed[0]; i++) {
+ list.add(new MatchingPositions(files[i].getAbsolutePath()));
+ }
+ occurences += files.length;
+ }
+
+ if (recursive) {
+ files = base.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ File d = new File(dir, name);
+ return d.isDirectory() && d.canRead();
+ }
+ });
+ Arrays.sort(files);
+
+ for (int i = 0; i < files.length && !killed[0]; i++) {
+ MatchingPositions rpos = searchInFiles(killed, files[i], true, ignoreCR, file, word);
+ if (rpos != null) {
+ list.add(rpos);
+ occurences += rpos.getOccurences();
+ }
+ }
+ }
+
+ pos.setOccurences(occurences);
+
+ if (list.isEmpty()) {
+ return null;
+ }
+ }
+
+ return pos;
+ }
+
+ /**
+ * Search a word (with a pattern) in a file. The search is made line by line.
+ * @param file the file where to search
+ * @param pat the pattern of the word to search
+ * @return infos with the matching positions
+ */
+ public static MatchingPositions searchWordInFile(File f, Pattern pat) {
+ if (f.exists() && f.canRead()) {
+ MatchingPositions pos = new MatchingPositions(f.getAbsolutePath());
+ String charset;
+ try {
+ charset = ScilabEditorKit.tryToGuessEncoding(f).name();
+ } catch (Exception e) {
+ charset = Charset.defaultCharset().name();
+ }
+
+ try {
+ Scanner scanner = new Scanner(f, charset);
+ int occ = 0;
+ int line = 0;
+ while (scanner.hasNextLine()) {
+ line++;
+ String str = scanner.nextLine();
+ Matcher matcher = pat.matcher(str);
+ int socc = occ;
+ while (matcher.find()) {
+ occ++;
+ }
+ if (occ != socc) {
+ pos.addLine(line, str, pat);
+ }
+ }
+ scanner.close();
+
+ pos.setOccurences(occ);
+ return pos;
+ } catch (Exception e) { }
+ }
+
+ return null;
+ }
+
+ /**
+ * Search a word (with a pattern) in a file. The file content is considered as one line (useful to search "...\n...")
+ * @param file the file where to search
+ * @param pat the pattern of the word to search
+ * @return infos with the matching positions
+ */
+ public static MatchingPositions searchWordInFileIgnoringCR(File f, Pattern pat) {
+ if (f.exists() && f.canRead()) {
+ MatchingPositions pos = new MatchingPositions(f.getAbsolutePath());
+ String charset;
+ try {
+ charset = ScilabEditorKit.tryToGuessEncoding(f).name();
+ } catch (Exception e) {
+ charset = Charset.defaultCharset().name();
+ }
+
+ try {
+ Scanner scanner = new Scanner(f, charset);
+ int occ = 0;
+ while (scanner.findWithinHorizon(pat, 0) != null) {
+ occ++;
+ }
+ pos.setOccurences(occ);
+ scanner.close();
+
+ return pos;
+ } catch (Exception e) { }
+ }
+
+ return null;
+ }
+
+ /**
+ * Count the file having a name corresponding to a pattern
+ * @param base the base directory
+ * @param pat the file name pattern
+ * @return the number of files
+ */
+ public static int countFiles(File base, Pattern pat) {
+ if (!base.isDirectory() || !base.canRead()) {
+ return -1;
+ }
+
+ int[] count = new int[] {0};
+ countFiles(base, pat, count);
+
+ return count[0];
+ }
+
+ /**
+ * Count files in a recursive way
+ */
+ private static void countFiles(File base, final Pattern pat, final int[] count) {
+ File[] files = base.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ File f = new File(dir, name);
+ if (f.isFile() && f.canRead() && pat.matcher(name).matches()) {
+ count[0]++;
+ } else if (f.isDirectory() && f.canRead()) {
+ countFiles(f, pat, count);
+ }
+ return false;
+ }
+ });
+ }
+
+ /**
+ * @param file the file to test
+ * @return true if it is a binary file
+ */
+ public static boolean isBinaryFile(File f) {
+ try {
+ BufferedReader reader = new BufferedReader(new FileReader(f));
+ char[] buffer = new char[8192];
+ int len = reader.read(buffer, 0, 8192);
+ reader.close();
+ int i = 0;
+ if (len != -1) {
+ for (; i < len && buffer[i] != '\0'; i++) {
+ ;
+ }
+ }
+
+ return len != -1 && i != len;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ private static void indent(BufferedWriter buffer, int level) throws IOException {
+ for (int i = 0; i < level; i++) {
+ buffer.append(" ");
+ }
+ }
+
+ /**
+ * MatchingPositions: inner class to store the results of a search in a file or in a directory
+ */
+ public static class MatchingPositions implements Iconable {
+
+ private final String file;
+ private boolean isRoot;
+ private Icon icon;
+ private int occurences;
+ private List<MatchingPositions> children;
+ private final List<Line> lines = new ArrayList<Line>();
+
+ /**
+ * Constructor
+ * @param file the file where to search is made
+ * @param children the list of the file in the directory
+ */
+ public MatchingPositions(String file, List<MatchingPositions> children) {
+ this.file = file;
+ this.children = children;
+ setIcon();
+ }
+
+ /**
+ * Constructor
+ * @param file the file where to search is made
+ */
+ public MatchingPositions(String file) {
+ this(file, null);
+ }
+
+ /**
+ * @param root the xml Element representing a MatchingPositions
+ */
+ public MatchingPositions(Element root) {
+ this.file = root.getAttribute("file");
+ this.isRoot = Boolean.parseBoolean(root.getAttribute("isRoot"));
+ this.occurences = Integer.parseInt(root.getAttribute("occurences"));
+ if (root.hasChildNodes()) {
+ NodeList nodeList = root.getChildNodes();
+ Element e = (Element) nodeList.item(1);
+ if (e.getTagName().equals("Position")) {
+ this.children = new ArrayList<MatchingPositions>();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ if (nodeList.item(i) instanceof Element) {
+ e = (Element) nodeList.item(i);
+ this.children.add(new MatchingPositions(e));
+ }
+ }
+ } else {
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ if (nodeList.item(i) instanceof Element) {
+ e = (Element) nodeList.item(i);
+ this.lines.add(new Line(e));
+ }
+ }
+ }
+ }
+ setIcon();
+ }
+
+ private void setIcon() {
+ if (children != null) {
+ this.icon = FOLDERIMAGE;
+ } else if (file.endsWith(".sce") || file.endsWith(".sci")) {
+ this.icon = SCILABFILEIMAGE;
+ } else {
+ this.icon = FILEIMAGE;
+ }
+ }
+
+ /**
+ * Set this as the root directory
+ */
+ public void setRoot() {
+ isRoot = true;
+ }
+
+ /**
+ * Set the number of matches in the file or in the directory
+ * @param occ the number of matches
+ */
+ public void setOccurences(int occ) {
+ occurences = occ;
+ }
+
+ /**
+ * @return the number of matches
+ */
+ public int getOccurences() {
+ return occurences;
+ }
+
+ /**
+ * Add a line where the searched word has been found
+ * @param number the line number
+ * @param line the line content
+ * @param pat the pattern used
+ */
+ public void addLine(int number, String line, Pattern pat) {
+ this.lines.add(new Line(number, line, pat));
+ }
+
+ /**
+ * @return the file name
+ */
+ public String getFileName() {
+ return file;
+ }
+
+ /**
+ * @return true if we are in a directory
+ */
+ public boolean isDirectory() {
+ return children != null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Icon getIcon() {
+ return icon;
+ }
+
+ /**
+ * @return true if the file have matching lines
+ */
+ public boolean hasLines() {
+ return !lines.isEmpty();
+ }
+
+ /**
+ * @return the file present in this directory
+ */
+ public List<MatchingPositions> getChildren() {
+ return children;
+ }
+
+ /**
+ * Convert this MatchingPositions and its children (if they are) in a DefaultMutableTreeNode
+ * @return the coirresponding DefaultMutableTreeNode
+ */
+ public DefaultMutableTreeNode toDefaultMutableTreeNode() {
+ DefaultMutableTreeNode root = new DefaultMutableTreeNode(this);
+ if (children != null && !children.isEmpty()) {
+ for (int i = 0; i < children.size(); i++) {
+ root.add(children.get(i).toDefaultMutableTreeNode());
+ }
+ } else if (!lines.isEmpty()) {
+ for (Line l : lines) {
+ root.add(new DefaultMutableTreeNode(l));
+ }
+ }
+
+ return root;
+ }
+
+ /**
+ * @param buffer the buffer where to write the XML
+ * @param level the indentation level
+ */
+ public void toXML(BufferedWriter buffer, int level) throws IOException {
+ indent(buffer, level);
+ buffer.append("<Position file=\"" + ScilabXMLUtilities.getXMLString(file) + "\" isRoot=\"" + isRoot + "\" occurences=\"" + occurences + "\"");
+ if (children != null && !children.isEmpty()) {
+ buffer.append(">\n");
+ for (int i = 0; i < children.size(); i++) {
+ children.get(i).toXML(buffer, level + 1);
+ }
+ indent(buffer, level);
+ buffer.append("</Position>\n");
+ } else if (!lines.isEmpty()) {
+ buffer.append(">\n");
+ for (Line l : lines) {
+ l.toXML(buffer, level + 1);
+ }
+ indent(buffer, level);
+ buffer.append("</Position>\n");
+ } else {
+ buffer.append("/>\n");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ String occ = SciNotesMessages.MATCHES;
+ if (occurences <= 1) {
+ occ = SciNotesMessages.MATCH;
+ }
+
+ String filename;
+ if ((!isDirectory() && occurences != 0)) {
+ filename = new File(getFileName()).getName();
+ } else if (isRoot) {
+ filename = getFileName();
+ } else {
+ filename = new File(getFileName()).getName();
+ }
+
+ if (occurences == 0 && !isRoot) {
+ return filename;
+ }
+
+ filename = filename.replace("&", "&amp;").replace("/", "&#47;").replace("\\", "&#92;").replace("<", "&lt;").replace(">", "&gt;");
+ return String.format(occ, filename, occurences);
+ }
+ }
+
+ /**
+ * Line: inner class to store a line number and line content
+ */
+ public static class Line implements Iconable {
+
+ private final int number;
+ private String content;
+
+ /**
+ * Constructor
+ * @param number the line number
+ * @param content the line content
+ * @param pattern the used pattern
+ */
+ public Line(int number, String content, Pattern pattern) {
+ this.number = number;
+ Matcher matcher = pattern.matcher(content);
+ if (content.length() > 128) {
+ content = content.substring(0, 128) + "...";
+ }
+ StringBuffer sb = new StringBuffer();
+ while (matcher.find()) {
+ /*
+ TODO: Find a better way to handle <b> and </b> around the pattern.
+ If HTML entities are put before the loop the pattern should be updated (not a funky task...).
+ Actually, it could have a bad rendering on binary files (which probably contains \0...)
+ */
+ matcher.appendReplacement(sb, "\0");
+ sb.append(matcher.group());
+ sb.append("\0\0");
+ }
+ matcher.appendTail(sb);
+ this.content = sb.toString();
+ this.content = this.content.replace("&", "&amp;").replace("/", "&#47;").replace("\\", "&#92;").replace("<", "&lt;").replace(">", "&gt;").replace("\0\0", "</b>").replace("\0", "<b>");
+ }
+
+ /**
+ * @param root the xml Element representing a Line
+ */
+ public Line(Element root) {
+ this.number = Integer.parseInt(root.getAttribute("number"));
+ this.content = root.getAttribute("content");
+ }
+
+ /**
+ * @return the line number
+ */
+ public int getNumber() {
+ return number;
+ }
+
+ /**
+ * @return the line content as HTML
+ */
+ public String getContent() {
+ return content;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Icon getIcon() {
+ return LINEICON;
+ }
+
+ /**
+ * @param buffer the buffer where to write the XML
+ * @param level the indentation level
+ */
+ public void toXML(BufferedWriter buffer, int level) throws IOException {
+ indent(buffer, level);
+ buffer.append("<Line content=\"" + ScilabXMLUtilities.getXMLString(content) + "\" number=\"" + number + "\"/>\n");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return "<html><u>line " + number + "</u>&thinsp;: " + content + "</html>";
+ }
+ }
+
+ /**
+ * Inner interface for the JTree representation
+ */
+ public static interface Iconable {
+
+ /**
+ * @return the icon used in the JTree representation
+ */
+ public Icon getIcon();
+ }
+
+ /**
+ * Inner class to allow a background search
+ */
+ public static abstract class BackgroundSearch {
+
+ private MatchingPositions pos;
+ private SwingWorker worker;
+ private long time;
+ private boolean[] killed;
+
+ /**
+ * Default Constructor
+ */
+ public BackgroundSearch() { }
+
+ /**
+ * Stop this search
+ */
+ public void stop() {
+ if (worker != null && !isDone()) {
+ worker.cancel(true);
+ worker = null;
+ if (killed != null && killed.length >= 1) {
+ killed[0] = true;
+ }
+ }
+ }
+
+ /**
+ * Called when the work is done
+ */
+ public abstract void done();
+
+ /**
+ * @return true if the search is finished
+ */
+ public boolean isDone() {
+ if (worker != null) {
+ return worker.isDone();
+ }
+ return true;
+ }
+
+ /**
+ * Get the results
+ * @return the results
+ */
+ public MatchingPositions getResults() {
+ if (isDone()) {
+ worker = null;
+ return pos;
+ }
+ return null;
+ }
+
+ /**
+ * Set the elapsed time for this search
+ */
+ public void setElapsedTime(long t) {
+ this.time = t;
+ }
+
+ /**
+ * @return the elapsed time of this search
+ */
+ public long getElapsedTime() {
+ return time;
+ }
+
+ /**
+ * Set the SwingWorker we work with
+ * @param worker the SwingWorker
+ */
+ private void setSwingWorker(SwingWorker worker) {
+ this.worker = worker;
+ }
+
+ /**
+ * @param killed a reference on a boolean to inform the main loop that the process has been killed
+ */
+ private void setKilled(boolean[] killed) {
+ this.killed = killed;
+ }
+
+ /**
+ * @param pos the results to set
+ */
+ private void setResults(MatchingPositions pos) {
+ this.pos = pos;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/TabManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/TabManager.java
new file mode 100755
index 000000000..b804189b6
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/TabManager.java
@@ -0,0 +1,304 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+/**
+ * This class handles the tabulation
+ * @author Calixte DENIZET
+ */
+public class TabManager {
+
+ private static final String EOL = "\n";
+
+ private String tab;
+ private int lengthTab;
+ private ScilabDocument doc;
+ private Element elem;
+ private IndentManager indent;
+ private boolean isTabInsertable = true;
+
+ /**
+ * We can link this TabManager with an IndentManager just to say that the size of a tabulation changed
+ * @param doc the document
+ * @param indent an IndentManager
+ */
+ public TabManager(ScilabDocument doc, IndentManager indent) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ this.indent = indent;
+ setTabulation(' ', 3);
+ }
+
+ /**
+ * Set the type and the size of a tabulation
+ * @param tab is a char : ' ' or '\t'
+ * @param n is the length of a tab
+ */
+ public void setTabulation(char tab, int n) {
+ if (tab == ' ') {
+ this.tab = " ";
+ lengthTab = n;
+ } else {
+ this.tab = "\t";
+ lengthTab = 1;
+ }
+ doc.putProperty("tabSize", new Integer(Math.max(n, 1)));
+ if (indent != null) {
+ indent.setProperties(tab, SciNotesOptions.getSciNotesDisplay().indentSize);
+ }
+ }
+
+ public String getTabulationString(int position) {
+ if (tab.equals(" ")) {
+ Element startL = elem.getElement(elem.getElementIndex(position));
+ int sstart = position - startL.getStartOffset();
+ int len = lengthTab - (sstart % lengthTab);
+ if (len == 0) {
+ len = lengthTab;
+ }
+ char[] str = new char[len];
+ for (int i = 0; i < len; i++) {
+ str[i] = ' ';
+ }
+
+ return new String(str);
+ } else {
+ return tab;
+ }
+ }
+
+ public String getBasicTabulationString() {
+ if (tab.equals(" ")) {
+ char[] str = new char[lengthTab];
+ for (int i = 0; i < lengthTab; i++) {
+ str[i] = ' ';
+ }
+
+ return new String(str);
+ } else {
+ return tab;
+ }
+ }
+
+ /**
+ * Set the type and the size of a tabulation
+ * @param tabulation a Tabulation
+ */
+ public void setTabulation(Tabulation tabulation) {
+ setTabulation(tabulation.tab, tabulation.number);
+ }
+
+ /**
+ * Set the type and the size of a tabulation
+ */
+ public void setDefaultTabulation() {
+ setTabulation(new Tabulation());
+ }
+
+ /**
+ * Insert a tab inside a line (true) or tabify a line (false)
+ * @param b the boolean
+ */
+ public void setTabInsertable(boolean b) {
+ isTabInsertable = b;
+ }
+
+ /**
+ * @return a String which represents a tab
+ */
+ public String getTabulation() {
+ return tab;
+ }
+
+ /**
+ * Insert a tab just after the caret position (depends on setTabInsertable)
+ * @param position the position in the doc
+ * @return the length of a tab
+ */
+ public int insertTab(int position) {
+ try {
+ if (isTabInsertable) {
+ String tab = getTabulationString(position);
+ doc.insertString(position, tab, null);
+
+ return tab.length();
+ } else {
+ tabifyLines(position, position - 1);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+
+ return lengthTab;
+ }
+
+ /**
+ * Tabify several lines.
+ * @param start the starting position in the doc
+ * @param end the ending position in the doc
+ * @return the new positions of the selected text
+ */
+ public int[] tabifyLines(int start, int end) {
+ Element startL = elem.getElement(elem.getElementIndex(start));
+ int sstart = startL.getStartOffset();
+ int[] ret = new int[] {0, 0};
+ int send = end;
+
+ try {
+ String str = doc.getText(sstart, send - sstart + 1);
+ if (str.charAt(str.length() - 1) == EOL.charAt(0)) {
+ send--;
+ str = str.substring(0, str.length() - 1);
+ ret[1]++;
+ }
+ String tab = getTabulationString(start);
+ String plainTab = getTabulationString(0);
+ String rep = EOL + plainTab;
+ str = tab + str.replaceAll(EOL, rep);
+ ret[0] = start + tab.length();
+ ret[1] += sstart + str.length();
+ doc.replace(sstart, send - sstart + 1, str, null);
+ return ret;
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Suppress a tabulation just before the position or untabify line (depends on setTabInsertable)
+ * @param position of the caret
+ * @return the length of a tab
+ */
+ public int removeTab(int position) {
+ try {
+ if (isTabInsertable) {
+ int pos = Math.max(0, position - lengthTab);
+ if (tab.equals(doc.getText(pos, lengthTab))) {
+ doc.remove(pos, lengthTab);
+ } else {
+ return 0;
+ }
+ } else {
+ untabifyLine(position);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+
+ return lengthTab;
+ }
+
+ /**
+ * Delete a tab at the beginning of a line where the caret is if possible.
+ * @param position the position in the doc
+ */
+ public void untabifyLine(int position) {
+ IndentScanner iscan = indent.getIndentScanner();
+ int line = elem.getElementIndex(position);
+ int n = iscan.getTabsAtBeginning(line);
+
+ try {
+ if (n >= lengthTab) {
+ doc.remove(elem.getElement(line).getStartOffset(), lengthTab);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Remove one tabulation step from every line starting with tabulation between start and end
+ * @param start the starting position in the doc
+ * @param end the ending position in the doc
+ * @return the new positions of the selected text
+ */
+ public int[] untabifyLines(int start, int end) {
+ int sstart = elem.getElement(elem.getElementIndex(start)).getStartOffset();
+ int[] ret = new int[2];
+ ret[0] = start;
+
+ try {
+ String str = doc.getText(sstart, end - sstart + 1);
+ String untab = EOL + getBasicTabulationString();
+ str = str.replaceAll(untab, EOL);
+ IndentScanner iscan = indent.getIndentScanner();
+ int n = iscan.getTabsAtBeginning(elem.getElementIndex(sstart));
+ if (n >= lengthTab) {
+ str = str.substring(lengthTab);
+ if (start - sstart + 1 >= lengthTab) {
+ ret[0] = start - lengthTab;
+ }
+ }
+ ret[1] = sstart + str.length();
+
+ doc.replace(sstart, end - sstart + 1, str, null);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ return ret;
+ }
+
+ /**
+ * Inner class to represent a tabulation
+ */
+ public static class Tabulation {
+
+ /**
+ * Should be '\t' or ' '
+ */
+ public char tab;
+
+ /**
+ * The number of whites equivalent at this tabulation
+ */
+ public int number;
+
+ /**
+ * Should be one of the constants of ScilabView
+ */
+ public int type;
+
+ /**
+ * If type is ScilabView.TABCHARACTER, then rep is the char representing a tabulation
+ * in the view
+ */
+ public char rep;
+
+ /**
+ * Constructor
+ * @param tab '\t' or ' '
+ * @param number the number of whites
+ * @param type see the constants in ScilabView
+ * @param rep the char to represent a tabulation in a view
+ */
+ public Tabulation(char tab, int number, int type, char rep) {
+ this.tab = tab;
+ this.number = number;
+ this.type = type;
+ this.rep = rep;
+ }
+
+ public Tabulation() {
+ this.tab = SciNotesOptions.getSciNotesDisplay().useSpaces ? ' ' : '\t';
+ this.number = SciNotesOptions.getSciNotesDisplay().tabSize;
+ this.type = SciNotesOptions.getSciNotesDisplay().tabRepresentation;
+ this.rep = ' ';
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/TrailingWhiteManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/TrailingWhiteManager.java
new file mode 100755
index 000000000..2bda42b99
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/TrailingWhiteManager.java
@@ -0,0 +1,91 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+/**
+ * This class handles the tabulation
+ * @author Calixte DENIZET
+ */
+public class TrailingWhiteManager {
+
+ private static final String REGEXP_WHITES_AT_END = "[ \t]+$";
+ private static final String REGEXP_WHITES_AT_EOL = "[ \t]+\n";
+
+ private ScilabDocument doc;
+ private Element elem;
+
+ /**
+ * The constructor
+ * @param doc the document
+ */
+ public TrailingWhiteManager(ScilabDocument doc) {
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
+ }
+
+ /**
+ * Remove the trailing blanks at the end of the line containing position
+ * @param position the position in the doc
+ */
+ public int removeTrailingWhite(int position) {
+ int nline = elem.getElementIndex(position);
+ Element line = elem.getElement(nline);
+ int start = line.getStartOffset();
+ int end = line.getEndOffset() - 1;
+
+ try {
+ String str = doc.getText(start, end - start);
+ str = str.replaceFirst(REGEXP_WHITES_AT_END, "");
+ doc.replace(start, end - start, str, null);
+ return Math.min(position, start + str.length());
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ return position;
+ }
+
+ /**
+ * Remove the blanks at the end of each lines
+ * @param start the starting position in the doc
+ * @param end the ending position in the doc
+ * @return the new positions of the selected text
+ */
+ public int[] removeTrailingWhite(int start, int end) {
+ int nfirst = elem.getElementIndex(start);
+ int nlast = elem.getElementIndex(end);
+ int sstart = elem.getElement(nfirst).getStartOffset();
+ int eend = elem.getElement(nlast).getEndOffset() - 1;
+ int[] ret = new int[2];
+ ret[0] = start;
+
+ try {
+ String str = doc.getText(sstart, eend - sstart);
+ str = str.replaceAll(REGEXP_WHITES_AT_EOL, "\n");
+ int len = str.length();
+ str = str.replaceFirst(REGEXP_WHITES_AT_END, "");
+ len = len - str.length();
+
+ ret[1] = sstart + str.length() - (eend - end - len - 1);
+
+ doc.replace(sstart, eend - sstart, str, null);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ return ret;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/AboutAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/AboutAction.java
new file mode 100755
index 000000000..27573376f
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/AboutAction.java
@@ -0,0 +1,58 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.utils.ScilabAboutBox;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Display about box for the text editor
+ * @author Bruno JOFRET
+ * @author Vincent COUVERT
+ */
+public final class AboutAction extends DefaultAction {
+
+ private static final long serialVersionUID = -8172282717877209957L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated editor
+ */
+ public AboutAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Menu created for "Help menu"
+ * @param label label of the menu
+ * @param editor associated editor
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new AboutAction(label, editor), key);
+ }
+
+ /**
+ * Action !!
+ * @see org.scilab.modules.graph.actions.DefaultAction#doAction()
+ */
+ public void doAction() {
+ ScilabAboutBox.displayAndWait();
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.java
new file mode 100755
index 000000000..bb05ee26d
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForKeywordsAction.java
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.HelpOnTypingManager;
+
+/**
+ * ActivateHelpOnTypingForKeywordsAction Class
+ * @author Calixte DENIZET
+ *
+ */
+public final class ActivateHelpOnTypingForKeywordsAction extends DefaultCheckAction {
+
+ private static final long serialVersionUID = 3793710651553964430L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ActivateHelpOnTypingForKeywordsAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ HelpOnTypingManager.getInstance().enableKeywords(getState());
+ SciNotes.activateHelpOnTyping();
+ }
+
+ /**
+ * createCheckBoxMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return CheckBoxMenuItem
+ */
+ public static CheckBoxMenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ final CheckBoxMenuItem cb = createCheckBoxMenu(label, null, new ActivateHelpOnTypingForKeywordsAction(label, editor), key);
+ cb.setChecked(HelpOnTypingManager.getInstance().isKeywordsActive());
+ ((JCheckBoxMenuItem) cb.getAsSimpleCheckBoxMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ cb.setChecked(HelpOnTypingManager.getInstance().isKeywordsActive());
+ }
+ });
+
+ return cb;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.java
new file mode 100755
index 000000000..e747cdc00
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ActivateHelpOnTypingForOpenersAction.java
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.HelpOnTypingManager;
+
+/**
+ * ActivateHelpOnTypingForOpenersAction Class
+ * @author Calixte DENIZET
+ *
+ */
+public final class ActivateHelpOnTypingForOpenersAction extends DefaultCheckAction {
+
+ private static final long serialVersionUID = 7522390935632696429L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ActivateHelpOnTypingForOpenersAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ HelpOnTypingManager.getInstance().enableOpeners(getState());
+ SciNotes.activateHelpOnTyping();
+ }
+
+ /**
+ * createCheckBoxMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return CheckBoxMenuItem
+ */
+ public static CheckBoxMenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ final CheckBoxMenuItem cb = createCheckBoxMenu(label, null, new ActivateHelpOnTypingForOpenersAction(label, editor), key);
+ cb.setChecked(HelpOnTypingManager.getInstance().isOpenersActive());
+ ((JCheckBoxMenuItem) cb.getAsSimpleCheckBoxMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ cb.setChecked(HelpOnTypingManager.getInstance().isOpenersActive());
+ }
+ });
+
+ return cb;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.java
new file mode 100755
index 000000000..d2fbd0407
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CCloseTabInNewWindowAction.java
@@ -0,0 +1,54 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Display about box for the text editor
+ * @author Calixte DENIZET
+ */
+public final class CCloseTabInNewWindowAction extends DefaultAction {
+
+ private static final long serialVersionUID = 5238253626333724452L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated editor
+ */
+ public CCloseTabInNewWindowAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CCloseTabInNewWindowAction(label, editor), key);
+ }
+
+ /**
+ * Action
+ */
+ public void doAction() {
+ SciNotes.cloneAndCloseCurrentTab(getEditor(), true);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CapitalizeAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CapitalizeAction.java
new file mode 100755
index 000000000..f266ae660
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CapitalizeAction.java
@@ -0,0 +1,138 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.StringTokenizer;
+
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.CompoundUndoManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * CapitalizeAction Class
+ * @author Calixte DENIZET
+ */
+public final class CapitalizeAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1531881688147993338L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CapitalizeAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ String str;
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+
+ if (start == end) {
+ try {
+ String letter = doc.getText(start, 1);
+ char c = letter.charAt(0);
+ if (Character.isUpperCase(c)) {
+ str = letter.toLowerCase();
+ } else {
+ str = letter.toUpperCase();
+ }
+ doc.mergeEditsBegin();
+ doc.getUndoManager().enableOneShot(true);
+ sep.select(start, start + 1);
+ sep.replaceSelection(str);
+ doc.mergeEditsEnd();
+ doc.getUndoManager().enableOneShot(false);
+ } catch (BadLocationException e) { }
+ } else {
+ str = sep.getSelectedText();
+ boolean nonLetter = true;
+ char[] buf = str.toCharArray();
+ for (int i = 0; i < buf.length; i++) {
+ char c = buf[i];
+ if (Character.isLetter(c)) {
+ if (nonLetter) {
+ if (Character.isLowerCase(c)) {
+ buf[i] = Character.toUpperCase(c);
+ } else {
+ buf[i] = Character.toLowerCase(c);
+ }
+ nonLetter = false;
+ }
+ } else {
+ nonLetter = true;
+ }
+ }
+
+ doc.mergeEditsBegin();
+ sep.replaceSelection(new String(buf));
+ sep.select(start, end);
+ doc.mergeEditsEnd();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer token = new StringTokenizer(label, ";\uff1b");
+ final String label1 = token.nextToken();
+ final String label2 = token.nextToken();
+ return createMenu(label1, label2, editor, key, new CapitalizeAction(label1, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @param hoka the HelpOnKeyword action
+ * @return MenuItem
+ */
+ protected static MenuItem createMenu(final String label1, final String label2, final SciNotes editor, KeyStroke key, final CapitalizeAction hoka) {
+ final MenuItem menuitem = createMenu(label1, null, hoka, key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String select = editor.getTextPane().getSelectedText();
+ if (select == null) {
+ menuitem.setText(label2);
+ } else {
+ menuitem.setText(label1);
+ }
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAction.java
new file mode 100755
index 000000000..07523736b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAction.java
@@ -0,0 +1,66 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * CloseAction Class
+ * @author Bruno JOFRET
+ *
+ */
+public final class CloseAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 3575152401442746355L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CloseAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ SciNotes ed = getEditor();
+ ed.closeTabAt(ed.getTabPane().getSelectedIndex());
+
+ // Close the last opened file create a new file named "Untitled 1"
+ if (ed.getTabPane().getTabCount() == 0) {
+ ed.addEmptyTab();
+ ConfigSciNotesManager.saveToOpenFiles(ed.getTextPane().getName(), ed, ed.getTextPane());
+ }
+ }
+
+ /**
+ * CreateMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CloseAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllAction.java
new file mode 100755
index 000000000..5fbc3e7e8
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllAction.java
@@ -0,0 +1,70 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * CloseAllAction Class
+ * @author Allan CORNET
+ *
+ */
+public final class CloseAllAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 7134703185408271944L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CloseAllAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ SciNotes ed = getEditor();
+ while (ed.getTabPane().getTabCount() != 0) {
+ if (!ed.closeTabAt(ed.getTabPane().getSelectedIndex())) {
+ return;
+ }
+ }
+
+ // Close the last opened file create a new file named "Untitled 1"
+ if (ed.getTabPane().getTabCount() == 0) {
+ ed.addEmptyTab();
+ ConfigSciNotesManager.saveToOpenFiles(ed.getTextPane().getName(), ed, ed.getTextPane());
+ }
+ }
+
+ /**
+ * Create menu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CloseAllAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllButThisAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllButThisAction.java
new file mode 100755
index 000000000..569d60baa
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CloseAllButThisAction.java
@@ -0,0 +1,77 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * CloseAllButThisAction Class
+ * @author Allan CORNET
+ *
+ */
+public final class CloseAllButThisAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -9052217229357472945L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CloseAllButThisAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ SciNotes ed = getEditor();
+ int nbTabCount = ed.getTabPane().getTabCount();
+ boolean bContinue = true;
+ if (nbTabCount > 1) {
+ while ((ed.getTabPane().getTabCount() != 1) & (bContinue)) {
+ int currentIndex = ed.getTabPane().getSelectedIndex();
+ if (currentIndex != 0) {
+ bContinue = ed.closeTabAt(0);
+ } else {
+ bContinue = ed.closeTabAt(1);
+ }
+ }
+ }
+
+ // Close the last opened file create a new file named "Untitled 1"
+ if (ed.getTabPane().getTabCount() == 0) {
+ ed.addEmptyTab();
+ ConfigSciNotesManager.saveToOpenFiles(ed.getTextPane().getName(), ed, ed.getTextPane());
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CloseAllButThisAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CodeNavigatorAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CodeNavigatorAction.java
new file mode 100755
index 000000000..6fb9cc8d7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CodeNavigatorAction.java
@@ -0,0 +1,68 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.tabfactory.CodeNavigatorTab;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+
+/**
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings("serial")
+public final class CodeNavigatorAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CodeNavigatorAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return createMenu
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CodeNavigatorAction(label, editor), key);
+ }
+
+ /**
+ * Action !!
+ */
+ public void doAction() {
+ getEditor().addNavigator();
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new CodeNavigatorAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CommentAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CommentAction.java
new file mode 100755
index 000000000..12f294f4c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CommentAction.java
@@ -0,0 +1,81 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.CommentManager;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * CommentAction Class
+ * @author Bruno JOFRET
+ *
+ */
+public final class CommentAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -7258307088402814986L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CommentAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int pos = sep.getCaretPosition();
+ CommentManager com = sep.getCommentManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+
+ doc.mergeEditsBegin();
+ if (start == end) {
+ com.commentLines(start, start);
+ } else {
+ int[] ret = com.commentLines(start, end);
+ if (ret != null) {
+ if (pos == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CommentAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.java
new file mode 100755
index 000000000..9ab9e9204
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLAction.java
@@ -0,0 +1,215 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.ClipboardOwner;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.awt.im.InputContext;
+import java.io.IOException;
+
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import javax.swing.TransferHandler;
+
+import org.scilab.modules.jvm.LoadClassPath;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.HTMLCodeConverter;
+
+/**
+ * CopyAsHTMLAction Class
+ * @author Calixte Denizet
+ */
+public class CopyAsHTMLAction extends DefaultAction {
+
+ private static final long serialVersionUID = 5363720520521282071L;
+
+ protected boolean printLineNumber;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CopyAsHTMLAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ if (!getEditor().getTextPane().copyColumnSelectionInClipBoard()) {
+ String selection = getEditor().getTextPane().getSelectedText();
+ if (selection != null) {
+ HTMLSelection sel = new HTMLSelection(getEditor().getTextPane(), selection, printLineNumber);
+ Toolkit.getDefaultToolkit().getSystemClipboard().setContents(sel, sel);
+ }
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return createMenu
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CopyAsHTMLAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new CopyAsHTMLAction(tooltip, editor));
+ }
+
+ /**
+ * Inner class to handle HTML selectoin
+ */
+ public static class HTMLSelection implements Transferable, ClipboardOwner {
+
+ private DataFlavor htmlFlavor;
+ private String data;
+ private boolean printLineNumber;
+ private ScilabEditorPane pane;
+ private boolean codeConverterLoaded;
+
+ /**
+ * Default constructor
+ * @param data the data to copy
+ */
+ HTMLSelection(ScilabEditorPane pane, String data, boolean printLineNumber) {
+ this.data = data;
+ this.printLineNumber = printLineNumber;
+ this.pane = pane;
+ try {
+ htmlFlavor = new DataFlavor("text/html;class=java.lang.String");
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getTransferData(DataFlavor flavor) {
+ Object ret = null;
+ if (flavor.equals(htmlFlavor)) {
+ if (!codeConverterLoaded) {
+ LoadClassPath.loadOnUse("copyAsHTMLinScinotes");
+ codeConverterLoaded = true;
+ }
+ ret = new HTMLCodeConverter(pane).convert(data, printLineNumber);
+ } else if (flavor.equals(DataFlavor.stringFlavor)) {
+ ret = data;
+ }
+
+ return ret;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ return new DataFlavor[] {htmlFlavor, DataFlavor.stringFlavor};
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isDataFlavorSupported(DataFlavor flavor) {
+ return flavor.equals(htmlFlavor) || flavor.equals(DataFlavor.stringFlavor);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void lostOwnership(Clipboard clipboard, Transferable contents) { }
+ }
+
+ /**
+ * Inner class to handle the HTML transfers
+ */
+ public static class HTMLTransferHandler extends TransferHandler {
+
+ private static final long serialVersionUID = -5089826958820112637L;
+
+ /**
+ * Default constructor
+ */
+ public HTMLTransferHandler() { }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Transferable createTransferable(JComponent c) {
+ ScilabEditorPane pane = (ScilabEditorPane) c;
+ String selection = pane.getSelectedText();
+ if (selection != null) {
+ return new HTMLSelection(pane, selection, false);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean importData(JComponent c, Transferable t) {
+ if (c instanceof ScilabEditorPane) {
+ DataFlavor[] flavors = t.getTransferDataFlavors();
+ if (flavors != null) {
+ int i = 0;
+ for (; i < flavors.length; i++) {
+ if (flavors[i].equals(DataFlavor.stringFlavor)) {
+ break;
+ }
+ }
+ if (i != flavors.length) {
+ InputContext ic = c.getInputContext();
+ if (ic != null) {
+ ic.endComposition();
+ }
+ try {
+ String data = (String) t.getTransferData(DataFlavor.stringFlavor);
+ ((ScilabEditorPane) c).replaceSelection(data);
+ return true;
+ } catch (UnsupportedFlavorException e) { }
+ catch (IOException ex) { }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getSourceActions(JComponent c) {
+ return COPY_OR_MOVE;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.java
new file mode 100755
index 000000000..9468de737
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopyAsHTMLWithLineNumberAction.java
@@ -0,0 +1,60 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * CopyAsHTMLWithLineNumberAction Class
+ * @author Calixte Denizet
+ */
+public class CopyAsHTMLWithLineNumberAction extends CopyAsHTMLAction {
+
+ private static final long serialVersionUID = -8643739654819519110L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CopyAsHTMLWithLineNumberAction(String name, SciNotes editor) {
+ super(name, editor);
+ printLineNumber = true;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return createMenu
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CopyAsHTMLWithLineNumberAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new CopyAsHTMLWithLineNumberAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.java
new file mode 100755
index 000000000..aac5a66ad
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CopySelectionInNewTabAction.java
@@ -0,0 +1,71 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * CopySelectionInNewTabAction class
+ * @author Calixte DENIZET
+ */
+public final class CopySelectionInNewTabAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 320938663765236236L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CopySelectionInNewTabAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ String selection = getEditor().getTextPane().getSelectedText();
+ SciNotes.scinotesWithText(selection);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor scinotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final MenuItem menuitem = createMenu(label, null, new CopySelectionInNewTabAction(label, editor), key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String selection = editor.getTextPane().getSelectedText();
+ menuitem.setEnabled(selection != null);
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CutAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CutAction.java
new file mode 100755
index 000000000..6be424630
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CutAction.java
@@ -0,0 +1,85 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Toolkit;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * CutAction Class
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public final class CutAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -4831313579986185630L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public CutAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ doc.mergeEditsBegin();
+ if (!getEditor().getTextPane().copyColumnSelectionInClipBoard() || !getEditor().getTextPane().removeColumnSelection()) {
+ String selection = getEditor().getTextPane().getSelectedText();
+ if (selection != null) {
+ CopyAsHTMLAction.HTMLSelection sel = new CopyAsHTMLAction.HTMLSelection(getEditor().getTextPane(), selection, false);
+ Toolkit.getDefaultToolkit().getSystemClipboard().setContents(sel, sel);
+ getEditor().getTextPane().replaceSelection("");
+ }
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new CutAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new CutAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultAction.java
new file mode 100755
index 000000000..e16ad8dee
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultAction.java
@@ -0,0 +1,123 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+import org.scilab.modules.gui.events.callback.CommonCallBack;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menuitem.ScilabMenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * Default action in SciNotes
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public class DefaultAction extends CommonCallBack {
+
+ private static final long serialVersionUID = 3597772070169671017L;
+
+ private final SciNotes editor;
+
+ /**
+ * Constructor
+ * @param editor associated SciNotes instance
+ */
+ private DefaultAction(SciNotes editor) {
+ super(SciNotesMessages.DEFAULT + SciNotesMessages.DOTS);
+ this.editor = editor;
+ }
+
+ /**
+ * Constructor
+ * @param label action name
+ * @param editor associated editor
+ */
+ protected DefaultAction(String label, SciNotes editor) {
+ super(label);
+ this.editor = editor;
+ }
+
+ /**
+ * Get associated editor
+ * @return editor instance
+ */
+ public SciNotes getEditor() {
+ return editor;
+ }
+
+ /**
+ * Create a button for a tool bar
+ * @param title tooltip for the button
+ * @param icon image icon
+ * @param listener action listener
+ * @return the button
+ */
+ protected static JButton createButton(String title, String icon, ActionListener listener) {
+ JButton button = new JButton();
+ button.addActionListener(listener);
+ button.setToolTipText(title);
+ if (icon == null) {
+ button.setText(title);
+ } else {
+ button.setIcon(new ImageIcon(FindIconHelper.findIcon(icon)));
+ }
+ return button;
+ }
+
+ /**
+ * Create a menu for a menu bar
+ * @param title label for the menu
+ * @param icon image icon
+ * @param listener action listener
+ * @param keyStroke menu shortcut
+ * @return the button
+ */
+ protected static MenuItem createMenu(String title, String icon, DefaultAction listener, KeyStroke keyStroke) {
+ MenuItem menu = ScilabMenuItem.createMenuItem();
+ menu.setCallback(listener);
+ menu.setText(title);
+
+ if (keyStroke != null) {
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(keyStroke);
+ }
+
+ return menu;
+ }
+
+ /**
+ * Default action
+ */
+ public void doAction() {
+ JOptionPane.showMessageDialog(getEditor(), "Not Implemented Now !!!", null, JOptionPane.ERROR_MESSAGE);
+ }
+
+ /**
+ * Default action
+ */
+ @Override
+ public void callBack() {
+ doAction();
+ }
+
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultCheckAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultCheckAction.java
new file mode 100755
index 000000000..02fa26e3a
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DefaultCheckAction.java
@@ -0,0 +1,149 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.bridge.checkboxmenuitem.SwingScilabCheckBoxMenuItem;
+import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
+import org.scilab.modules.gui.checkboxmenuitem.SimpleCheckBoxMenuItem;
+import org.scilab.modules.gui.events.callback.CommonCallBack;
+import org.scilab.modules.gui.menu.SimpleMenu;
+import org.scilab.modules.gui.menuitem.SimpleMenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * DefaultCheckAction Class
+ * @author Bruno JOFRET
+ *
+ */
+public class DefaultCheckAction extends SwingScilabCheckBoxMenuItem implements CheckBoxMenuItem, ActionListener {
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 5618123082228356437L;
+ private SciNotes editorBackup;
+
+ /**
+ * Constructor
+ * @param editor SciNotes
+ */
+ @SuppressWarnings("serial")
+ public DefaultCheckAction(SciNotes editor) {
+ super();
+ setText(SciNotesMessages.DEFAULT + SciNotesMessages.DOTS);
+ setState(true);
+ editorBackup = editor;
+
+ setCallback(new CommonCallBack(SciNotesMessages.DEFAULT + SciNotesMessages.DOTS) {
+ public void callBack() {
+ doAction();
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ });
+ }
+
+ /**
+ *
+ * @param label label (string)
+ * @param editor SciNotes
+ */
+ @SuppressWarnings("serial")
+ protected DefaultCheckAction(String label, SciNotes editor) {
+ super();
+ setText(label);
+ setState(true);
+ editorBackup = editor;
+ setCallback(new CommonCallBack(SciNotesMessages.DEFAULT + SciNotesMessages.DOTS) {
+ public void callBack() {
+ doAction();
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ });
+ }
+
+ /**
+ * get Editor
+ * @return SciNotes
+ */
+ public SciNotes getEditor() {
+ return editorBackup;
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ JOptionPane.showMessageDialog(getEditor(), "Not Implemented Now !!! (state = " + getState() + ")", null, JOptionPane.ERROR_MESSAGE);
+ }
+
+ /**
+ * actionPerformed
+ * @param arg0 ActionEvent
+ */
+ public void actionPerformed(ActionEvent arg0) {
+ doAction();
+ }
+
+ /**
+ * createCheckBoxMenu
+ * @param title String
+ * @param icon String
+ * @param defaultCheckAction DefaultCheckAction
+ * @param keyStroke KeyStroke
+ * @return CheckBoxMenuItem
+ */
+ protected static CheckBoxMenuItem createCheckBoxMenu(String title, String icon, DefaultCheckAction defaultCheckAction, KeyStroke keyStroke) {
+ defaultCheckAction.setText(title);
+ defaultCheckAction.setChecked(false);
+ if (keyStroke != null) {
+ ((SwingScilabCheckBoxMenuItem) defaultCheckAction.getAsSimpleCheckBoxMenuItem()).setAccelerator(keyStroke);
+ }
+ return defaultCheckAction;
+ }
+
+ /**
+ * getAsSimpleCheckBoxMenuItem
+ * @return SimpleCheckBoxMenuItem
+ */
+ public SimpleCheckBoxMenuItem getAsSimpleCheckBoxMenuItem() {
+ return this;
+ }
+
+ /**
+ * getAsSimpleMenuItem
+ * @return SimpleMenuItem
+ */
+ public SimpleMenuItem getAsSimpleMenuItem() {
+ return null;
+ }
+
+ /**
+ * getAsSimpleMenu
+ * @return SimpleMenu
+ */
+ public SimpleMenu getAsSimpleMenu() {
+ return null;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DeleteAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DeleteAction.java
new file mode 100755
index 000000000..3c118d9d6
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DeleteAction.java
@@ -0,0 +1,66 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.DefaultEditorKit;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Delete action
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public final class DeleteAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -1818764947112443369L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public DeleteAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ doc.mergeEditsBegin();
+ if (!getEditor().getTextPane().removeColumnSelection()) {
+ getEditor().getTextPane().getActionMap().get(DefaultEditorKit.deleteNextCharAction).actionPerformed(null);
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new DeleteAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.java
new file mode 100755
index 000000000..8e21b589b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/DoubleQuoteStringAction.java
@@ -0,0 +1,124 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.IOException;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.CompoundUndoManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabLexer;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+
+/**
+ * DoubleQuoteStringAction Class
+ * @author Calixte DENIZET
+ */
+public final class DoubleQuoteStringAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public DoubleQuoteStringAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ doc.getUndoManager().enableOneShot(true);
+ doc.mergeEditsBegin();
+ doubleQuoteString(doc);
+ doc.mergeEditsEnd();
+ doc.getUndoManager().enableOneShot(false);
+ }
+
+ /**
+ * Replace the strings simply quoted by double quoted strings
+ * @param doc the documen
+ */
+ public static void doubleQuoteString(ScilabDocument doc) {
+ StringBuffer buffer = new StringBuffer(128);
+ ScilabLexer lexer = doc.createLexer(false);
+ Element elem = doc.getDefaultRootElement();
+ Element line;
+ int lastLine = elem.getElementIndex(doc.getLength());
+ int tok;
+
+ try {
+ for (int i = 0; i <= lastLine; i++) {
+ line = elem.getElement(i);
+ lexer.setRange(line.getStartOffset(), line.getEndOffset());
+ do {
+ tok = lexer.scan();
+ if (ScilabLexerConstants.isString(tok)) {
+ buffer.append(doc.getText(lexer.start + lexer.yychar(), lexer.yylength()));
+ } else if (buffer.length() > 0) {
+ boolean modified = false;
+ int len = buffer.length();
+ if (buffer.charAt(0) == '\'') {
+ buffer.replace(0, 1, "\"");
+ modified = true;
+ }
+ if (len > 1 && buffer.charAt(len - 1) == '\'') {
+ buffer.replace(len - 1, len, "\"");
+ modified = true;
+ }
+ if (modified) {
+ int start = lexer.start + lexer.yychar() - len;
+ doc.replace(start, len, buffer.toString(), null);
+ }
+ buffer.setLength(0);
+ }
+ } while (tok != ScilabLexerConstants.EOF);
+ }
+ } catch (Exception e) {
+ System.err.println(e);
+ }
+ }
+
+ /**
+ * @return an action to replace single quoted strings by double quoted ones in a document
+ */
+ public static SciNotes.ActionOnDocument getActionOnDocument() {
+ return new SciNotes.ActionOnDocument() {
+ public void actionOn(ScilabDocument doc) throws IOException {
+ doubleQuoteString(doc);
+ }
+ };
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new DoubleQuoteStringAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EncodingAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EncodingAction.java
new file mode 100755
index 000000000..980f1b2f6
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EncodingAction.java
@@ -0,0 +1,386 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
+import javax.swing.JMenu;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.EditorKit;
+
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * EncodingAction Class
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ *
+ */
+public class EncodingAction extends DefaultCheckAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -5421313717126859924L;
+
+ private static final String CHECKICON = ScilabConstants.SCI.getPath() + "/modules/gui/images/icons/check-icon.png";
+
+ private static Map<String, String> encodings = new HashMap<String, String>();
+ private static Map<String, List<String>> language = new HashMap<String, List<String>>();
+ private static JRadioButtonMenuItem[] radioTypes;
+ private static Menu[] menuLang;
+
+ static {
+ encodings.put("x-MacArabic", "Arabic");
+ encodings.put("x-MacCentralEurope", "Central European");
+ encodings.put("x-MacCroatian", "Central European");
+ encodings.put("x-MacCyrillic", "Cyrillic");
+ encodings.put("x-MacGreek", "Greek");
+ encodings.put("x-MacHebrew", "Hebrew");
+ encodings.put("x-MacIceland", "Western European");
+ encodings.put("x-MacRoman", "Western European");
+ encodings.put("x-MacRomania", "Central European");
+ encodings.put("x-MacThai", "Thai");
+ encodings.put("x-MacTurkish", "Turkish");
+ encodings.put("x-MacUkraine", "Cyrillic");
+ encodings.put("ASMO-708", "Arabic");
+ encodings.put("cp866", "Cyrillic");
+ encodings.put("windows-874", "Thai");
+ encodings.put("shift_jis", "Japanese");
+ encodings.put("gb2312", "Chinese Simplified");
+ encodings.put("ks_c_5601-1987", "Korean");
+ encodings.put("big5", "Chinese Traditional");
+ encodings.put("utf-16", "Unicode");
+ encodings.put("windows-1250", "Central European");
+ encodings.put("windows-1251", "Cyrillic");
+ encodings.put("windows-1252", "Western European");
+ encodings.put("windows-1253", "Greek");
+ encodings.put("windows-1254", "Turkish");
+ encodings.put("windows-1255", "Hebrew");
+ encodings.put("windows-1256", "Arabic");
+ encodings.put("windows-1257", "Baltic");
+ encodings.put("windows-1258", "Vietnamese");
+ encodings.put("Johab", "Korean");
+ encodings.put("utf-32", "Unicode");
+ encodings.put("utf-32BE", "Unicode");
+ encodings.put("us-ascii", "US-ASCII");
+ encodings.put("koi8-r", "Cyrillic");
+ encodings.put("EUC-JP", "Japanese");
+ encodings.put("koi8-u", "Cyrillic");
+ encodings.put("iso-8859-1", "Western European");
+ encodings.put("iso-8859-2", "Central European");
+ encodings.put("iso-8859-3", "Latin");
+ encodings.put("iso-8859-4", "Baltic");
+ encodings.put("iso-8859-5", "Cyrillic");
+ encodings.put("iso-8859-6", "Arabic");
+ encodings.put("iso-8859-7", "Greek");
+ encodings.put("iso-8859-8", "Hebrew");
+ encodings.put("iso-8859-9", "Turkish");
+ encodings.put("iso-8859-13", "Estonian");
+ encodings.put("iso-8859-15", "Latin");
+ encodings.put("iso-2022-jp", "Japanese");
+ encodings.put("csISO2022JP", "Japanese");
+ encodings.put("iso-2022-kr", "Korean");
+ encodings.put("euc-jp", "Japanese");
+ encodings.put("EUC-CN", "Chinese Simplified");
+ encodings.put("euc-kr", "Korean");
+ encodings.put("GB18030", "Chinese Simplified");
+ encodings.put("utf-8", "Unicode");
+ }
+
+ private String encoding;
+
+ /**
+ * Constructor
+ * @param encodingName Encoding Name
+ * @param editor SciNotes
+ */
+ public EncodingAction(String encodingName, SciNotes editor) {
+ super(encodingName, editor);
+ encoding = encodingName;
+ }
+
+ /**
+ * Clean
+ */
+ public static void close() {
+ radioTypes = null;
+ menuLang = null;
+ }
+
+ /**
+ * createRadioButtonMenuItem
+ * @param editor SciNotes
+ * @return JRadioButtonMenuItem
+ */
+ public JRadioButtonMenuItem createRadioButtonMenuItem(SciNotes editor) {
+ JRadioButtonMenuItem radio = new JRadioButtonMenuItem(encoding);
+ radio.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ doAction();
+ }
+ });
+
+ return radio;
+ }
+
+ /**
+ * createEncodingSubMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return a Menu
+ */
+ public static Menu createMenu(String label, SciNotes editor, KeyStroke key) {
+ Menu encodingTypeMenu = ScilabMenu.createMenu();
+ encodingTypeMenu.setText(label);
+
+ Map<String, List<String>> languages = getEncodings();
+ Iterator<String> iter = languages.keySet().iterator();
+ int size = 0;
+ while (iter.hasNext()) {
+ size += languages.get(iter.next()).size();
+ }
+
+ if (radioTypes == null) {
+ radioTypes = new JRadioButtonMenuItem[size];
+ menuLang = new Menu[languages.size()];
+ }
+
+ ButtonGroup group = new ButtonGroup();
+
+ iter = languages.keySet().iterator();
+ int psize = 0;
+ int k = 0;
+ while (iter.hasNext()) {
+ String lang = iter.next();
+ List<String> encodingList = languages.get(lang);
+ menuLang[k] = ScilabMenu.createMenu();
+ menuLang[k].setText(lang);
+ encodingTypeMenu.add(menuLang[k]);
+ for (int i = 0; i < encodingList.size(); i++) {
+ radioTypes[psize + i] = (new EncodingAction(encodingList.get(i), editor)).createRadioButtonMenuItem(editor);
+ group.add(radioTypes[psize + i]);
+ ((JMenu) menuLang[k].getAsSimpleMenu()).add(radioTypes[psize + i]);
+
+ if (encodingList.get(i).equalsIgnoreCase(Charset.defaultCharset().toString())) {
+ radioTypes[psize + i].setSelected(true);
+ }
+ }
+ psize += encodingList.size();
+ k++;
+ }
+
+ return encodingTypeMenu;
+ }
+
+ public static Set<String> getSupportedEncodings() {
+ return encodings.keySet();
+ }
+
+ /**
+ * Update the selected item in the encoding pull down menu of the document.
+ * @param scilabDocument the document for which the encoding menu should
+ * be updated
+ */
+ public static void updateEncodingMenu(ScilabDocument scilabDocument) {
+ if (radioTypes != null) {
+ for (int i = 0; i < radioTypes.length; i++) {
+ if (scilabDocument.getEncoding().equalsIgnoreCase(radioTypes[i].getText())) {
+ radioTypes[i].setSelected(true);
+ updateIcon(radioTypes[i].getText());
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * getEncodings
+ * @return Map : Language -&gt; {enc1, enc2, ...}
+ */
+ public static Map<String, List<String>> getEncodings() {
+ if (!language.isEmpty()) {
+ return language;
+ }
+
+ Set<String> keys = encodings.keySet();
+ Iterator<String> iterator = keys.iterator();
+ while (iterator.hasNext()) {
+ String enc = iterator.next();
+ try {
+ Charset.forName(enc);
+ String lang = encodings.get(enc);
+ if (!language.containsKey(lang)) {
+ language.put(lang, new ArrayList<String>());
+ }
+
+ language.get(lang).add(enc);
+ } catch (IllegalCharsetNameException e) {
+ encodings.remove(enc);
+ } catch (UnsupportedCharsetException e) {
+ encodings.remove(enc);
+ }
+ }
+
+ language = new TreeMap<String, List<String>>(language);
+ return language;
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ boolean isSuccess = false;
+
+ ScilabDocument styleDocument = ((ScilabDocument) getEditor().getTextPane().getDocument());
+
+ if (styleDocument.isContentModified()) {
+ /* File modified */
+ if (getEditor().getTextPane().getName() != null) {
+ /* Not untitled */
+ switch (ScilabModalDialog.show(getEditor(),
+ SciNotesMessages.MODIFICATIONS_WILL_BE_LOST, SciNotesMessages.CONTINUE,
+ IconType.QUESTION_ICON, ButtonType.YES_NO)) {
+ case YES_OPTION : //Yes, continue
+ break;
+ case NO_OPTION ://No, exit
+ //Back to previous menu checked
+ updateEncodingMenu(styleDocument);
+ return;
+ default:
+ break;
+ }
+ }
+ }
+
+ // Avoid modifications to be saved
+ styleDocument.setUpdater(false);
+ boolean indentMode = styleDocument.getAutoIndent();
+ styleDocument.setAutoIndent(false);
+
+ styleDocument.setEncoding(encoding);
+ //ConfigSciNotesManager.saveDefaultEncoding(encoding);
+
+ //Update the menu
+ updateIcon(encoding);
+
+ // If file associated then reload
+ EditorKit editorKit = getEditor().getEditorKit();
+ String fileName = getEditor().getTextPane().getName();
+
+ FileInputStream fis = null;
+ InputStreamReader isr = null;
+ BufferedReader br = null;
+
+ try {
+ if (fileName != null) {
+ File file = new File(getEditor().getTextPane().getName());
+ if (file.exists()) {
+ if (styleDocument.getLength() > 0) {
+ styleDocument.getUndoManager().discardAllEdits();
+ styleDocument.disableUndoManager();
+ styleDocument.remove(0, styleDocument.getLength());
+
+ fis = new FileInputStream(file);
+ isr = new InputStreamReader(fis, encoding);
+ br = new BufferedReader(isr);
+ editorKit.read(br, styleDocument, 0);
+
+ styleDocument.enableUndoManager();
+ }
+ }
+ }
+ isSuccess = true;
+ } catch (UnsupportedEncodingException e) {
+ isSuccess = false;
+ } catch (FileNotFoundException e) {
+ isSuccess = false;
+ } catch (IOException e) {
+ isSuccess = false;
+ } catch (BadLocationException e) {
+ isSuccess = false;
+ } finally {
+ try {
+ if (fis != null) {
+ fis.close();
+ }
+ if (isr != null) {
+ isr.close();
+ }
+ if (br != null) {
+ br.close();
+ }
+ } catch (IOException e) { }
+ }
+
+ /* Allow changes to be saved */
+ styleDocument.setAutoIndent(indentMode);
+ styleDocument.setUpdater(true);
+
+ styleDocument.setContentModified(false);
+ // changing such a property dicards undo
+ styleDocument.getUndoManager().discardAllEdits();
+ if (!isSuccess) {
+ ScilabModalDialog.show(getEditor(), SciNotesMessages.COULD_NOT_CONVERT_FILE,
+ SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ }
+
+ /**
+ * Add a check-icon near the current used language
+ * @param enc the actual encoding
+ */
+ private static void updateIcon(String enc) {
+ String lang = encodings.get(enc);
+ for (int i = 0; i < menuLang.length; i++) {
+ if (((JMenu) menuLang[i].getAsSimpleMenu()).getIcon() != null) {
+ ((JMenu) menuLang[i].getAsSimpleMenu()).setIcon(null);
+ }
+ if (menuLang[i].getText().equals(lang)) {
+ ((JMenu) menuLang[i].getAsSimpleMenu()).setIcon(new ImageIcon(CHECKICON));
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EndOfLineAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EndOfLineAction.java
new file mode 100755
index 000000000..6fc6c74bf
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EndOfLineAction.java
@@ -0,0 +1,199 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JMenu;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * Class EndOfLineAction
+ * @author Allan CORNET
+ *
+ */
+public class EndOfLineAction extends DefaultCheckAction {
+
+ private static final String EOL_LINUX = "\n";
+ private static final String EOL_MACOS = "\r";
+ private static final String EOL_WINDOWS = "\r\n";
+ private static final String LINE_SEPARATOR = "line.separator";
+
+ private static JRadioButtonMenuItem[] radioEolTypes;
+
+ /**
+ * generated serialVersionUID
+ */
+ private static final long serialVersionUID = 7147038540238271944L;
+
+ /* default */
+ private String eolMenuLabel = SciNotesMessages.EOL_AUT0;
+
+ /**
+ * Constructor
+ * @param eolName String
+ * @param editor SciNotes
+ */
+ public EndOfLineAction(String eolName, SciNotes editor) {
+ super(eolName, editor);
+ eolMenuLabel = eolName;
+ }
+
+ /**
+ * createRadioButtonMenuItem
+ * @param editor SciNotes
+ * @return JRadioButtonMenuItem
+ */
+ public JRadioButtonMenuItem createRadioButtonMenuItem(SciNotes editor) {
+ JRadioButtonMenuItem radio = new JRadioButtonMenuItem(eolMenuLabel);
+ radio.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ doAction();
+ }
+ });
+ return radio;
+ }
+
+ /**
+ * Clean
+ */
+ public static void close() {
+ radioEolTypes = null;
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabDocument styleDocument = ((ScilabDocument) getEditor().getTextPane().getDocument());
+
+ // default
+ String newOel = System.getProperty(LINE_SEPARATOR);
+
+ if (eolMenuLabel.compareToIgnoreCase(SciNotesMessages.EOL_AUT0) == 0) {
+ newOel = System.getProperty(LINE_SEPARATOR);
+ } else if (eolMenuLabel.compareToIgnoreCase(SciNotesMessages.EOL_LINUX) == 0) {
+ newOel = EOL_LINUX;
+ } else if (eolMenuLabel.compareToIgnoreCase(SciNotesMessages.EOL_MACOS) == 0) {
+ newOel = EOL_MACOS;
+ } else if (eolMenuLabel.compareToIgnoreCase(SciNotesMessages.EOL_WINDOWS) == 0) {
+ newOel = EOL_WINDOWS;
+ }
+
+ if (styleDocument.getEOL().compareTo(newOel) != 0) {
+ styleDocument.setEOL(newOel);
+ styleDocument.setContentModified(true);
+ // changing such a property dicards undo
+ styleDocument.getUndoManager().discardAllEdits();
+ getEditor().updateTabTitle();
+ }
+ }
+
+ /**
+ * create End Of Line sub Menu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return a Menu
+ */
+ public static Menu createMenu(String label, SciNotes editor, KeyStroke key) {
+ String eolLinux = ScilabDocument.EOLUNIX;
+ String eolMacOs = ScilabDocument.EOLMAC;
+ String eolWindows = ScilabDocument.EOLWIN;
+ String defaultEolLabel = SciNotesMessages.EOL_LINUX;
+
+ // selected by default O.S
+ String systemEolValue = System.getProperty(LINE_SEPARATOR);
+
+ if (systemEolValue.compareTo(eolLinux) == 0) {
+ defaultEolLabel = SciNotesMessages.EOL_LINUX;
+ }
+
+ if (systemEolValue.compareTo(eolWindows) == 0) {
+ defaultEolLabel = SciNotesMessages.EOL_WINDOWS;
+ }
+
+ if (systemEolValue.compareTo(eolMacOs) == 0) {
+ defaultEolLabel = SciNotesMessages.EOL_MACOS;
+ }
+
+ Menu eolTypeMenu = ScilabMenu.createMenu();
+ eolTypeMenu.setText(label);
+
+ radioEolTypes = new JRadioButtonMenuItem[3];
+ ButtonGroup groupEol = new ButtonGroup();
+
+ radioEolTypes[0] = (new EndOfLineAction(SciNotesMessages.EOL_LINUX, editor)).createRadioButtonMenuItem(editor);
+ groupEol.add(radioEolTypes[0]);
+ ((JMenu) eolTypeMenu.getAsSimpleMenu()).add(radioEolTypes[0]);
+
+ radioEolTypes[1] = (new EndOfLineAction(SciNotesMessages.EOL_WINDOWS, editor)).createRadioButtonMenuItem(editor);
+ groupEol.add(radioEolTypes[1]);
+ ((JMenu) eolTypeMenu.getAsSimpleMenu()).add(radioEolTypes[1]);
+
+ radioEolTypes[2] = (new EndOfLineAction(SciNotesMessages.EOL_MACOS, editor)).createRadioButtonMenuItem(editor);
+ groupEol.add(radioEolTypes[2]);
+ ((JMenu) eolTypeMenu.getAsSimpleMenu()).add(radioEolTypes[2]);
+
+ // selected menu
+ for (int k = 0; k < radioEolTypes.length; k++) {
+ if (radioEolTypes[k].getText().compareTo(defaultEolLabel) == 0) {
+ radioEolTypes[k].setSelected(true);
+ }
+ }
+
+ return eolTypeMenu;
+ }
+
+
+ /**
+ * Update the selected item in the EOL pull down menu of the document.
+ * @param scilabDocument the document for which the End Of Line menu should
+ * be updated
+ */
+ public static void updateEolMenu(ScilabDocument scilabDocument) {
+ String eolLinux = ScilabDocument.EOLUNIX;
+ String eolMacOs = ScilabDocument.EOLMAC;
+ String eolWindows = ScilabDocument.EOLWIN;
+
+ String eolUsedLabel = SciNotesMessages.EOL_LINUX;
+ String eolUsed = scilabDocument.getEOL();
+
+ if (eolUsed.compareTo(eolLinux) == 0) {
+ eolUsedLabel = SciNotesMessages.EOL_LINUX;
+ }
+
+ if (eolUsed.compareTo(eolMacOs) == 0) {
+ eolUsedLabel = SciNotesMessages.EOL_MACOS;
+ }
+
+ if (eolUsed.compareTo(eolWindows) == 0) {
+ eolUsedLabel = SciNotesMessages.EOL_WINDOWS;
+ }
+
+ for (int k = 0; k < radioEolTypes.length; k++) {
+ if (radioEolTypes[k].getText().compareTo(eolUsedLabel) == 0) {
+ radioEolTypes[k].setSelected(true);
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java
new file mode 100755
index 000000000..270c53f28
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java
@@ -0,0 +1,99 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.StringTokenizer;
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.console.ScilabConsole;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+import org.scilab.modules.history_manager.HistoryManagement;
+
+/**
+ * EvaluateSelectionAction class
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public final class EvaluateSelectionAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 320938663765236236L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public EvaluateSelectionAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ /* Will do the job as if it was copy / paste in scilab Console */
+ ScilabEditorPane sep = getEditor().getTextPane();
+ String selection = sep.getCodeToExecute();
+ if (selection.compareTo("") != 0) {
+ StringTokenizer tokens = new StringTokenizer(selection, "\n");
+ String[] lines = new String[tokens.countTokens()];
+ int i = 0;
+ while (tokens.hasMoreTokens()) {
+ lines[i++] = tokens.nextToken();
+ }
+ HistoryManagement.appendLinesToScilabHistory(lines, lines.length);
+ ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(selection, true, false);
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor scinotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer token = new StringTokenizer(label, ";\uff1b");
+ final String label1 = token.nextToken();
+ final String label2 = token.nextToken();
+ final MenuItem menuitem = createMenu(label1, null, new EvaluateSelectionAction(label1, editor), key);
+ if (!ScilabConsole.isExistingConsole()) { // Only available in STD mode
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).setEnabled(false);
+ }
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String select = editor.getTextPane().getSelectedText();
+ if (select == null) {
+ menuitem.setText(label2);
+ } else {
+ menuitem.setText(label1);
+ }
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java
new file mode 100755
index 000000000..9109b3214
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java
@@ -0,0 +1,116 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.console.ScilabConsole;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * ExecuteFileIntoScilabAction Class
+ * @author Bruno JOFRET
+ * @author Allan CORNET
+ * @author Calixte DENIZET
+ *
+ */
+public class ExecuteFileIntoScilabAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -8625083632641564277L;
+
+ protected boolean saveBefore;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ExecuteFileIntoScilabAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Execute the file into Scilab
+ * @param editor the Scilab editor
+ */
+ protected void executeFile(SciNotes editor, String filePath) {
+ if (filePath == null) {
+ return;
+ }
+
+ filePath = filePath.replaceAll("\"", "\"\"");
+ filePath = filePath.replaceAll("'", "''");
+ if (filePath.compareTo("") != 0) {
+ String cmdToExec = "exec('" + filePath + "', -1)";
+ try {
+ ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(cmdToExec, true, false);
+ } catch (NoClassDefFoundError e) {
+ /* This happens when SciNotes is launch as standalone (ie without
+ * Scilab) */
+ ScilabModalDialog.show(editor, SciNotesMessages.COULD_NOT_FIND_CONSOLE);
+ }
+ }
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ SciNotes editor = getEditor();
+ if (((ScilabDocument) getEditor().getTextPane().getDocument()).isContentModified()) {
+ if (saveBefore || ScilabModalDialog.show(getEditor(), SciNotesMessages.EXECUTE_WARNING, SciNotesMessages.EXECUTE_FILE_INTO_SCILAB,
+ IconType.WARNING_ICON, ButtonType.CANCEL_OR_SAVE_AND_EXECUTE) == AnswerOption.SAVE_EXECUTE_OPTION) {
+ if (editor.save(getEditor().getTabPane().getSelectedIndex(), true)) {
+ this.executeFile(editor, editor.getTextPane().getName());
+ }
+ }
+ } else {
+ this.executeFile(editor, editor.getTextPane().getName());
+ }
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new ExecuteFileIntoScilabAction(tooltip, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ExecuteFileIntoScilabAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExitAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExitAction.java
new file mode 100755
index 000000000..8efe6f05e
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExitAction.java
@@ -0,0 +1,67 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * ExitAction class
+ * @author Bruno JOFRET
+ *
+ */
+public final class ExitAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -6434487252794798547L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ExitAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ doExit(getEditor());
+ }
+
+ /**
+ * doExit
+ * @param editor SciNotes
+ */
+ public static void doExit(SciNotes editor) {
+ SciNotes.closeEditor(editor);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ExitAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExportAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExportAction.java
new file mode 100755
index 000000000..0ef127b25
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExportAction.java
@@ -0,0 +1,232 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Cursor;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.File;
+
+import javax.swing.JFileChooser;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.bridge.filechooser.SwingScilabFileChooser;
+import org.scilab.modules.gui.filechooser.ScilabFileChooser;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.gui.utils.ConfigManager;
+import org.scilab.modules.gui.utils.SciFileFilter;
+import org.scilab.modules.jvm.LoadClassPath;
+import org.scilab.modules.localization.Messages;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.CodeExporter;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * Class Export action for SciNotes
+ * @author Calixte DENIZET
+ */
+public class ExportAction extends DefaultAction {
+
+ private static final long serialVersionUID = 7796680521955058413L;
+
+ private static final String DOT = ".";
+
+ private boolean codeConverterLoaded;
+ private File currentFile;
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor the editor
+ */
+ public ExportAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Function doAction
+ */
+ public void doAction() {
+ String extension = null;
+ String title = "Export";
+ String path = "";
+
+ String initialDirectoryPath = path;
+ if (initialDirectoryPath == null) {
+ initialDirectoryPath = getEditor().getTextPane().getName();
+ }
+ if (initialDirectoryPath == null) {
+ initialDirectoryPath = ConfigManager.getLastOpenedDirectory();
+ }
+
+ SciFileFilter pdfFilter = new SciFileFilter("*.pdf", null, 0);
+ SciFileFilter psFilter = new SciFileFilter("*.ps", null, 1);
+ SciFileFilter epsFilter = new SciFileFilter("*.eps", null, 2);
+ SciFileFilter rtfFilter = new SciFileFilter("*.rtf", null, 3);
+
+ final SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+
+ fileChooser.setInitialDirectory(ConfigManager.getLastOpenedDirectory());
+ fileChooser.setAcceptAllFileFilterUsed(false);
+ fileChooser.setInitialDirectory(initialDirectoryPath);
+ fileChooser.setDialogTitle(Messages.gettext(title));
+ fileChooser.setApproveButtonText(Messages.gettext(title));
+
+ // order is also important here
+ fileChooser.addChoosableFileFilter(pdfFilter);
+ fileChooser.addChoosableFileFilter(psFilter);
+ fileChooser.addChoosableFileFilter(epsFilter);
+ fileChooser.addChoosableFileFilter(rtfFilter);
+
+ //select default file type
+ fileChooser.setFileFilter(pdfFilter);
+ fileChooser.setTitle(title);
+
+ fileChooser.addPropertyChangeListener(JFileChooser.FILE_FILTER_CHANGED_PROPERTY, new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ Object val = e.getNewValue();
+ if (val != null && (val instanceof SciFileFilter)) {
+ String filter = ((SciFileFilter) val).getDescription();
+ String file = currentFile.getName();
+ int dotpos = file.lastIndexOf(".");
+ if (dotpos != -1) {
+ file = file.substring(0, dotpos);
+ }
+ dotpos = filter.lastIndexOf(".");
+ if (dotpos != -1) {
+ filter = filter.substring(dotpos, filter.length() - 1);
+ }
+ fileChooser.setSelectedFile(new File(file + filter));
+ }
+ }
+ });
+
+ fileChooser.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY , new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ Object val = e.getNewValue();
+ if (val != null && (val instanceof File)) {
+ currentFile = (File) val;
+ }
+ }
+ });
+
+ String name = getEditor().getTextPane().getName();
+ if (name == null) {
+ name = ((ScilabDocument) getEditor().getTextPane().getDocument()).getFirstFunctionName();
+ if (name == null) {
+ name = "";
+ }
+ }
+ int dotpos = name.lastIndexOf(".");
+ if (dotpos != -1) {
+ name = name.substring(0, dotpos);
+ }
+ if (name != null) {
+ name += ".pdf";
+ fileChooser.setSelectedFile(new File(name));
+ }
+
+ int retval = fileChooser.showSaveDialog(getEditor());
+
+ String fileName = null;
+ String type = null;
+
+ if (retval == JFileChooser.APPROVE_OPTION) {
+ File f = SciNotes.fileToCanonicalFile(fileChooser.getSelectedFile());
+ initialDirectoryPath = f.getPath();
+ if (f.exists()) {
+ if (ScilabModalDialog.show(getEditor(), SciNotesMessages.REPLACE_FILE_TITLE,
+ SciNotesMessages.FILE_ALREADY_EXIST, IconType.QUESTION_ICON,
+ ButtonType.YES_NO) == AnswerOption.NO_OPTION) {
+ return;
+ }
+ }
+
+ boolean hasNoExtension = true;
+ fileName = f.getName();
+ if (fileName.lastIndexOf(DOT) != -1) {
+ int len = fileName.substring(fileName.lastIndexOf(DOT), fileName.length()).length();
+ if (len >= 2 && len <= 4) {
+ hasNoExtension = false;
+ extension = fileName.substring(fileName.lastIndexOf(DOT) + 1, fileName.length());
+ }
+ }
+
+ if (extension == null) {
+ if (fileChooser.getFileFilter() == pdfFilter) {
+ extension = "pdf";
+ type = CodeExporter.PDF;
+ } else if (fileChooser.getFileFilter() == psFilter) {
+ extension = "ps";
+ type = CodeExporter.PS;
+ } else if (fileChooser.getFileFilter() == epsFilter) {
+ extension = "eps";
+ type = CodeExporter.EPS;
+ } else if (fileChooser.getFileFilter() == rtfFilter) {
+ extension = "rtf";
+ type = CodeExporter.RTF;
+ } else {
+ extension = "";
+ type = null;
+ }
+ } else {
+ if (extension.equalsIgnoreCase("pdf")) {
+ type = CodeExporter.PDF;
+ } else if (extension.equalsIgnoreCase("ps")) {
+ type = CodeExporter.PS;
+ } else if (extension.equalsIgnoreCase("eps")) {
+ type = CodeExporter.EPS;
+ } else if (extension.equalsIgnoreCase("rtf")) {
+ type = CodeExporter.RTF;
+ }
+ }
+
+ if (hasNoExtension) {
+ fileName = f.getPath() + DOT + extension;
+ } else {
+ fileName = f.getPath();
+ }
+ } else if (retval == JFileChooser.CANCEL_OPTION) {
+ fileName = null;
+ }
+
+ if (!codeConverterLoaded) {
+ LoadClassPath.loadOnUse("copyAsHTMLinScinotes");
+ LoadClassPath.loadOnUse("pdf_ps_eps_graphic_export");
+ codeConverterLoaded = true;
+ }
+
+ if (fileName != null && type != null) {
+ getEditor().getTextPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ CodeExporter.convert(getEditor().getTextPane(), fileName, type, PageSetupAction.getPageFormat());
+ getEditor().getTextPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+
+ /**
+ * Create the MenuItem for print action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ExportAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindAction.java
new file mode 100755
index 000000000..4a877629d
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindAction.java
@@ -0,0 +1,1320 @@
+/* Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Color;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowFocusListener;
+import java.awt.event.WindowListener;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.KeyStroke;
+import javax.swing.SwingUtilities;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultHighlighter;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
+import javax.swing.text.Highlighter;
+
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.bridge.textbox.SwingScilabTextBox;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.SearchManager;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * FindAction
+ * @author Sylvestre KOUMAR
+ * @author Allan CORNET
+ * @author Antoine ELIAS
+ * @author Vincent COUVERT
+ * @author Calixte DENIZET
+ */
+public final class FindAction extends DefaultAction implements WindowFocusListener {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -5499974793656106222L;
+
+ private static final int GAP = 5;
+ private static final int THREE = 3;
+
+ private static final String FILTERNEWLINES = "filterNewlines";
+ private static final String ESCAPE = "ESCAPE";
+
+ private static final Color SELECTEDCOLOR = new Color(205, 183, 158);
+ private static final Highlighter.HighlightPainter ACTIVEPAINTER = new DefaultHighlighter.DefaultHighlightPainter(Color.green);
+ private static final Highlighter.HighlightPainter INACTIVEPAINTER = new DefaultHighlighter.DefaultHighlightPainter(Color.yellow);
+ private static final Highlighter.HighlightPainter SELECTEDPAINTER = new DefaultHighlighter.DefaultHighlightPainter(SELECTEDCOLOR);
+
+ private static String previousSearch;
+
+ private static boolean windowAlreadyExist;
+ private static FindAction current;
+
+ private JFrame frame;
+ private JButton buttonClose;
+ private JButton buttonFind;
+ private ButtonGroup buttonGroup1;
+ private ButtonGroup buttonGroup2;
+ private JButton buttonReplace;
+ private JButton buttonReplaceAll;
+ private JButton buttonReplaceFind;
+ private JCheckBox checkCase;
+ private JCheckBox checkRegular;
+ private JCheckBox checkCircular;
+ private JCheckBox checkWhole;
+ private JComboBox comboFind;
+ private JComboBox comboReplace;
+ private JLabel labelFind;
+ private JLabel labelReplace;
+ private JPanel panelButton;
+ private JPanel panelDirection;
+ private JPanel panelFind;
+ private JPanel panelFrame;
+ private JPanel panelOptions;
+ private JPanel panelScope;
+ private SwingScilabTextBox statusBar;
+ private JRadioButton radioAll;
+ private JRadioButton radioFromCaret;
+ private JRadioButton radioBackward;
+ private JRadioButton radioForward;
+ private JRadioButton radioSelection;
+
+ private String oldWord;
+ private String newWord;
+ private String wordToFind;
+
+ private String lastSearch = "";
+ private String lastReplace = "";
+
+ private int startSelectedLines;
+ private int endSelectedLines;
+
+ private int startFind;
+ private int endFind;
+
+ private boolean restarted;
+
+ private Object[] highlighters;
+ private Object selectedHighlight;
+
+ private String previousRegexp;
+ private int previousIndex;
+ private List<Integer[]> foundOffsets;
+ private final MyListener myListener = new MyListener();
+
+ private boolean comboReplaceCanceled;
+ private boolean comboFindCanceled;
+
+ private Document previousDocument;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public FindAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ if (windowAlreadyExist) {
+ if (current != this) {
+ current.closeFindReplaceWindow();
+ current = this;
+ findReplaceBox();
+ } else {
+ frame.setVisible(true);
+ buttonFind.requestFocus();
+ frame.toFront();
+ }
+ } else {
+ current = this;
+ findReplaceBox();
+ }
+
+ previousRegexp = "";
+ previousIndex = -1;
+ getEditor().getTextPane().removeCaretListener(myListener);
+ startSelectedLines = 0;
+ endSelectedLines = 0;
+
+ try {
+ // If some text is selected, it is used in find.
+ //if more than one line is selected set radio button "selected lines" at true
+ // else find and replace action is applied to the entire document
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ int startPos = scinotesTextPane.getSelectionStart();
+ int endPos = scinotesTextPane.getSelectionEnd();
+ Element root = scinotesTextPane.getDocument().getDefaultRootElement();
+ int startLine = root.getElementIndex(startPos);
+ int endLine = root.getElementIndex(endPos);
+
+ if (startPos != endPos) {
+ if (startLine != endLine) {
+ radioSelection.doClick();
+ comboFind.setSelectedIndex(-1);
+ comboReplace.setSelectedIndex(-1);
+ } else {
+ radioAll.doClick();
+ comboFind.getEditor().setItem(scinotesTextPane.getDocument().getText(startPos, endPos - startPos));
+ comboFind.getEditor().selectAll();
+ }
+ } else {
+ radioAll.doClick();
+ comboFind.setSelectedIndex(-1);
+ comboReplace.setSelectedIndex(-1);
+ }
+ windowAlreadyExist = true;
+ updateFindReplaceButtonStatus();
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new FindAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new FindAction(tooltip, editor));
+ }
+
+ /**
+ * Close the eventually opened FindReplaceWindow
+ */
+ public static void close() {
+ if (current != null) {
+ current.closeFindReplaceWindow();
+ }
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void windowGainedFocus(WindowEvent e) {
+ if (e.getWindow() == getEditor().getSwingParentWindow()) {
+ frame.setAlwaysOnTop(true);
+ }
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void windowLostFocus(WindowEvent e) {
+ if (e.getOppositeWindow() != frame && e.getOppositeWindow() != getEditor().getSwingParentWindow()) {
+ frame.setAlwaysOnTop(false);
+ }
+ }
+
+ /**
+ * findReplaceBox
+ */
+ public void findReplaceBox() {
+
+ //Find & Replace Frame
+ frame = new JFrame();
+ frame.setAlwaysOnTop(true);
+ frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE , 0), ESCAPE);
+ frame.getRootPane().getActionMap().put(ESCAPE, new AbstractAction() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ closeFindReplaceWindow();
+ }
+ });
+
+ frame.setIconImage(new ImageIcon(FindIconHelper.findIcon("scilab")).getImage());
+ frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ frame.setTitle(SciNotesMessages.FIND_REPLACE);
+ frame.setResizable(false);
+
+ getEditor().getSwingParentWindow().addWindowFocusListener(this);
+ frame.addWindowFocusListener(this);
+
+ buttonGroup1 = new ButtonGroup();
+ buttonGroup2 = new ButtonGroup();
+ panelFrame = new JPanel();
+ panelDirection = new JPanel();
+ radioForward = new JRadioButton();
+ radioBackward = new JRadioButton();
+ panelScope = new JPanel();
+ radioAll = new JRadioButton();
+ radioFromCaret = new JRadioButton();
+ radioSelection = new JRadioButton();
+ panelOptions = new JPanel();
+ checkCase = new JCheckBox();
+ checkWhole = new JCheckBox();
+ checkRegular = new JCheckBox();
+ checkCircular = new JCheckBox();
+ panelFind = new JPanel();
+ labelFind = new JLabel();
+ labelReplace = new JLabel();
+ comboFind = new JComboBox();
+ comboReplace = new JComboBox();
+ panelButton = new JPanel();
+ buttonFind = new JButton();
+ buttonReplaceFind = new JButton();
+ buttonReplace = new JButton();
+ buttonReplaceAll = new JButton();
+ buttonClose = new JButton();
+ statusBar = new SwingScilabTextBox();
+
+ panelFrame.setLayout(new BoxLayout(panelFrame, BoxLayout.PAGE_AXIS));
+ panelFrame.setBorder(BorderFactory.createEmptyBorder(2 * GAP, 2 * GAP, 2 * GAP, 2 * GAP));
+
+ /* Pattern to search and replace*/
+ labelFind.setText(SciNotesMessages.FIND);
+ labelReplace.setText(SciNotesMessages.REPLACE);
+
+ comboFind.setEditable(true);
+ comboReplace.setEditable(true);
+
+ panelFind.setLayout(new GridLayout(2, 2, GAP, GAP));
+ panelFind.add(labelFind);
+ panelFind.add(comboFind);
+ panelFind.add(labelReplace);
+ panelFind.add(comboReplace);
+ panelFrame.add(panelFind);
+
+ /* Search direction selection*/
+ panelDirection.setBorder(BorderFactory.createTitledBorder(SciNotesMessages.DIRECTION));
+
+ buttonGroup1.add(radioForward);
+ radioForward.setText(SciNotesMessages.FORWARD);
+ buttonGroup1.add(radioBackward);
+ radioBackward.setText(SciNotesMessages.BACKWARD);
+
+ panelDirection.setLayout(new GridLayout(3, 1, GAP, GAP));
+ panelDirection.add(radioForward);
+ panelDirection.add(radioBackward);
+
+ /* Scope for search */
+ panelScope.setBorder(BorderFactory.createTitledBorder(SciNotesMessages.SCOPE));
+
+ buttonGroup2.add(radioAll);
+ radioAll.setText(SciNotesMessages.SELECT_ALL);
+
+ buttonGroup2.add(radioFromCaret);
+ radioFromCaret.setText(SciNotesMessages.SELECT_FROM_CARET);
+
+ buttonGroup2.add(radioSelection);
+ radioSelection.setText(SciNotesMessages.SELECTED_LINES);
+
+ panelScope.setLayout(new GridLayout(3, 1, GAP, GAP));
+ panelScope.add(radioAll);
+ panelScope.add(radioFromCaret);
+ panelScope.add(radioSelection);
+
+ JPanel panelDirectionScope = new JPanel();
+ panelDirectionScope.setLayout(new GridLayout(1, 2, GAP, GAP));
+ panelDirectionScope.add(panelDirection);
+ panelDirectionScope.add(panelScope);
+ panelFrame.add(panelDirectionScope);
+
+ /* Misc Options */
+ panelOptions.setBorder(BorderFactory.createTitledBorder(SciNotesMessages.OPTIONS));
+
+ checkCase.setText(SciNotesMessages.CASE_SENSITIVE);
+ checkWhole.setText(SciNotesMessages.WHOLE_WORD);
+ checkRegular.setText(SciNotesMessages.REGULAR_EXPRESSIONS);
+ checkCircular.setText(SciNotesMessages.CIRCULAR_SEARCH);
+
+ checkCircular.setSelected(true);
+ panelOptions.setLayout(new GridLayout(2, 2, GAP, GAP));
+ panelOptions.add(checkCase);
+ panelOptions.add(checkRegular);
+ panelOptions.add(checkWhole);
+ panelOptions.add(checkCircular);
+ panelFrame.add(panelOptions);
+
+ buttonFind.setText(SciNotesMessages.FIND_BUTTON);
+ buttonReplaceFind.setText(SciNotesMessages.REPLACE_FIND);
+ buttonReplace.setText(SciNotesMessages.REPLACE);
+ buttonReplaceAll.setText(SciNotesMessages.REPLACE_ALL);
+ buttonClose.setText(SciNotesMessages.CLOSE);
+ statusBar.setText("");
+
+ panelButton.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+ panelButton.setLayout(new GridLayout(THREE, THREE, GAP, GAP));
+ panelButton.add(new JLabel());
+ panelButton.add(buttonFind);
+ panelButton.add(buttonReplaceFind);
+ panelButton.add(new JLabel());
+ panelButton.add(buttonReplace);
+ panelButton.add(buttonReplaceAll);
+ panelButton.add(new JLabel());
+ panelButton.add(new JLabel());
+ panelButton.add(buttonClose);
+
+ panelFrame.add(panelButton);
+ panelFrame.add(statusBar);
+
+ frame.setContentPane(panelFrame);
+
+ frame.pack();
+ frame.setLocationRelativeTo(getEditor());
+ frame.setVisible(true);
+
+ buttonReplaceFind.setEnabled(false);
+ buttonReplace.setEnabled(false);
+ buttonFind.setEnabled(false);
+ buttonReplaceAll.setEnabled(false);
+
+ radioForward.setSelected(true);
+ radioAll.doClick();
+
+ fillSearch();
+ fillReplace();
+
+ restoreConfiguration();
+
+ ((JTextField) comboReplace.getEditor().getEditorComponent()).getDocument().putProperty(FILTERNEWLINES, Boolean.FALSE);
+ ((JTextField) comboFind.getEditor().getEditorComponent()).getDocument().putProperty(FILTERNEWLINES, Boolean.FALSE);
+ checkCase.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveCaseSensitive(checkCase.isSelected());
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ checkWhole.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveWholeWord(checkWhole.isSelected());
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ checkCircular.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveCircularSearch(checkCircular.isSelected());
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ checkRegular.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveRegularExpression(checkRegular.isSelected());
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ /*behaviour of buttons*/
+ radioSelection.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ Element root = scinotesTextPane.getDocument().getDefaultRootElement();
+ int startPos = scinotesTextPane.getSelectionStart();
+ int endPos = scinotesTextPane.getSelectionEnd();
+ int startLine = root.getElementIndex(startPos);
+ int endLine = root.getElementIndex(endPos);
+ startSelectedLines = root.getElement(startLine).getStartOffset();
+ endSelectedLines = root.getElement(endLine).getEndOffset() - 1;
+
+ scinotesTextPane.setCaretPosition(startSelectedLines);
+
+ removeAllHighlights();
+ setSelectedHighlight();
+
+ scinotesTextPane.addFocusListener(new FocusListener() {
+ @Override
+ public void focusGained(FocusEvent e) {
+ JFrame opposite = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, e.getOppositeComponent());
+ if (opposite == frame) {
+ removeAllHighlights();
+ previousRegexp = "";
+ radioAll.setSelected(true);
+ getEditor().getTextPane().removeFocusListener(this);
+ }
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) { }
+ });
+
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ radioAll.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ removeAllHighlights();
+ previousRegexp = "";
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ radioFromCaret.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ removeAllHighlights();
+ previousRegexp = "";
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ radioBackward.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ buttonFind.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateRecentSearch();
+ findText();
+ }
+ });
+
+ buttonReplace.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateRecentSearch();
+ updateRecentReplace();
+
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) scinotesTextPane.getDocument();
+
+ doc.mergeEditsBegin();
+ replaceOnlyText();
+ doc.mergeEditsEnd();
+ }
+
+ });
+
+ buttonReplaceFind.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateRecentSearch();
+ updateRecentReplace();
+
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) scinotesTextPane.getDocument();
+
+ doc.mergeEditsBegin();
+ if (buttonReplace.isEnabled()) {
+ replaceText();
+ }
+ doc.mergeEditsEnd();
+ findText();
+ }
+ });
+
+ buttonReplaceAll.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateRecentSearch();
+ updateRecentReplace();
+
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) scinotesTextPane.getDocument();
+ int start = 0;
+ int end = doc.getLength();
+ String text = "";
+
+ boolean wholeWordSelected = checkWhole.isSelected() && checkWhole.isEnabled();
+ boolean regexpSelected = checkRegular.isSelected();
+ boolean caseSelected = checkCase.isSelected();
+
+ // save current caret position to restore it at the end
+ int currentCaretPos = scinotesTextPane.getCaretPosition();
+
+ if (radioSelection.isSelected()) {
+ start = startSelectedLines;
+ end = endSelectedLines;
+ try {
+ text = doc.getText(startSelectedLines, endSelectedLines - startSelectedLines);
+ } catch (BadLocationException ex) { }
+ } else if (radioFromCaret.isSelected()) {
+ if (radioForward.isSelected()) {
+ start = currentCaretPos;
+ end = doc.getLength();
+ } else {
+ start = 0;
+ end = currentCaretPos;
+ }
+ try {
+ text = doc.getText(start, end - start);
+ } catch (BadLocationException ex) { }
+ } else {
+ text = doc.getText();
+ }
+
+ oldWord = (String) comboFind.getEditor().getItem();
+ newWord = (String) comboReplace.getEditor().getItem();
+ setPreviousSearch(oldWord);
+
+ Pattern pattern = SearchManager.generatePattern(oldWord, caseSelected, wholeWordSelected, regexpSelected);
+ Matcher matcher = pattern.matcher(text);
+ String replacedText;
+ if (regexpSelected) {
+ newWord = newWord.replaceAll("\\\\r\\\\n|\\\\n", "\n").replaceAll("\\\\t", "\t");
+ replacedText = matcher.replaceAll(newWord);
+ } else {
+ replacedText = matcher.replaceAll(Matcher.quoteReplacement(newWord));
+ }
+ if (replacedText.compareTo(text) != 0 && text.length() > 0) {
+ // only touch document if any replacement took place
+ try {
+ List<ScilabDocument.Anchor> anchors = doc.getAnchorsBetween(start, end);
+ doc.mergeEditsBegin();
+ doc.setFocused(true);
+ doc.replace(start, text.length(), replacedText, null);
+ doc.mergeEditsEnd();
+ Element root = doc.getDefaultRootElement();
+ for (ScilabDocument.Anchor anchor : anchors) {
+ ScilabDocument.ScilabLeafElement line = (ScilabDocument.ScilabLeafElement) root.getElement(anchor.getLine());
+ line.setAnchor(anchor.toString());
+ }
+ if (getEditor().getNavigator() != null) {
+ getEditor().getNavigator().update();
+ }
+ previousRegexp = "";
+ previousIndex = -1;
+ buttonReplace.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ buttonReplaceAll.setEnabled(false);
+ scinotesTextPane.setCaretPosition(Math.min(currentCaretPos, doc.getLength()));
+ } catch (BadLocationException e1) {
+ e1.printStackTrace();
+ }
+ }
+ if (radioSelection.isSelected()) {
+ removeAllHighlights();
+ endSelectedLines = startSelectedLines + replacedText.length();
+ setSelectedHighlight();
+ }
+ }
+ });
+
+ buttonClose.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ closeFindReplaceWindow();
+ }
+ });
+
+ comboReplace.addPopupMenuListener(new PopupMenuListener() {
+ @Override
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ comboReplaceCanceled = true;
+ }
+
+ @Override
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+ @Override
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+ });
+
+ comboReplace.getEditor().getEditorComponent().addMouseListener(new MouseListener() {
+ @Override
+ public void mouseReleased(MouseEvent e) { }
+ @Override
+ public void mousePressed(MouseEvent e) {
+ closeComboPopUp();
+ updateFindReplaceButtonStatus();
+ }
+ @Override
+ public void mouseExited(MouseEvent e) { }
+ @Override
+ public void mouseEntered(MouseEvent e) { }
+ @Override
+ public void mouseClicked(MouseEvent e) { }
+ });
+
+ comboReplace.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) { }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (comboReplaceCanceled) {
+ comboReplaceCanceled = false;
+ } else {
+ closeFindReplaceWindow();
+ }
+ }
+
+ if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+ replaceText();
+ findText();
+ buttonReplaceFind.requestFocus();
+ }
+
+ updateFindReplaceButtonStatus();
+ }
+ @Override
+ public void keyPressed(KeyEvent e) { }
+ });
+
+ comboFind.addPopupMenuListener(new PopupMenuListener() {
+ @Override
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ comboFindCanceled = true;
+ }
+
+ @Override
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+ @Override
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+ });
+
+ comboFind.getEditor().getEditorComponent().addMouseListener(new MouseListener() {
+ @Override
+ public void mouseReleased(MouseEvent arg0) { }
+ @Override
+ public void mousePressed(MouseEvent arg0) {
+ closeComboPopUp();
+ }
+ @Override
+ public void mouseExited(MouseEvent arg0) { }
+ @Override
+ public void mouseEntered(MouseEvent arg0) { }
+ @Override
+ public void mouseClicked(MouseEvent arg0) { }
+ });
+
+ comboFind.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ updateFindReplaceButtonStatus();
+ }
+ });
+
+ comboFind.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) { }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (comboFindCanceled) {
+ comboFindCanceled = false;
+ } else {
+ closeFindReplaceWindow();
+ }
+ }
+
+ if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+ buttonFind.requestFocus();
+ findText();
+ }
+
+ updateFindReplaceButtonStatus();
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) { }
+ });
+
+ frame.addWindowListener(new WindowListener() {
+ @Override
+ public void windowClosed(WindowEvent e) { }
+ @Override
+ public void windowDeiconified(WindowEvent e) { }
+ @Override
+ public void windowActivated(WindowEvent e) { }
+
+ @Override
+ public void windowClosing(WindowEvent e) {
+ closeFindReplaceWindow();
+ }
+
+ @Override
+ public void windowDeactivated(WindowEvent e) { }
+ @Override
+ public void windowIconified(WindowEvent e) { }
+ @Override
+ public void windowOpened(WindowEvent e) { }
+ });
+ }
+
+ /**
+ * Close combo pop-up
+ */
+ private void closeComboPopUp() {
+ if (comboFind.isPopupVisible()) {
+ comboFind.hidePopup();
+ }
+
+ if (comboReplace.isPopupVisible()) {
+ comboReplace.hidePopup();
+ }
+ }
+
+ /**
+ * fill comboFind
+ */
+ private void fillSearch() {
+ comboFind.removeAllItems();
+ List<String> recentFind = ConfigSciNotesManager.getRecentSearch();
+ for (String item : recentFind) {
+ comboFind.addItem(item);
+ }
+ }
+
+ /**
+ * fill comboReplace
+ */
+ private void fillReplace() {
+ comboReplace.removeAllItems();
+ List<String> recentReplace = ConfigSciNotesManager.getRecentReplace();
+ for (String item : recentReplace) {
+ comboReplace.addItem(item);
+ }
+ }
+
+ /**
+ * Update recent search
+ */
+ private void updateRecentSearch() {
+ String word = (String) comboFind.getEditor().getItem();
+ if (word != null && word.length() != 0 && !word.equals(lastSearch)) {
+ List<String> recentFind = ConfigSciNotesManager.getRecentSearch();
+ if (!recentFind.contains(word)) {
+ comboFind.addItem(word);
+ ConfigSciNotesManager.saveRecentSearch(word);
+ lastSearch = word;
+ }
+ }
+ }
+
+ /**
+ * Update recent replace
+ */
+ private void updateRecentReplace() {
+ String word = (String) comboReplace.getEditor().getItem();
+ if (word != null && word.length() != 0 && !word.equals(lastReplace)) {
+ List<String> recentReplace = ConfigSciNotesManager.getRecentReplace();
+ if (!recentReplace.contains(word)) {
+ comboReplace.addItem(word);
+ ConfigSciNotesManager.saveRecentReplace(word);
+ lastReplace = word;
+ }
+ }
+ }
+
+ /**
+ * Restore configuration
+ */
+ private void restoreConfiguration() {
+ checkRegular.setSelected(ConfigSciNotesManager.getRegularExpression());
+ checkCircular.setSelected(ConfigSciNotesManager.getCircularSearch());
+ checkWhole.setSelected(ConfigSciNotesManager.getWholeWord());
+ checkCase.setSelected(ConfigSciNotesManager.getCaseSensitive());
+ }
+
+ /**
+ * Update status of buttons
+ */
+ protected void updateFindReplaceButtonStatus() {
+ String textFind = (String) comboFind.getEditor().getItem();
+ if (textFind.compareTo("") != 0) {
+ buttonFind.setEnabled(true);
+ buttonReplace.setEnabled(true);
+ buttonReplaceAll.setEnabled(true);
+ buttonReplaceFind.setEnabled(true);
+ statusBar.setText("");
+ } else {
+ buttonFind.setEnabled(false);
+ buttonReplace.setEnabled(false);
+ buttonReplaceAll.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ }
+
+ // permit to choose "whole word" only if the input is a single word
+ Pattern patternWholeWord = Pattern.compile("\\w*");
+ Matcher matcherWholeWord = patternWholeWord.matcher(textFind);
+
+ checkWhole.setEnabled(false);
+
+ if (matcherWholeWord.find()) {
+ if ((matcherWholeWord.end() - matcherWholeWord.start()) == textFind.length()) {
+ checkWhole.setEnabled(true);
+ }
+ }
+
+ // if we search a regexp, we first need to know if the regexp is valid or not
+ if (checkRegular.isSelected()) {
+ try {
+ Pattern.compile(textFind);
+ } catch (PatternSyntaxException pse) {
+ statusBar.setText(String.format(SciNotesMessages.INVALID_REGEXP, textFind));
+ buttonFind.setEnabled(false);
+ buttonReplaceAll.setEnabled(false);
+ }
+ }
+
+ if (buttonReplace.isEnabled() && oldWord != null && oldWord.compareTo(textFind) != 0) {
+ buttonReplace.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ }
+ }
+
+ /**
+ * Add highlights on the view to see the searched word
+ * @param active to highlight an active word
+ */
+ public void addHighlighters(boolean active) {
+ Highlighter hl = getEditor().getTextPane().getHighlighter();
+ removeAllHighlights();
+ highlighters = new Object[foundOffsets.size()];
+ for (int i = 0; i < foundOffsets.size(); i++) {
+ try {
+ if (active) {
+ highlighters[i] = hl.addHighlight(foundOffsets.get(i)[0], foundOffsets.get(i)[1], ACTIVEPAINTER);
+ } else {
+ highlighters[i] = hl.addHighlight(foundOffsets.get(i)[0], foundOffsets.get(i)[1], INACTIVEPAINTER);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (radioSelection.isSelected()) {
+ setSelectedHighlight();
+ }
+ }
+
+ /**
+ * Change the highlight with index n to active (or not) the word
+ * @param n the index
+ * @param active to highlight an active word
+ */
+ public void changeHighlighter(int n, boolean active) {
+ if (highlighters != null) {
+ Highlighter hl = getEditor().getTextPane().getHighlighter();
+ hl.removeHighlight(highlighters[n]);
+ try {
+ if (active) {
+ highlighters[n] = hl.addHighlight(foundOffsets.get(n)[0], foundOffsets.get(n)[1], ACTIVEPAINTER);
+ } else {
+ highlighters[n] = hl.addHighlight(foundOffsets.get(n)[0], foundOffsets.get(n)[1], INACTIVEPAINTER);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+
+ if (radioSelection.isSelected()) {
+ setSelectedHighlight();
+ }
+ }
+ }
+
+ /**
+ * Set the selection where to search
+ */
+ public void setSelectedHighlight() {
+ Highlighter hl = getEditor().getTextPane().getHighlighter();
+ try {
+ if (selectedHighlight != null) {
+ hl.removeHighlight(selectedHighlight);
+ }
+ selectedHighlight = hl.addHighlight(startSelectedLines, endSelectedLines, SELECTEDPAINTER);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Remove an highlight
+ * @param n th index of the word
+ **/
+ public void removeHighlighter(int n) {
+ if (highlighters != null) {
+ Highlighter hl = getEditor().getTextPane().getHighlighter();
+ hl.removeHighlight(highlighters[n]);
+ }
+ }
+
+ /**
+ * Remove all Highlights
+ */
+ public void removeAllHighlights() {
+ Highlighter hl = getEditor().getTextPane().getHighlighter();
+ if (highlighters != null) {
+ for (int i = 0; i < highlighters.length; i++) {
+ hl.removeHighlight(highlighters[i]);
+ }
+ }
+ if (selectedHighlight != null) {
+ hl.removeHighlight(selectedHighlight);
+ selectedHighlight = null;
+ }
+ }
+
+ /**
+ * Get the next keyword after the position pos
+ * @param pos the position of the caret
+ * @param forward for a forward search
+ * @param circular for a circular search
+ * @return the index of the word
+ */
+ private int getSearched(int pos, boolean forward, boolean circular) {
+ int index = -1;
+ for (int i = 0; i < foundOffsets.size(); i++) {
+ if (forward && foundOffsets.get(i)[0] >= pos) {
+ index = i;
+ break;
+ } else if (!forward && foundOffsets.get(i)[0] >= pos) {
+ if (i == 0) {
+ return -1;
+ }
+ index = i - 1;
+ break;
+ }
+ }
+
+ if (index == -1 && circular) {
+ if (forward) {
+ return 0;
+ } else {
+ return foundOffsets.size() - 1;
+ }
+ }
+
+ return index;
+ }
+
+ /**
+ * Generate the offsets of the searched word
+ * @return a boolean if a job has been done
+ */
+ public boolean generateOffsets() {
+ boolean caseSensitive = checkCase.isSelected();
+ boolean wholeWord = checkWhole.isSelected() && checkWhole.isEnabled();
+ boolean useRegexp = checkRegular.isSelected();
+ boolean onlySelectedLines = radioSelection.isSelected();
+ Document doc = getEditor().getTextPane().getDocument();
+ wordToFind = (String) comboFind.getEditor().getItem();
+
+ String strregexp = SearchManager.generatePattern(wordToFind, caseSensitive, wholeWord, useRegexp).toString();
+ if (doc != previousDocument || !previousRegexp.equals(strregexp)) {
+ previousRegexp = strregexp;
+ if (doc != previousDocument) {
+ previousDocument = doc;
+ }
+ if (onlySelectedLines) {
+ foundOffsets = SearchManager.findWord(doc, wordToFind, startSelectedLines, endSelectedLines, caseSensitive, wholeWord, useRegexp);
+ } else {
+ foundOffsets = SearchManager.findWord(doc, wordToFind, 0, doc.getLength(), caseSensitive, wholeWord, useRegexp);
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * findText
+ */
+ private void findText() {
+ boolean circularSearchSelected = checkCircular.isSelected();
+ boolean forwardSearch = radioForward.isSelected();
+ boolean backwardSearch = radioBackward.isSelected();
+
+ String exp = (String) comboFind.getEditor().getItem();
+ if (exp.compareTo("") == 0) {
+ return;
+ }
+
+ setPreviousSearch(wordToFind);
+
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+
+ if (generateOffsets()) {
+ addHighlighters(false);
+ previousIndex = -1;
+ }
+
+ int currentCaretPos = scinotesTextPane.getSelectionStart();
+
+ if (forwardSearch) {
+ currentCaretPos = scinotesTextPane.getSelectionEnd();
+ } else {
+ currentCaretPos = scinotesTextPane.getSelectionStart() - 1;
+ }
+
+ statusBar.setText("");
+
+ int size = foundOffsets.size();
+ if (size > 0) {
+ int nextIndex = -1;
+ if (previousIndex == -1) {
+ nextIndex = getSearched(currentCaretPos, !backwardSearch, circularSearchSelected);
+ } else {
+ if (backwardSearch) {
+ if (circularSearchSelected) {
+ nextIndex = (size + previousIndex - 1) % size;
+ } else {
+ nextIndex = previousIndex - 1;
+ }
+ } else {
+ if (circularSearchSelected) {
+ nextIndex = (previousIndex + 1) % size;
+ } else {
+ nextIndex = previousIndex + 1;
+ }
+ }
+ changeHighlighter(previousIndex, false);
+ }
+
+ if (nextIndex == size) {
+ nextIndex = -1;
+ }
+
+ if (nextIndex != -1) {
+ if (restarted) {
+ statusBar.setText("");
+ restarted = false;
+ } else if (circularSearchSelected && size >= 2 && nextIndex <= previousIndex) {
+ statusBar.setText(SciNotesMessages.RESTART_FROM_BEGINNING);
+ restarted = true;
+ }
+
+ changeHighlighter(nextIndex, true);
+ previousIndex = nextIndex;
+ if (backwardSearch) {
+ scinotesTextPane.setCaretPosition(foundOffsets.get(nextIndex)[0]);
+ } else {
+ scinotesTextPane.setCaretPosition(foundOffsets.get(nextIndex)[1]);
+ }
+
+ scinotesTextPane.addFocusListener(myListener);
+ buttonReplace.setEnabled(true);
+ buttonReplaceFind.setEnabled(true);
+
+ startFind = foundOffsets.get(nextIndex)[0];
+ endFind = foundOffsets.get(nextIndex)[1];
+ } else {
+ startFind = 0;
+ endFind = 0;
+ buttonFind.setEnabled(false);
+ buttonReplace.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ statusBar.setText(String.format(SciNotesMessages.STRING_NOT_FOUND, wordToFind));
+ }
+ } else { // nothing has been found
+ statusBar.setText(String.format(SciNotesMessages.STRING_NOT_FOUND, wordToFind));
+ buttonFind.setEnabled(false);
+ buttonReplace.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ buttonReplaceAll.setEnabled(false);
+ }
+ }
+
+ /**
+ * replaceOnlyText
+ */
+ private void replaceOnlyText() {
+ replaceText();
+ buttonReplace.setEnabled(false);
+ buttonReplaceFind.setEnabled(false);
+ }
+
+ /**
+ * replaceText
+ */
+ private void replaceText() {
+ boolean caseSensitive = checkCase.isSelected();
+ boolean wholeWord = checkWhole.isSelected() && checkWhole.isEnabled();
+ boolean useRegexp = checkRegular.isSelected();
+
+ String find = (String) comboFind.getEditor().getItem();
+ String replace = (String) comboReplace.getEditor().getItem();
+ if (useRegexp) {
+ replace = replace.replaceAll("\\\\r\\\\n|\\\\n", "\n").replaceAll("\\\\t", "\t");
+ } else {
+ replace = Matcher.quoteReplacement(replace);
+ }
+
+ if (find.compareTo("") == 0 || (startFind == endFind)) {
+ return;
+ }
+
+ setPreviousSearch(find);
+
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+
+ /*
+ * we replace only the current result and then disable replace and replace find button
+ * same behaviour as find and replace in eclipse
+ */
+
+ try {
+ Pattern pattern = SearchManager.generatePattern(find, caseSensitive, wholeWord, useRegexp);
+ Matcher matcher = pattern.matcher(scinotesTextPane.getText(startFind, endFind - startFind + 1));
+ String replacedText = matcher.replaceAll(replace);
+ ScilabDocument doc = (ScilabDocument) scinotesTextPane.getDocument();
+ doc.setFocused(true);
+ doc.replace(startFind, endFind - startFind + 1, replacedText, null);
+ scinotesTextPane.setCaretPosition(startFind + replacedText.length());
+ endSelectedLines += replacedText.length() - (endFind - startFind + 1);
+ previousRegexp = "";
+ previousIndex = -1;
+ if (generateOffsets()) {
+ addHighlighters(false);
+ }
+ } catch (BadLocationException ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * closeFindReplaceWindow
+ */
+ public void closeFindReplaceWindow() {
+ if (windowAlreadyExist) {
+ JEditorPane scinotesTextPane = getEditor().getTextPane();
+ if (scinotesTextPane != null) {
+ scinotesTextPane.getHighlighter().removeAllHighlights();
+ int start = scinotesTextPane.getSelectionStart();
+ int end = scinotesTextPane.getSelectionEnd();
+ scinotesTextPane.select(start, end);
+ }
+ getEditor().getSwingParentWindow().removeWindowFocusListener(this);
+ frame.removeWindowFocusListener(this);
+ frame.dispose();
+ windowAlreadyExist = false;
+ }
+ }
+
+ /**
+ * Get the previous search
+ * @return the previuos search
+ */
+ public static String getPreviousSearch() {
+ return previousSearch;
+ }
+
+ /**
+ * Set the previous search
+ * @param previousSearch String
+ */
+ public static void setPreviousSearch(String previousSearch) {
+ FindAction.previousSearch = previousSearch;
+ }
+
+ /**
+ * Inner class to handle events (used as a singleton)
+ */
+ private class MyListener implements CaretListener, FocusListener {
+
+ /**
+ * Constructor
+ */
+ public MyListener() {
+ super();
+ }
+
+ /**
+ * focusGained in interface FocusListener
+ * @param e FocusEvent
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (previousIndex != -1) {
+ int start = foundOffsets.get(previousIndex)[0];
+ int end = foundOffsets.get(previousIndex)[1];
+ getEditor().getTextPane().select(start, end);
+ }
+ getEditor().getTextPane().addCaretListener(this);
+ }
+
+ /**
+ * focusLost in interface FocusListener
+ * @param e FocusEvent
+ */
+ @Override
+ public void focusLost(FocusEvent e) { }
+
+ /**
+ * caretUpdate in interface CaretListener
+ * @param e FocusEvent
+ */
+ @Override
+ public void caretUpdate(CaretEvent e) {
+ removeAllHighlights();
+ getEditor().getTextPane().removeCaretListener(this);
+ getEditor().getTextPane().removeFocusListener(this);
+ previousRegexp = "";
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindNextAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindNextAction.java
new file mode 100755
index 000000000..0dfc8cdff
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindNextAction.java
@@ -0,0 +1,102 @@
+/* Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.util.List;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.SearchManager;
+
+/**
+ *
+ * @author Antoine ELIAS
+ *
+ */
+public final class FindNextAction extends DefaultAction {
+
+ private static final long serialVersionUID = -9017015781643180532L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public FindNextAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ try {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ int startPos = getEditor().getTextPane().getSelectionStart();
+ int endPos = getEditor().getTextPane().getSelectionEnd();
+ int startLine = doc.getDefaultRootElement().getElementIndex(startPos);
+ int endLine = doc.getDefaultRootElement().getElementIndex(endPos);
+
+ //don't manage multiple lines quick find
+ if (startLine != endLine) {
+ return;
+ }
+
+ String exp = null;
+ if (startPos == endPos) {
+ //nothing to search
+ if (FindAction.getPreviousSearch() == null) {
+ return;
+ } else {
+ exp = FindAction.getPreviousSearch();
+ }
+ } else {
+ exp = doc.getText(startPos, endPos - startPos);
+ }
+
+ //search from current position to end document
+ List<Integer[]> offsets = SearchManager.findWord(doc, exp, 0, doc.getLength(), true, false, false);
+ if (offsets.size() != 0) {
+ int index = -1;
+ for (int i = 0; i < offsets.size(); i++) {
+ if (offsets.get(i)[0] >= endPos + 1) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index == -1) {
+ index = 0;
+ }
+
+ getEditor().getTextPane().select(offsets.get(index)[0], offsets.get(index)[1]);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new FindNextAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindPreviousAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindPreviousAction.java
new file mode 100755
index 000000000..fe4514868
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/FindPreviousAction.java
@@ -0,0 +1,102 @@
+/* Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.util.List;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.SearchManager;
+
+/**
+ *
+ * @author Antoine ELIAS
+ *
+ */
+public final class FindPreviousAction extends DefaultAction {
+
+ private static final long serialVersionUID = -9017015781643180532L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public FindPreviousAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ try {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ int startPos = getEditor().getTextPane().getSelectionStart();
+ int endPos = getEditor().getTextPane().getSelectionEnd();
+ int startLine = doc.getDefaultRootElement().getElementIndex(startPos);
+ int endLine = doc.getDefaultRootElement().getElementIndex(endPos);
+
+ //don't manage multiple lines quick find
+ if (startLine != endLine) {
+ return;
+ }
+
+ String exp = null;
+ if (startPos == endPos) {
+ //nothing to search
+ if (FindAction.getPreviousSearch() == null) {
+ return;
+ } else {
+ exp = FindAction.getPreviousSearch();
+ }
+ } else {
+ exp = doc.getText(startPos, endPos - startPos);
+ }
+
+ //search from current position to end document
+ List<Integer[]> offsets = SearchManager.findWord(doc, exp, 0, doc.getLength(), true, false, false);
+ if (offsets.size() != 0) {
+ int index = -1;
+ for (int i = 0; i < offsets.size(); i++) {
+ if (offsets.get(i)[0] >= startPos) {
+ index = i - 1;
+ break;
+ }
+ }
+
+ if (index == -1) {
+ index = offsets.size() - 1;
+ }
+
+ getEditor().getTextPane().select(offsets.get(index)[0], offsets.get(index)[1]);
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new FindPreviousAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GeneralSettingsAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GeneralSettingsAction.java
new file mode 100755
index 000000000..97f966f51
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GeneralSettingsAction.java
@@ -0,0 +1,66 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.ScilabGeneralPrefs;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SetFontAction Class
+ * @author Calixte DENIZET
+ */
+public class GeneralSettingsAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public GeneralSettingsAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ ScilabGeneralPrefs.openPreferences("scinotes/");
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new GeneralSettingsAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new GeneralSettingsAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.java
new file mode 100755
index 000000000..591be1601
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GenerateHelpFromFunctionAction.java
@@ -0,0 +1,138 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.List;
+
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+import javax.swing.text.Element;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.FunctionScanner;
+
+/**
+ * Generate help from a function definition
+ * @author Calixte DENIZET
+ */
+public class GenerateHelpFromFunctionAction extends DefaultAction {
+
+ private static final long serialVersionUID = 5008914832562621484L;
+
+ /**
+ * The help template
+ */
+ public static final String TEMPLATE = "//\n"
+ + "//\n"
+ + "// Calling Sequence\n"
+ + "// [returnValues] = functionName(argsValues) // \n"
+ + "// Parameters\n"
+ + "// argsValuesOnColumn\n"
+ + "// returnValuesOnColumn\n"
+ + "// \n"
+ + "// Description\n"
+ + "// \n"
+ + "// \n"
+ + "// Examples\n"
+ + "// \n"
+ + "// \n"
+ + "// See Also\n"
+ + "// \n"
+ + "// \n"
+ + "// Authors\n"
+ + "// \n"
+ + "\n";
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public GenerateHelpFromFunctionAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int pos = sep.getCaretPosition();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ Element e = root.getElement(root.getElementIndex(pos));
+ if (e instanceof ScilabDocument.ScilabLeafElement) {
+ ScilabDocument.ScilabLeafElement se = (ScilabDocument.ScilabLeafElement) e;
+ if (se.isFunction()) {
+ FunctionScanner.FunctionInfo info = se.getFunctionInfo();
+ String help = TEMPLATE.replaceFirst("functionName", info.functionName);
+ help = help.replaceFirst("returnValues", generateList(info.returnValues, ", ", ""));
+ help = help.replaceFirst("argsValues", generateList(info.argsValues, ", ", ""));
+ help = help.replaceFirst("returnValuesOnColumn", generateList(info.returnValues, ": \n// ", ": "));
+ help = help.replaceFirst("argsValuesOnColumn", generateList(info.argsValues, ": \n// ", ": "));
+ try {
+ doc.mergeEditsEnd();
+ doc.insertString(e.getEndOffset(), help, null);
+ } catch (BadLocationException exc) { }
+ }
+ }
+ }
+
+ /**
+ * Generate a string containing the list gave as argument in using sep as separator
+ * @param list the list
+ * @param sep the separator
+ * @param end a String to close
+ * @return the generated String
+ */
+ private String generateList(List<String> list, String sep, String end) {
+ String str = "";
+ for (int i = 0; i < list.size() - 1; i++) {
+ str += list.get(i) + sep;
+ }
+ if (list.size() >= 1) {
+ str += list.get(list.size() - 1) + end;
+ }
+
+ return str;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final MenuItem menuitem = createMenu(label, null, new GenerateHelpFromFunctionAction(label, editor), key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ ScilabDocument.ScilabLeafElement elem = (ScilabDocument.ScilabLeafElement) root.getElement(root.getElementIndex(pos));
+ menuitem.setEnabled(elem.isFunction());
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.java
new file mode 100755
index 000000000..1a32d4539
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoNextAnchorAction.java
@@ -0,0 +1,61 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * GotoNextAnchorAction Class
+ * @author Calixte DENIZET
+ */
+public class GotoNextAnchorAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public GotoNextAnchorAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ int line = root.getElementIndex(sep.getCaretPosition());
+ sep.scrollTextToLineNumber(doc.nextAnchorFrom(line) + 1, false);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new GotoNextAnchorAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.java
new file mode 100755
index 000000000..4c08a2686
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/GotoPreviousAnchorAction.java
@@ -0,0 +1,61 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * GotoPreviousAnchorAction Class
+ * @author Calixte DENIZET
+ */
+public class GotoPreviousAnchorAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public GotoPreviousAnchorAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ int line = root.getElementIndex(sep.getCaretPosition());
+ sep.scrollTextToLineNumber(doc.previousAnchorFrom(line) + 1, false);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new GotoPreviousAnchorAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpAction.java
new file mode 100755
index 000000000..0e3edff06
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpAction.java
@@ -0,0 +1,71 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.action_binding.InterpreterManagement;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * HelpAction Class
+ * @author Bruno JOFRET
+ *
+ */
+public final class HelpAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -3024180292998640447L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public HelpAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ InterpreterManagement.requestScilabExec("help('scinotes')");
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new HelpAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new HelpAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.java
new file mode 100755
index 000000000..74e87ba16
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordAction.java
@@ -0,0 +1,116 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.StringTokenizer;
+
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.action_binding.InterpreterManagement;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * HelpOnKeywordAction Class
+ * @author Calixte DENIZET
+ */
+public class HelpOnKeywordAction extends DefaultAction {
+
+ private static final long serialVersionUID = -7241378949942315933L;
+
+ protected boolean isPopup;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public HelpOnKeywordAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ String selection = "";
+ int start = getEditor().getTextPane().getSelectionStart();
+ int end = getEditor().getTextPane().getSelectionEnd();
+ try {
+ if (start == end) {
+ String kw = getEditor().getTextPane().getHelpableKeyword(!isPopup);
+ if (kw != null) {
+ selection = kw;
+ }
+ } else {
+ selection = getEditor().getTextPane().getDocument().getText(start, end - start);
+ }
+ } catch (BadLocationException e) { }
+
+ InterpreterManagement.requestScilabExec("help('" + selection + "')");
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer token = new StringTokenizer(label, ";\uff1b");
+ final String label1 = token.nextToken();
+ final String label2 = token.nextToken();
+ return createMenu(label1, label2, editor, key, new HelpOnKeywordAction(label1 + SciNotesMessages.DOTS, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @param hoka the HelpOnKeyword action
+ * @return MenuItem
+ */
+ protected static MenuItem createMenu(final String label1, final String label2, final SciNotes editor, KeyStroke key, final HelpOnKeywordAction hoka) {
+ final MenuItem menuitem = createMenu(label1, null, hoka, key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String select = editor.getTextPane().getSelectedText();
+ if (select == null) {
+ String kw = editor.getTextPane().getHelpableKeyword(!hoka.isPopup);
+ if (kw != null) {
+ menuitem.setText(label1 + SciNotesMessages.QUOTE + kw + SciNotesMessages.QUOTE);
+ menuitem.setEnabled(true);
+ } else {
+ menuitem.setText(label1 + SciNotesMessages.DOTS);
+ menuitem.setEnabled(false);
+ }
+ } else {
+ menuitem.setText(label2);
+ menuitem.setEnabled(true);
+ }
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.java
new file mode 100755
index 000000000..da009387c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/HelpOnKeywordInPopupAction.java
@@ -0,0 +1,54 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.util.StringTokenizer;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * HelpOnKeywordAction Class
+ * @author Calixte DENIZET
+ */
+public class HelpOnKeywordInPopupAction extends HelpOnKeywordAction {
+
+ private static final long serialVersionUID = -7189187227299495917L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public HelpOnKeywordInPopupAction(String name, SciNotes editor) {
+ super(name, editor);
+ isPopup = true;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer token = new StringTokenizer(label, ";\uff1b");
+ final String label1 = token.nextToken();
+ final String label2 = token.nextToken();
+ return createMenu(label1, label2, editor, key, new HelpOnKeywordInPopupAction(label1 + SciNotesMessages.DOTS, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IncrementalSearchAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IncrementalSearchAction.java
new file mode 100755
index 000000000..f6200bc73
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IncrementalSearchAction.java
@@ -0,0 +1,392 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010-2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.KeyboardFocusManager;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.AbstractAction;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * IncrementalSearchAction Class
+ * @author Calixte DENIZET
+ */
+public final class IncrementalSearchAction extends DefaultAction {
+
+ private static final long serialVersionUID = -3093932085002970876L;
+ private static final String SCI = ScilabConstants.SCI.getPath();
+ private static final String TAB = "tab";
+ private static final ImageIcon CLOSEICON = new ImageIcon(SCI + "/modules/gui/images/icons/close-tab.png");
+ private static final ImageIcon TOPICON = new ImageIcon(FindIconHelper.findIcon("go-top"));
+ private static final ImageIcon BOTICON = new ImageIcon(FindIconHelper.findIcon("go-bottom"));
+ private static final int BUTTONSIZE = 28;
+
+ private static Map<SciNotes, SearchField> fields = new HashMap<SciNotes, SearchField>();
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public IncrementalSearchAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ if (!fields.containsKey(getEditor())) {
+ SearchField field = new SearchField();
+ fields.put(getEditor(), field);
+ getEditor().insertBottomComponent(field);
+ field.requestFocus();
+ } else {
+ fields.get(getEditor()).requestFocus();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new IncrementalSearchAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new IncrementalSearchAction(tooltip, editor));
+ }
+
+ /**
+ * @param editor the editor where to close the search bar
+ */
+ public static void close(SciNotes editor) {
+ if (fields.containsKey(editor)) {
+ fields.get(editor).removeListeners();
+ fields.remove(editor);
+ }
+ }
+
+ /**
+ * @param editor the editor where to close the search bar
+ * @return the word which is currently searching
+ */
+ public static String getWord(SciNotes editor) {
+ if (fields.containsKey(editor)) {
+ return fields.get(editor).getWord();
+ }
+
+ return null;
+ }
+
+ /**
+ * @param editor the editor where to close the search bar
+ * @return true if it is an exact search
+ */
+ public static boolean getExact(SciNotes editor) {
+ if (fields.containsKey(editor)) {
+ return fields.get(editor).getExact();
+ }
+
+ return false;
+ }
+
+ /**
+ * Inner class to have an incremental search field.
+ */
+ @SuppressWarnings(value = { "serial" })
+ class SearchField extends JPanel implements FocusListener, KeyListener {
+
+ private String text;
+ private final JTextField field;
+ private boolean exact;
+
+ /**
+ * Default Constructor
+ */
+ public SearchField() {
+ super(new BorderLayout());
+ field = new JTextField();
+ field.addKeyListener(this);
+ field.addFocusListener(this);
+ field.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
+ field.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), TAB);
+ field.getActionMap().put(TAB, new AbstractAction() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ getEditor().getTextPane().requestFocus();
+ }
+ });
+ JPanel panelButtons = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
+ panelButtons.add(new CloseButton());
+ panelButtons.add(new TopBotButtons(true));
+ panelButtons.add(new TopBotButtons(false));
+ JCheckBox check = new JCheckBox(SciNotesMessages.EXACT);
+ check.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ exact = e.getStateChange() == ItemEvent.SELECTED;
+ changeText();
+ }
+ });
+ panelButtons.add(check);
+ add(panelButtons, BorderLayout.WEST);
+ add(field, BorderLayout.CENTER);
+ setVisible(true);
+ }
+
+ /**
+ * @return the word which is currently searching
+ */
+ public String getWord() {
+ return field.getText();
+ }
+
+ /**
+ * @return true if it is an exact search
+ */
+ public boolean getExact() {
+ return exact;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void requestFocus() {
+ field.requestFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (text == null) {
+ changeText();
+ }
+ field.select(0, field.getText().length());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void focusLost(FocusEvent e) {
+ text = null;
+ }
+
+ /**
+ * Remove listeners
+ */
+ public void removeListeners() {
+ field.removeFocusListener(field.getFocusListeners()[0]);
+ field.removeKeyListener(field.getKeyListeners()[0]);
+ }
+
+ /**
+ * Hide the search field
+ */
+ public void hideField() {
+ removeListeners();
+ fields.remove(getEditor());
+ getEditor().insertBottomComponent(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void keyReleased(KeyEvent e) {
+ int key = e.getKeyCode();
+ if (key == KeyEvent.VK_ESCAPE) {
+ hideField();
+ return;
+ }
+
+ if (key != KeyEvent.VK_LEFT && key != KeyEvent.VK_RIGHT && key != KeyEvent.VK_UP && key != KeyEvent.VK_DOWN) {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int pos = sep.getSelectionStart();
+ int start;
+ String str = field.getText();
+ if (str != null) {
+ sep.highlightWords(str, exact);
+ if (!exact) {
+ str = str.toLowerCase();
+ }
+ if (key == KeyEvent.VK_ENTER && ((e.getModifiers() & KeyEvent.SHIFT_MASK) != 0)) {
+ start = text.lastIndexOf(str, pos - 1);
+ e.consume();
+ } else {
+ if (key == KeyEvent.VK_ENTER) {
+ pos++;
+ }
+ start = text.indexOf(str, pos);
+ }
+ if (start != -1) {
+ sep.select(start, start + str.length());
+ field.setForeground(Color.BLACK);
+ } else {
+ field.setForeground(Color.RED);
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void keyTyped(KeyEvent e) { }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void keyPressed(KeyEvent e) { }
+
+ /**
+ * Change the text where to search
+ */
+ private void changeText() {
+ if (getEditor().getTextPane() != null) {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ text = doc.getText();
+ if (!exact) {
+ text = text.toLowerCase();
+ }
+ sep.highlightWords(field.getText(), exact);
+ }
+ }
+
+ /**
+ * Inner class for the close-buttons
+ */
+ @SuppressWarnings(value = { "serial" })
+ class CloseButton extends JButton {
+
+ /**
+ * Constructor
+ */
+ CloseButton() {
+ super(CLOSEICON);
+ setFocusable(false);
+ setContentAreaFilled(true);
+ setOpaque(false);
+ setRolloverEnabled(true);
+ setBorderPainted(false);
+ setPreferredSize(new Dimension(BUTTONSIZE, BUTTONSIZE));
+ addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ hideField();
+ }
+ });
+ }
+ }
+
+ /**
+ * Inner class for the top-bot-buttons
+ @SuppressWarnings(value = { "serial" })
+ */
+ class TopBotButtons extends JButton {
+
+ /**
+ * Constructor
+ * @param top true for the top-icon
+ */
+ TopBotButtons(final boolean top) {
+ super(top ? TOPICON : BOTICON);
+ setFocusable(false);
+ setContentAreaFilled(true);
+ setOpaque(false);
+ setRolloverEnabled(true);
+ setBorderPainted(false);
+ setPreferredSize(new Dimension(BUTTONSIZE, BUTTONSIZE));
+ addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int pos = sep.getSelectionStart();
+ int start;
+ String str = field.getText();
+
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ String txt = doc.getText();
+ if (!exact) {
+ txt = txt.toLowerCase();
+ }
+
+ if (str != null) {
+ if (!exact) {
+ str = str.toLowerCase();
+ }
+ if (top) {
+ start = txt.lastIndexOf(str, pos - 1);
+ } else {
+ start = txt.indexOf(str, pos + 1);
+ }
+ if (start != -1) {
+ sep.select(start, start + str.length());
+ field.setForeground(Color.BLACK);
+ } else {
+ field.setForeground(Color.RED);
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IndentAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IndentAction.java
new file mode 100755
index 000000000..de1f7e045
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/IndentAction.java
@@ -0,0 +1,100 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.IOException;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.IndentManager;
+import org.scilab.modules.scinotes.TabManager;
+
+/**
+ * IndentAction Class
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings("serial")
+public final class IndentAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public IndentAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int pos = sep.getCaretPosition();
+ IndentManager indent = sep.getIndentManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ int[] ret = new int[2];
+
+ doc.mergeEditsBegin();
+ if (start == end) {
+ ret = indent.indentDoc(start, end);
+ if (ret != null) {
+ sep.setCaretPosition(ret[0]);
+ }
+ } else {
+ ret = indent.indentDoc(start, end - 1);
+ if (ret != null) {
+ if (pos == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * @return an action to reindent a document
+ */
+ public static SciNotes.ActionOnDocument getActionOnDocument() {
+ return new SciNotes.ActionOnDocument() {
+ public void actionOn(ScilabDocument doc) throws IOException {
+ IndentManager indent = new IndentManager(doc);
+ TabManager tab = new TabManager(doc, indent);
+ tab.setDefaultTabulation();
+ indent.indentDoc(0, doc.getLength());
+ }
+ };
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new IndentAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/InsertOverwriteAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/InsertOverwriteAction.java
new file mode 100755
index 000000000..0019e80ba
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/InsertOverwriteAction.java
@@ -0,0 +1,62 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * Handle the INSERT key
+ * @author Calixte DENIZET
+ *
+ */
+public final class InsertOverwriteAction extends AbstractAction {
+
+ private static final long serialVersionUID = 8047960139101685363L;
+ /**
+ * The key associated with this action
+ */
+ private static String key = "INSERT";
+
+ /**
+ * Constructor
+ */
+ public InsertOverwriteAction() { }
+
+ /**
+ * actionPerformed
+ * @param ev ActionEvent
+ */
+ public void actionPerformed(ActionEvent ev) {
+ ScilabEditorPane sep = (ScilabEditorPane) ev.getSource();
+ sep.setOverwriteMode(!sep.getOverwriteMode());
+ if (sep.getOverwriteMode()) {
+ sep.setInfoBarText("Overwrite Mode");
+ } else {
+ sep.setInfoBarText("");
+ }
+ }
+
+ /**
+ * putInInputMap
+ * @param textPane JComponent
+ */
+ public static void putInInputMap(JComponent textPane) {
+ textPane.getInputMap().put(KeyStroke.getKeyStroke(key), new InsertOverwriteAction());
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineBeautifierAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineBeautifierAction.java
new file mode 100755
index 000000000..eb6d8ff26
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineBeautifierAction.java
@@ -0,0 +1,81 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorKit;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * LineBeautifierAction Class
+ * @author Bernard HUGUENEY
+ * @author Calixte DENIZET
+ *
+ */
+public final class LineBeautifierAction extends ScilabEditorKit.InsertBreakAction {
+
+ /**
+ * The key associated with tthis action
+ */
+ private static String key = "ENTER";
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -8313095922543576108L;
+
+ /**
+ * Constructor
+ */
+ public LineBeautifierAction() { }
+
+ /**
+ * actionPerformed
+ * @param ev ActionEvent
+ */
+ public void actionPerformed(ActionEvent ev) {
+ ScilabEditorPane sep = (ScilabEditorPane) ev.getSource();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ int pos = sep.getCaretPosition();
+ Element root = doc.getDefaultRootElement();
+ int end = root.getElement(root.getElementIndex(pos)).getEndOffset() - 1;
+ String str = "";
+ try {
+ str = doc.getText(pos, end - pos);
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+ if (str.matches("[ \\t]+(then|do)")) {
+ sep.setCaretPosition(end);
+ }
+
+ super.actionPerformed(ev);
+ sep.getIndentManager().indentDoc(sep.getCaretPosition() - 1);
+ }
+
+ /**
+ * putInInputMap
+ * @param textPane JComponent
+ */
+ public static void putInInputMap(JComponent textPane) {
+ textPane.getInputMap().put(KeyStroke.getKeyStroke(key), new LineBeautifierAction());
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineNumbersAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineNumbersAction.java
new file mode 100755
index 000000000..dcbe2b149
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LineNumbersAction.java
@@ -0,0 +1,141 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.StringTokenizer;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JMenu;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.xml.XConfiguration;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesConfiguration;
+import org.scilab.modules.scinotes.SciNotesOptions;
+import org.scilab.modules.scinotes.SciNotesLineNumberPanel;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * LineNumbersAction Class
+ * @author Calixte DENIZET
+ */
+public final class LineNumbersAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -2778300710964013775L;
+
+ private static int state;
+ private final JRadioButtonMenuItem[] arr = new JRadioButtonMenuItem[3];
+
+ /**
+ * Construtor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public LineNumbersAction(String name, SciNotes editor) {
+ super(name, editor);
+ init();
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() { }
+
+ private static int getState() {
+ return SciNotesLineNumberPanel.getState(SciNotesOptions.getSciNotesDisplay().showLineNumbers, SciNotesOptions.getSciNotesDisplay().whereami);
+ }
+
+ private static void setState(int state) {
+ boolean[] states = SciNotesLineNumberPanel.getState(state);
+ SciNotesOptions.getSciNotesDisplay().showLineNumbers = states[0];
+ SciNotesOptions.getSciNotesDisplay().whereami = states[1];
+ XConfiguration.set(XConfiguration.getXConfigurationDocument(), SciNotesOptions.DISPLAYPATH + "/@show-line-numbers", Boolean.toString(states[0]));
+ XConfiguration.set(XConfiguration.getXConfigurationDocument(), SciNotesOptions.DISPLAYPATH + "/@whereami", Boolean.toString(states[1]));
+ SciNotes.setWhereamiLineNumbering();
+ }
+
+ private void init() {
+ ButtonGroup group = new ButtonGroup();
+ JRadioButtonMenuItem radio;
+
+ for (int i = 0; i < 3; i++) {
+ radio = createRadioButtonMenuItem(i);
+ group.add(radio);
+ arr[i] = radio;
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return createMenu
+ */
+ public static Menu createMenu(String label, SciNotes editor, KeyStroke key) {
+ StringTokenizer tokens = new StringTokenizer(label, ";\uff1b");
+ String labelLineNumbering = tokens.nextToken();
+ String labelOff = tokens.nextToken();
+ String labelNormal = tokens.nextToken();
+ String labelWhereami = tokens.nextToken();
+
+ final LineNumbersAction ln = new LineNumbersAction(labelLineNumbering, editor);
+ String[] labels = new String[] {labelOff, labelNormal, labelWhereami};
+
+ final Menu menu = ScilabMenu.createMenu();
+ menu.setText(labelLineNumbering);
+
+ ln.arr[getState()].setSelected(true);
+
+ for (int i = 0; i < 3; i++) {
+ ((JMenu) menu.getAsSimpleMenu()).add(ln.arr[i]);
+ ln.arr[i].setText(labels[i]);
+ }
+
+ ((JMenu) menu.getAsSimpleMenu()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ ln.arr[getState()].setSelected(true);
+ }
+ });
+
+ return menu;
+ }
+
+ /**
+ * createRadioButtonMenuItem
+ * @param ln the LineNumbersAction
+ * @param title the label of the menuitem
+ * @param state the state associated with the menuitem
+ * @return JRadioButtonMenuItem
+ */
+ private static JRadioButtonMenuItem createRadioButtonMenuItem(final int state) {
+ JRadioButtonMenuItem radio = new JRadioButtonMenuItem();
+ radio.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ LineNumbersAction.setState(state);
+ }
+ });
+
+ return radio;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.java
new file mode 100755
index 000000000..a0e60978c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/LoadIntoScilabAction.java
@@ -0,0 +1,136 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.action_binding.InterpreterManagement;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * LoadIntoScilabAction class
+ * @author Allan CORNET
+ *
+ */
+public final class LoadIntoScilabAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -5659317486404897280L;
+
+ private static final int MAX_LINES_RECOMMANDED = 100;
+ private static final int NB_STANDARD_COLUMNS = 80;
+ private static final int MAX_CHARACTERS_RECOMMANDED = MAX_LINES_RECOMMANDED * NB_STANDARD_COLUMNS;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public LoadIntoScilabAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ String text = getEditor().getTextPane().getText();
+
+ if (text.compareTo("") != 0) {
+ boolean bContinue = false;
+
+ if (maxLinesRecommandedDetected(text)) {
+ if (ScilabModalDialog.show(getEditor(), SciNotesMessages.BIG_FILE_WARNING, SciNotesMessages.LOAD_INTO_SCILAB,
+ IconType.QUESTION_ICON, ButtonType.YES_NO) == AnswerOption.YES_OPTION) {
+ bContinue = true;
+ } else {
+ bContinue = false;
+ }
+ } else {
+ bContinue = true;
+ }
+
+ if (bContinue) {
+ String tmpFilename = "LOAD_INTO_SCILAB-";
+
+ FileOutputStream fos = null;
+ OutputStreamWriter out = null;
+ // save file as UTF-8
+ try {
+ File f = File.createTempFile(tmpFilename, ".sce");
+ String tmpFullFilename = f.getAbsolutePath();
+ fos = new FileOutputStream(f);
+ out = new OutputStreamWriter(fos , "UTF-8");
+ out.write(text);
+ out.flush();
+ String cmdToExec = "exec('" + tmpFullFilename + "', 1)";
+ InterpreterManagement.requestScilabExec(cmdToExec);
+ } catch (IOException e) {
+ ScilabModalDialog.show(getEditor(), SciNotesMessages.COULD_NOT_FIND_TMPFILE);
+ } finally {
+ try {
+ if (fos != null) {
+ fos.close();
+ }
+ if (out != null) {
+ out.close();
+ }
+ } catch (IOException e) { }
+ }
+ }
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new LoadIntoScilabAction(label, editor), key);
+ }
+
+ /**
+ * check if string is not too big
+ * @param text to scan
+ * @return true or false
+ */
+ private static boolean maxLinesRecommandedDetected(String text) {
+ if (text.length() > MAX_CHARACTERS_RECOMMANDED) {
+ return true;
+ }
+
+ String[] splitedStringOnLineSeparator = text.split(System.getProperty("line.separator"));
+ if (splitedStringOnLineSeparator.length > MAX_LINES_RECOMMANDED) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NewAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NewAction.java
new file mode 100755
index 000000000..372ef1195
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NewAction.java
@@ -0,0 +1,70 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * File creation management
+ * @author Bruno JOFRET
+ */
+public final class NewAction extends DefaultAction {
+
+ private static final long serialVersionUID = -6865132453503118587L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public NewAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Create file action
+ * @see org.scilab.modules.scinotes.actions.DefaultAction#doAction()
+ */
+ public void doAction() {
+ SciNotes ed = getEditor();
+ ed.addEmptyTab();
+ ConfigSciNotesManager.saveToOpenFiles(ed.getTextPane().getName(), ed, ed.getTextPane());
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new NewAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new NewAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextParagraphAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextParagraphAction.java
new file mode 100755
index 000000000..6450d7348
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextParagraphAction.java
@@ -0,0 +1,98 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.util.regex.Pattern;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * NextParagraphAction Class
+ * @author Calixte DENIZET
+ */
+public class NextParagraphAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+ private static final Pattern pat = Pattern.compile("[ \\t\\r\\n]*");
+ protected int next = +1;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public NextParagraphAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ int line = root.getElementIndex(sep.getCaretPosition());
+ boolean empty = isEmptyLine(doc, line);
+ int i = line + next;
+ int stop = next > 0 ? root.getElementCount() : -1;
+ for (; i != stop; i += next) {
+ boolean b = isEmptyLine(doc, i);
+ if (empty && !b) {
+ empty = false;
+ } else if (!empty && b) {
+ break;
+ }
+ }
+ if (i == stop) {
+ i = next > 0 ? stop - 1 : 0;
+ }
+
+ sep.setCaretPosition(root.getElement(i).getStartOffset());
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new NextParagraphAction(label, editor), key);
+ }
+
+ /**
+ * Test if a lin e is empty
+ * @param doc the document
+ * @param line the line number
+ * @return true if the line is empty
+ */
+ private static final boolean isEmptyLine(ScilabDocument doc, int line) {
+ try {
+ Element e = doc.getDefaultRootElement().getElement(line);
+ int s = e.getStartOffset();
+ String str = doc.getText(s, e.getEndOffset() - s);
+ return pat.matcher(str).matches();
+ } catch (BadLocationException e) { }
+
+ return false;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextTabAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextTabAction.java
new file mode 100755
index 000000000..0a1610869
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/NextTabAction.java
@@ -0,0 +1,60 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * NextTabAction Class
+ * @author Bruno JOFRET
+ *
+ */
+public final class NextTabAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 3283491475309953312L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public NextTabAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ int index = getEditor().getTabPane().getSelectedIndex();
+ int count = getEditor().getTabPane().getTabCount();
+ getEditor().getTabPane().setSelectedIndex((index + 1) % count);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new NextTabAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenAction.java
new file mode 100755
index 000000000..c9d7af796
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenAction.java
@@ -0,0 +1,116 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.bridge.filechooser.SwingScilabFileChooser;
+import org.scilab.modules.gui.filechooser.Juigetfile;
+import org.scilab.modules.gui.filechooser.ScilabFileChooser;
+import org.scilab.modules.gui.utils.ConfigManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * File opening management
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public class OpenAction extends DefaultAction {
+
+ private static final long serialVersionUID = -8765712033802048782L;
+ private String initialDirectoryPath;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public OpenAction(String name, SciNotes editor) {
+ this(name, editor, "");
+ }
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ * @param path the path where to open the filechooser
+ */
+ public OpenAction(String name, SciNotes editor, String path) {
+ super(name, editor);
+ this.initialDirectoryPath = path;
+ }
+
+ /**
+ * Open file action
+ * @see org.scilab.modules.scinotes.actions.DefaultAction#doAction()
+ */
+ public void doAction() {
+ String path;
+ if (initialDirectoryPath.length() == 0) {
+ path = getEditor().getTextPane().getName();
+ } else {
+ path = initialDirectoryPath;
+ }
+
+ if (path == null) {
+ path = ConfigManager.getLastOpenedDirectory();
+ }
+
+ String[] mask = new String[] {"*.cos*", "*.sci", "*.sce", "*.tst", "*.start", "*.quit", "*.dem", "*.sc*", "all"};
+
+ SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+ fileChooser.setMultiSelectionEnabled(true);
+ fileChooser.setInitialDirectory(path);
+ fileChooser.setAcceptAllFileFilterUsed(true);
+ fileChooser.addMask(mask, null);
+ fileChooser.setUiDialogType(Juigetfile.SAVE_DIALOG);
+
+ int retval = fileChooser.showOpenDialog(getEditor());
+ if (retval == JFileChooser.APPROVE_OPTION) {
+ File[] f = fileChooser.getSelectedFiles();
+ for (int i = 0; i < f.length; i++) {
+ RecentFileAction.updateRecentOpenedFilesMenu(getEditor());
+ getEditor().readFile(f[i]);
+ }
+ }
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static Object createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new OpenAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new OpenAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenFileInAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenFileInAction.java
new file mode 100755
index 000000000..da8425cd3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenFileInAction.java
@@ -0,0 +1,115 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.bridge.menu.SwingScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * Action to open the filechooser in a predefined directory
+ * @author Calixte DENIZET
+ */
+public final class OpenFileInAction extends OpenAction {
+
+ private static final long serialVersionUID = 1L;
+ private static final String SCI = "SCI";
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public OpenFileInAction(String name, SciNotes editor) {
+ super(name, editor, name);
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param editor associated SciNotes instance
+ * @param path the path to open
+ * @return the menuitem
+ */
+ public static MenuItem createMenu(SciNotes editor, String path) {
+ return createMenu(path, null, new OpenFileInAction(path, editor), null);
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static Object createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final Menu favoriteDirs = ScilabMenu.createMenu();
+ ((SwingScilabMenu) favoriteDirs.getAsSimpleMenu()).addMenuListener(new MenuListener() {
+
+ public void menuCanceled(MenuEvent e) { }
+ public void menuDeselected(MenuEvent e) { }
+ public void menuSelected(MenuEvent e) {
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ }
+ });
+
+ favoriteDirs.setText(label);
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ return favoriteDirs;
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ StringTokenizer token = new StringTokenizer(tooltip, ";\uff1b");
+ String tt = token.nextToken();
+ String path = token.nextToken();
+ if (path.equals(SCI)) {
+ path = System.getenv(SCI);
+ } else if (path.equals("MODULES")) {
+ path = System.getenv(SCI) + "/modules";
+ }
+
+ return createButton(tt + path, icon, new OpenFileInAction(path, editor));
+ }
+
+ /**
+ * Update menu displaying favorite directories.
+ * @param menu the menu to update
+ * @param editor SciNotes
+ */
+ public static void updateFavoriteDirsMenu(Menu menu, SciNotes editor) {
+ ((SwingScilabMenu) menu.getAsSimpleMenu()).removeAll();
+ List<File> dirs = ConfigSciNotesManager.getAllFavoriteDirs();
+
+ for (int i = 0; i < dirs.size(); i++) {
+ menu.add(createMenu(editor, dirs.get(i).getPath()));
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.java
new file mode 100755
index 000000000..0bdf4cbb3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenSourceFileOnKeywordAction.java
@@ -0,0 +1,343 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+import java.util.Iterator;
+import java.util.NavigableSet;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.JTextComponent;
+
+import org.scilab.modules.action_binding.InterpreterManagement;
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.KeywordEvent;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabLexer;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * OpenSourceFileOnKeywordAction Class
+ * @author Calixte DENIZET
+ */
+public class OpenSourceFileOnKeywordAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final int GAP = 5;
+ private static boolean windowAlreadyExist;
+ private static JFrame mainFrame;
+
+ private NavigableSet<String> macrosSet;
+ private JButton okButton;
+ private JButton cancelButton;
+ private JComboBox comboComplete;
+ private boolean onMenu;
+ private int lastSize;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public OpenSourceFileOnKeywordAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ * @param onMenu if true the dialog will be open when a menu is actionned
+ */
+ public OpenSourceFileOnKeywordAction(String name, SciNotes editor, boolean onMenu) {
+ this(name, editor);
+ this.onMenu = onMenu;
+ }
+
+ /**
+ * Clean
+ */
+ public static void close() {
+ mainFrame = null;
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ KeywordEvent kwe = sep.getKeywordEvent(sep.getSelectionEnd());
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ if (ScilabLexerConstants.isOpenable(kwe.getType())) {
+ String name = "";
+ try {
+ name = doc.getText(kwe.getStart(), kwe.getLength());
+ } catch (BadLocationException e) { }
+ if (onMenu) {
+ openSourceBox(name);
+ } else {
+ openSource(name);
+ }
+ } else {
+ openSourceBox("");
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new OpenSourceFileOnKeywordAction(label, editor, true), key);
+ }
+
+ /**
+ * Show the source of a macro if it is present in the pane or open the source
+ * @param pane the ScilabEditorPane
+ * @param name the macro's name
+ */
+ public static void openSource(ScilabEditorPane pane, String name) {
+ ScilabDocument doc = (ScilabDocument) pane.getDocument();
+ int pos = doc.searchFunctionByName(name);
+ if (pos != -1) {
+ pane.scrollTextToPos(pos);
+ } else {
+ String path = "get_function_path('" + name + "')";
+ InterpreterManagement.requestScilabExec("if " + path + " ~=[] then editor(" + path + ");end");
+ }
+ }
+
+ /**
+ * Close the window
+ */
+ public static void closeOpenSourceWindow() {
+ if (windowAlreadyExist) {
+ mainFrame.dispose();
+ windowAlreadyExist = false;
+ }
+ }
+
+ /**
+ * Open a window to get the name of the macro
+ * @param name the name of a macro
+ */
+ public void openSourceBox(String name) {
+ if (windowAlreadyExist) {
+ mainFrame.setVisible(true);
+ if (name.length() != 0) {
+ comboComplete.removeAllItems();
+ comboComplete.getEditor().setItem(name);
+ comboComplete.hidePopup();
+ }
+ return;
+ }
+
+ macrosSet = new TreeSet(ScilabLexer.macros);
+
+ mainFrame = new JFrame();
+ mainFrame.setAlwaysOnTop(true);
+ mainFrame.setIconImage(new ImageIcon(FindIconHelper.findIcon("scilab")).getImage());
+ mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+ windowAlreadyExist = true;
+
+ JLabel label = new JLabel(SciNotesMessages.OPEN_SOURCE_FILE_OF);
+
+ comboComplete = new JComboBox();
+ comboComplete.setEditable(true);
+ if (name.length() != 0) {
+ comboComplete.removeAllItems();
+ comboComplete.getEditor().setItem(name);
+ } else {
+ updateComboComplete(" ");
+ }
+
+ comboComplete.hidePopup();
+
+ cancelButton = new JButton(SciNotesMessages.CANCEL);
+ okButton = new JButton(SciNotesMessages.OK);
+ okButton.setPreferredSize(cancelButton.getPreferredSize());
+
+ JPanel panelButton = new JPanel();
+ panelButton.setLayout(new GridLayout(1, 4, GAP, GAP));
+ panelButton.setBorder(BorderFactory.createEmptyBorder(GAP, 0, 0, 0));
+ panelButton.add(new JLabel());
+ panelButton.add(new JLabel());
+ panelButton.add(cancelButton);
+ panelButton.add(okButton);
+
+ JPanel panelCombo = new JPanel();
+ panelCombo.setLayout(new GridLayout(1, 2, GAP, GAP));
+ panelCombo.add(label);
+ panelCombo.add(comboComplete);
+
+ JPanel panelFrame = new JPanel();
+ panelFrame.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+ panelFrame.setLayout(new BoxLayout(panelFrame, BoxLayout.PAGE_AXIS));
+ panelFrame.add(panelCombo);
+ panelFrame.add(panelButton);
+
+ mainFrame.setContentPane(panelFrame);
+
+ cancelButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ OpenSourceFileOnKeywordAction.windowAlreadyExist = false;
+ mainFrame.dispose();
+ }
+ });
+
+ okButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ OpenSourceFileOnKeywordAction.windowAlreadyExist = false;
+ mainFrame.dispose();
+ openSource((String) comboComplete.getEditor().getItem());
+ }
+ });
+
+ comboComplete.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+
+ private String old = "";
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ int code = e.getKeyCode();
+ if (code == KeyEvent.VK_ENTER) {
+ if (comboComplete.getSelectedIndex() == -1 && comboComplete.getItemCount() > 0) {
+ comboComplete.setSelectedIndex(0);
+ }
+ comboComplete.hidePopup();
+ okButton.requestFocus();
+ } else if (code == KeyEvent.VK_ESCAPE) {
+ comboComplete.hidePopup();
+ } else if (code != KeyEvent.VK_UP && code != KeyEvent.VK_DOWN) {
+ updateComboComplete(old);
+ comboComplete.setPopupVisible(true);
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent arg0) {
+ old = (String) comboComplete.getEditor().getItem();
+ }
+
+ @Override
+ public void keyTyped(KeyEvent arg0) { }
+ });
+
+ mainFrame.addWindowListener(new WindowListener() {
+ @Override
+ public void windowClosed(WindowEvent arg0) { }
+ @Override
+ public void windowDeiconified(WindowEvent arg0) { }
+ @Override
+ public void windowActivated(WindowEvent arg0) { }
+
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ OpenSourceFileOnKeywordAction.windowAlreadyExist = false;
+ mainFrame.dispose();
+ }
+
+ @Override
+ public void windowDeactivated(WindowEvent arg0) { }
+ @Override
+ public void windowIconified(WindowEvent arg0) { };
+ @Override
+ public void windowOpened(WindowEvent arg0) { }
+ });
+
+ mainFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ mainFrame.setTitle(SciNotesMessages.OPEN_SOURCE);
+ mainFrame.pack();
+ mainFrame.setLocationRelativeTo(getEditor());
+ mainFrame.setVisible(true);
+ }
+
+ /**
+ * Open the source of a macro
+ * @param name of the macro
+ */
+ private void openSource(String name) {
+ openSource(getEditor().getTextPane(), name);
+ }
+
+ /**
+ * Update the comboBox with the possible completion of the name
+ * entered in the comboBox.
+ * @param old the previous name
+ */
+ private void updateComboComplete(String old) {
+ String name = (String) comboComplete.getEditor().getItem();
+ Set subset = null;
+ if (name != null && !name.equals(old)) {
+ String bound = "";
+ Iterator<String> iter;
+ int len = name.length();
+ if (len != 0) {
+ if (len == 1) {
+ bound = new String(new char[] {(char) (name.charAt(0) + 1)});
+ } else {
+ bound = name.substring(0, len - 1);
+ bound += (char) (name.charAt(len - 1) + 1);
+ }
+ /* If "abc" is entered, we built "abd" (last letter + 1) and we
+ retrieve all the names between "abc" and "abd" (excluded) */
+ subset = macrosSet.subSet(name, true, bound, false);
+ iter = subset.iterator();
+ } else {
+ iter = macrosSet.iterator();
+ }
+
+ if (subset != null && subset.size() != lastSize) {
+ comboComplete.removeAllItems();
+ while (iter.hasNext()) {
+ comboComplete.addItem(iter.next());
+ }
+ lastSize = subset.size();
+ comboComplete.setPopupVisible(false);
+ }
+
+ comboComplete.getEditor().setItem(name);
+ JTextComponent c = ((JTextComponent) comboComplete.getEditor().getEditorComponent());
+ c.setSelectionStart(c.getSelectionEnd());
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.java
new file mode 100755
index 000000000..bf25af8ef
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenTabInNewWindowAction.java
@@ -0,0 +1,53 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Open a tab in a new window
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class OpenTabInNewWindowAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated editor
+ */
+ public OpenTabInNewWindowAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new OpenTabInNewWindowAction(label, editor), key);
+ }
+
+ /**
+ * Action
+ */
+ public void doAction() {
+ SciNotes.cloneAndCloseCurrentTab(getEditor(), false);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenURLAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenURLAction.java
new file mode 100755
index 000000000..f0e822ffd
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenURLAction.java
@@ -0,0 +1,83 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.utils.WebBrowser;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.KeywordEvent;
+
+/**
+ * OpenURLAction Class
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class OpenURLAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public OpenURLAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ KeywordEvent kwe = sep.getKeywordEvent(sep.getSelectionEnd());
+ if (ScilabLexerConstants.URL == kwe.getType() || ScilabLexerConstants.MAIL == kwe.getType()) {
+ try {
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ String url = doc.getText(kwe.getStart(), kwe.getLength());
+ WebBrowser.openUrl(url);
+ } catch (BadLocationException e) { }
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final MenuItem menuitem = createMenu(label, null, new OpenURLAction(label, editor), key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String keyword = editor.getTextPane().getSelectedText();
+ if (keyword == null) {
+ KeywordEvent kwe = editor.getTextPane().getKeywordEvent();
+ menuitem.setEnabled(ScilabLexerConstants.MAIL == kwe.getType() || ScilabLexerConstants.URL == kwe.getType());
+ }
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OverwriteAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OverwriteAction.java
new file mode 100755
index 000000000..073bfb07a
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OverwriteAction.java
@@ -0,0 +1,67 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * OverwriteAction class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class OverwriteAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public OverwriteAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Create Menu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final MenuItem menuitem = createMenu(label, null, new OverwriteAction(label, editor), key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ menuitem.setEnabled(editor.getTextPane().checkExternalModif());
+ }
+ }
+ });
+
+ return menuitem;
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ getEditor().overwrite(getEditor().getTabPane().getSelectedIndex());
+ getEditor().getTextPane().updateInfosWhenFocused();
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PageSetupAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PageSetupAction.java
new file mode 100755
index 000000000..b3631a3ae
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PageSetupAction.java
@@ -0,0 +1,74 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.print.PageFormat;
+import java.awt.print.PrinterJob;
+import javax.print.attribute.HashPrintRequestAttributeSet;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * Class Page setup action for SciNotes
+ * @author Sylvestre Koumar
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class PageSetupAction extends DefaultAction {
+
+ private static PageFormat pageFormat;
+
+ static {
+ pageFormat = new PageFormat();
+ pageFormat.setPaper(ConfigSciNotesManager.getPaperFormat());
+ }
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor Editor
+ */
+ public PageSetupAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Function Run
+ */
+ public void doAction() {
+ pageFormat = PrinterJob.getPrinterJob().pageDialog(pageFormat);
+ ConfigSciNotesManager.savePaperFormat(pageFormat.getPaper());
+ }
+
+ /**
+ * Create the MenuItem for page setup action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PageSetupAction(label, editor), key);
+ }
+
+ /**
+ * Get the page format
+ * @return PageFormat
+ */
+ public static PageFormat getPageFormat() {
+ return pageFormat;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteAction.java
new file mode 100755
index 000000000..61c6ce86c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteAction.java
@@ -0,0 +1,91 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesCaret;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorKit;
+
+/**
+ * Class for paste action
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class PasteAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor to associate
+ */
+ public PasteAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Action !
+ */
+ public void doAction() {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ try {
+ String str = (String) Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this).getTransferData(DataFlavor.stringFlavor);
+ if (str != null && !str.isEmpty()) {
+ str = ((ScilabEditorKit) getEditor().getEditorKit()).read(new StringReader(str)).content;
+ doc.mergeEditsBegin();
+ getEditor().getTextPane().replaceSelection(str);
+ doc.mergeEditsEnd();
+ if (!((SciNotesCaret) getEditor().getTextPane().getCaret()).isEmptySelection()) {
+ ((SciNotesCaret) getEditor().getTextPane().getCaret()).removeHighlights();
+ }
+ }
+ } catch (UnsupportedFlavorException e) {
+ } catch (IOException e) {
+ System.err.println(e);
+ }
+ }
+
+ /**
+ * Create the MenuItem for print action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PasteAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new PasteAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteColumnAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteColumnAction.java
new file mode 100755
index 000000000..5258e22c4
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteColumnAction.java
@@ -0,0 +1,138 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.StringTokenizer;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.CompoundUndoManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesCaret;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorKit;
+
+/**
+ * Class for paste action
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class PasteColumnAction extends DefaultAction {
+
+ private static final String CR = "\n";
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor to associate
+ */
+ public PasteColumnAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Action !
+ */
+ public void doAction() {
+ ScilabDocument doc = (ScilabDocument) getEditor().getTextPane().getDocument();
+ Element root = doc.getDefaultRootElement();
+ String str = null;
+ try {
+ str = (String) Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this).getTransferData(DataFlavor.stringFlavor);
+ if (str != null) {
+ str = ((ScilabEditorKit) getEditor().getEditorKit()).read(new StringReader(str)).content;
+ }
+ } catch (UnsupportedFlavorException ex1) {
+ System.err.println(ex1);
+ } catch (IOException ex2) {
+ System.err.println(ex2);
+ }
+ if (str != null) {
+ SciNotesCaret caret = (SciNotesCaret) getEditor().getTextPane().getCaret();
+ int pos;
+ if (caret.isEmptySelection()) {
+ pos = getEditor().getTextPane().getSelectionStart();
+ } else {
+ int[][] positions = caret.getSelectedPositions();
+ pos = positions[0][0];
+ }
+ int spos = pos;
+ doc.getUndoManager().enableOneShot(true);
+ doc.mergeEditsBegin();
+ getEditor().getTextPane().replaceSelection("");
+ StringTokenizer tokens = new StringTokenizer(str, CR);
+ int index = root.getElementIndex(pos);
+ String crs = initString(tokens.countTokens() - root.getElementCount() + index, '\n');
+ if (crs.length() > 0) {
+ try {
+ doc.insertString(doc.getLength(), crs, null);
+ } catch (BadLocationException e) { }
+ }
+ int col = pos - root.getElement(index).getStartOffset();
+ while (tokens.hasMoreTokens()) {
+ String tok = tokens.nextToken();
+ int end = root.getElement(index).getEndOffset() - 1;
+ if (pos > end) {
+ tok = initString(pos - end, ' ') + tok;
+ pos = end;
+ }
+ try {
+ doc.insertString(pos, tok, null);
+ } catch (BadLocationException e) { }
+ if (index < root.getElementCount() - 1) {
+ pos = root.getElement(++index).getStartOffset() + col;
+ }
+ }
+ doc.mergeEditsEnd();
+ doc.getUndoManager().enableOneShot(false);
+ getEditor().getTextPane().setCaretPosition(spos);
+ }
+ }
+
+ /**
+ * Init a string
+ * @param n the length of the string
+ * @param c the char to use to initialize
+ * @return the initialized string
+ */
+ private static String initString(int n, char c) {
+ if (n > 0) {
+ char[] buf = new char[n];
+ for (int i = 0; i < n; i++) {
+ buf[i] = c;
+ }
+
+ return new String(buf);
+ }
+ return "";
+ }
+
+ /**
+ * Create the MenuItem for print action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PasteColumnAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousParagraphAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousParagraphAction.java
new file mode 100755
index 000000000..f449984d4
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousParagraphAction.java
@@ -0,0 +1,48 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * PreviousParagraphAction Class
+ * @author Calixte DENIZET
+ */
+public class PreviousParagraphAction extends NextParagraphAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public PreviousParagraphAction(String name, SciNotes editor) {
+ super(name, editor);
+ next = -1;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PreviousParagraphAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousTabAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousTabAction.java
new file mode 100755
index 000000000..e275b562c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousTabAction.java
@@ -0,0 +1,56 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Class Previous tab action for SciNotes
+ * @author Sylvestre Koumar
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class PreviousTabAction extends DefaultAction {
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor Editor
+ */
+ public PreviousTabAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ int index = getEditor().getTabPane().getSelectedIndex();
+ int count = getEditor().getTabPane().getTabCount();
+ getEditor().getTabPane().setSelectedIndex((count + index - 1) % count);
+ }
+
+ /**
+ * Create the MenuItem for previous tab action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PreviousTabAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintAction.java
new file mode 100755
index 000000000..59a42fbc7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintAction.java
@@ -0,0 +1,77 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.jvm.LoadClassPath;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.CodeExporter;
+
+/**
+ * Class Print action for SciNotes
+ * @author Sylvestre Koumar
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class PrintAction extends DefaultAction {
+
+ private boolean codeConverterLoaded;
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor the editor
+ */
+ public PrintAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Function doAction
+ */
+ public void doAction() {
+ if (!codeConverterLoaded) {
+ LoadClassPath.loadOnUse("copyAsHTMLinScinotes");
+ LoadClassPath.loadOnUse("pdf_ps_eps_graphic_export");
+ codeConverterLoaded = true;
+ }
+ ScilabEditorPane pane = getEditor().getTextPane();
+ CodeExporter.convert(pane, null, CodeExporter.PRINT, PageSetupAction.getPageFormat());
+ }
+
+ /**
+ * Create the MenuItem for print action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PrintAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new PrintAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintPreviewAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintPreviewAction.java
new file mode 100755
index 000000000..f509ae504
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintPreviewAction.java
@@ -0,0 +1,81 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.jvm.LoadClassPath;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.CodeExporter;
+
+/**
+ * PrintPreviewAction class
+ * @author Bruno JOFRET
+ *
+ */
+public final class PrintPreviewAction extends DefaultAction {
+
+ private boolean codeConverterLoaded;
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -3222532237364937814L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public PrintPreviewAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ if (!codeConverterLoaded) {
+ LoadClassPath.loadOnUse("copyAsHTMLinScinotes");
+ LoadClassPath.loadOnUse("pdf_ps_eps_graphic_export");
+ codeConverterLoaded = true;
+ }
+ ScilabEditorPane pane = getEditor().getTextPane();
+ CodeExporter.convert(pane, null, CodeExporter.PREVIEW, PageSetupAction.getPageFormat());
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new PrintPreviewAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new PrintPreviewAction(tooltip, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RecentFileAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RecentFileAction.java
new file mode 100755
index 000000000..0f9b38d5f
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RecentFileAction.java
@@ -0,0 +1,126 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.bridge.menu.SwingScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesOptions;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+
+/**
+ * RecentFileAction Class
+ * @author Allan SIMON
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class RecentFileAction extends DefaultAction {
+
+ private static Map<SciNotes, Menu> menus = new HashMap<SciNotes, Menu>();
+
+ private File recentFile;
+
+ /**
+ * Constructor
+ * @param editor SciNotes
+ * @param f File
+ */
+ public RecentFileAction(SciNotes editor , File f) {
+ super(f.getName(), editor);
+ recentFile = f;
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ConfigSciNotesManager.saveToRecentOpenedFiles(recentFile.getPath());
+ getEditor().readFile(recentFile);
+ getEditor().setTitle(recentFile.getPath() + " - SciNotes");
+ }
+
+ /**
+ * Clean
+ */
+ public static void close(SciNotes ed) {
+ menus.remove(ed);
+ }
+
+ /**
+ * createMenu
+ * @param editor SciNotes
+ * @param f File
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(SciNotes editor, File f) {
+ return createMenu(f.getName(), null, new RecentFileAction(editor, f), null);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor associated editor
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static Menu createMenu(String label, SciNotes editor, KeyStroke key) {
+ Menu recentsMenu = ScilabMenu.createMenu();
+ recentsMenu.setText(label);
+ menus.put(editor, recentsMenu);
+
+ updateRecentOpenedFilesMenu(editor);
+ return recentsMenu;
+ }
+
+ /**
+ * Update menu displaying recent opened files.
+ * @param editor SciNotes
+ */
+ public static void updateRecentOpenedFilesMenu() {
+ List<File> recentFiles = ConfigSciNotesManager.getAllRecentOpenedFiles();
+ for (SciNotes ed : menus.keySet()) {
+ Menu recentsMenu = menus.get(ed);
+ if (recentsMenu != null) {
+ ((SwingScilabMenu) recentsMenu.getAsSimpleMenu()).removeAll();
+ final int N = Math.min(recentFiles.size(), SciNotesOptions.getSciNotesPreferences().numberOfRecentlyOpen);
+ for (int i = N - 1; i >= 0; i--) {
+ recentsMenu.add(RecentFileAction.createMenu(ed, recentFiles.get(i)));
+ }
+ }
+ }
+ }
+
+ /**
+ * Update menu displaying recent opened files.
+ * @param editor SciNotes
+ */
+ public static void updateRecentOpenedFilesMenu(SciNotes editor) {
+ List<File> recentFiles = ConfigSciNotesManager.getAllRecentOpenedFiles();
+ Menu recentsMenu = menus.get(editor);
+ if (recentsMenu != null) {
+ ((SwingScilabMenu) recentsMenu.getAsSimpleMenu()).removeAll();
+ final int N = Math.min(recentFiles.size(), SciNotesOptions.getSciNotesPreferences().numberOfRecentlyOpen);
+ for (int i = N - 1; i >= 0; i--) {
+ recentsMenu.add(RecentFileAction.createMenu(editor, recentFiles.get(i)));
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RedoAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RedoAction.java
new file mode 100755
index 000000000..98d3ce681
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RedoAction.java
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * CommentAction Class
+ * @author Bruno JOFRET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class RedoAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public RedoAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ getEditor().redo();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new RedoAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ JButton button = createButton(tooltip, icon, new RedoAction(tooltip, editor));
+ editor.setRedoButton(button);
+ return button;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.java
new file mode 100755
index 000000000..ddeff555b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RegisterFavoriteDirsAction.java
@@ -0,0 +1,214 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.swing.JFileChooser;
+import javax.swing.KeyStroke;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
+import org.scilab.modules.gui.filechooser.ScilabFileChooser;
+import org.scilab.modules.gui.bridge.filechooser.SwingScilabFileChooser;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.bridge.menu.SwingScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * Action to register favorite directories
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class RegisterFavoriteDirsAction extends DefaultAction {
+
+ private static MenuItem addDir;
+ private static MenuItem rmDir;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public RegisterFavoriteDirsAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Clean
+ */
+ public static void close() {
+ addDir = null;
+ rmDir = null;
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static Object createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer token = new StringTokenizer(label, ";\uff1b");
+ String label1 = token.nextToken();
+ String label2 = token.nextToken();
+ String label3 = token.nextToken();
+
+ final Menu favoriteDirs = ScilabMenu.createMenu();
+ ((SwingScilabMenu) favoriteDirs.getAsSimpleMenu()).addMenuListener(new MenuListener() {
+
+ public void menuCanceled(MenuEvent e) { }
+ public void menuDeselected(MenuEvent e) { }
+ public void menuSelected(MenuEvent e) {
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ }
+ });
+
+ favoriteDirs.setText(label1);
+ addDir = AddDirectoryAction.createMenu(favoriteDirs, label2, editor, null);
+ rmDir = RmDirectoryAction.createMenu(favoriteDirs, label3, editor, null);
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ return favoriteDirs;
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param editor associated SciNotes instance
+ * @param path the path to open
+ * @return the menuitem
+ */
+ public static MenuItem createMenu(SciNotes editor, String path) {
+ return createMenu(path, null, new DefaultAction("", editor) {
+ public void doAction() { }
+ }, null);
+ }
+
+ /**
+ * Update menu displaying favorite directories.
+ * @param menu the menu to update
+ * @param editor SciNotes
+ */
+ public static void updateFavoriteDirsMenu(Menu menu, SciNotes editor) {
+ ((SwingScilabMenu) menu.getAsSimpleMenu()).removeAll();
+ menu.add(addDir);
+ menu.add(rmDir);
+
+ List<File> dirs = ConfigSciNotesManager.getAllFavoriteDirs();
+
+ if (dirs.size() != 0) {
+ menu.addSeparator();
+ }
+
+ for (int i = 0; i < dirs.size(); i++) {
+ menu.add(createMenu(editor, dirs.get(i).getPath()));
+ }
+ }
+
+ /**
+ * Inner class to handle the action which consists to add a new directory
+ */
+ @SuppressWarnings(value = { "serial" })
+ static class AddDirectoryAction extends DefaultAction {
+
+ private Menu menu;
+
+ /**
+ * Constructor
+ * @param menu the menu associated with this action
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public AddDirectoryAction(Menu menu, String name, SciNotes editor) {
+ super(name, editor);
+ this.menu = menu;
+ }
+
+ /**
+ * Open file action
+ * @see org.scilab.modules.scinotes.actions.DefaultAction#doAction()
+ */
+ public void doAction() {
+ SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+ fileChooser.setDialogTitle(getCommand());
+ fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ fileChooser.setAcceptAllFileFilterUsed(false);
+ if (fileChooser.showOpenDialog(getEditor()) == JFileChooser.APPROVE_OPTION) {
+ File path = fileChooser.getSelectedFile();
+ if (path == null || path.isFile()) {
+ path = fileChooser.getCurrentDirectory();
+ }
+ ConfigSciNotesManager.saveFavoriteDirectory(path.getPath());
+ updateFavoriteDirsMenu(menu, getEditor());
+ }
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param menu the menu associated with this action
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static MenuItem createMenu(Menu menu, String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new AddDirectoryAction(menu, label, editor), key);
+ }
+ }
+
+ /**
+ * Inner class to handle the action which consists to remove a directory
+ @SuppressWarnings(value = { "serial" })
+ */
+ static class RmDirectoryAction extends DefaultAction {
+
+ private Menu menu;
+
+ /**
+ * Constructor
+ * @param menu the menu associated with this action
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public RmDirectoryAction(Menu menu, String name, SciNotes editor) {
+ super(name, editor);
+ this.menu = menu;
+ }
+
+ /**
+ * Open file action
+ * @see org.scilab.modules.scinotes.actions.DefaultAction#doAction()
+ */
+ public void doAction() {
+ ConfigSciNotesManager.rmLastFavoriteDirectory();
+ updateFavoriteDirsMenu(menu, getEditor());
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param menu the menu associated with this action
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static MenuItem createMenu(Menu menu, String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new RmDirectoryAction(menu, label, editor), key);
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ReloadAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ReloadAction.java
new file mode 100755
index 000000000..a52865d78
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ReloadAction.java
@@ -0,0 +1,55 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * ReloadAction class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class ReloadAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ReloadAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Create Menu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ReloadAction(label, editor), key);
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ getEditor().reload(getEditor().getTabPane().getSelectedIndex());
+ getEditor().getTextPane().updateInfosWhenFocused();
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveAnchorAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveAnchorAction.java
new file mode 100755
index 000000000..ebcdf1a8c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveAnchorAction.java
@@ -0,0 +1,65 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * RemoveAnchorAction Class
+ * @author Calixte DENIZET
+ */
+public class RemoveAnchorAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public RemoveAnchorAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ ScilabDocument.ScilabLeafElement line = (ScilabDocument.ScilabLeafElement) root.getElement(root.getElementIndex(sep.getCaretPosition()));
+ line.setAnchor(null);
+ sep.getXln().repaint();
+ if (getEditor().getNavigator() != null) {
+ getEditor().getNavigator().update();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new RemoveAnchorAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.java
new file mode 100755
index 000000000..f2a1b0b1b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RemoveTrailingWhiteAction.java
@@ -0,0 +1,93 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.io.IOException;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.TrailingWhiteManager;
+
+/**
+ * RemoveTrailingWhiteAction Class
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class RemoveTrailingWhiteAction extends DefaultAction {
+
+ /**
+ * Construtor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public RemoveTrailingWhiteAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int pos = sep.getCaretPosition();
+ TrailingWhiteManager trailing = sep.getTrailingWhiteManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+
+ doc.mergeEditsBegin();
+ if (start == end) {
+ int ret = trailing.removeTrailingWhite(start);
+ if (ret != -1) {
+ sep.setCaretPosition(ret);
+ }
+ } else {
+ int[] ret = new int[2];
+ ret = trailing.removeTrailingWhite(start, end - 1);
+ if (ret != null) {
+ if (pos == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * @return an action to reindent a document
+ */
+ public static SciNotes.ActionOnDocument getActionOnDocument() {
+ return new SciNotes.ActionOnDocument() {
+ public void actionOn(ScilabDocument doc) throws IOException {
+ TrailingWhiteManager trailingWhite = new TrailingWhiteManager(doc);
+ trailingWhite.removeTrailingWhite(0, doc.getLength());
+ }
+ };
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new RemoveTrailingWhiteAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.java
new file mode 100755
index 000000000..11d782810
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.java
@@ -0,0 +1,123 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * Class for paste action
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class RepeatSelectionOnColumnAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor to associate
+ */
+ public RepeatSelectionOnColumnAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Action !
+ */
+ public void doAction() {
+ ScilabEditorPane pane = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) pane.getDocument();
+ Element root = doc.getDefaultRootElement();
+ String str = null;
+ boolean select = false;
+
+ if (pane.getSelectionStart() == pane.getSelectionEnd()) {
+ try {
+ str = doc.getText(pane.getCaretPosition(), 1);
+ } catch (BadLocationException e) { }
+ } else {
+ str = pane.getSelectedText();
+ select = true;
+ }
+
+ if (str != null) {
+ doc.mergeEditsBegin();
+ int pos = pane.getSelectionStart();
+ int index = root.getElementIndex(pos);
+ int col = pos - root.getElement(index).getStartOffset();
+ int len = str.length();
+ String cr = "";
+ int end;
+ int spos = 0;
+ if (index < root.getElementCount() - 1) {
+ pos = root.getElement(index + 1).getStartOffset() + col;
+ end = root.getElement(index + 1).getEndOffset() - 1;
+ } else {
+ cr = "\n";
+ spos = 1;
+ end = root.getElement(index).getEndOffset() - 1;
+ pos = end + col;
+ }
+
+ spos += pos;
+ if (pos >= end) {
+ str = cr + whites(pos - end) + str;
+ pos = end;
+ }
+ try {
+ doc.insertString(pos, str, null);
+ } catch (BadLocationException e) { }
+
+ doc.mergeEditsEnd();
+ if (select) {
+ pane.select(spos, spos + len);
+ } else {
+ pane.setCaretPosition(spos);
+ }
+ }
+ }
+
+ /**
+ * Generates a string of whites
+ * @param n the whites number
+ * @param the string
+ */
+ private static String whites(int n) {
+ if (n > 0) {
+ char[] buf = new char[n];
+ for (int i = 0; i < n; i++) {
+ buf[i] = ' ';
+ }
+
+ return new String(buf);
+ }
+ return "";
+ }
+
+ /**
+ * Create the MenuItem for print action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new RepeatSelectionOnColumnAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.java
new file mode 100755
index 000000000..6ea17ae75
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.java
@@ -0,0 +1,577 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Paul Griffiths
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.Vector;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractCellEditor;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.KeyStroke;
+import javax.swing.UIManager;
+import javax.swing.event.ChangeEvent;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreeCellEditor;
+import javax.swing.tree.TreeCellRenderer;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
+import org.scilab.modules.gui.bridge.menubar.SwingScilabMenuBar;
+import org.scilab.modules.gui.bridge.toolbar.SwingScilabToolBar;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * RestoreOpenedFilesAction Class
+ * @author Paul Griffiths
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class RestoreOpenedFilesAction extends DefaultCheckAction {
+
+ private static final int GAP = 10;
+ private static final String ESCAPE = "ESCAPE";
+ private static final Icon SCILAB_ICON = new ImageIcon(FindIconHelper.findIcon("scilab"));
+ private static List<File> selectedFiles;
+ private static Map<SciNotes, List<Component>> listOfComponents;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public RestoreOpenedFilesAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ ConfigSciNotesManager.saveRestoreOpenedFiles(this.getState());
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static CheckBoxMenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ CheckBoxMenuItem cb = createCheckBoxMenu(label, null, new RestoreOpenedFilesAction(label, editor), key);
+ boolean b = ConfigSciNotesManager.getRestoreOpenedFiles();
+ cb.setChecked(b);
+ return cb;
+ }
+
+ /**
+ * @return the selected files opened in the last session
+ */
+ public static List<File> getSelectedFiles() {
+ return selectedFiles;
+ }
+
+ private static void saveEnabledComponents(SciNotes ed) {
+ List<Component> list = new ArrayList<Component>();
+ SwingScilabMenuBar mb = (SwingScilabMenuBar) ed.getMenuBar().getAsSimpleMenuBar();
+ SwingScilabToolBar tb = (SwingScilabToolBar) ed.getToolBar().getAsSimpleToolBar();
+ for (int i = 0; i < mb.getMenuCount(); i++) {
+ if (mb.getMenu(i).isEnabled()) {
+ list.add(mb.getMenu(i));
+ mb.getMenu(i).setEnabled(false);
+ }
+ }
+ for (int i = 0; i < tb.getComponentCount(); i++) {
+ if (tb.getComponent(i).isEnabled()) {
+ list.add(tb.getComponent(i));
+ tb.getComponent(i).setEnabled(false);
+ }
+ }
+
+ if (listOfComponents == null) {
+ listOfComponents = new HashMap<SciNotes, List<Component>>();
+ }
+ listOfComponents.put(ed, list);
+ }
+
+ public static void restoreEnabledComponents(SciNotes ed) {
+ if (listOfComponents != null && listOfComponents.containsKey(ed)) {
+ SwingScilabMenuBar mb = (SwingScilabMenuBar) ed.getMenuBar().getAsSimpleMenuBar();
+ SwingScilabToolBar tb = (SwingScilabToolBar) ed.getToolBar().getAsSimpleToolBar();
+ List<Component> l = listOfComponents.get(ed);
+ for (Component c : l) {
+ c.setEnabled(true);
+ }
+
+ l.clear();
+ listOfComponents.remove(ed);
+ if (listOfComponents.isEmpty()) {
+ listOfComponents = null;
+ }
+ }
+ }
+
+ public static JPanel getTab(final SciNotes ed, final String uuid) {
+ final JTree tree = fillTree(uuid);
+ if (tree == null) {
+ return null;
+ }
+
+ JButton ok = new JButton(SciNotesMessages.OK);
+ JButton cancel = new JButton(SciNotesMessages.CANCEL);
+ ok.setPreferredSize(cancel.getPreferredSize());
+ Object[] buttons = new Object[2];
+ ok.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ List<File> list = getOpenedFiles(tree, uuid);
+ ed.getTabPane().remove(0);
+ if (list != null && list.size() != 0) {
+ for (File f : list) {
+ ed.openFile(f.getPath(), 0, null);
+ }
+ } else if (ed.getTabPane().getTabCount() == 0) {
+ ed.addEmptyTab();
+ }
+
+ if (ed.getNavigator() != null) {
+ ed.getNavigator().updateTree();
+ }
+
+ restoreEnabledComponents(ed);
+ }
+ });
+
+ cancel.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ List<UUID> editorID = ConfigSciNotesManager.getOpenFilesEditorList();
+ for (int i = 0; i < editorID.size(); i++) {
+ // Remove these files from the list of open files
+ if (editorID.get(i).toString().equals(uuid)) {
+ ConfigSciNotesManager.removeFromOpenFiles(editorID.get(i));
+ break;
+ }
+ }
+ ed.getTabPane().remove(0);
+ if (ed.getTabPane().getTabCount() == 0) {
+ ed.addEmptyTab();
+ }
+ restoreEnabledComponents(ed);
+ }
+ });
+
+ if (isWindows()) {
+ buttons[0] = ok;
+ buttons[1] = cancel;
+
+ } else {
+ buttons[0] = cancel;
+ buttons[1] = ok;
+ }
+
+ JOptionPane jop = new JOptionPane(SciNotesMessages.RESTORE_FILES_QUERY, JOptionPane.QUESTION_MESSAGE, JOptionPane.CANCEL_OPTION, null, buttons);
+ final JPanel panel = new JPanel();
+ panel.setLayout(new GridBagLayout());
+ GridBagConstraints c = new GridBagConstraints();
+ c.gridheight = 1;
+ c.gridwidth = 1;
+ c.gridx = 0;
+ c.gridy = 0;
+ c.weightx = 1;
+ c.weighty = 0.1;
+ c.anchor = GridBagConstraints.PAGE_START;
+ c.fill = GridBagConstraints.HORIZONTAL;
+ panel.add(jop, c);
+ c.gridx = 0;
+ c.gridy = 1;
+ c.gridheight = GridBagConstraints.REMAINDER;
+ c.weighty = 0.9;
+ c.fill = GridBagConstraints.BOTH;
+ JScrollPane scroll = new JScrollPane(tree);
+ panel.add(scroll, c);
+ ok.requestFocusInWindow();
+
+ saveEnabledComponents(ed);
+
+ return panel;
+ }
+
+ /**
+ * @return true if the OS is Windows
+ */
+ private static boolean isWindows() {
+ return System.getProperty("os.name").toLowerCase().contains("windows");
+ }
+
+ /**
+ * @return the files to open in the different editors
+ */
+ private static List<File> getOpenedFiles(JTree tree, String uuid) {
+ List<File> list = new ArrayList();
+ List<String> remove = new ArrayList();
+ TreeModel model = tree.getModel();
+ TreeNode node = (TreeNode) model.getChild(model.getRoot(), 0);
+
+ for (int i = 0; i < node.getChildCount(); i++) {
+ DefaultMutableTreeNode mutNode = (DefaultMutableTreeNode) node.getChildAt(i);
+ CheckBoxNode cb = (CheckBoxNode) mutNode.getUserObject();
+ if (cb.isSelected()) {
+ list.add(cb.getFile());
+ } else {
+ remove.add(cb.getFile().getAbsolutePath());
+ }
+ }
+ // Remove these files from the list of open files
+ ConfigSciNotesManager.removeFromOpenFiles(UUID.fromString(uuid), remove);
+
+ return list;
+ }
+
+ /**
+ * Fill the tree with the opened files
+ * @param uuid the editor uuid
+ */
+ private static JTree fillTree(String uuid) {
+ List<UUID> editorID = ConfigSciNotesManager.getOpenFilesEditorList();
+ Vector eds = new Vector(1);
+
+ List<File> filesToOpen = removeAlreadyOpenFiles(uuid);
+
+ if (filesToOpen.size() > 0) {
+ eds.add(new FilesVector("SciNotes", filesToOpen));
+ } else {
+ return null;
+ }
+
+ JTree tree = new JTree(eds);
+
+ CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
+ tree.setCellRenderer(renderer);
+
+ tree.setCellEditor(new CheckBoxNodeEditor(tree));
+ tree.setEditable(true);
+
+ for (int i = 0; i < tree.getRowCount(); i++) {
+ tree.expandRow(i);
+ }
+
+ return tree;
+ }
+
+ /**
+ * @param editorUUID the editor UUID
+ * @return the files opened in the previous session minus the already opened files
+ */
+ private static List<File> removeAlreadyOpenFiles(String editorUUID) {
+ List<File> filesToOpen = ConfigSciNotesManager.getOpenFilesByEditor(UUID.fromString(editorUUID));
+ SciNotes editor = SciNotes.getEditorFromUUID(editorUUID);
+ List<File> filesToRemove = new ArrayList();
+ if (editor != null) {
+ int n = editor.getTabPane().getTabCount();
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane pane = editor.getTextPane(i);
+ String name = pane.getName();
+ if (name != null) {
+ for (File ff : filesToOpen) {
+ if (ff.equals(new File(name))) {
+ filesToRemove.add(ff);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ filesToOpen.removeAll(filesToRemove);
+
+ return filesToOpen;
+ }
+
+ /**
+ * Inner class to handle the renderer of a checkbox in a JTree
+ */
+ static class CheckBoxNodeRenderer implements TreeCellRenderer {
+
+ private final JCheckBox leafRenderer = new JCheckBox();
+ private final DefaultTreeCellRenderer nonLeafRenderer = new DefaultTreeCellRenderer();
+
+ private final Color selectionBorderColor;
+ private final Color selectionForeground;
+ private final Color selectionBackground;
+ private final Color textForeground;
+ private final Color textBackground;
+
+ private File file;
+
+ /**
+ * Constructor
+ */
+ public CheckBoxNodeRenderer() {
+ Font fontValue = UIManager.getFont("Tree.font");
+ if (fontValue != null) {
+ leafRenderer.setFont(fontValue);
+ }
+ Boolean booleanValue = (Boolean) UIManager.get("Tree.drawsFocusBorderAroundIcon");
+ leafRenderer.setFocusPainted(booleanValue != null && booleanValue.booleanValue());
+
+ selectionBorderColor = UIManager.getColor("Tree.selectionBorderColor");
+ selectionForeground = UIManager.getColor("Tree.selectionForeground");
+ selectionBackground = UIManager.getColor("Tree.selectionBackground");
+ textForeground = UIManager.getColor("Tree.textForeground");
+ textBackground = UIManager.getColor("Tree.textBackground");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree, Object value,
+ boolean selected, boolean expanded, boolean leaf, int row,
+ boolean hasFocus) {
+ if (leaf) {
+ String stringValue = tree.convertValueToText(value, selected, expanded, leaf, row, false);
+ leafRenderer.setText(stringValue);
+ leafRenderer.setSelected(false);
+
+ leafRenderer.setEnabled(tree.isEnabled());
+
+ if (selected) {
+ leafRenderer.setForeground(selectionForeground);
+ leafRenderer.setBackground(selectionBackground);
+ } else {
+ leafRenderer.setForeground(textForeground);
+ leafRenderer.setBackground(textBackground);
+ }
+
+ if (value != null && value instanceof DefaultMutableTreeNode) {
+ Object obj = ((DefaultMutableTreeNode) value).getUserObject();
+ if (obj instanceof CheckBoxNode) {
+ CheckBoxNode node = (CheckBoxNode) obj;
+ leafRenderer.setText(node.getText());
+ leafRenderer.setSelected(node.isSelected());
+ file = node.getFile();
+ }
+ }
+ return leafRenderer;
+ } else {
+ return nonLeafRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
+ }
+ }
+
+ /**
+ * @return the JCheckBox used to render a checkBox
+ */
+ protected JCheckBox getLeafRenderer() {
+ return leafRenderer;
+ }
+
+ /**
+ * @return the file associated with the renderer
+ */
+ protected File getFile() {
+ return file;
+ }
+ }
+
+ /**
+ * Inner class to handle the checkbox in a JTree
+ */
+ static class CheckBoxNodeEditor extends AbstractCellEditor implements TreeCellEditor {
+
+ private final CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
+ private ChangeEvent changeEvent;
+ private final JTree tree;
+
+ /**
+ * Default constructor
+ * @param tree the tree
+ */
+ public CheckBoxNodeEditor(JTree tree) {
+ this.tree = tree;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getCellEditorValue() {
+ JCheckBox checkbox = renderer.getLeafRenderer();
+ CheckBoxNode checkBoxNode = new CheckBoxNode(renderer.getFile(), checkbox.getText(), checkbox.isSelected());
+ return checkBoxNode;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isCellEditable(EventObject e) {
+ boolean ret = false;
+ if (e instanceof MouseEvent) {
+ MouseEvent mouseEvent = (MouseEvent) e;
+ TreePath path = tree.getPathForLocation(mouseEvent.getX(), mouseEvent.getY());
+ if (path != null) {
+ Object node = path.getLastPathComponent();
+ if (node != null && node instanceof DefaultMutableTreeNode) {
+ DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
+ ret = treeNode.isLeaf() && treeNode.getUserObject() instanceof CheckBoxNode;
+ }
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Component getTreeCellEditorComponent(JTree tree, Object value,
+ boolean selected, boolean expanded, boolean leaf, int row) {
+ Component editor = renderer.getTreeCellRendererComponent(tree, value, true, expanded, leaf, row, true);
+ ItemListener itemListener = new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent itemEvent) {
+ if (stopCellEditing()) {
+ fireEditingStopped();
+ }
+ }
+ };
+ if (editor instanceof JCheckBox) {
+ ((JCheckBox) editor).addItemListener(itemListener);
+ }
+
+ return editor;
+ }
+ }
+
+ /**
+ * Inner class to handle checkboxes in a tree
+ */
+ static class CheckBoxNode {
+
+ private String text;
+ private boolean selected;
+ private File file;
+
+ /**
+ * Constructor
+ * @param text which will be displayed
+ * @param selected true if the checkbox is selected
+ */
+ public CheckBoxNode(File f, String text, boolean selected) {
+ this.file = f;
+ this.text = text;
+ this.selected = selected;
+ }
+
+ /**
+ * @return true if the checkbox is selected
+ */
+ public boolean isSelected() {
+ return selected;
+ }
+
+ /**
+ * @param newValue true if the checkbox must be selected
+ */
+ public void setSelected(boolean newValue) {
+ selected = newValue;
+ }
+
+ /**
+ * @return the String which is displayed
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param newValue the text to set
+ */
+ public void setText(String newValue) {
+ text = newValue;
+ }
+
+ public File getFile() {
+ return file;
+ }
+ }
+
+ /**
+ * Inner class to have a named Vector to add to the tree
+ */
+ static class FilesVector extends Vector {
+
+ private final String name;
+
+ /**
+ * Constructor
+ * @param name the name of the List which will be display in the tree
+ * @param elems the elements
+ */
+ public FilesVector(String name, List<File> elems) {
+ super();
+ this.name = name;
+ for (int i = 0; i < elems.size(); i++) {
+ add(new CheckBoxNode(elems.get(i), elems.get(i).getName() + " (in " + elems.get(i).getParent() + ")", true));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAction.java
new file mode 100755
index 000000000..856e64592
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAction.java
@@ -0,0 +1,75 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * SaveAction class
+ * @author Bruno JOFRET
+ *
+ */
+public final class SaveAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1638973738114812027L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SaveAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Create Menu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SaveAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new SaveAction(tooltip, editor));
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ if (!getEditor().save(getEditor().getTabPane().getSelectedIndex(), true)) {
+ ScilabModalDialog.show(getEditor(), SciNotesMessages.COULD_NOT_SAVE_FILE, SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAllAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAllAction.java
new file mode 100755
index 000000000..9f0837b3b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAllAction.java
@@ -0,0 +1,70 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ *
+ * @author Allan CORNET
+ * SaveAllAction class
+ */
+public final class SaveAllAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 7134703185408281234L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SaveAllAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ int currentIndex = getEditor().getTabPane().getSelectedIndex();
+
+ for (int i = 0; i < getEditor().getTabPane().getTabCount(); i++) {
+ getEditor().getTabPane().setSelectedIndex(i);
+ if (!getEditor().save(getEditor().getTabPane().getSelectedIndex(), true)) {
+ ScilabModalDialog.show(getEditor(), SciNotesMessages.COULD_NOT_SAVE_FILE,
+ SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ }
+ getEditor().getTabPane().setSelectedIndex(currentIndex);
+
+ }
+
+ /**
+ * CreateMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SaveAllAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.java
new file mode 100755
index 000000000..5f2220df0
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.java
@@ -0,0 +1,82 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SaveAndExecuteAllFilesAction class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class SaveAndExecuteAllFilesAction extends SaveAndExecuteFileAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SaveAndExecuteAllFilesAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ SciNotes editor = getEditor();
+ int n = editor.getTabPane().getTabCount();
+ boolean saved = true;
+ for (int i = 0; i < n; i++) {
+ ScilabEditorPane pane = editor.getTextPane(i);
+ if (((ScilabDocument) pane.getDocument()).isContentModified()) {
+ editor.getTabPane().setSelectedIndex(i);
+ saved = saved && editor.save(i, true);
+ }
+ }
+ if (saved) {
+ for (int i = 0; i < n; i++) {
+ executeFile(editor, editor.getTextPane(i).getName());
+ }
+ }
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new SaveAndExecuteAllFilesAction(tooltip, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SaveAndExecuteAllFilesAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.java
new file mode 100755
index 000000000..d27d71f6e
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.java
@@ -0,0 +1,60 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SaveAndExecuteFileAction Class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class SaveAndExecuteFileAction extends ExecuteFileIntoScilabAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SaveAndExecuteFileAction(String name, SciNotes editor) {
+ super(name, editor);
+ saveBefore = true;
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new SaveAndExecuteFileAction(tooltip, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SaveAndExecuteFileAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAsAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAsAction.java
new file mode 100755
index 000000000..6d2cf77a3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAsAction.java
@@ -0,0 +1,89 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ *
+ * @author Bruno JOFRET
+ *
+ */
+public class SaveAsAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 8327808176820789884L;
+
+ private String path;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param path the default path where to open the filechooser
+ * @param editor SciNotes
+ */
+ public SaveAsAction(String name, String path, SciNotes editor) {
+ super(name, editor);
+ this.path = path;
+ }
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SaveAsAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * DoAction
+ */
+ public void doAction() {
+ if (!getEditor().saveAs(path)) {
+ ScilabModalDialog.show(getEditor(), SciNotesMessages.COULD_NOT_SAVE_FILE,
+ SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ }
+
+ /**
+ * CreateMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static Object createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SaveAsAction(label, null, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ return createButton(tooltip, icon, new SaveAsAction(tooltip, null, editor));
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveFileInAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveFileInAction.java
new file mode 100755
index 000000000..bfbf9a5fe
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveFileInAction.java
@@ -0,0 +1,102 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.io.File;
+import java.util.List;
+
+import javax.swing.KeyStroke;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.bridge.menu.SwingScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * Action to save in a predefined directory
+ * @author Calixte DENIZET
+ */
+public final class SaveFileInAction extends SaveAsAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param path the path where to save
+ * @param editor associated SciNotes instance
+ */
+ public SaveFileInAction(String name, String path, SciNotes editor) {
+ super(name, path, editor);
+ }
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor associated SciNotes instance
+ */
+ public SaveFileInAction(String name, SciNotes editor) {
+ super(name, null, editor);
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param label label of the menu
+ * @param editor associated SciNotes instance
+ * @param key KeyStroke
+ * @return the menu
+ */
+ public static Object createMenu(String label, final SciNotes editor, KeyStroke key) {
+ final Menu favoriteDirs = ScilabMenu.createMenu();
+ ((SwingScilabMenu) favoriteDirs.getAsSimpleMenu()).addMenuListener(new MenuListener() {
+
+ public void menuCanceled(MenuEvent e) { }
+ public void menuDeselected(MenuEvent e) { }
+ public void menuSelected(MenuEvent e) {
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ }
+ });
+
+ favoriteDirs.setText(label);
+ updateFavoriteDirsMenu(favoriteDirs, editor);
+ return favoriteDirs;
+ }
+
+ /**
+ * Create a menu to add to SciNotes menu bar
+ * @param editor associated SciNotes instance
+ * @param path the path to open
+ * @return the menuitem
+ */
+ public static MenuItem createMenu(SciNotes editor, String path) {
+ return createMenu(path, null, new SaveFileInAction(path, path, editor), null);
+ }
+
+ /**
+ * Update menu displaying favorite directories.
+ * @param menu the menu to update
+ * @param editor SciNotes
+ */
+ public static void updateFavoriteDirsMenu(Menu menu, SciNotes editor) {
+ ((SwingScilabMenu) menu.getAsSimpleMenu()).removeAll();
+ List<File> dirs = ConfigSciNotesManager.getAllFavoriteDirs();
+
+ for (int i = 0; i < dirs.size(); i++) {
+ menu.add(createMenu(editor, dirs.get(i).getPath()));
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java
new file mode 100755
index 000000000..83cc8ed5b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SciNotesCompletionAction.java
@@ -0,0 +1,516 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
+import javax.swing.text.Element;
+import javax.swing.text.StyledDocument;
+import javax.swing.text.BadLocationException;
+
+import com.artenum.rosetta.core.CompletionItemImpl;
+import com.artenum.rosetta.interfaces.core.CompletionItem;
+import com.artenum.rosetta.interfaces.core.InputParsingManager;
+import com.artenum.rosetta.interfaces.core.HistoryManager;
+import com.artenum.rosetta.interfaces.core.GenericInterpreter;
+import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
+import com.artenum.rosetta.interfaces.core.CompletionManager;
+import com.artenum.rosetta.interfaces.ui.CompletionWindow;
+import com.artenum.rosetta.interfaces.ui.OutputView;
+import com.artenum.rosetta.interfaces.ui.PromptView;
+import com.artenum.rosetta.interfaces.ui.InputCommandView;
+
+import org.scilab.modules.completion.Completion;
+import org.scilab.modules.console.CompletionAction;
+import org.scilab.modules.console.SciCompletionManager;
+import org.scilab.modules.console.SciInputParsingManager;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menuitem.ScilabMenuItem;
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+
+import org.scilab.modules.localization.Messages;
+
+import org.scilab.modules.scinotes.KeywordEvent;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+import org.scilab.modules.scinotes.utils.SciNotesCompletionWindow;
+
+/**
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class SciNotesCompletionAction extends CompletionAction {
+
+ private SciNotes editor;
+
+ /**
+ * Constructor
+ * @param textPane the pane associated
+ * @param editor SciNotes
+ */
+ public SciNotesCompletionAction(JComponent textPane, SciNotes editor) {
+ this.editor = editor;
+ configuration = new SciNotesCompletionConfiguration();
+ }
+
+ /**
+ * Constructor
+ * @param editor SciNotes
+ */
+ public SciNotesCompletionAction(SciNotes editor) {
+ this.editor = editor;
+ }
+
+ /**
+ * Constructor
+ * @param name unused parameter
+ * @param editor SciNotes
+ */
+ public SciNotesCompletionAction(String name, SciNotes editor) {
+ this.editor = editor;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void actionPerformed(ActionEvent actionEvent) {
+ if (configuration == null) {
+ configuration = new SciNotesCompletionConfiguration();
+ }
+ configuration.getCompletionWindow().setGraphicalContext(editor.getTextPane());
+ super.actionPerformed(actionEvent);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ MenuItem menu = ScilabMenuItem.createMenuItem();
+ menu.setText(label);
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).addActionListener(new ActionListener() {
+ private SciNotesCompletionAction action;
+ public void actionPerformed(ActionEvent actionEvent) {
+ if (action == null) {
+ action = new SciNotesCompletionAction(editor);
+ }
+ action.actionPerformed(actionEvent);
+ }
+ });
+
+ if (key != null) {
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(key);
+ }
+
+ return menu;
+ }
+
+ /**
+ * Inner class to manage the completion
+ */
+ class SciNotesInputParsingManager extends SciInputParsingManager {
+
+ /**
+ * Reset
+ */
+ public void reset() {
+ try {
+ ((ScilabDocument) editor.getTextPane().getDocument()).setFocused(true);
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ int line = root.getElementIndex(pos);
+ int start = root.getElement(line).getStartOffset();
+ editor.getTextPane().getDocument().remove(start, pos - start);
+ editor.getTextPane().setCaretPosition(start);
+ } catch (BadLocationException e) { }
+ }
+
+ /**
+ * @return the caret position
+ */
+ public int getCaretPosition() {
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ int line = root.getElementIndex(pos);
+ int start = root.getElement(line).getStartOffset();
+ return pos - start;
+ }
+
+ /**
+ * @return the commandLine
+ */
+ public String getCommandLine() {
+ try {
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ int line = root.getElementIndex(pos);
+ int start = root.getElement(line).getStartOffset();
+ KeywordEvent ke = editor.getTextPane().getKeywordEvent();
+ if (ke.getType() == ScilabLexerConstants.FIELD) {
+ ke = editor.getTextPane().getKeywordEvent(ke.getStart() - 1);
+ if (ke.getType() == ScilabLexerConstants.ID) {
+ // Here we try to complete a field of an unknown variable so
+ // we suppose that it will be a handle
+ return "";
+ }
+ }
+ return editor.getTextPane().getDocument().getText(start, pos - start);
+ } catch (BadLocationException e) { }
+ return "";
+ }
+
+ /**
+ * @param content to append
+ */
+ public void append(String content) {
+ try {
+ ScilabDocument doc = (ScilabDocument) editor.getTextPane().getDocument();
+ doc.setFocused(true);
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ doc.mergeEditsBegin();
+ editor.getTextPane().getDocument().insertString(pos, content, null);
+ doc.mergeEditsEnd();
+ } catch (BadLocationException e) { }
+ }
+
+ /**
+ * @return a Point where to put the completion window
+ */
+ public Point getWindowCompletionLocation() {
+ try {
+ int pos = editor.getTextPane().getCaretPosition();
+ Rectangle r = editor.getTextPane().modelToView(pos);
+ return new Point(r.x, r.y + r.height);
+ } catch (BadLocationException e) { }
+ return new Point(0, 0);
+ }
+
+ /**
+ * @return an int
+ */
+ public int getCompletionLevel() {
+ return 0;
+ }
+
+ /**
+ * @param level an int
+ * @return a String to be completed
+ */
+ public String getPartLevel(int level) {
+ return Completion.getPartLevel(getCommandLine());
+ }
+
+ /**
+ * Return an empty string to be sure that word won't be completed
+ * into filename.
+ * @param level an unused int
+ * @return a String
+ */
+ public String getFilePartLevel(int level) {
+ return "";
+ }
+
+ /**
+ * @param completionResult a String
+ */
+ public void writeCompletionPart(String completionResult) { }
+
+ /**
+ * @return an int
+ */
+ public int getNumberOfLines() {
+ return 0;
+ }
+
+ /**
+ * @return a boolean
+ */
+ public boolean isBlockEditing() {
+ return true;
+ }
+
+ /**
+ * @param inputCommandView an InputCommandView
+ */
+ public void setInputCommandView(InputCommandView inputCommandView) { }
+
+ /**
+ * Put a backspace
+ */
+ public void backspace() {
+ try {
+ Element root = editor.getTextPane().getDocument().getDefaultRootElement();
+ int pos = editor.getTextPane().getCaretPosition();
+ editor.getTextPane().getDocument().remove(pos - 1, 1);
+ editor.getTextPane().setCaretPosition(pos - 1);
+ } catch (BadLocationException e) { }
+ }
+ }
+
+ /**
+ * Inner class to handle special completion case in SciNotes.
+ * When a field name is met, we can suppose that is a handle.
+ */
+ class SciNotesCompletionManager extends SciCompletionManager {
+
+ /**
+ * {@inheritDoc}
+ */
+ public SciNotesCompletionManager() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<CompletionItem> getCompletionItems() {
+ List<CompletionItem> list = super.getCompletionItems();
+ if (list.isEmpty()) {
+ ScilabEditorPane sep = editor.getTextPane();
+ KeywordEvent ke = sep.getKeywordEvent();
+ String searchedPattern = null;
+ boolean handle = false;
+ try {
+ if (ke.getType() == ScilabLexerConstants.OPERATOR) {
+ String str = sep.getDocument().getText(ke.getStart(), ke.getLength());
+ if (str.equals(".")) {
+ searchedPattern = " ";
+ }
+ } else if (ke.getType() == ScilabLexerConstants.FIELD) {
+ searchedPattern = sep.getDocument().getText(ke.getStart(), ke.getLength());
+ }
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ }
+
+ String[] scilabHandlesDictionnary = Completion.searchHandleGraphicsPropertiesDictionary(searchedPattern);
+ String type = Messages.gettext("Graphics handle field");
+
+ list = new ArrayList<CompletionItem>();
+ if (scilabHandlesDictionnary != null) {
+ for (String item : scilabHandlesDictionnary) {
+ dictionnary.add(new CompletionItemImpl(type, item + " (" + type + ")", item, Messages.gettext("No help")));
+ }
+ }
+
+ return dictionnary;
+ }
+ return list;
+ }
+ }
+
+ /**
+ * Inner class which implements interface ConsoleConfiguration.
+ * Only use to be compatible with the way to complete in the console
+ */
+ class SciNotesCompletionConfiguration implements ConsoleConfiguration {
+
+ private SciNotesInputParsingManager xipm = new SciNotesInputParsingManager();
+ private SciCompletionManager scm = new SciNotesCompletionManager();
+ private SciNotesCompletionWindow cwi;
+
+ /**
+ * Constructor
+ * @param textPane where to complete
+ */
+ public SciNotesCompletionConfiguration() {
+ scm.setInputParsingManager(xipm);
+ cwi = new SciNotesCompletionWindow(editor, scm);
+ cwi.setInputParsingManager(xipm);
+ cwi.setGraphicalContext(editor.getTextPane());
+ }
+
+ /**
+ * @return an InputParsingManager
+ */
+ public InputParsingManager getInputParsingManager() {
+ return xipm;
+ }
+
+ /**
+ * Returns the current completion manager
+ * @return the completion manager
+ */
+ public CompletionManager getCompletionManager() {
+ return scm;
+ }
+
+ /**
+ * @return the CompletionWindow
+ */
+ public CompletionWindow getCompletionWindow() {
+ return cwi;
+ }
+
+ /**
+ * @return null
+ */
+ public PromptView getPromptView() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public OutputView getOutputView() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public InputCommandView getInputCommandView() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public StyledDocument getOutputViewStyledDocument() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public StyledDocument getInputCommandViewStyledDocument() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public HistoryManager getHistoryManager() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public String getBackgroundColor() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public String getForegroundColor() {
+ return null;
+ }
+
+ /**
+ * @return 0
+ */
+ public int getScrollableUnitIncrement() {
+ return 0;
+ }
+
+ /**
+ * @return 0
+ */
+ public int getScrollableBlockIncrement() {
+ return 0;
+ }
+
+ /**
+ * @return true
+ */
+ public boolean getHorizontalWrapAllowed() {
+ return true;
+ }
+
+ /**
+ * @return true
+ */
+ public boolean getVerticalWrapAllowed() {
+ return true;
+ }
+
+ /**
+ * @return null
+ */
+ public String getFontName() {
+ return null;
+ }
+
+ /**
+ * @return 0
+ */
+ public int getFontStyle() {
+ return 0;
+ }
+
+ /**
+ * @return 0
+ */
+ public int getFontSize() {
+ return 0;
+ }
+
+ /**
+ * @return null
+ */
+ public String getWelcomeLine() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public GenericInterpreter getGenericInterpreter() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public ActionMap getActionMapping() {
+ return null;
+ }
+
+ /**
+ * @param profileName a String
+ */
+ public void setActiveProfile(String profileName) { }
+
+ /**
+ * @return null
+ */
+ public String getActiveProfile() {
+ return null;
+ }
+
+ /**
+ * @return null
+ */
+ public InputMap getKeyMapping() {
+ return null;
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchFilesAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchFilesAction.java
new file mode 100755
index 000000000..012e52fed
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchFilesAction.java
@@ -0,0 +1,47 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SearchFilesAction Class
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class SearchFilesAction extends SearchWordInFilesAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SearchFilesAction(String name, SciNotes editor) {
+ super(name, editor);
+ searchFiles = true;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SearchFilesAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java
new file mode 100755
index 000000000..5f0856408
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java
@@ -0,0 +1,719 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowFocusListener;
+import java.awt.event.WindowListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.KeyStroke;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.bridge.filechooser.SwingScilabFileChooser;
+import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
+import org.scilab.modules.gui.filechooser.ScilabFileChooser;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+import org.scilab.modules.scinotes.utils.SearchFile;
+
+/**
+ * SearchWordInFilesAction Class
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class SearchWordInFilesAction extends DefaultAction implements WindowFocusListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final int GAP = 5;
+ private static final String FILTERNEWLINES = "filterNewlines";
+ private static final String ESCAPE = "ESCAPE";
+ private static final String ENABLED = "enabled";
+ private static final Color ERRORCOLOR = Color.RED;
+ private static Color NORMALCOLOR;
+
+ private static boolean windowAlreadyExist;
+ private static JFrame mainFrame;
+ private static Object searcher;
+ private static SearchWordInFilesAction current;
+
+ private JButton buttonFind;
+ private JButton buttonStop;
+ private JButton buttonClose;
+ private JButton cancelButton;
+ private JButton chooseBaseDirButton;
+ private JComboBox comboBaseDir;
+ private JComboBox comboFilePattern;
+ private JComboBox comboWordPattern;
+ private JCheckBox checkRecursive;
+ private JCheckBox checkWordCase;
+ private JCheckBox checkFileCase;
+ private JCheckBox checkRegular;
+ private JCheckBox checkLineByLine;
+ private JCheckBox checkWhole;
+
+ private boolean comboBaseDirCanceled;
+ private boolean comboFilePatternCanceled;
+ private boolean comboWordPatternCanceled;
+
+ private String lastWordPattern;
+ private String lastFilePattern;
+ private String lastBaseDir;
+
+ protected boolean searchFiles;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SearchWordInFilesAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ current = this;
+ openSearchWindow();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SearchWordInFilesAction(label, editor), key);
+ }
+
+ /**
+ * Close the window
+ */
+ public static void closeWindow() {
+ if (windowAlreadyExist) {
+ stopSearch();
+ SwingScilabWindow window = current.getEditor().getSwingParentWindow();
+ if (window != null) {
+ window.removeWindowFocusListener(current);
+ }
+ mainFrame.removeWindowFocusListener(current);
+ mainFrame.dispose();
+ windowAlreadyExist = false;
+ }
+ }
+
+ /**
+ * Start a search
+ */
+ public void startSearch() {
+ if (SearchFile.isDone(searcher)) {
+ buttonStop.setEnabled(true);
+ buttonFind.setEnabled(false);
+ String baseDir = getBaseDir((String) comboBaseDir.getEditor().getItem());
+ boolean recursive = checkRecursive.isSelected();
+ boolean lineByLine = checkLineByLine.isSelected();
+ String filePattern = (String) comboFilePattern.getEditor().getItem();
+ boolean fileCase = checkFileCase.isSelected();
+ String wordPattern = null;
+ if (!searchFiles) {
+ wordPattern = (String) comboWordPattern.getEditor().getItem();
+ }
+ boolean wordCase = checkWordCase.isSelected();
+ boolean wholeWord = checkWhole.isSelected();
+ boolean regex = checkRegular.isSelected();
+ searcher = SearchFile.getSearchResultsWindow(buttonStop, getEditor(), baseDir, recursive, !lineByLine, filePattern, fileCase, wordPattern, wordCase, wholeWord, regex);
+ }
+ }
+
+ /**
+ * Stop the current search if exists
+ */
+ public static void stopSearch() {
+ if (searcher != null) {
+ SearchFile.stopSearch(searcher);
+ searcher = null;
+ }
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void windowGainedFocus(WindowEvent e) {
+ if (e.getWindow() == getEditor().getSwingParentWindow()) {
+ mainFrame.setAlwaysOnTop(true);
+ }
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ public void windowLostFocus(WindowEvent e) {
+ if (e.getOppositeWindow() != mainFrame && e.getOppositeWindow() != getEditor().getSwingParentWindow()) {
+ mainFrame.setAlwaysOnTop(false);
+ }
+ }
+
+ /**
+ * Open a window to get the name of the macro
+ * @param name the name of a macro
+ */
+ public void openSearchWindow() {
+ if (windowAlreadyExist) {
+ mainFrame.setVisible(true);
+ return;
+ }
+
+ mainFrame = new JFrame();
+ mainFrame.setAlwaysOnTop(true);
+ mainFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ mainFrame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE , 0), ESCAPE);
+ mainFrame.getRootPane().getActionMap().put(ESCAPE, new AbstractAction() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ closeWindow();
+ }
+ });
+ mainFrame.setTitle(SciNotesMessages.SEARCHINFILES);
+ mainFrame.setIconImage(new ImageIcon(FindIconHelper.findIcon("system-search", "32x32")).getImage());
+
+ getEditor().getSwingParentWindow().addWindowFocusListener(this);
+ mainFrame.addWindowFocusListener(this);
+
+ windowAlreadyExist = true;
+
+ JLabel baseDirLabel = new JLabel(SciNotesMessages.BASEDIRECTORY);
+ JLabel baseDirExpLabel = new JLabel(SciNotesMessages.BASEDIREXP);
+ comboBaseDir = new JComboBox();
+ comboBaseDir.setEditable(true);
+ chooseBaseDirButton = new JButton(SciNotesMessages.CHOOSEDIR);
+ JPanel panelBase = new JPanel();
+ JLabel filePatternLabel = new JLabel(SciNotesMessages.FILEPATTERN + ":");
+ JLabel filePatternExpLabel = new JLabel(SciNotesMessages.FILEPATTERNEXP);
+ comboFilePattern = new JComboBox();
+ comboFilePattern.setEditable(true);
+ ((JTextField) comboFilePattern.getEditor().getEditorComponent()).setColumns(32);
+ JLabel wordPatternLabel = new JLabel(SciNotesMessages.WORDPATTERN + ":");
+ comboWordPattern = new JComboBox();
+ comboWordPattern.setEditable(true);
+ comboWordPattern.getEditor().addActionListener(new ActionListener() {
+
+ public void actionPerformed(ActionEvent e) {
+ updateCombos();
+ startSearch();
+ }
+ });
+ ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setColumns(32);
+ NORMALCOLOR = ((JTextField) comboWordPattern.getEditor().getEditorComponent()).getForeground();
+
+ JPanel panelOptions = new JPanel();
+ panelOptions.setBorder(BorderFactory.createTitledBorder(SciNotesMessages.OPTIONS));
+ checkWordCase = new JCheckBox(SciNotesMessages.WORDCASESENSITIVE);
+ checkFileCase = new JCheckBox(SciNotesMessages.FILECASESENSITIVE);
+ checkWhole = new JCheckBox(SciNotesMessages.WHOLE_WORD);
+ checkRegular = new JCheckBox(SciNotesMessages.REGULAR_EXPRESSIONS);
+ checkLineByLine = new JCheckBox(SciNotesMessages.FILELINEBYLINE);
+ checkRecursive = new JCheckBox(SciNotesMessages.RECURSIVESEARCH);
+ panelOptions.setLayout(new GridLayout(3, 2, GAP, GAP));
+ panelOptions.add(checkWordCase);
+ panelOptions.add(checkFileCase);
+ panelOptions.add(checkWhole);
+ panelOptions.add(checkRegular);
+ panelOptions.add(checkLineByLine);
+ panelOptions.add(checkRecursive);
+
+ buttonFind = new JButton(SciNotesMessages.FIND_BUTTON);
+ buttonStop = new JButton(SciNotesMessages.STOPBUTTON);
+ buttonStop.setEnabled(false);
+ buttonClose = new JButton(SciNotesMessages.CLOSE);
+ JPanel panelButton = new JPanel();
+ panelButton.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+ panelButton.setLayout(new GridLayout(1, 4, GAP, GAP));
+ panelButton.add(new JLabel());
+ panelButton.add(buttonFind);
+ panelButton.add(buttonStop);
+ panelButton.add(buttonClose);
+
+ restoreConfiguration();
+ if (searchFiles) {
+ comboWordPattern.setEnabled(false);
+ checkWordCase.setEnabled(false);
+ checkWhole.setEnabled(false);
+ checkRegular.setEnabled(false);
+ checkLineByLine.setEnabled(false);
+ wordPatternLabel.setEnabled(false);
+ }
+
+ panelBase.setLayout(new GridBagLayout());
+ GridBagConstraints gbc = new GridBagConstraints();
+
+ gbc.gridx = gbc.gridy = 0;
+ gbc.gridwidth = gbc.gridheight = 1;
+ gbc.weightx = gbc.weighty = 0;
+ gbc.anchor = GridBagConstraints.LINE_START;
+ panelBase.add(baseDirLabel, gbc);
+
+ gbc.gridx = 0;
+ gbc.gridy = 1;
+ gbc.gridwidth = 3;
+ gbc.weightx = 1;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ gbc.anchor = GridBagConstraints.BASELINE;
+ gbc.insets = new Insets(0, 0, GAP, 0);
+ panelBase.add(comboBaseDir, gbc);
+
+ gbc.gridx = 1;
+ gbc.gridy = 2;
+ gbc.gridwidth = 2;
+ gbc.weightx = 1;
+ gbc.fill = GridBagConstraints.NONE;
+ gbc.anchor = GridBagConstraints.EAST;
+ gbc.insets = new Insets(0, 0, GAP, 0);
+ panelBase.add(baseDirExpLabel, gbc);
+
+ gbc.gridx = 3;
+ gbc.gridy = 1;
+ gbc.gridwidth = 1;
+ gbc.weightx = 0;
+ gbc.fill = GridBagConstraints.NONE;
+ gbc.anchor = GridBagConstraints.BASELINE;
+ panelBase.add(chooseBaseDirButton, gbc);
+
+ gbc.gridx = 0;
+ gbc.gridy = 3;
+ gbc.anchor = GridBagConstraints.LINE_START;
+ panelBase.add(filePatternLabel, gbc);
+
+ gbc.gridy = 4;
+ gbc.gridwidth = 3;
+ gbc.weightx = 1;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ gbc.anchor = GridBagConstraints.BASELINE;
+ panelBase.add(comboFilePattern, gbc);
+
+ gbc.gridx = 1;
+ gbc.gridy = 5;
+ gbc.gridwidth = 2;
+ gbc.weightx = 1;
+ gbc.fill = GridBagConstraints.NONE;
+ gbc.anchor = GridBagConstraints.EAST;
+ gbc.insets = new Insets(0, 0, GAP, 0);
+ panelBase.add(filePatternExpLabel, gbc);
+
+ gbc.gridx = 0;
+ gbc.gridy = 6;
+ gbc.gridwidth = 1;
+ gbc.weightx = 0;
+ gbc.anchor = GridBagConstraints.LINE_START;
+ panelBase.add(wordPatternLabel, gbc);
+
+ gbc.gridy = 7;
+ gbc.gridwidth = 3;
+ gbc.weightx = 1;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ gbc.anchor = GridBagConstraints.BASELINE;
+ gbc.insets = new Insets(0, 0, GAP, 0);
+ panelBase.add(comboWordPattern, gbc);
+
+ JPanel panelFrame = new JPanel();
+ panelFrame.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+ panelFrame.setLayout(new BoxLayout(panelFrame, BoxLayout.PAGE_AXIS));
+ panelFrame.add(panelBase);
+ panelFrame.add(panelOptions);
+ panelFrame.add(panelButton);
+
+ mainFrame.setContentPane(panelFrame);
+
+ mainFrame.addWindowListener(new WindowListener() {
+ @Override
+ public void windowClosed(WindowEvent arg0) { }
+ @Override
+ public void windowDeiconified(WindowEvent arg0) { }
+ @Override
+ public void windowActivated(WindowEvent arg0) { }
+
+ @Override
+ public void windowClosing(WindowEvent arg0) {
+ closeWindow();
+ }
+
+ @Override
+ public void windowDeactivated(WindowEvent arg0) { }
+ @Override
+ public void windowIconified(WindowEvent arg0) { };
+ @Override
+ public void windowOpened(WindowEvent arg0) { }
+ });
+
+ checkWordCase.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveCaseSensitive(checkWordCase.isSelected());
+ }
+ });
+
+ checkFileCase.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveFileCase(checkFileCase.isSelected());
+ }
+ });
+
+ checkWhole.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveWholeWord(checkWhole.isSelected());
+ }
+ });
+
+ checkRecursive.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveRecursive(checkRecursive.isSelected());
+ }
+ });
+
+ checkRegular.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveRegularExpression(checkRegular.isSelected());
+ }
+ });
+
+ checkLineByLine.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ConfigSciNotesManager.saveLineByLine(checkLineByLine.isSelected());
+ }
+ });
+
+ chooseBaseDirButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+ fileChooser.setDialogTitle(SciNotesMessages.CHOOSEBASEDIR);
+ fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ fileChooser.setAcceptAllFileFilterUsed(false);
+ if (fileChooser.showOpenDialog(getEditor()) == JFileChooser.APPROVE_OPTION) {
+ File path = fileChooser.getSelectedFile();
+ if (path == null || path.isFile()) {
+ path = fileChooser.getCurrentDirectory();
+ }
+ comboBaseDir.getEditor().setItem(path.toString());
+ updateFindButtonStatus(true);
+ }
+ }
+ });
+
+ buttonFind.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateCombos();
+ startSearch();
+ }
+ });
+
+ buttonStop.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ stopSearch();
+ }
+
+ });
+
+ buttonStop.addPropertyChangeListener(new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent e) {
+ if (mainFrame.isVisible() && e.getPropertyName().equals(SearchFile.SEARCHDONE)) {
+ boolean newValue = (Boolean) e.getNewValue();
+ buttonFind.setEnabled(newValue);
+ buttonStop.setEnabled(!newValue);
+ } else if (e.getPropertyName().equals(ENABLED)) {
+ boolean newValue = (Boolean) e.getNewValue();
+ comboBaseDir.setEnabled(!newValue);
+ comboFilePattern.setEnabled(!newValue);
+ chooseBaseDirButton.setEnabled(!newValue);
+ }
+ }
+ });
+
+ buttonClose.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ closeWindow();
+ }
+
+ });
+
+ comboBaseDir.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ updateFindButtonStatus(true);
+ }
+ });
+
+ comboBaseDir.addPopupMenuListener(new PopupMenuListener() {
+ @Override
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ comboBaseDirCanceled = true;
+ }
+
+ @Override
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+ @Override
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+ });
+
+ comboBaseDir.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) { }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (comboBaseDirCanceled) {
+ comboBaseDirCanceled = false;
+ } else {
+ closeWindow();
+ }
+ }
+ updateFindButtonStatus(true);
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) { }
+ });
+
+ comboFilePattern.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ updateFindButtonStatus(false);
+ }
+ });
+
+ comboFilePattern.addPopupMenuListener(new PopupMenuListener() {
+ @Override
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ comboFilePatternCanceled = true;
+ }
+
+ @Override
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+ @Override
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+ });
+
+ comboFilePattern.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) { }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (comboFilePatternCanceled) {
+ comboFilePatternCanceled = false;
+ } else {
+ closeWindow();
+ }
+ }
+ updateFindButtonStatus(false);
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) { }
+ });
+
+ comboWordPattern.addPopupMenuListener(new PopupMenuListener() {
+ @Override
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ comboWordPatternCanceled = true;
+ }
+
+ @Override
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+ @Override
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+ });
+
+ comboWordPattern.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
+ @Override
+ public void keyTyped(KeyEvent e) { }
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (comboWordPatternCanceled) {
+ comboWordPatternCanceled = false;
+ } else {
+ closeWindow();
+ }
+ }
+ if (checkRegular.isSelected()) {
+ try {
+ Pattern.compile((String) comboWordPattern.getEditor().getItem());
+ ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(NORMALCOLOR);
+ buttonFind.setEnabled(true);
+ } catch (PatternSyntaxException pse) {
+ ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(ERRORCOLOR);
+ buttonFind.setEnabled(false);
+ }
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) { }
+ });
+
+ mainFrame.pack();
+ mainFrame.setResizable(false);
+ mainFrame.setLocationRelativeTo(getEditor());
+ mainFrame.setVisible(true);
+ }
+
+ /**
+ * Update status of buttons
+ */
+ protected void updateFindButtonStatus(boolean baseDirModified) {
+ String baseDir = (String) comboBaseDir.getEditor().getItem();
+ String filePattern = (String) comboFilePattern.getEditor().getItem();
+ boolean goodBaseDir = !baseDirModified;
+ if (baseDirModified && !baseDir.isEmpty()) {
+ baseDir = getBaseDir(baseDir);
+ File dir = new File(baseDir);
+ if (dir.exists() && dir.isDirectory()) {
+ goodBaseDir = true;
+ }
+ }
+ if (goodBaseDir) {
+ ((JTextField) comboBaseDir.getEditor().getEditorComponent()).setForeground(NORMALCOLOR);
+ buttonFind.setEnabled(!filePattern.isEmpty());
+ } else {
+ ((JTextField) comboBaseDir.getEditor().getEditorComponent()).setForeground(ERRORCOLOR);
+ buttonFind.setEnabled(false);
+ }
+ }
+
+ /**
+ * Replace ~ by user home
+ * @param baseDir the base directory
+ * @return correct base directory
+ */
+ private static String getBaseDir(String baseDir) {
+ baseDir = baseDir.trim();
+ if (baseDir != null && !baseDir.isEmpty()) {
+ if (baseDir.startsWith("~" + File.separator) || baseDir.equals("~")) {
+ return baseDir.replaceFirst("~", ScilabConstants.USERHOME);
+ } else if (baseDir.startsWith("SCI" + File.separator) || baseDir.equals("SCI")) {
+ try {
+ return baseDir.replaceFirst("SCI", ScilabConstants.SCI.getCanonicalPath());
+ } catch (IOException e) { }
+ }
+ }
+
+ return baseDir;
+ }
+
+ /**
+ * Update the combos
+ */
+ public void updateCombos() {
+ lastBaseDir = updateRecent(comboBaseDir, lastBaseDir, ConfigSciNotesManager.RECENTBASEDIR, ConfigSciNotesManager.BASEDIR);
+ lastFilePattern = updateRecent(comboFilePattern, lastFilePattern, ConfigSciNotesManager.RECENTFILEPATTERN, ConfigSciNotesManager.FILEPATTERN);
+ lastWordPattern = updateRecent(comboWordPattern, lastWordPattern, ConfigSciNotesManager.RECENTWORDPATTERN, ConfigSciNotesManager.WORDPATTERN);
+ }
+
+ /**
+ * Restore configuration
+ */
+ private void restoreConfiguration() {
+ checkRegular.setSelected(ConfigSciNotesManager.getRegularExpression());
+ checkWhole.setSelected(ConfigSciNotesManager.getWholeWord());
+ checkWordCase.setSelected(ConfigSciNotesManager.getCaseSensitive());
+ checkFileCase.setSelected(ConfigSciNotesManager.getFileCase());
+ checkRecursive.setSelected(ConfigSciNotesManager.getRecursive());
+ checkLineByLine.setSelected(ConfigSciNotesManager.getLineByLine());
+ fillCombo(comboBaseDir, ConfigSciNotesManager.RECENTBASEDIR, ConfigSciNotesManager.BASEDIR);
+ fillCombo(comboFilePattern, ConfigSciNotesManager.RECENTFILEPATTERN, ConfigSciNotesManager.FILEPATTERN);
+ fillCombo(comboWordPattern, ConfigSciNotesManager.RECENTWORDPATTERN, ConfigSciNotesManager.WORDPATTERN);
+ }
+
+ /**
+ * fill comboBaseDir
+ */
+ private static void fillCombo(JComboBox combo, String nodeName, String childNodeName) {
+ combo.removeAllItems();
+ List<String> recent = ConfigSciNotesManager.getRecent(nodeName, childNodeName);
+ for (String item : recent) {
+ combo.addItem(item);
+ }
+ }
+
+ /**
+ * Update recent base directory
+ */
+ private static String updateRecent(JComboBox combo, String last, String nodeName, String childNodeName) {
+ String str = (String) combo.getEditor().getItem();
+ if (str != null && str.length() != 0 && !str.equals(last)) {
+ List<String> recent = ConfigSciNotesManager.getRecent(nodeName, childNodeName);
+ if (!recent.contains(str)) {
+ combo.addItem(str);
+ combo.setSelectedItem(str);
+ ConfigSciNotesManager.saveRecent(str, nodeName, childNodeName);
+ last = str;
+ }
+ }
+ return last;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectAllAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectAllAction.java
new file mode 100755
index 000000000..a369922fb
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectAllAction.java
@@ -0,0 +1,59 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2009 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+import javax.swing.text.DefaultEditorKit;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * Class to handle "select all"
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class SelectAllAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SelectAllAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ((ScilabDocument) getEditor().getTextPane().getDocument()).mergeEditsEnd();
+ ((ScilabDocument) getEditor().getTextPane().getDocument()).mergeEditsBegin();
+ getEditor().getTextPane().getActionMap().get(DefaultEditorKit.selectAllAction).actionPerformed(null);
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SelectAllAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockAction.java
new file mode 100755
index 000000000..4d02088b8
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockAction.java
@@ -0,0 +1,114 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import javax.swing.JMenuItem;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.KeywordEvent;
+import org.scilab.modules.scinotes.MatchingBlockScanner;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+
+/**
+ * Class to handle the block selection
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class SelectBlockAction extends DefaultAction {
+
+ protected boolean isPopup;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SelectBlockAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ MatchingBlockScanner scanner = sep.getMatchingBlockManager(true).getScanner();
+ KeywordEvent event = sep.getKeywordEvent(!isPopup, false);
+ int tok = event.getType();
+ int pos;
+ MatchingBlockScanner.MatchingPositions mpos = null;
+ if (ScilabLexerConstants.isMatchable(tok)) {
+ pos = event.getStart();
+ mpos = scanner.getMatchingBlock(pos, true);
+ if (mpos != null) {
+ sep.setSelectionStart(mpos.firstB);
+ sep.setSelectionEnd(mpos.secondE);
+ }
+ }
+
+ if (mpos == null) {
+ scanner = sep.getMatchingBlockManager(false).getScanner();
+ event = sep.getKeywordEvent(!isPopup, true);
+ tok = event.getType();
+ if (ScilabLexerConstants.isMatchable(tok)) {
+ pos = event.getStart() + event.getLength();
+ mpos = scanner.getMatchingBlock(pos, false);
+ if (mpos != null) {
+ sep.setSelectionStart(mpos.secondB);
+ sep.setSelectionEnd(mpos.firstE);
+ }
+ }
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, editor, key, new SelectBlockAction(label, editor));
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @param sba the SelectBlock action
+ * @return MenuItem
+ */
+ protected static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key, final SelectBlockAction sba) {
+ final MenuItem menuitem = createMenu(label, null, sba, key);
+ ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ ScilabEditorPane sep = editor.getTextPane();
+ boolean block = ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, false).getType());
+ block = block || ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, true).getType());
+ menuitem.setEnabled(block);
+ }
+ }
+ });
+
+ return menuitem;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.java
new file mode 100755
index 000000000..0754ce67c
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockInPopupAction.java
@@ -0,0 +1,47 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Class to handle the block selection in popup menu
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class SelectBlockInPopupAction extends SelectBlockAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SelectBlockInPopupAction(String name, SciNotes editor) {
+ super(name, editor);
+ isPopup = true;
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, editor, key, new SelectBlockInPopupAction(label, editor));
+ }
+} \ No newline at end of file
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetAnchorAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetAnchorAction.java
new file mode 100755
index 000000000..c86d833ea
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetAnchorAction.java
@@ -0,0 +1,173 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import java.awt.Dialog.ModalityType;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.KeyStroke;
+import javax.swing.text.Element;
+
+import org.scilab.modules.commons.gui.FindIconHelper;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.utils.SciNotesMessages;
+
+/**
+ * SetAnchorAction Class
+ * @author Calixte DENIZET
+ */
+public class SetAnchorAction extends DefaultAction {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final int GAP = 5;
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SetAnchorAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ openAnchorWindow();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SetAnchorAction(label, editor), key);
+ }
+
+ /**
+ * Open a dialog to get the anchor's name
+ */
+ public void openAnchorWindow() {
+ final JDialog dialog;
+ final JButton okButton;
+ final JButton cancelButton;
+ final JTextField textField;
+
+ dialog = new JDialog();
+ dialog.setModalityType(ModalityType.APPLICATION_MODAL);
+ dialog.setIconImage(new ImageIcon(FindIconHelper.findIcon("scilab")).getImage());
+ JLabel label = new JLabel(SciNotesMessages.ANCHOR_NAME);
+
+ cancelButton = new JButton(SciNotesMessages.CANCEL);
+ okButton = new JButton(SciNotesMessages.OK);
+ okButton.setPreferredSize(cancelButton.getPreferredSize());
+
+ JPanel panelButton = new JPanel();
+ panelButton.setLayout(new GridLayout(1, 4, GAP, GAP));
+ panelButton.setBorder(BorderFactory.createEmptyBorder(GAP, 0, 0, 0));
+ panelButton.add(new JLabel());
+ panelButton.add(new JLabel());
+ panelButton.add(cancelButton);
+ panelButton.add(okButton);
+
+ textField = new JTextField();
+ JPanel panelText = new JPanel();
+ panelText.setLayout(new GridLayout(1, 2, GAP, GAP));
+ panelText.add(label);
+ panelText.add(textField);
+
+ JPanel panelDialog = new JPanel();
+ panelDialog.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
+ panelDialog.setLayout(new BoxLayout(panelDialog, BoxLayout.PAGE_AXIS));
+ panelDialog.add(panelText);
+ panelDialog.add(panelButton);
+
+ dialog.setContentPane(panelDialog);
+
+ cancelButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ dialog.dispose();
+ }
+ });
+
+ okButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ setAnchorName(textField.getText());
+ dialog.dispose();
+ }
+ });
+
+ textField.addKeyListener(new KeyListener() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ int code = e.getKeyCode();
+ if (code == KeyEvent.VK_ENTER) {
+ okButton.doClick();
+ } else if (code == KeyEvent.VK_ESCAPE) {
+ cancelButton.doClick();
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent arg0) { }
+
+ @Override
+ public void keyTyped(KeyEvent arg0) { }
+ });
+
+ dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+ dialog.setTitle(SciNotesMessages.SET_ANCHOR);
+ dialog.pack();
+ dialog.setLocationRelativeTo(getEditor());
+ dialog.setVisible(true);
+ }
+
+ /**
+ * Set the anchor's name
+ * @param name the anchor's name
+ */
+ private void setAnchorName(String name) {
+ if (name != null && name.length() != 0) {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ sep.getXln().repaint();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ Element root = doc.getDefaultRootElement();
+ ScilabDocument.ScilabLeafElement line = (ScilabDocument.ScilabLeafElement) root.getElement(root.getElementIndex(sep.getCaretPosition()));
+ line.setAnchor(name);
+ getEditor().getNavigator().update();
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetColorsAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetColorsAction.java
new file mode 100755
index 000000000..229f82911
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetColorsAction.java
@@ -0,0 +1,54 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.ScilabGeneralPrefs;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SetColorsAction Class
+ * @author Calixte DENIZET
+ */
+public class SetColorsAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SetColorsAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ ScilabGeneralPrefs.openPreferences("colors/");
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SetColorsAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetFontAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetFontAction.java
new file mode 100755
index 000000000..5c71f96e1
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SetFontAction.java
@@ -0,0 +1,54 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.commons.ScilabGeneralPrefs;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * SetFontAction Class
+ * @author Calixte DENIZET
+ */
+public class SetFontAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SetFontAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ @Override
+ public void doAction() {
+ ScilabGeneralPrefs.openPreferences("fonts/");
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key Keystroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new SetFontAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SplitAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SplitAction.java
new file mode 100755
index 000000000..acf230fb7
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SplitAction.java
@@ -0,0 +1,141 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+package org.scilab.modules.scinotes.actions;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.StringTokenizer;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JComponent;
+import javax.swing.JMenu;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.EditorComponent;
+
+/**
+ * SplitAction Class
+ * @author Calixte DENIZET
+ */
+public final class SplitAction extends DefaultAction {
+
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1L;
+
+ private int state;
+
+ /**
+ * Construtor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public SplitAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ switch (state) {
+ case 0 :
+ getEditor().removeSplit();
+ return;
+ case 1 :
+ getEditor().splitTab(false);
+ return;
+ default :
+ getEditor().splitTab(true);
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return createMenu
+ */
+ public static Menu createMenu(String label, final SciNotes editor, KeyStroke key) {
+ StringTokenizer tokens = new StringTokenizer(label, ";\uff1b");
+ String labelSplitView = tokens.nextToken();
+ String labelOff = tokens.nextToken();
+ String labelH = tokens.nextToken();
+ String labelV = tokens.nextToken();
+
+ SplitAction ln = new SplitAction(labelSplitView, editor);
+ Menu menu = ScilabMenu.createMenu();
+ menu.setText(labelSplitView);
+
+ ButtonGroup group = new ButtonGroup();
+ JRadioButtonMenuItem radio;
+ final JRadioButtonMenuItem[] arr = new JRadioButtonMenuItem[3];
+ String[] labels = new String[] {labelOff, labelH, labelV};
+
+ for (int i = 0; i < 3; i++) {
+ radio = createRadioButtonMenuItem(ln, labels[i], i);
+ group.add(radio);
+ ((JMenu) menu.getAsSimpleMenu()).add(radio);
+ arr[i] = radio;
+ }
+
+ arr[0].setSelected(true);
+
+ ((JMenu) menu.getAsSimpleMenu()).addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ EditorComponent c = editor.getTextPane().getEditorComponent();
+ int state = 0;
+ if (c.isSplited()) {
+ JSplitPane split = c.getSplitPane();
+ if (split.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
+ state = 1;
+ } else {
+ state = 2;
+ }
+ }
+ arr[state].setSelected(true);
+ }
+ }
+ });
+
+ return menu;
+ }
+
+ /**
+ * createRadioButtonMenuItem
+ * @param split the SplitAction
+ * @param title the label of the menuitem
+ * @param state the state associated with the menuitem
+ * @return JRadioButtonMenuItem
+ */
+ private static JRadioButtonMenuItem createRadioButtonMenuItem(final SplitAction split, String title, final int state) {
+ JRadioButtonMenuItem radio = new JRadioButtonMenuItem(title);
+ radio.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ split.state = state;
+ split.doAction();
+ }
+ });
+
+ return radio;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/TabifyAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/TabifyAction.java
new file mode 100755
index 000000000..f77b67da4
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/TabifyAction.java
@@ -0,0 +1,97 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotesCaret;
+import org.scilab.modules.scinotes.TabManager;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * Class Tabify action for SciNotes
+ * @author Sylvestre Koumar
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class TabifyAction extends DefaultAction {
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor the editor
+ */
+ public TabifyAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Function doAction
+ */
+ public synchronized void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int posC = sep.getCaretPosition();
+ TabManager tab = sep.getTabManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+
+ doc.mergeEditsBegin();
+ if (((SciNotesCaret) sep.getCaret()).isEmptySelection()) {
+ if (start == end) {
+ tab.insertTab(start);
+ } else {
+ int[] ret = tab.tabifyLines(start, end - 1);
+ if (ret != null) {
+ if (posC == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ } else {
+ int[][] pos = ((SciNotesCaret) sep.getCaret()).getSelectedPositions();
+ ((SciNotesCaret) sep.getCaret()).protectHighlights(true);
+ int ret;
+ int sret = 0;
+ for (int i = 0; i < pos.length; i++) {
+ if (pos[i][0] < pos[i][1]) {
+ ret = tab.insertTab(pos[i][0] + sret);
+ sret += ret;
+ pos[i][0] += sret;
+ pos[i][1] += sret;
+ }
+ }
+ ((SciNotesCaret) sep.getCaret()).protectHighlights(false);
+ ((SciNotesCaret) sep.getCaret()).updateHighlights();
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * Create the MenuItem for tabify action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new TabifyAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToLowerCaseAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToLowerCaseAction.java
new file mode 100755
index 000000000..64c4a266a
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToLowerCaseAction.java
@@ -0,0 +1,67 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * ToLowerCaseAction Class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class ToLowerCaseAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ToLowerCaseAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ String str = sep.getSelectedText();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+
+ if (str != null) {
+ doc.mergeEditsBegin();
+ sep.replaceSelection(str.toLowerCase());
+ sep.select(start, end);
+ doc.mergeEditsEnd();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ToLowerCaseAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToUpperCaseAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToUpperCaseAction.java
new file mode 100755
index 000000000..ad7f89199
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ToUpperCaseAction.java
@@ -0,0 +1,67 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * ToUpperCaseAction Class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class ToUpperCaseAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public ToUpperCaseAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ String str = sep.getSelectedText();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+
+ if (str != null) {
+ doc.mergeEditsBegin();
+ sep.replaceSelection(str.toUpperCase());
+ sep.select(start, end);
+ doc.mergeEditsEnd();
+ }
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new ToUpperCaseAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnCommentAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnCommentAction.java
new file mode 100755
index 000000000..9e68dd4f8
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnCommentAction.java
@@ -0,0 +1,79 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.CommentManager;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * UnCommentAction Class
+ * @author Calixte DENIZET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class UnCommentAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public UnCommentAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int pos = sep.getCaretPosition();
+ CommentManager com = sep.getCommentManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+ int[] ret;
+
+ doc.mergeEditsBegin();
+ if (start == end) {
+ ret = com.uncommentLines(start, start);
+ sep.setCaretPosition(ret[0]);
+ } else {
+ ret = com.uncommentLines(start, end);
+ if (ret != null) {
+ if (pos == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * createMenu
+ * @param label label of the menu
+ * @param editor SciNotes
+ * @param key KeyStroke
+ * @return MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new UnCommentAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnTabifyAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnTabifyAction.java
new file mode 100755
index 000000000..f7f11b836
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnTabifyAction.java
@@ -0,0 +1,96 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotesCaret;
+import org.scilab.modules.scinotes.TabManager;
+import org.scilab.modules.scinotes.ScilabDocument;
+
+/**
+ * Class Untabify action for SciNotes
+ * @author Sylvestre Koumar
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public class UnTabifyAction extends DefaultAction {
+
+ /**
+ * Default constructor
+ * @param name the name of the action
+ * @param editor the editor
+ */
+ public UnTabifyAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * Function doAction
+ */
+ public void doAction() {
+ ScilabEditorPane sep = getEditor().getTextPane();
+ int start = sep.getSelectionStart();
+ int end = sep.getSelectionEnd();
+ int posC = sep.getCaretPosition();
+ TabManager tab = sep.getTabManager();
+ ScilabDocument doc = (ScilabDocument) sep.getDocument();
+
+ doc.mergeEditsBegin();
+ if (((SciNotesCaret) sep.getCaret()).isEmptySelection()) {
+ if (start == end) {
+ tab.untabifyLine(start);
+ } else {
+ int[] ret = tab.untabifyLines(start, end - 1);
+ if (ret != null) {
+ if (posC == start) {
+ sep.select(ret[1], ret[0]);
+ } else {
+ sep.select(ret[0], ret[1]);
+ }
+ }
+ }
+ } else {
+ int[][] pos = ((SciNotesCaret) sep.getCaret()).getSelectedPositions();
+ ((SciNotesCaret) sep.getCaret()).protectHighlights(true);
+ int ret;
+ int sret = 0;
+ for (int i = 0; i < pos.length; i++) {
+ if (pos[i][0] < pos[i][1]) {
+ ret = tab.removeTab(pos[i][0] - sret);
+ sret += ret;
+ pos[i][0] -= sret;
+ pos[i][1] -= sret;
+ }
+ }
+ ((SciNotesCaret) sep.getCaret()).protectHighlights(false);
+ ((SciNotesCaret) sep.getCaret()).updateHighlights();
+ }
+
+ doc.mergeEditsEnd();
+ }
+
+ /**
+ * Create the MenuItem for untabify action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new UnTabifyAction(label, editor), key);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UndoAction.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UndoAction.java
new file mode 100755
index 000000000..9ed6d97c2
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UndoAction.java
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.actions;
+
+import javax.swing.JButton;
+import javax.swing.KeyStroke;
+
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * CommentAction Class
+ * @author Bruno JOFRET
+ *
+ */
+@SuppressWarnings(value = { "serial" })
+public final class UndoAction extends DefaultAction {
+
+ /**
+ * Constructor
+ * @param name the name of the action
+ * @param editor SciNotes
+ */
+ public UndoAction(String name, SciNotes editor) {
+ super(name, editor);
+ }
+
+ /**
+ * doAction
+ */
+ public void doAction() {
+ getEditor().undo();
+ }
+
+ /**
+ * Create the MenuItem for undo action
+ * @param label label of the menu
+ * @param editor Editor
+ * @param key KeyStroke
+ * @return a MenuItem
+ */
+ public static MenuItem createMenu(String label, SciNotes editor, KeyStroke key) {
+ return createMenu(label, null, new UndoAction(label, editor), key);
+ }
+
+ /**
+ * createButton
+ * @param tooltip the tooltip
+ * @param icon an icon name searched in SCI/modules/gui/images/icons/
+ * @param editor SciNotes
+ * @return PushButton
+ */
+ public static JButton createButton(String tooltip, String icon, SciNotes editor) {
+ JButton button = createButton(tooltip, icon, new UndoAction(tooltip, editor));
+ editor.setUndoButton(button);
+ return button;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/style/FilterManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/style/FilterManager.java
new file mode 100755
index 000000000..4ab635514
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/style/FilterManager.java
@@ -0,0 +1,9 @@
+package org.scilab.modules.scinotes.style;
+
+import org.scilab.modules.scinotes.ScilabDocument;
+
+public class FilterManager {
+
+ public FilterManager(final ScilabDocument scilabDocument) {
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.java
new file mode 100755
index 000000000..dd838f8b0
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTab.java
@@ -0,0 +1,86 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import java.util.List;
+import java.util.ListIterator;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+
+/**
+ * Class to create SciNotes instances
+ *
+ * @author Calixte DENIZET
+ */
+public class CodeNavigatorTab {
+
+ /**
+ * @param uuid
+ * the uuid to restore
+ * @return a new SciNotes instance
+ */
+ public static NavigatorWindow getCodeNavigatorInstance(
+ final SciNotes editor, String uuid) {
+ final NavigatorWindow nav;
+ if (uuid != null) {
+ nav = new NavigatorWindow(editor, uuid);
+ } else {
+ nav = new NavigatorWindow(editor);
+ ScilabTabFactory.getInstance().addToCache(nav);
+ }
+
+ ClosingOperationsManager.registerClosingOperation((SwingScilabDockablePanel) nav,
+ new ClosingOperationsManager.ClosingOperation() {
+
+ @Override
+ public int canClose() {
+ return 1;
+ }
+
+ @Override
+ public void destroy() {
+ nav.closeNavigator();
+ }
+
+ @Override
+ public String askForClosing(final List<SwingScilabDockablePanel> list) {
+ return null;
+ }
+
+ @Override
+ public void updateDependencies(List<SwingScilabDockablePanel> list,
+ ListIterator<SwingScilabDockablePanel> it) {
+ }
+ });
+
+ WindowsConfigurationManager.registerEndedRestoration(
+ (SwingScilabDockablePanel) nav,
+ new WindowsConfigurationManager.EndedRestoration() {
+
+ @Override
+ public void finish() {
+ nav.changeToolBar();
+ }
+ });
+
+ ClosingOperationsManager.addDependency((SwingScilabDockablePanel) editor,
+ (SwingScilabDockablePanel) nav);
+
+ return nav;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.java
new file mode 100755
index 000000000..d65e3e58b
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/CodeNavigatorTabFactory.java
@@ -0,0 +1,92 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.AbstractScilabTabFactory;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+
+/**
+ * The main Tab factory.
+ * A component which needs to restore a Tab with a given uuid must register its factory.
+ *
+ * @author Calixte DENIZET
+ */
+public class CodeNavigatorTabFactory extends AbstractScilabTabFactory {
+
+ public static final String APPLICATION = "CodeNavigator";
+ public static final String PACKAGE = "SciNotes";
+ public static final String CLASS = "org.scilab.modules.scinotes.tabfactory.CodeNavigatorTabFactory";
+
+ private static CodeNavigatorTabFactory instance;
+
+ /**
+ * Default constructor
+ */
+ public CodeNavigatorTabFactory() {
+ if (instance == null) {
+ instance = this;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SwingScilabDockablePanel getTab(String uuid) {
+ String editorUUID = ConfigSciNotesManager.getCodeNavigatorState(uuid);
+ SciNotes editor = (SciNotes) ScilabTabFactory.getInstance().getFromCache(editorUUID);
+
+ return CodeNavigatorTab.getCodeNavigatorInstance(editor, uuid);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getPackage() {
+ return PACKAGE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getClassName() {
+ return CLASS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getApplication() {
+ return APPLICATION;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isAValidUUID(String uuid) {
+ return ConfigSciNotesManager.getCodeNavigatorState(uuid) != null;
+ }
+
+ /**
+ * @return an instance of this factory
+ */
+ public static CodeNavigatorTabFactory getInstance() {
+ new CodeNavigatorTabFactory();
+
+ return instance;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTab.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTab.java
new file mode 100755
index 000000000..42c37a2ad
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTab.java
@@ -0,0 +1,88 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import java.util.List;
+import java.util.ListIterator;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesGUI;
+
+/**
+ * Class to create SciNotes instances
+ *
+ * @author Calixte DENIZET
+ */
+public class SciNotesTab {
+
+ /**
+ * @param uuid
+ * the uuid to restore
+ * @return a new SciNotes instance
+ */
+ public static SciNotes getEditorInstance(String uuid) {
+ SciNotes editorInstance;
+ if (uuid != null) {
+ editorInstance = new SciNotes(uuid);
+ } else {
+ editorInstance = new SciNotes();
+ ScilabTabFactory.getInstance().addToCache(editorInstance);
+ }
+ SciNotesGUI.init(editorInstance);
+
+ final SciNotes ed = editorInstance;
+ ClosingOperationsManager.registerClosingOperation(
+ (SwingScilabDockablePanel) editorInstance,
+ new ClosingOperationsManager.ClosingOperation() {
+
+ @Override
+ public int canClose() {
+ return ed.canClose() ? 1 : 0;
+ }
+
+ @Override
+ public void destroy() {
+ ed.closeSciNotes();
+ }
+
+ @Override
+ public String askForClosing(final List<SwingScilabDockablePanel> list) {
+ return ed.askForClosing();
+ }
+
+ @Override
+ public void updateDependencies(List<SwingScilabDockablePanel> list,
+ ListIterator<SwingScilabDockablePanel> it) {
+ }
+ });
+
+ WindowsConfigurationManager.registerEndedRestoration(
+ (SwingScilabDockablePanel) editorInstance,
+ new WindowsConfigurationManager.EndedRestoration() {
+
+ @Override
+ public void finish() {
+ ed.endedRestoration();
+ }
+ });
+
+ ClosingOperationsManager
+ .addDependencyWithRoot((SwingScilabDockablePanel) editorInstance);
+
+ return editorInstance;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.java
new file mode 100755
index 000000000..cf5cef588
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SciNotesTabFactory.java
@@ -0,0 +1,90 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.AbstractScilabTabFactory;
+
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+
+/**
+ * The main Tab factory.
+ * A component which needs to restore a Tab with a given uuid must register its factory.
+ *
+ * @author Calixte DENIZET
+ */
+public class SciNotesTabFactory extends AbstractScilabTabFactory {
+
+ public static final String APPLICATION = "SciNotes";
+ public static final String PACKAGE = "SciNotes";
+ public static final String CLASS = "org.scilab.modules.scinotes.tabfactory.SciNotesTabFactory";
+
+ private static SciNotesTabFactory instance;
+
+ /**
+ * Default constructor
+ */
+ public SciNotesTabFactory() {
+ if (instance == null) {
+ instance = this;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SwingScilabDockablePanel getTab(String uuid) {
+ return SciNotesTab.getEditorInstance(uuid);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getPackage() {
+ return PACKAGE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getClassName() {
+ return CLASS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getApplication() {
+ return APPLICATION;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isAValidUUID(String uuid) {
+ return ConfigSciNotesManager.getEditorsUUID().contains(uuid);
+ }
+
+ /**
+ * @return an instance of this factory
+ */
+ public static SciNotesTabFactory getInstance() {
+ new SciNotesTabFactory();
+
+ return instance;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.java
new file mode 100755
index 000000000..8fa997701
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTab.java
@@ -0,0 +1,86 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import java.util.List;
+import java.util.ListIterator;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.SearchFile;
+
+/**
+ * Class to create SciNotes instances
+ *
+ * @author Calixte DENIZET
+ */
+public class SearchInFilesTab {
+
+ /**
+ * @param uuid
+ * the uuid to restore
+ * @return a new SciNotes instance
+ */
+ public static SearchFile getSearchInFilesTabInstance(final SciNotes editor,
+ String uuid) {
+ final SearchFile sf;
+ if (uuid != null) {
+ sf = new SearchFile(editor, uuid);
+ } else {
+ sf = new SearchFile(editor);
+ ScilabTabFactory.getInstance().addToCache(sf);
+ }
+
+ ClosingOperationsManager.registerClosingOperation((SwingScilabDockablePanel) sf,
+ new ClosingOperationsManager.ClosingOperation() {
+
+ @Override
+ public int canClose() {
+ return 1;
+ }
+
+ @Override
+ public void destroy() {
+ sf.closeSearchInFiles();
+ }
+
+ @Override
+ public String askForClosing(final List<SwingScilabDockablePanel> list) {
+ return null;
+ }
+
+ @Override
+ public void updateDependencies(List<SwingScilabDockablePanel> list,
+ ListIterator<SwingScilabDockablePanel> it) {
+ }
+ });
+
+ WindowsConfigurationManager.registerEndedRestoration(
+ (SwingScilabDockablePanel) sf,
+ new WindowsConfigurationManager.EndedRestoration() {
+
+ @Override
+ public void finish() {
+ sf.changeToolBar();
+ }
+ });
+
+ ClosingOperationsManager.addDependency((SwingScilabDockablePanel) editor,
+ (SwingScilabDockablePanel) sf);
+
+ return sf;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.java
new file mode 100755
index 000000000..867f143d5
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/tabfactory/SearchInFilesTabFactory.java
@@ -0,0 +1,92 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.tabfactory;
+
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.tabfactory.AbstractScilabTabFactory;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
+import org.scilab.modules.scinotes.utils.NavigatorWindow;
+
+/**
+ * The main Tab factory.
+ * A component which needs to restore a Tab with a given uuid must register its factory.
+ *
+ * @author Calixte DENIZET
+ */
+public class SearchInFilesTabFactory extends AbstractScilabTabFactory {
+
+ public static final String APPLICATION = "SearchInFiles";
+ public static final String PACKAGE = "SciNotes";
+ public static final String CLASS = "org.scilab.modules.scinotes.tabfactory.SearchInFilesTabFactory";
+
+ private static SearchInFilesTabFactory instance;
+
+ /**
+ * Default constructor
+ */
+ public SearchInFilesTabFactory() {
+ if (instance == null) {
+ instance = this;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SwingScilabDockablePanel getTab(String uuid) {
+ String editorUUID = ConfigSciNotesManager.getSearchInFilesState(uuid);
+ SciNotes editor = (SciNotes) ScilabTabFactory.getInstance().getFromCache(editorUUID);
+
+ return SearchInFilesTab.getSearchInFilesTabInstance(editor, uuid);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getPackage() {
+ return PACKAGE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getClassName() {
+ return CLASS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getApplication() {
+ return APPLICATION;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isAValidUUID(String uuid) {
+ return ConfigSciNotesManager.getSearchInFilesState(uuid) != null;
+ }
+
+ /**
+ * @return an instance of this factory
+ */
+ public static SearchInFilesTabFactory getInstance() {
+ new SearchInFilesTabFactory();
+
+ return instance;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
new file mode 100755
index 000000000..bf8afd366
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
@@ -0,0 +1,158 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.StringReader;
+
+import java.awt.print.PageFormat;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.commons.xml.ScilabTransformerFactory;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.helptools.scilab.AbstractScilabCodeHandler;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+
+/**
+ * Code converter Class
+ * @author Calixte DENIZET
+ */
+public class CodeExporter extends FOCodeConverter {
+
+ /**
+ * Constant for PDF
+ */
+ public static final String PDF = MimeConstants.MIME_PDF;
+
+ /**
+ * Constant for PS
+ */
+ public static final String PS = MimeConstants.MIME_POSTSCRIPT;
+
+ /**
+ * Constant for EPS
+ */
+ public static final String EPS = MimeConstants.MIME_EPS;
+
+ /**
+ * Constant for RTF
+ */
+ public static final String RTF = MimeConstants.MIME_RTF;
+
+ /**
+ * Constant for PNG
+ */
+ public static final String PNG = MimeConstants.MIME_PNG;
+
+ /**
+ * Constant for PREVIEW a document in AWT window
+ */
+ public static final String PREVIEW = MimeConstants.MIME_FOP_AWT_PREVIEW;
+
+ /**
+ * Constant for PRINT
+ */
+ public static final String PRINT = MimeConstants.MIME_FOP_PRINT;
+
+ private static final String CREATOR = "SciNotes for Scilab";
+ private SciNotes editor;
+
+ /**
+ * Constructor
+ * @param pane the ScilabEditorPane where the code must be converted.
+ */
+ public CodeExporter(ScilabEditorPane pane) {
+ super(pane);
+ editor = pane.getEditor();
+ }
+
+ /**
+ * Make the conversion of a ScilabEditorPane
+ * @param pane the ScilabEditorPane
+ * @param the fileName for the output
+ * @param type must on of the constants PDF, EPS, ...
+ * @param format the page format
+ */
+ public static void convert(ScilabEditorPane pane, String fileName, String type, PageFormat format) {
+ CodeExporter exporter = new CodeExporter(pane);
+ exporter.convert(((ScilabDocument) pane.getDocument()).getText(), pane.getXln().getLineNumber(), fileName, type, pane.getShortName(), format);
+ }
+
+ /**
+ * Make the conversion of a ScilabEditorPane
+ * @param pane the ScilabEditorPane
+ * @param lineNumberArray an array containing integers to number the lines
+ * @param the fileName for the output
+ * @param type must on of the constants PDF, EPS, ...
+ * @param format the page format
+ */
+ public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) {
+ FopFactory fopFactory = FopFactory.newInstance();
+ OutputStream out = null;
+
+ try {
+ fopFactory.setUserConfig(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
+ FOUserAgent userAgent = fopFactory.newFOUserAgent();
+ userAgent.setProducer(CREATOR);
+ userAgent.setTitle(title);
+ userAgent.setAuthor(System.getProperty("user.name"));
+ Fop fop;
+ if (!type.equals(PRINT) && !type.equals(PREVIEW) && fileName != null && !fileName.isEmpty()) {
+ out = new BufferedOutputStream(new FileOutputStream(new File(fileName)));
+ fop = fopFactory.newFop(type, userAgent, out);
+ } else {
+ fop = fopFactory.newFop(type, userAgent);
+ }
+ String factoryName = ScilabTransformerFactory.useDefaultTransformerFactoryImpl();
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = factory.newTransformer();
+ String str = super.convert(code, lineNumberArray, format);
+ Source src = new StreamSource(new StringReader(str));
+ Result res = new SAXResult(fop.getDefaultHandler());
+ transformer.transform(src, res);
+ ScilabTransformerFactory.restoreTransformerFactoryImpl(factoryName);
+ } catch (Exception e) {
+ if (type.equals(PRINT)) {
+ ScilabModalDialog.show(editor, SciNotesMessages.PRINTERERROR + "\n" + e.getLocalizedMessage());
+ } else {
+ System.err.println(SciNotesMessages.EXPORTERROR + ":");
+ e.printStackTrace();
+ }
+ } finally {
+ try {
+ if (out != null) {
+ out.close();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.java
new file mode 100755
index 000000000..02aefcc24
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ConfigSciNotesManager.java
@@ -0,0 +1,1558 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2009 - INRIA - Allan SIMON
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Toolkit;
+import java.awt.print.Paper;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.scilab.modules.commons.ScilabCommons;
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.commons.ScilabCommonsUtils;
+import org.scilab.modules.commons.xml.ScilabXMLUtilities;
+import org.scilab.modules.commons.xml.ScilabDocumentBuilderFactory;
+import org.scilab.modules.commons.xml.ScilabTransformerFactory;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.gui.utils.Position;
+import org.scilab.modules.gui.utils.Size;
+
+import org.scilab.modules.scinotes.ScilabView;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.TabManager;
+import org.scilab.modules.scinotes.MatchingBlockManager;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.SAXException;
+
+/**
+ * Configuration class which interacts with the file etc/scinotesConfiguration.xml
+ */
+public final class ConfigSciNotesManager {
+
+ public static final String RECENTBASEDIR = "recentBaseDir";
+ public static final String BASEDIR = "baseDir";
+ public static final String RECENTFILEPATTERN = "recentFilePattern";
+ public static final String FILEPATTERN = "filePattern";
+ public static final String RECENTWORDPATTERN = "recentWordPattern";
+ public static final String WORDPATTERN = "wordPattern";
+
+ private static final int BUFSIZE = 1024;
+
+ private static final int MARGIN = 20;
+
+ private static final String ERROR_READ = "Could not load file: ";
+ private static final String ERROR_WRITE = "Could not save file: ";
+ private static final String VALUE = "value";
+ private static final String VERSION = "version";
+ private static final String STYLE = "style";
+ private static final String DEFAULT = "default";
+ private static final String WIDTH = "width";
+ private static final String HEIGHT = "height";
+ private static final String EDITOR = "SciNotes";
+
+ private static final String FOREGROUNDCOLOR = "ForegroundColor";
+ private static final String BACKGROUNDCOLOR = "BackgroundColor";
+ private static final String ALTERNCOLORS = "AlternColors";
+ private static final String COLOR1 = "color1";
+ private static final String COLOR2 = "color2";
+ private static final String LINECOLOR = "linecolor";
+ private static final String CONTOURCOLOR = "contourcolor";
+ private static final String COLORPREFIX = "#";
+
+ private static final String NAME = "name";
+ private static final String NULL = "null";
+
+ private static final String PROFILE = "Profile";
+
+ private static final String RECENT_SEARCH = "recentSearch";
+ private static final String SEARCH = "search";
+ private static final String RECENT_REPLACE = "recentReplace";
+ private static final String REPLACE = "replace";
+ private static final String RECURSIVE = "recursiveSearch";
+ private static final String LINEBYLINE = "readLineByLine";
+ private static final String FILECASE = "fileCase";
+ private static final String SEARCHINFILES = "searchInFiles";
+
+ private static final String EXPRESSION = "exp";
+ private static final String REGULAR_EXPRESION = "regularExp";
+ private static final String CIRCULAR = "circularSearch";
+ private static final String WORD_WARP = "wordWarp";
+ private static final String WHOLE_WORD = "wholeWord";
+ private static final String CASE_SENSITIVE = "caseSensitive";
+ private static final String STATE_FLAG = "state";
+
+ private static final String SETTING = "Setting";
+ private static final String SCINOTES = "scinotes";
+ private static final String TRUE = "true";
+ private static final String FALSE = "false";
+ private static final String DOCUMENT = "document";
+ private static final String PATH = "path";
+ private static final String RECENT_FILES = "recentFiles";
+ private static final String OPEN_FILES = "openFiles";
+ private static final String RESTOREFILES = "RestoreFiles";
+ private static final String EDITORINST = "editorInstance";
+ private static final String EDITORUUID = "EditorUUID";
+ private static final String PANEINST = "paneInstance";
+ private static final String PANEINST_EX = "paneInstanceExtra";
+
+ private static final String FAVORITE_DIRS = "favoriteDirectories";
+ private static final String DIRECTORY = "Directory";
+
+ private static final String PAPER = "PaperFormat";
+ private static final String MARGINLEFT = "MarginLeft";
+ private static final String MARGINRIGHT = "MarginRight";
+ private static final String MARGINTOP = "MarginTop";
+ private static final String MARGINBOTTOM = "MarginBottom";
+
+ private static final String CODENAVIGATOR = "CodeNavigator";
+
+ private static final String SCI = "SCI";
+ private static final String SCINOTES_CONFIG_FILE = System.getenv(SCI) + "/modules/scinotes/etc/scinotesConfiguration.xml";
+
+ private static final int MAXRECENT = 20;
+
+ private static Document document;
+
+ private static boolean updated;
+ private static boolean mustSave = true;
+
+ private static String USER_SCINOTES_CONFIG_FILE = ScilabConstants.SCIHOME.toString() + "/scinotesConfiguration.xml";
+
+ static {
+ if (ScilabConstants.SCIHOME != null && ScilabConstants.SCIHOME.canRead() && ScilabConstants.SCIHOME.canWrite()) {
+ USER_SCINOTES_CONFIG_FILE = ScilabConstants.SCIHOME.toString() + "/scinotesConfiguration.xml";
+ } else {
+ USER_SCINOTES_CONFIG_FILE = SCINOTES_CONFIG_FILE;
+ mustSave = false;
+ }
+ }
+
+ /**
+ * Constructor
+ */
+ private ConfigSciNotesManager() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Create a copy of Scilab configuration file in the user directory
+ */
+ public static void createUserCopy() {
+ if (checkVersion() && mustSave) {
+ /* Create a local copy of the configuration file */
+ ScilabCommonsUtils.copyFile(new File(SCINOTES_CONFIG_FILE), new File(USER_SCINOTES_CONFIG_FILE));
+ document = null;
+ updated = true;
+ }
+ }
+
+ /**
+ * Get the name of the user configuration file
+ * @return the name of the configuration file
+ */
+ public static String getUserConfigFile() {
+ return USER_SCINOTES_CONFIG_FILE;
+ }
+
+ /**
+ * @return true if scinotesConfiguration.xml in etc has a version greater than the version in home
+ */
+ public static boolean checkVersion() {
+ if (updated) {
+ return false;
+ }
+
+ File fileConfig = new File(USER_SCINOTES_CONFIG_FILE);
+
+ if (fileConfig.exists()) {
+ document = null;
+ readDocument(SCINOTES_CONFIG_FILE);
+ Node setting = getNodeChild(null, SETTING);
+ String str = ((Element) setting).getAttribute(VERSION);
+ if (str != null && str.length() != 0) {
+ float versionEtc = Float.parseFloat(str);
+ document = null;
+ readDocument();
+ setting = getNodeChild(null, SETTING);
+ str = ((Element) setting).getAttribute(VERSION);
+ document = null;
+
+ if (str != null && str.length() != 0) {
+ float versionHome = Float.parseFloat(str);
+ return versionEtc != versionHome;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @return the paper format saved in previous session
+ */
+ public static Paper getPaperFormat() {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+
+ NodeList profiles = root.getElementsByTagName(PROFILE);
+ Element scinotesProfile = (Element) profiles.item(0);
+
+ NodeList allSizeElements = scinotesProfile.getElementsByTagName(PAPER);
+ Element paper = (Element) allSizeElements.item(0);
+
+ if (paper == null) {
+ return new Paper();
+ }
+
+ Paper p = new Paper();
+ double width = Double.parseDouble(paper.getAttribute(WIDTH));
+ double height = Double.parseDouble(paper.getAttribute(HEIGHT));
+ double marginLeft = Double.parseDouble(paper.getAttribute(MARGINLEFT));
+ double marginRight = Double.parseDouble(paper.getAttribute(MARGINRIGHT));
+ double marginTop = Double.parseDouble(paper.getAttribute(MARGINTOP));
+ double marginBottom = Double.parseDouble(paper.getAttribute(MARGINBOTTOM));
+ p.setSize(width, height);
+ p.setImageableArea(marginLeft, marginTop, width - (marginLeft + marginRight), height - (marginTop + marginBottom));
+
+ return p;
+ }
+
+ /**
+ * Save the paper format
+ * @param p the Paper to save
+ */
+ public static void savePaperFormat(Paper p) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+
+ NodeList profiles = root.getElementsByTagName(PROFILE);
+ Element scinotesProfile = (Element) profiles.item(0);
+
+ NodeList allSizeElements = scinotesProfile.getElementsByTagName(PAPER);
+ Element paper = (Element) allSizeElements.item(0);
+
+ if (paper == null) {
+ paper = document.createElement(PAPER);
+ scinotesProfile.appendChild((Node) paper);
+ }
+
+ double width = p.getWidth();
+ double height = p.getHeight();
+ double marginLeft = p.getImageableX();
+ double marginRight = width - (marginLeft + p.getImageableWidth());
+ double marginTop = p.getImageableY();
+ double marginBottom = height - (marginTop + p.getImageableHeight());
+
+ paper.setAttribute(WIDTH, Double.toString(width));
+ paper.setAttribute(HEIGHT, Double.toString(height));
+ paper.setAttribute(MARGINLEFT, Double.toString(marginLeft));
+ paper.setAttribute(MARGINRIGHT, Double.toString(marginRight));
+ paper.setAttribute(MARGINTOP, Double.toString(marginTop));
+ paper.setAttribute(MARGINBOTTOM, Double.toString(marginBottom));
+
+ writeDocument();
+ }
+
+ /**
+ * @return the color the altern colors for inner function
+ */
+ public static Color[] getAlternColors() {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+
+ NodeList profiles = root.getElementsByTagName(PROFILE);
+ Element scinotesProfile = (Element) profiles.item(0);
+
+ NodeList allSizeElements = scinotesProfile.getElementsByTagName(ALTERNCOLORS);
+ Element alternColors = (Element) allSizeElements.item(0);
+ Color[] arr = new Color[2];
+
+ Color c;
+ if (NULL.equals(alternColors.getAttribute(COLOR1))) {
+ c = null;
+ } else {
+ c = Color.decode(alternColors.getAttribute(COLOR1));
+ }
+
+ arr[0] = c;
+
+ if (NULL.equals(alternColors.getAttribute(COLOR2))) {
+ c = null;
+ } else {
+ c = Color.decode(alternColors.getAttribute(COLOR2));
+ }
+
+ arr[1] = c;
+ return arr;
+ }
+
+ /**
+ * Get all the recent opened files
+ * @return an array of uri
+ */
+ public static List<File> getAllRecentOpenedFiles() {
+ List<File> files = new ArrayList<File>();
+ readDocument();
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(RECENT_FILES).item(0);
+ if (root != null) {
+ NodeList recentFiles = root.getElementsByTagName(DOCUMENT);
+ for (int i = 0; i < recentFiles.getLength(); ++i) {
+ Element style = (Element) recentFiles.item(i);
+
+ File temp = new File(style.getAttribute(PATH));
+
+ if (temp.exists()) {
+ files.add(temp);
+ } else {
+ root.removeChild((Node) style);
+ }
+ }
+ }
+
+ clean(root);
+ writeDocument();
+
+ return files;
+ }
+
+ /**
+ * Get all the favorite dirs
+ * @return a list of File
+ */
+ public static List<File> getAllFavoriteDirs() {
+ List<File> dirsList = new ArrayList<File>();
+ readDocument();
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(FAVORITE_DIRS).item(0);
+ if (root != null) {
+ NodeList dirs = root.getElementsByTagName(DIRECTORY);
+ for (int i = 0; i < dirs.getLength(); i++) {
+ Element dir = (Element) dirs.item(i);
+ File temp = new File(dir.getAttribute(PATH));
+
+ if (temp.exists()) {
+ dirsList.add(temp);
+ } else {
+ root.removeChild((Node) dir);
+ }
+ }
+ }
+
+ clean(root);
+ writeDocument();
+
+ return dirsList;
+ }
+
+ /**
+ * Add a path to a favorite directory
+ * @param path the path of the dir
+ */
+ public static void saveFavoriteDirectory(String path) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(FAVORITE_DIRS).item(0);
+ Element newDir = document.createElement(DIRECTORY);
+ newDir.setAttribute(PATH, path);
+ root.appendChild((Node) newDir);
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Remove the last favorite directory
+ */
+ public static void rmLastFavoriteDirectory() {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(FAVORITE_DIRS).item(0);
+ NodeList dirs = root.getElementsByTagName(DIRECTORY);
+
+ if (dirs.getLength() != 0) {
+ root.removeChild(dirs.item(dirs.getLength() - 1));
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Add a file to recent Opened Files
+ * @param filePath the path of the files to add
+ */
+ public static void saveToRecentOpenedFiles(String filePath) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(RECENT_FILES).item(0);
+ NodeList recentFiles = root.getElementsByTagName(DOCUMENT);
+ int numberOfFiles = recentFiles.getLength();
+
+ // we remove all the duplicate
+ for (int i = 0; i < recentFiles.getLength(); ++i) {
+ Element style = (Element) recentFiles.item(i);
+ if (filePath.equals(style.getAttribute(PATH))) {
+ root.removeChild((Node) style);
+ numberOfFiles--;
+ }
+ }
+
+ // if we have reached the maximun , we remove the oldest files
+ while (recentFiles.getLength() >= MAXRECENT) {
+ root.removeChild(root.getFirstChild());
+ }
+
+ Element newFile = document.createElement(DOCUMENT);
+ newFile.setAttribute(PATH, filePath);
+ root.appendChild((Node) newFile);
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * @return true if open files should be restored upon restart.
+ */
+ public static boolean getRestoreOpenedFiles() {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+
+ NodeList profiles = root.getElementsByTagName(PROFILE);
+ Element scinotesProfile = (Element) profiles.item(0);
+
+ NodeList allSizeElements = scinotesProfile.getElementsByTagName(RESTOREFILES);
+ Element restorefiles = (Element) allSizeElements.item(0);
+
+ return TRUE.equals(restorefiles.getAttribute(VALUE));
+ }
+
+ /**
+ * Active/deactive restoration of open files upon restart of scinotes
+ * @param activated active or not
+ */
+ public static void saveRestoreOpenedFiles(boolean activated) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+
+ NodeList profiles = root.getElementsByTagName(PROFILE);
+ Element scinotesProfile = (Element) profiles.item(0);
+
+ NodeList allSizeElements = scinotesProfile.getElementsByTagName(RESTOREFILES);
+ Element restorefiles = (Element) allSizeElements.item(0);
+ if (restorefiles == null) {
+ Element restoreElement = document.createElement(RESTOREFILES);
+ restorefiles.setAttribute(VALUE, new Boolean(activated).toString());
+ restorefiles.appendChild((Node) restoreElement);
+ } else {
+ restorefiles.setAttribute(VALUE, new Boolean(activated).toString());
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Return a count of the open files that exist. New files, for instance, do not.
+ * @return count
+ */
+ public static int countExistingOpenFiles(UUID uuid) {
+ int count = 0;
+ readDocument();
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ if (root != null) {
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+ for (int i = 0; i < openFiles.getLength(); ++i) {
+ Element style = (Element) openFiles.item(i);
+ if (style.getAttribute(EDITORINST).equals(uuid.toString())) {
+ File temp = new File(style.getAttribute(PATH));
+ if (temp.exists()) {
+ count++;
+ }
+ }
+ }
+ }
+ return count;
+ }
+
+ /**
+ * Get the list of open files associated with an editor instance hashcode.
+ * Only files that exist are returned.
+ * @param editorID unique id of an editor instance
+ * @return an array of uri
+ */
+ public static List<File> getOpenFilesByEditor(UUID editorID) {
+ List<File> files = new ArrayList<File>();
+ readDocument();
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ if (root != null) {
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ /* Loop through the list and return only the files with a matching hash code. */
+ int i = 0;
+ for (; i < openFiles.getLength(); i++) {
+ Element doc = (Element) openFiles.item(i);
+
+ if (editorID.equals(UUID.fromString(doc.getAttribute(EDITORINST)))) {
+ File temp = new File(doc.getAttribute(PATH));
+
+ /* Check that the file exists and add to file list or else remove the node. */
+ if (temp.exists() && !files.contains(temp)) {
+ files.add(temp);
+ } else {
+ root.removeChild((Node) doc);
+ i--; // Adjust index to account for removed item.
+ }
+ }
+ }
+
+ clean(root);
+ writeDocument();
+ }
+ return files;
+ }
+
+ /**
+ * Get a list of unique editor instance identifiers in the list of open files.
+ * @return an array of editor instance identifiers
+ */
+ public static List<UUID> getOpenFilesEditorList() {
+ List<UUID> editorIDlist = new ArrayList<UUID>();
+ readDocument();
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ if (root != null) {
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ /* Loop through the list and return the list of IDs. */
+ for (int i = 0; i < openFiles.getLength(); ++i) {
+ Element style = (Element) openFiles.item(i);
+
+ UUID editorID = UUID.fromString(style.getAttribute(EDITORINST));
+
+ if (!editorIDlist.contains(editorID)) {
+ editorIDlist.add(editorID);
+ }
+ }
+ }
+ return editorIDlist;
+ }
+
+ /**
+ * Add a file to currently open files
+ * @param filePath the path of the files to add
+ * @param editorInstance instance of the editor to associate with the open file
+ * @param sep the pane
+ */
+ public static void saveToOpenFiles(String filePath, SciNotes editorInstance, ScilabEditorPane sep) {
+ saveToOpenFiles(filePath, editorInstance, sep, -1);
+ }
+
+ /**
+ * Add a file to currently open files
+ * @param filePath the path of the files to add
+ * @param editorInstance instance of the editor to associate with the open file
+ * @param sep the pane
+ */
+ public static void saveToOpenFiles(String filePath, SciNotes editorInstance, ScilabEditorPane sep, int pos) {
+ readDocument();
+ removeFromOpenFiles(editorInstance.getUUID(), Arrays.asList(new String[] {filePath}));
+ UUID nil = new UUID(0, 0);
+
+ // Find the element containing the list of open files
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ // Get the list of open files
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+ int numberOfFiles = openFiles.getLength();
+
+ Node bef = null;
+ if (pos != - 1 && pos < numberOfFiles) {
+ bef = openFiles.item(pos);
+ }
+
+ Element newFile = document.createElement(DOCUMENT);
+ newFile.setAttribute(PATH, filePath);
+ // Record the editor instance's hash code
+ newFile.setAttribute(EDITORINST, editorInstance.getUUID().toString());
+ //root.appendChild((Node) newFile);
+ // Record the text pane's hash code
+ newFile.setAttribute(PANEINST, sep.getUUID().toString());
+ newFile.setAttribute(PANEINST_EX, nil.toString());
+ if (bef != null) {
+ root.insertBefore((Node) newFile, bef);
+ } else {
+ root.appendChild((Node) newFile);
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Remove a tab with an open file from the list of open files
+ * @param editorInstance instance of the editor
+ * @param sep instance of the editor pane.
+ */
+ public static void removeFromOpenFiles(SciNotes editorInstance, ScilabEditorPane sep) {
+ removeFromOpenFiles(editorInstance.getUUID(), sep.getUUID());
+ }
+
+ /**
+ * Remove from the list of open files all files with a matching editor instance identifer
+ * @param editorID editor instance identifer
+ */
+ public static void removeFromOpenFiles(UUID editorID) {
+ removeFromOpenFiles(editorID, new UUID(0, 0) /* nil UUID */);
+ }
+
+ /**
+ * Remove a tab with an open file from the list of open files
+ * @param editorID editor instance identifer
+ * @param sepID editor pane instance identifer. If a nil UUID is passed,
+ * all files with a matching editor instance identifer are removed.
+ */
+ public static void removeFromOpenFiles(UUID editorID, List<String> toRemove) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ // Remove item with matching editorID and sepID.
+ for (int i = openFiles.getLength() - 1; i >= 0; i--) {
+ Element doc = (Element) openFiles.item(i);
+ if (editorID.equals(UUID.fromString(doc.getAttribute(EDITORINST)))
+ && toRemove.contains(doc.getAttribute(PATH))) {
+ root.removeChild((Node) doc);
+ }
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Remove a tab with an open file from the list of open files
+ * @param editorID editor instance identifer
+ * @param sepID editor pane instance identifer. If a nil UUID is passed,
+ * all files with a matching editor instance identifer are removed.
+ */
+ public static void removeFromOpenFiles(UUID editorID, UUID sepID) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ // Remove item with matching editorID and sepID.
+ UUID nil = new UUID(0, 0);
+ for (int i = openFiles.getLength() - 1; i >= 0; i--) {
+ Element style = (Element) openFiles.item(i);
+ UUID paneID1 = UUID.fromString(style.getAttribute(PANEINST));
+ UUID paneID2 = UUID.fromString(style.getAttribute(PANEINST_EX));
+
+ if (editorID.equals(UUID.fromString(style.getAttribute(EDITORINST)))
+ && (sepID.equals(nil) || sepID.equals(paneID1) || sepID.equals(paneID2))) {
+ root.removeChild((Node) style);
+ }
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Change a filename.
+ * @param newfilePath new pathname of the file
+ * @param editorInstance instance of the editor
+ * @param sep instance of the editor pane
+ */
+ public static void renameOpenFilesItem(String newfilePath, SciNotes editorInstance, ScilabEditorPane sep) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ Element style = findOpenFileItem(root, editorInstance.getUUID(), sep.getUUID());
+
+ if (style != null) {
+ style.setAttribute(PATH, newfilePath);
+ }
+
+ /* Save changes */
+ writeDocument();
+ }
+
+ /**
+ * Replace a single text pane ID with two pane IDs when a tab split occurs
+ * @param editorInstance instance of the editor
+ * @param old1 old instance of the editor pane
+ * @param new1 first new instance of the tabbed editor pane
+ * @param new2 second new instance of the tabbed editor pane
+ */
+ public static void tabSplitOpenFilesItem(SciNotes editorInstance, ScilabEditorPane old1, ScilabEditorPane new1, ScilabEditorPane new2) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ Element style = findOpenFileItem(root, editorInstance.getUUID(), old1.getUUID());
+
+ if (style != null) {
+ style.setAttribute(PANEINST, new1.getUUID().toString());
+ style.setAttribute(PANEINST_EX, new2.getUUID().toString());
+ }
+
+ /* Save changes */
+ writeDocument();
+ }
+
+ /**
+ * Replace double pane IDs with a single ID when a tabbed pane is replaced by a single pane.
+ * @param editorInstance instance of the editor
+ * @param old1 one of the old tabbed editor pane
+ * @param new1 new editor pane
+ */
+ public static void removeTabSplitInOpenFilesItem(SciNotes editorInstance, ScilabEditorPane old1, ScilabEditorPane new1) {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ Element style = findOpenFileItem(root, editorInstance.getUUID(), old1.getUUID());
+
+ if (style != null) {
+ UUID nil = new UUID(0, 0);
+ style.setAttribute(PANEINST, new1.getUUID().toString());
+ style.setAttribute(PANEINST_EX, nil.toString());
+ }
+
+ /* Save changes */
+ writeDocument();
+ }
+
+ /**
+ * Find the first element with matching editor and pane identifiers
+ * @param root Document root
+ * @param editorID instance of the editor to find
+ * @param sepID instance of the editor pane to find
+ * @return the corresponding element
+ */
+ public static Element findOpenFileItem(Element root, UUID editorID, UUID sepID) {
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ // Find item with matching editor and pane IDs
+ for (int i = 0; i < openFiles.getLength(); i++) {
+ Element style = (Element) openFiles.item(i);
+ UUID paneID1 = UUID.fromString(style.getAttribute(PANEINST));
+ UUID paneID2 = UUID.fromString(style.getAttribute(PANEINST_EX));
+
+ if (editorID.equals(UUID.fromString(style.getAttribute(EDITORINST)))
+ && (sepID.equals(paneID1) || sepID.equals(paneID2))) {
+ return style;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Empty the list of open files. Performed when the editor is opened
+ * and the user opts not to restore the open files.
+ */
+ public static void removeAllOpenFiles() {
+ readDocument();
+
+ Element root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+
+ // Remove all
+ for (int i = openFiles.getLength() - 1; i >= 0; --i) {
+ Element style = (Element) openFiles.item(i);
+ root.removeChild((Node) style);
+ }
+
+ clean(root);
+ writeDocument();
+ }
+
+ /**
+ * Reset the current conf file
+ */
+ public static void resetDocument() {
+ document = null;
+ }
+
+ /**
+ * Read the file to modify
+ */
+ private static void readDocument() {
+ readDocument(USER_SCINOTES_CONFIG_FILE);
+ }
+
+ /**
+ * Read the file to modify
+ */
+ private static void readDocument(String pathConfSci) {
+ File fileConfig = new File(USER_SCINOTES_CONFIG_FILE);
+ if (!fileConfig.exists()) {
+ createUserCopy();
+ }
+ File xml = null;
+ DocumentBuilder docBuilder = null;
+ String factoryName = ScilabDocumentBuilderFactory.useDefaultDocumentBuilderFactoryImpl();
+
+ try {
+ if (document == null) {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ docBuilder = factory.newDocumentBuilder();
+
+ // read content of a XML file with DOM
+ xml = new File(pathConfSci);
+ document = docBuilder.parse(xml);
+ }
+ } catch (ParserConfigurationException pce) {
+ System.err.println(ERROR_READ + pathConfSci);
+ } catch (SAXException se) {
+ System.err.println(ERROR_READ + pathConfSci);
+ } catch (IOException ioe) {
+ System.err.println(ERROR_READ + pathConfSci);
+ }
+
+ ScilabDocumentBuilderFactory.restoreDocumentBuilderFactoryImpl(factoryName);
+
+ if (document == null && fileConfig.exists()) {
+ ScilabModalDialog.show(null, SciNotesMessages.CORRUPTED_CONF_FILE, SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ fileConfig.delete();
+ createUserCopy();
+ readDocument(pathConfSci);
+ }
+ }
+
+ /**
+ * Save the modifications
+ */
+ private static void writeDocument() {
+ if (mustSave) {
+ ScilabXMLUtilities.writeDocument(document, USER_SCINOTES_CONFIG_FILE);
+ }
+ }
+
+ /**
+ *
+ */
+ public static void saveCodeNavigatorState(String editorUUID, String navUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList navs = root.getElementsByTagName(CODENAVIGATOR);
+ boolean update = false;
+ for (int i = 0; i < navs.getLength(); i++) {
+ Element nav = (Element) navs.item(i);
+ if (nav.getAttribute("uuid").equals(navUUID)) {
+ nav.setAttribute("depends", editorUUID);
+ update = true;
+ break;
+ }
+ }
+
+ if (!update) {
+ ScilabXMLUtilities.createNode(document, root, CODENAVIGATOR, new String[] {"uuid", navUUID, "depends", editorUUID});
+ }
+
+ writeDocument();
+ }
+
+ /**
+ *
+ */
+ public static String getCodeNavigatorState(String navUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList navs = root.getElementsByTagName(CODENAVIGATOR);
+ for (int i = 0; i < navs.getLength(); i++) {
+ Element nav = (Element) navs.item(i);
+ if (nav.getAttribute("uuid").equals(navUUID)) {
+ return nav.getAttribute("depends");
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public static String getCodeNavigatorStateForEditor(String editorUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList navs = root.getElementsByTagName(CODENAVIGATOR);
+ for (int i = 0; i < navs.getLength(); i++) {
+ Element nav = (Element) navs.item(i);
+ if (nav.getAttribute("depends").equals(editorUUID)) {
+ return nav.getAttribute("uuid");
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public static void saveSearchInFilesState(String editorUUID, String sfUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList sfs = root.getElementsByTagName(SEARCHINFILES);
+ boolean update = false;
+ for (int i = 0; i < sfs.getLength(); i++) {
+ Element sf = (Element) sfs.item(i);
+ if (sf.getAttribute("uuid").equals(sfUUID)) {
+ sf.setAttribute("depends", editorUUID);
+ update = true;
+ break;
+ }
+ }
+
+ if (!update) {
+ ScilabXMLUtilities.createNode(document, root, SEARCHINFILES, new String[] {"uuid", sfUUID, "depends", editorUUID});
+ }
+
+ writeDocument();
+ }
+
+ /**
+ *
+ */
+ public static String getSearchInFilesState(String sfUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList sfs = root.getElementsByTagName(SEARCHINFILES);
+ for (int i = 0; i < sfs.getLength(); i++) {
+ Element sf = (Element) sfs.item(i);
+ if (sf.getAttribute("uuid").equals(sfUUID)) {
+ return sf.getAttribute("depends");
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public static String getSearchInFilesStateForEditor(String editorUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList sfs = root.getElementsByTagName(SEARCHINFILES);
+ for (int i = 0; i < sfs.getLength(); i++) {
+ Element sf = (Element) sfs.item(i);
+ if (sf.getAttribute("depends").equals(editorUUID)) {
+ return sf.getAttribute("uuid");
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public static void saveEditorUUID(String editorUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList eis = root.getElementsByTagName(EDITORUUID);
+ for (int i = 0; i < eis.getLength(); i++) {
+ Element ei = (Element) eis.item(i);
+ if (ei.getAttribute("uuid").equals(editorUUID)) {
+ return;
+ }
+ }
+
+ ScilabXMLUtilities.createNode(document, root, EDITORUUID, new String[] {"uuid", editorUUID});
+
+ writeDocument();
+ }
+
+ /**
+ *
+ */
+ public static void removeEditorUUID(String editorUUID) {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList eis = root.getElementsByTagName(EDITORUUID);
+ for (int i = 0; i < eis.getLength(); i++) {
+ Element ei = (Element) eis.item(i);
+ if (ei.getAttribute("uuid").equals(editorUUID)) {
+ root.removeChild(ei);
+ }
+ }
+
+ root = (Element) document.getDocumentElement().getElementsByTagName(OPEN_FILES).item(0);
+ if (root != null) {
+ NodeList openFiles = root.getElementsByTagName(DOCUMENT);
+ for (int i = 0; i < openFiles.getLength(); ++i) {
+ Element of = (Element) openFiles.item(i);
+ if (of.getAttribute(EDITORINST).equals(editorUUID)) {
+ root.removeChild(of);
+ }
+ }
+ }
+
+ writeDocument();
+ }
+
+ /**
+ *
+ */
+ public static List<String> getEditorsUUID() {
+ readDocument();
+
+ Element root = document.getDocumentElement();
+ NodeList eis = root.getElementsByTagName(EDITORUUID);
+ List<String> list = new ArrayList<String>();
+ for (int i = 0; i < eis.getLength(); i++) {
+ Element ei = (Element) eis.item(i);
+ list.add(ei.getAttribute("uuid"));
+ }
+
+ return list;
+ }
+
+ /**
+ * Add a file to recent Opened Files
+ * @param exp the path of the files to add
+ */
+ public static void saveRecentSearch(String exp) {
+ Node root = getXcosRoot();
+ if (root == null || exp == null || exp.compareTo("") == 0) {
+ return;
+ }
+
+ Node recents = getNodeChild(root, RECENT_SEARCH);
+ if (recents == null) {
+ recents = document.createElement(RECENT_SEARCH);
+ root.appendChild(recents);
+ }
+
+ List<Node> search = getNodeChildren(recents, SEARCH);
+
+ while (search.size() >= MAXRECENT) {
+ removeRecentSearch(((Element) search.get(0)).getAttribute(EXPRESSION));
+ search = getNodeChildren(recents, SEARCH);
+ }
+ //if path already in file no need to add it
+ for (Node item : search) {
+ if (exp.compareTo(((Element) item).getAttribute(EXPRESSION)) == 0) {
+ return;
+ }
+ }
+
+ Element newSearch = document.createElement(SEARCH);
+ newSearch.setAttribute(EXPRESSION, exp);
+ recents.appendChild((Node) newSearch);
+
+ clean(recents);
+ writeDocument();
+ }
+
+ /**
+ * @param exp the expression to remove
+ */
+ public static void removeRecentSearch(String exp) {
+ Node root = getXcosRoot();
+ if (root == null) {
+ return;
+ }
+
+ Node recent = getNodeChild(root, RECENT_SEARCH);
+ List<Node> search = getNodeChildren(recent, SEARCH);
+
+ // remove node if exists
+ for (Node file : search) {
+ if (exp.compareTo(((Element) file).getAttribute(EXPRESSION)) == 0) {
+ recent.removeChild(file);
+ break;
+ }
+ }
+
+ clean(recent);
+ writeDocument();
+
+ }
+
+ /**
+ * @return a list of the recent searches
+ */
+ public static List<String> getRecentSearch() {
+ List<String> files = new ArrayList<String>();
+
+ Node root = getXcosRoot();
+ if (root == null) {
+ return files;
+ }
+
+ Node recent = getNodeChild(root, RECENT_SEARCH);
+ List<Node> searches = getNodeChildren(recent, SEARCH);
+ for (Node search : searches) {
+ String exp = ((Element) search).getAttribute(EXPRESSION);
+ if (exp != null && exp.compareTo("") != 0) {
+ files.add(exp);
+ }
+ }
+
+ return files;
+ }
+
+ /**
+ * Add a file to recent Opened Files
+ * @param exp the path of the files to add
+ */
+ public static void saveRecent(String exp, String nodeName, String childNodeName) {
+ Node root = getXcosRoot();
+ if (root == null || exp == null || exp.compareTo("") == 0) {
+ return;
+ }
+
+ Node recents = getNodeChild(root, nodeName);
+ if (recents == null) {
+ recents = document.createElement(nodeName);
+ root.appendChild(recents);
+ }
+
+ List<Node> list = getNodeChildren(recents, childNodeName);
+
+ while (list.size() >= MAXRECENT) {
+ removeRecent(((Element) list.get(0)).getAttribute(EXPRESSION), nodeName, childNodeName);
+ list = getNodeChildren(recents, childNodeName);
+ }
+ //if path already in file no need to add it
+ for (Node item : list) {
+ if (exp.compareTo(((Element) item).getAttribute(EXPRESSION)) == 0) {
+ return;
+ }
+ }
+
+ Element newNode = document.createElement(childNodeName);
+ newNode.setAttribute(EXPRESSION, exp);
+ recents.appendChild((Node) newNode);
+
+ clean(recents);
+ writeDocument();
+ }
+
+ /**
+ * @param exp the expression to remove
+ */
+ public static void removeRecent(String exp, String nodeName, String childNodeName) {
+ Node root = getXcosRoot();
+ if (root == null) {
+ return;
+ }
+
+ Node recent = getNodeChild(root, nodeName);
+ List<Node> list = getNodeChildren(recent, childNodeName);
+
+ // remove node if exists
+ for (Node item : list) {
+ if (exp.compareTo(((Element) item).getAttribute(EXPRESSION)) == 0) {
+ recent.removeChild(item);
+ break;
+ }
+ }
+
+ clean(recent);
+ writeDocument();
+ }
+
+ /**
+ * @return a list of the recent searches
+ */
+ public static List<String> getRecent(String nodeName, String childNodeName) {
+ List<String> files = new ArrayList<String>();
+
+ Node root = getXcosRoot();
+ if (root == null) {
+ return files;
+ }
+
+ Node recent = getNodeChild(root, nodeName);
+ List<Node> list = getNodeChildren(recent, childNodeName);
+ for (Node node : list) {
+ String exp = ((Element) node).getAttribute(EXPRESSION);
+ if (exp != null && exp.compareTo("") != 0) {
+ files.add(exp);
+ }
+ }
+
+ return files;
+ }
+
+
+ /**
+ * @param exp the recent expression for a replacement
+ */
+ public static void saveRecentReplace(String exp) {
+ Node root = getXcosRoot();
+ if (root == null || exp == null || exp.compareTo("") == 0) {
+ return;
+ }
+
+ Node recent = getNodeChild(root, RECENT_REPLACE);
+ if (recent == null) {
+ recent = document.createElement(RECENT_REPLACE);
+ root.appendChild(recent);
+ }
+
+ List<Node> replace = getNodeChildren(recent, REPLACE);
+
+ while (replace.size() >= MAXRECENT) {
+ removeRecentReplace(((Element) replace.get(0)).getAttribute(EXPRESSION));
+ replace = getNodeChildren(recent, REPLACE);
+ }
+ //if path already in file no need to add it
+ for (Node item : replace) {
+ if (exp.compareTo(((Element) item).getAttribute(EXPRESSION)) == 0) {
+ return;
+ }
+ }
+
+ Element newReplace = document.createElement(REPLACE);
+ newReplace.setAttribute(EXPRESSION, exp);
+ recent.appendChild((Node) newReplace);
+
+ clean(recent);
+ writeDocument();
+ }
+
+ /**
+ * @param filePath remove recent replace in the this file
+ */
+ public static void removeRecentReplace(String filePath) {
+
+ Node root = getXcosRoot();
+ if (root == null) {
+ return;
+ }
+
+ Node recent = getNodeChild(root, RECENT_REPLACE);
+ List<Node> replace = getNodeChildren(recent, REPLACE);
+
+ // remove node if exists
+ for (Node exp : replace) {
+ if (filePath.compareTo(((Element) exp).getAttribute(EXPRESSION)) == 0) {
+ recent.removeChild(exp);
+ break;
+ }
+
+ }
+
+ clean(recent);
+ writeDocument();
+
+ }
+
+ /**
+ * @return the recent replace
+ */
+ public static List<String> getRecentReplace() {
+ List<String> exps = new ArrayList<String>();
+
+ Node root = getXcosRoot();
+ if (root == null) {
+ return exps;
+ }
+
+ Node recent = getNodeChild(root, RECENT_REPLACE);
+ List<Node> replace = getNodeChildren(recent, REPLACE);
+ for (Node file : replace) {
+ String exp = ((Element) file).getAttribute(EXPRESSION);
+ if (exp != null && exp.compareTo("") != 0) {
+ exps.add(exp);
+ }
+ }
+
+ return exps;
+ }
+
+ /**
+ * @return true for a regexp search
+ */
+ public static boolean getRegularExpression() {
+ return getBooleanAttribute(REGULAR_EXPRESION, STATE_FLAG, false);
+ }
+
+ /**
+ * @param regualExp for a regexp search
+ */
+ public static void saveRegularExpression(boolean regualExp) {
+ saveBooleanAttribute(REGULAR_EXPRESION, STATE_FLAG, regualExp);
+ }
+
+ /**
+ * @return true for a wholeWord search
+ */
+ public static boolean getWholeWord() {
+ return getBooleanAttribute(WHOLE_WORD, STATE_FLAG, false);
+ }
+
+ /**
+ * @param wholeWord for a wholeWord search
+ */
+ public static void saveWholeWord(boolean wholeWord) {
+ saveBooleanAttribute(WHOLE_WORD, STATE_FLAG, wholeWord);
+ }
+
+ /**
+ * @return true for a recursive search
+ */
+ public static boolean getRecursive() {
+ return getBooleanAttribute(RECURSIVE, STATE_FLAG, true);
+ }
+
+ /**
+ * @param recursive for a recursive search
+ */
+ public static void saveRecursive(boolean recursive) {
+ saveBooleanAttribute(RECURSIVE, STATE_FLAG, recursive);
+ }
+
+ /**
+ * @return true for a line by line search
+ */
+ public static boolean getLineByLine() {
+ return getBooleanAttribute(LINEBYLINE, STATE_FLAG, true);
+ }
+
+ /**
+ * @param lineByLine for a line by line search
+ */
+ public static void saveLineByLine(boolean lineByLine) {
+ saveBooleanAttribute(LINEBYLINE, STATE_FLAG, lineByLine);
+ }
+
+ /**
+ * @return true for a case sensitive file name
+ */
+ public static boolean getFileCase() {
+ return getBooleanAttribute(FILECASE, STATE_FLAG, false);
+ }
+
+ /**
+ * @param fileCase for a case sensitive file name
+ */
+ public static void saveFileCase(boolean fileCase) {
+ saveBooleanAttribute(FILECASE, STATE_FLAG, fileCase);
+ }
+
+ /**
+ * @return true for a circular search
+ */
+ public static boolean getCircularSearch() {
+ return getBooleanAttribute(CIRCULAR, STATE_FLAG, true);
+ }
+
+ /**
+ * @param circular is true for a circular search
+ */
+ public static void saveCircularSearch(boolean circular) {
+ saveBooleanAttribute(CIRCULAR, STATE_FLAG, circular);
+ }
+
+ /**
+ * @return true for a case sensitive search
+ */
+ public static boolean getCaseSensitive() {
+ return getBooleanAttribute(CASE_SENSITIVE, STATE_FLAG, false);
+ }
+
+ /**
+ * @param caseSensitive for a case sensitive search
+ */
+ public static void saveCaseSensitive(boolean caseSensitive) {
+ saveBooleanAttribute(CASE_SENSITIVE, STATE_FLAG, caseSensitive);
+ }
+
+ /**
+ * getBooleanAttribute
+ * @param node the node name
+ * @param attrib the attribute of the node
+ * @param defaultValue true or false
+ * @return the found boolean value or defaultValue if not found
+ */
+ private static boolean getBooleanAttribute(String node, String attrib, boolean defaultValue) {
+ boolean flag = false;
+ Node root = getXcosRoot();
+ if (root == null) {
+ return flag;
+ }
+ Node recent = getNodeChild(root, node);
+ if (recent != null) {
+ String exp = ((Element) recent).getAttribute(attrib);
+ if (exp.compareTo(TRUE) == 0) {
+ flag = true;
+ }
+ } else {
+ return defaultValue;
+ }
+ return flag;
+ }
+
+ /**
+ * saveBooleanAttribute
+ * @param node the node name
+ * @param attrib the attribute of the node
+ * @param state "true" or "false"
+ */
+ private static void saveBooleanAttribute(String node, String attrib, boolean state) {
+ Node root = getXcosRoot();
+ if (root == null) {
+ return;
+ }
+
+ Node recent = getNodeChild(root, node);
+ if (recent == null) {
+ recent = document.createElement(node);
+ root.appendChild(recent);
+ }
+
+
+ ((Element) recent).setAttribute(attrib, new Boolean(state).toString());
+
+ root.appendChild(recent);
+
+ /* Save changes */
+ writeDocument();
+ }
+
+ /**
+ * getNodeChild
+ * @param par parent
+ * @param nodeName the name
+ * @return the node
+ */
+ private static Node getNodeChild(Node par, String nodeName) {
+ Node parent = par;
+ if (parent == null) {
+ if (document == null) {
+ readDocument();
+ if (document == null) {
+ return null;
+ }
+ }
+ parent = document;
+ }
+
+ Node currentNode = parent.getFirstChild();
+ while (currentNode != null) {
+ if (currentNode.getNodeName().compareTo(nodeName) == 0) {
+ return currentNode;
+ }
+ currentNode = currentNode.getNextSibling();
+ }
+ return currentNode;
+ }
+
+ /**
+ * getNodeChildren
+ * @param par parent
+ * @param childName the name
+ * @return a list of nodes
+ */
+ private static List<Node> getNodeChildren(Node par, String childName) {
+ Node parent = par;
+ List<Node> nodes = new ArrayList<Node>();
+ if (parent == null) {
+ if (document == null) {
+ readDocument();
+ if (document == null) {
+ return nodes;
+ }
+ }
+ parent = document;
+ }
+
+ Node currentNode = parent.getFirstChild();
+ while (currentNode != null) {
+ if (currentNode.getNodeName().compareTo(childName) == 0) {
+ nodes.add(currentNode);
+ }
+ currentNode = currentNode.getNextSibling();
+ }
+ return nodes;
+
+ }
+
+ /**
+ * @return the root
+ */
+ private static Node getXcosRoot() {
+ if (document == null) {
+ readDocument();
+ if (document == null) {
+ return null;
+ }
+ }
+
+ Node setting = getNodeChild(null, SETTING);
+
+ if (setting != null) {
+ List<Node> nodes = getNodeChildren(setting, PROFILE);
+ for (Node node : nodes) {
+ if (((Element) node).getAttribute(NAME).compareTo(SCINOTES) == 0) {
+ return node;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Remove text at the beginning and at the end
+ * @param r the element to clean
+ */
+ private static void clean(Node r) {
+ ScilabXMLUtilities.removeEmptyLines(r);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/DropFilesListener.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/DropFilesListener.java
new file mode 100755
index 000000000..cbcf17d7f
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/DropFilesListener.java
@@ -0,0 +1,218 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Point;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.io.IOException;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Element;
+
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * DropFiles Listener
+ * @author Allan CORNET
+ * @author Calixte DENIZET
+ *
+ */
+public class DropFilesListener implements DropTargetListener {
+
+ private DropTarget dropTarget;
+ private ScilabEditorPane pane;
+ private int p0;
+ private int p1;
+ private Point previousPoint = new Point();
+ private Point actualPoint = new Point();
+ private int actualPos;
+ private boolean enter;
+
+ /**
+ * Constructor
+ * @param pane JEditorPane
+ */
+ public DropFilesListener(ScilabEditorPane pane) {
+ this.pane = pane;
+ dropTarget = new DropTarget(pane, DnDConstants.ACTION_COPY_OR_MOVE, this, true, null);
+ dropTarget.setActive(true);
+ }
+
+ /**
+ * dragEnter
+ * @param arg0 DropTargetDragEvent
+ */
+ public void dragEnter(DropTargetDragEvent arg0) {
+ if (arg0.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+ int sp0 = pane.getSelectionStart();
+ int sp1 = pane.getSelectionEnd();
+ if (sp1 != sp0) {
+ p1 = sp1;
+ p0 = sp0;
+ }
+ enter = true;
+ }
+ }
+
+ /**
+ * dragExit
+ * @param arg0 DropTargetEvent
+ */
+ public void dragExit(DropTargetEvent arg0) {
+ if (enter) {
+ int y = actualPoint.y - previousPoint.y;
+ ScilabDocument doc = (ScilabDocument) pane.getDocument();
+ Element root = doc.getDefaultRootElement();
+ int line0 = root.getElementIndex(actualPos);
+ int line1 = Math.max(0, line0 + Math.min(root.getElementCount() - 1 - line0, (int) Math.signum(y) * y * y));
+ int diff = actualPos - root.getElement(line0).getStartOffset();
+ Element line = root.getElement(line1);
+ pane.setCaretPosition(Math.min(line.getStartOffset() + diff, line.getEndOffset() - 1));
+ }
+ }
+
+ /**
+ * dragOver
+ * @param arg0 DropTargetDragEven
+ */
+ public void dragOver(DropTargetDragEvent arg0) {
+ if (arg0.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+ previousPoint = actualPoint;
+ actualPoint = arg0.getLocation();
+ actualPos = pane.viewToModel(actualPoint);
+ pane.setCaretPosition(actualPos);
+ }
+ }
+
+ /**
+ * Drop handling
+ * @param arg0 the drop event
+ * @see java.awt.dnd.DropTargetListener#drop(java.awt.dnd.DropTargetDropEvent)
+ */
+ @SuppressWarnings("unchecked")
+ public void drop(DropTargetDropEvent arg0) {
+ arg0.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
+ Transferable transferable = arg0.getTransferable();
+
+ try {
+ DataFlavor uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
+ if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
+ try {
+ java.util.List data = (java.util.List) transferable.getTransferData(DataFlavor.javaFileListFlavor);
+ for (int i = 0; i < data.size(); i++) {
+ SciNotes.getEditor().openFile(data.get(i).toString(), 0, null);
+ }
+ arg0.dropComplete(true);
+ } catch (UnsupportedFlavorException e) {
+ arg0.dropComplete(false);
+ return;
+ } catch (IOException e) {
+ arg0.dropComplete(false);
+ return;
+ }
+
+ } else if (transferable.isDataFlavorSupported(uriListFlavor)) {
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4899516
+ String uriData;
+ try {
+ uriData = (String) transferable.getTransferData(uriListFlavor);
+ } catch (UnsupportedFlavorException e) {
+ arg0.dropComplete(false);
+ return;
+ } catch (IOException e) {
+ arg0.dropComplete(false);
+ return;
+ }
+ java.util.List data = textURIListToFileList(uriData);
+ for (int i = 0; i < data.size(); i++) {
+ SciNotes.getEditor().openFile(data.get(i).toString(), 0, null);
+ }
+ arg0.dropComplete(true);
+ } else if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+ try {
+ String dropString = (String) transferable.getTransferData(DataFlavor.stringFlavor);
+ ScilabDocument doc = (ScilabDocument) pane.getDocument();
+ int pos = pane.viewToModel(arg0.getLocation());
+ doc.mergeEditsBegin();
+ if (arg0.getDropAction() == DnDConstants.ACTION_MOVE) {
+ doc.remove(p0, p1 - p0);
+ if (pos > p1) {
+ pos = pos - (p1 - p0);
+ } else if (pos > p0) {
+ pos = p0;
+ }
+ }
+ doc.insertString(pos, dropString, null);
+ doc.mergeEditsEnd();
+ arg0.dropComplete(true);
+ } catch (UnsupportedFlavorException e) {
+ arg0.dropComplete(false);
+ return;
+ } catch (IOException e) {
+ arg0.dropComplete(false);
+ return;
+ } catch (BadLocationException e) {
+ arg0.dropComplete(false);
+ return;
+ }
+ }
+ } catch (ClassNotFoundException e1) {
+ arg0.dropComplete(false);
+ }
+ }
+
+ /**
+ * dropActionChanged
+ * @param arg0 DropTargetDragEvent
+ */
+ public void dropActionChanged(DropTargetDragEvent arg0) {
+ // TODO Auto-generated method stub
+ }
+
+ /**
+ * textURIListToFileList
+ * @param data String URI
+ * @return java.util.List
+ */
+ private static java.util.List textURIListToFileList(String data) {
+ java.util.List list = new java.util.ArrayList(1);
+ for (java.util.StringTokenizer st = new java.util.StringTokenizer(data, "\r\n");
+ st.hasMoreTokens();) {
+ String s = st.nextToken();
+ if (s.startsWith("#")) {
+ // the line is a comment (as per the RFC 2483)
+ continue;
+ }
+ try {
+ java.net.URI uri = new java.net.URI(s);
+ java.io.File file = new java.io.File(uri);
+ list.add(file);
+ } catch (java.net.URISyntaxException e) {
+ // malformed URI
+ } catch (IllegalArgumentException e) {
+ // the URI is not a valid 'file:' URI
+ }
+ }
+ return list;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/FOCodeConverter.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/FOCodeConverter.java
new file mode 100755
index 000000000..0be2252ef
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/FOCodeConverter.java
@@ -0,0 +1,148 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.print.PageFormat;
+import java.io.IOException;
+
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * Code to XSL-FO converter Class
+ * @author Calixte DENIZET
+ */
+public class FOCodeConverter extends HTMLCodeConverter {
+
+ private static final String ENTETE = "<?xml version=\"1.0\"?>\n"
+ + "<root xmlns=\"http://www.w3.org/1999/XSL/Format\">\n"
+ + "<layout-master-set>\n"
+ + "<simple-page-master master-name=\"content\"\n"
+ + "margin-right=\"MRin\"\n"
+ + "margin-left=\"MLin\"\n"
+ + "margin-bottom=\"MBin\"\n"
+ + "margin-top=\"MTin\"\n"
+ + "page-width=\"PWin\"\n"
+ + "page-height=\"PHin\">\n"
+ + "<region-body/>\n"
+ + "</simple-page-master>\n"
+ + "</layout-master-set>\n"
+ + "<page-sequence master-reference=\"content\">\n"
+ + "<flow flow-name=\"xsl-region-body\">";
+
+ private static final String END = "</flow></page-sequence></root>";
+
+ private int[] lineNumberArray;
+
+ /**
+ * Constructor
+ * @param pane the ScilabEditorPane to convert (needed to have the context)
+ */
+ public FOCodeConverter(ScilabEditorPane pane) {
+ super(pane);
+ }
+
+ /**
+ * @param code the code to convert
+ * @param lineNumberArray an array of integers to number correctly the file (depends on whereami)
+ * @param format the page format to use
+ * @return the XSL-FO corresponding code
+ */
+ public String convert(String code, int[] lineNumberArray, PageFormat format) {
+ this.printLineNumber = lineNumberArray != null;
+ this.lineNumberArray = lineNumberArray;
+ buffer.setLength(0);
+ Font f = ctx.tokenFonts[0];
+ double ml = format.getImageableX() / 72;
+ double mr = (format.getWidth() - format.getImageableWidth()) / 72 - ml;
+ double mt = format.getImageableY() / 72;
+ double mb = (format.getHeight() - format.getImageableHeight()) / 72 - mt;
+ double pw = format.getWidth() / 72;
+ double ph = format.getHeight() / 72;
+ String entete = ENTETE.replace("MR", Double.toString(mr)).replace("ML", Double.toString(ml)).replace("MT", Double.toString(mt)).replace("MB", Double.toString(mb)).replace("PW", Double.toString(pw)).replace("PH", Double.toString(ph));
+ buffer.append(entete);
+ buffer.append("<block white-space-treatment=\"preserve\" linefeed-treatment=\"preserve\" white-space-collapse=\"false\" hyphenate=\"false\" wrap-option=\"wrap\" font-family=\"" + f.getFamily() + "\" font-size=\"" + Float.toString(f.getSize2D() * 9f / 14f) + "pt\">");
+ if (printLineNumber) {
+ String attr = "color=\"rgb(127,127,127)\" font-family=\"" + ctx.tokenFonts[0].getFamily() + "\" font-size=\"" + Float.toString(ctx.tokenFonts[0].getSize2D() * 9f / 14f) + "\"";
+ buffer.append("<inline " + attr + ">" + getStringInt(lineNumber++) + "</inline> ");
+ }
+
+ return lexer.convert(this, code) + "</block>\n" + END;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String convertColor(Color c) {
+ return " color=\"rgb(" + c.getRed() + "," + c.getGreen() + "," + c.getBlue() + ")\" ";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String convertFont(Font f) {
+ String xml = "";
+ if (f.isBold()) {
+ xml += "font-weight=\"bold\" ";
+ }
+ if (f.isItalic()) {
+ xml += "font-style=\"italic\" ";
+ } else {
+ xml += "font-style=\"normal\" ";
+ }
+
+ return xml;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String convertAttrib(int a) {
+ String xml = "";
+ if ((a & 1) != 0) {
+ xml += " text-decoration=\"underline\" ";
+ }
+ if ((a & 2) != 0) {
+ xml += " text-decoration=\"line-through\" ";
+ }
+
+ return xml;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String convertTokenStyle(int tok, String contents) {
+ return "<inline " + convertColor(ctx.tokenColors[tok]) + convertFont(ctx.tokenFonts[tok]) + convertAttrib(ctx.tokenAttrib[tok]) + ">" + contents + "</inline>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleNothing(String seq) throws IOException {
+ if (seq.equals("\n") && printLineNumber) {
+ String attr = "color=\"rgb(127,127,127)\" font-family=\"" + ctx.tokenFonts[0].getFamily() + "\" font-size=\"" + Float.toString(ctx.tokenFonts[0].getSize2D() * 9f / 14f) + "\"";
+ buffer.append("\n<inline " + attr + ">" + getStringInt(lineNumber++) + "</inline> ");
+ } else {
+ buffer.append(seq);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getStringInt(int n) {
+ return super.getStringInt(lineNumberArray[n - 1]);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/HTMLCodeConverter.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/HTMLCodeConverter.java
new file mode 100755
index 000000000..a15f389ba
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/HTMLCodeConverter.java
@@ -0,0 +1,281 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.io.IOException;
+
+import org.scilab.modules.scinotes.ScilabContext;
+import org.scilab.modules.scinotes.ScilabEditorKit;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.ScilabLexerConstants;
+
+import org.scilab.modules.helptools.scilab.AbstractScilabCodeHandler;
+import org.scilab.modules.helptools.scilab.ScilabLexer;
+
+/**
+ * Code converter Class
+ * @author Calixte DENIZET
+ */
+public class HTMLCodeConverter extends AbstractScilabCodeHandler {
+
+ protected StringBuilder buffer = new StringBuilder(8192);
+
+ protected ScilabContext ctx;
+ protected ScilabLexer lexer;
+ protected boolean printLineNumber;
+ protected int lineNumber = 1;
+
+ /**
+ * Default constructor
+ * @param pane where the conversion occurs
+ */
+ public HTMLCodeConverter(ScilabEditorPane pane) {
+ this.ctx = ((ScilabEditorKit) pane.getEditorKit()).getStylePreferences();
+ this.lexer = new ScilabLexer(org.scilab.modules.scinotes.ScilabLexer.commands, org.scilab.modules.scinotes.ScilabLexer.macros);
+ }
+
+ /**
+ * @param code the Scilab code to convert
+ * @param printLineNumber is true if the line numbers must be printed
+ * @return the converted code in HTML
+ */
+ public String convert(String code, boolean printLineNumber) {
+ this.printLineNumber = printLineNumber;
+ buffer.setLength(0);
+ buffer.append("<pre style=\"font-family:" + ctx.tokenFonts[0].getFamily() + ";font-style:normal;font-size:" + Float.toString(ctx.tokenFonts[0].getSize2D()) + ";\">");
+ if (printLineNumber) {
+ String attr = "font-family:" + ctx.tokenFonts[0].getFamily() + ";font-size:" + Float.toString(ctx.tokenFonts[0].getSize2D() * 9f / 14f) + ";";
+ buffer.append("<span style=\"" + attr + "\">" + getStringInt(lineNumber++) + "</span> ");
+ }
+ return lexer.convert(this, code) + "</pre>";
+ }
+
+ /**
+ * @param c the color to convert
+ * @return the css color as rgb(R, G ,B);
+ */
+ public String convertColor(Color c) {
+ return "color:rgb(" + c.getRed() + "," + c.getGreen() + "," + c.getBlue() + ");";
+ }
+
+ /**
+ * @param f the font to convert
+ * @return the css styles for a font
+ */
+ public String convertFont(Font f) {
+ String html = "";
+ if (f.isBold()) {
+ html += "font-weight:bold;";
+ }
+ if (f.isItalic()) {
+ html += "font-style:italic;";
+ }
+
+ return html;
+ }
+
+ /**
+ * @param a the attributes: 1 for underline &amp; 2 for line-through
+ * @return the css styles for this text-decoration
+ */
+ public String convertAttrib(int a) {
+ String html = "";
+ if ((a & 1) != 0) {
+ html += "text-decoration:underline;";
+ }
+ if ((a & 2) != 0) {
+ html += "text-decoration:line-through;";
+ }
+
+ return html;
+ }
+
+ /**
+ * @param tok the kind of token according to ScilabLexerConstants
+ * @param contents contents to be enclosed
+ * @return a span with contents correctly decorated
+ */
+ public String convertTokenStyle(int tok, String contents) {
+ return "<span style=\"" + convertColor(ctx.tokenColors[tok]) + convertFont(ctx.tokenFonts[tok]) + convertAttrib(ctx.tokenAttrib[tok]) + "\">" + contents + "</span>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleDefault(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.DEFAULT, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleOperator(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.OPERATOR, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleOpenClose(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.OPENCLOSE, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleFKeywords(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.FKEYWORD, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleSKeywords(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.SKEYWORD, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleCKeywords(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.CKEYWORD, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleConstants(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.CONSTANTES, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleCommand(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.COMMANDS, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleMacro(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.MACROS, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleFunctionId(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.MACROINFILE, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleFunctionIdDecl(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.MACROINFILE, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleId(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.ID, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleInputOutputArgsDecl(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.INPUTOUTPUTARGS, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleInputOutputArgs(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.INPUTOUTPUTARGS, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleNumber(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.NUMBER, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleSpecial(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.SPECIAL, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleString(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.STRING, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleNothing(String seq) throws IOException {
+ if (seq.equals("\n") && printLineNumber) {
+ String attr = "font-family:" + ctx.tokenFonts[0].getFamily() + ";font-size:" + Float.toString(ctx.tokenFonts[0].getSize2D() * 9f / 14f) + ";";
+ buffer.append("\n<span style=\"" + attr + "\">" + getStringInt(lineNumber++) + "</span> ");
+ } else {
+ buffer.append(seq);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleField(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.FIELD, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void handleComment(String seq) throws IOException {
+ buffer.append(convertTokenStyle(ScilabLexerConstants.COMMENT, seq));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return buffer.toString();
+ }
+
+ /**
+ * @param n the line number
+ * @return a string containing line number on 4 digits: 0001, 0002..., 9999
+ */
+ public String getStringInt(int n) {
+ if (n < 10) {
+ return "000" + n;
+ } else if (n < 100) {
+ return "00" + n;
+ } else if (n < 1000) {
+ return "0" + n;
+ }
+
+ return Integer.toString(n);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/NavigatorWindow.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/NavigatorWindow.java
new file mode 100755
index 000000000..101354e03
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/NavigatorWindow.java
@@ -0,0 +1,930 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2010 - 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.FocusTraversalPolicy;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.JTree;
+import javax.swing.KeyStroke;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import javax.swing.SwingUtilities;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeExpansionListener;
+import javax.swing.text.Element;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.flexdock.docking.event.DockingEvent;
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
+import org.scilab.modules.gui.events.callback.CommonCallBack;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.menubar.MenuBar;
+import org.scilab.modules.gui.menubar.ScilabMenuBar;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menuitem.ScilabMenuItem;
+import org.scilab.modules.gui.tab.SimpleTab;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.textbox.ScilabTextBox;
+import org.scilab.modules.gui.textbox.TextBox;
+import org.scilab.modules.gui.toolbar.ToolBar;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesGUI;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.tabfactory.CodeNavigatorTabFactory;
+
+/**
+ *
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public final class NavigatorWindow extends SwingScilabDockablePanel implements DocumentListener,
+ TreeExpansionListener {
+
+ private static final String EMPTY = "";
+
+ private Map<ScilabEditorPane, DefaultMutableTreeNode> mapNode = new HashMap();
+ private Map<ScilabEditorPane, TreePath> mapFunPath = new HashMap();
+ private Map<ScilabEditorPane, TreePath> mapAnchorPath = new HashMap();
+ private List<ScilabEditorPane> panes = new ArrayList<ScilabEditorPane>();
+
+ private SciNotes editor;
+
+ private JTree functionNavigator;
+ private DefaultTreeModel model;
+ private ScilabEditorPane pane;
+ private ScilabDocument doc;
+ private boolean alphaOrder;
+
+ private boolean isAbsolute = true;
+ private boolean lineNumberActive = true;
+ private boolean locked;
+ private boolean init;
+
+ private JSeparator jSeparator1;
+ private JLabel labelGotoLine;
+ private JLabel labelNumerotation;
+ private JTextField lineNumber;
+ private JComboBox numType;
+ private JScrollPane scrollPane;
+
+ private SwingScilabWindow parentWindow;
+
+ static {
+ ScilabTabFactory.getInstance().addTabFactory(CodeNavigatorTabFactory.getInstance());
+ }
+
+ /**
+ * Creates new Navigator Window
+ */
+ public NavigatorWindow(SciNotes editor, String uuid) {
+ super(SciNotesMessages.CODE_NAVIGATOR, uuid == null ? UUID.randomUUID().toString() : uuid);
+ this.editor = editor;
+ editor.addNavigator(this);
+ setContentPane(new javax.swing.JPanel());
+ ConfigSciNotesManager.saveCodeNavigatorState(editor.getPersistentId(), getPersistentId());
+ WindowsConfigurationManager.restorationFinished(this);
+ }
+
+ /**
+ * Creates new Navigator Window
+ */
+ public NavigatorWindow(SciNotes editor) {
+ this(editor, null);
+ }
+
+ /**
+ * @param doc the doc to update
+ */
+ public void update(ScilabDocument doc) {
+ if (!init) {
+ initTree();
+ initComponents();
+ functionNavigator.addTreeExpansionListener(this);
+ init = true;
+ }
+
+ if (doc != null) {
+ if (this.doc != null) {
+ this.doc.removeDocumentListener(this);
+ }
+
+ this.doc = doc;
+ this.pane = doc.getEditorPane();
+
+ this.doc.addDocumentListener(this);
+
+ if (!mapNode.containsKey(pane)) {
+ initTree();
+ } else {
+ updateTree();
+ }
+ }
+ }
+
+ public void addEditorPane(ScilabEditorPane pane) {
+ panes.add(pane);
+ update((ScilabDocument) pane.getDocument());
+ }
+
+ /**
+ * Update the navigator
+ */
+ public void update() {
+ updateTree();
+ }
+
+ /**
+ * @param doc to use
+ */
+ public void activateNavigator(ScilabDocument doc) {
+ initTree();
+ update(doc);
+ }
+
+ /**
+ * Set the parent window
+ */
+ public void setParentWindow() {
+ this.parentWindow = SwingScilabWindow.createWindow(true);
+ parentWindow.addTab(this);
+ parentWindow.setVisible(true);
+ }
+
+ /**
+ * Get the parent window id for this tab
+ * @return the id of the parent window
+ */
+ public SwingScilabWindow getParentWindow() {
+ return this.parentWindow;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SimpleTab getAsSimpleTab() {
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addInfoBar(TextBox infoBarToAdd) {
+ setInfoBar(infoBarToAdd);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addMenuBar(MenuBar menuBarToAdd) {
+ setMenuBar(menuBarToAdd);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addToolBar(ToolBar toolBarToAdd) {
+ setToolBar(toolBarToAdd);
+ }
+
+ /**
+ * Close this Navigator.
+ */
+ public void closeNavigator() {
+ editor.removeNavigator();
+ mapNode.clear();
+ mapFunPath.clear();
+ mapAnchorPath.clear();
+ functionNavigator = null;
+ model = null;
+ pane = null;
+ doc = null;
+ for (ScilabEditorPane p : panes) {
+ ((ScilabDocument) p.getDocument()).removeDocumentListener(this);
+ }
+ panes.clear();
+ }
+
+ /**
+ * Nothing !
+ * @param e the event
+ */
+ public void changedUpdate(DocumentEvent e) { }
+
+ /**
+ * Called when an insertion is made in the doc
+ * @param e the event
+ */
+ public void insertUpdate(DocumentEvent e) {
+ handleEvent(e.getOffset(), e.getLength());
+ }
+
+ /**
+ * Called when a remove is made in the doc
+ * @param e the event
+ */
+ public void removeUpdate(DocumentEvent e) {
+ handleEvent(e.getOffset(), e.getLength());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dockingComplete(DockingEvent evt) {
+ super.dockingComplete(evt);
+ changeToolBar();
+ }
+
+ /**
+ * Try to add a SciNotes toolbar
+ */
+ public void changeToolBar() {
+ SwingScilabWindow win = (SwingScilabWindow) SwingUtilities.getAncestorOfClass(SwingScilabWindow.class, this);
+ if (win != null && win.getDockingPort() != null) {
+ Set<SwingScilabDockablePanel> set = (Set<SwingScilabDockablePanel>) win.getDockingPort().getDockables();
+ for (SwingScilabDockablePanel tab : set) {
+ if (tab == editor) {
+ addToolBar(editor.getToolBar());
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void undockingComplete(DockingEvent evt) {
+ super.undockingComplete(evt);
+ addToolBar(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void treeCollapsed(TreeExpansionEvent evt) { }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void treeExpanded(TreeExpansionEvent evt) {
+ if (!locked) {
+ TreePath path = evt.getPath();
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+ ScilabEditorPane savePane = pane;
+ ScilabDocument saveDoc = doc;
+ boolean update = false;
+ if (node.getUserObject() instanceof String && SciNotesMessages.FUNCTIONS.equals(node.getUserObject())) {
+ pane = (ScilabEditorPane) ((DefaultMutableTreeNode) node.getParent()).getUserObject();
+ doc = (ScilabDocument) pane.getDocument();
+ locked = true;
+ updateFunctions();
+ functionNavigator.expandPath(mapFunPath.get(pane));
+ update = true;
+ } else if (node.getUserObject() instanceof String && SciNotesMessages.ANCHORS.equals(node.getUserObject())) {
+ pane = (ScilabEditorPane) ((DefaultMutableTreeNode) node.getParent()).getUserObject();
+ doc = (ScilabDocument) pane.getDocument();
+ locked = true;
+ updateAnchors();
+ functionNavigator.expandPath(mapAnchorPath.get(pane));
+ update = true;
+ } else if (node.getUserObject() instanceof ScilabEditorPane) {
+ pane = (ScilabEditorPane) node.getUserObject();
+ doc = (ScilabDocument) pane.getDocument();
+ boolean expanded = functionNavigator.isExpanded(mapFunPath.get(pane));
+ updateFunctions();
+ if (expanded) {
+ locked = true;
+ functionNavigator.expandPath(mapFunPath.get(pane));
+ }
+ update = true;
+ }
+ if (update) {
+ pane = savePane;
+ doc = saveDoc;
+ }
+ } else {
+ locked = false;
+ }
+ }
+
+ /**
+ * @param pane the pane which has been splitted
+ * @param split the new pane
+ */
+ public void changePaneOnSplit(ScilabEditorPane pane, ScilabEditorPane split) {
+ if (mapNode.containsKey(pane)) {
+ DefaultMutableTreeNode node = mapNode.get(pane);
+ node.setUserObject(split);
+ mapNode.put(split, mapNode.get(pane));
+ mapNode.remove(pane);
+ mapFunPath.put(split, mapFunPath.get(pane));
+ mapFunPath.remove(pane);
+ mapAnchorPath.put(split, mapAnchorPath.get(pane));
+ mapAnchorPath.remove(pane);
+ }
+ }
+
+ /**
+ * @param pane to remove
+ */
+ public void removePane(ScilabEditorPane pane) {
+ if (mapNode.containsKey(pane)) {
+ DefaultMutableTreeNode node = mapNode.get(pane);
+ ((DefaultMutableTreeNode) model.getRoot()).remove(node);
+ model.reload();
+ mapNode.remove(pane);
+ mapFunPath.remove(pane);
+ mapAnchorPath.remove(pane);
+ panes.remove(pane);
+ this.pane = null;
+ this.doc = null;
+ }
+ }
+
+ /**
+ * This method is called from within the constructor to
+ * initialize the form.
+ */
+ private void initComponents() {
+ labelNumerotation = new JLabel();
+ lineNumber = new JTextField();
+ numType = new JComboBox();
+ jSeparator1 = new JSeparator();
+ labelGotoLine = new JLabel();
+ scrollPane = new JScrollPane();
+
+ setTitle(SciNotesMessages.CODE_NAVIGATOR);
+ updateUI();
+
+ labelNumerotation.setText(SciNotesMessages.NUMEROTATION);
+ labelNumerotation.setFocusable(false);
+
+ lineNumber.addKeyListener(new KeyListener() {
+ public void keyTyped(KeyEvent ke) { }
+ public void keyPressed(KeyEvent ke) { }
+
+ public void keyReleased(KeyEvent ke) {
+ updateCaretPosition();
+ }
+ });
+
+ lineNumber.addFocusListener(new FocusListener() {
+ public void focusGained(FocusEvent e) {
+ updateCaretPosition();
+ }
+
+ public void focusLost(FocusEvent e) {
+ }
+ });
+
+ numType.setModel(new DefaultComboBoxModel(new String[] {SciNotesMessages.ABSOLUTE, SciNotesMessages.RELATIVE}));
+ numType.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ int i = numType.getSelectedIndex();
+ if (i == 0 && !isAbsolute) {
+ lineNumber.setText(EMPTY);
+ isAbsolute = true;
+ } else if (i == 1 && isAbsolute) {
+ lineNumber.setText(EMPTY);
+ isAbsolute = false;
+ }
+ }
+ });
+
+ labelGotoLine.setText(SciNotesMessages.GO_TO_LINE);
+ labelGotoLine.setFocusable(false);
+
+ functionNavigator.addMouseListener(new MouseAdapter() {
+ public void mousePressed(MouseEvent e) {
+ int row = functionNavigator.getRowForLocation(e.getX(), e.getY());
+ if (e.getClickCount() == 2) {
+ handleSelectedItem(row);
+ }
+ }
+ });
+
+ functionNavigator.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "toggle");
+ functionNavigator.addKeyListener(new KeyAdapter() {
+ public void keyTyped(KeyEvent e) {
+ if (e.getKeyChar() == '\n') {
+ int row = functionNavigator.getMinSelectionRow();
+ handleSelectedItem(row);
+ }
+ }
+ });
+ createPopupMenuOnJTree();
+
+ scrollPane.setViewportView(functionNavigator);
+
+ /* Begin NetBeans */
+ GroupLayout layout = new GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(layout.createParallelGroup(Alignment.LEADING)
+ .addComponent(scrollPane, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
+ .addComponent(jSeparator1, GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(Alignment.LEADING)
+ .addComponent(labelGotoLine)
+ .addComponent(labelNumerotation))
+ .addGap(18, 18, 18)
+ .addGroup(layout.createParallelGroup(Alignment.LEADING)
+ .addComponent(lineNumber, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)
+ .addComponent(numType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING)
+ .addGroup(Alignment.TRAILING, layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addGroup(layout.createParallelGroup(Alignment.BASELINE)
+ .addComponent(labelGotoLine)
+ .addComponent(lineNumber, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+ .addGap(4, 4, 4)
+ .addGroup(layout.createParallelGroup(Alignment.BASELINE)
+ .addComponent(labelNumerotation)
+ .addComponent(numType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+ .addContainerGap())
+ );
+ /* End NetBeans */
+
+ List<Component> components = new ArrayList(3);
+ components.add(functionNavigator);
+ components.add(lineNumber);
+ components.add(numType);
+ setFocusable(true);
+ setFocusCycleRoot(true);
+ setFocusTraversalPolicy(new NavigatorFocusTraversalPolicy(components));
+
+ setMinimumSize(new Dimension(224, 0));
+ setPreferredSize(new Dimension(224, 543));
+
+ CommonCallBack callback = new CommonCallBack(null) {
+ public void callBack() {
+ ClosingOperationsManager.startClosingOperation((SwingScilabDockablePanel) NavigatorWindow.this);
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ };
+
+ MenuBar menubar = ScilabMenuBar.createMenuBar();
+ Menu fileMenu = ScilabMenu.createMenu();
+ fileMenu.setText(SciNotesMessages.FILE);
+ fileMenu.setMnemonic('F');
+ MenuItem menu = ScilabMenuItem.createMenuItem();
+ menu.setCallback(callback);
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(SciNotes.getActionKeys().get("scinotes-exit"));
+ menu.setText(SciNotesMessages.EXIT);
+ fileMenu.add(menu);
+ menubar.add(fileMenu);
+
+ Menu orderMenu = ScilabMenu.createMenu();
+ orderMenu.setText(SciNotesMessages.ORDER);
+ orderMenu.setMnemonic('O');
+ menu = ScilabMenuItem.createMenuItem();
+ menu.setCallback(new CommonCallBack(null) {
+ public void callBack() {
+ doc.setAlphaOrderInTree(true);
+ updateTree();
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ });
+ menu.setText(SciNotesMessages.ALPHABETIC_ORDER);
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(KeyStroke.getKeyStroke("alt A"));
+ orderMenu.add(menu);
+
+ menu = ScilabMenuItem.createMenuItem();
+ menu.setCallback(new CommonCallBack(null) {
+ public void callBack() {
+ doc.setAlphaOrderInTree(false);
+ updateTree();
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ });
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(KeyStroke.getKeyStroke("alt N"));
+ menu.setText(SciNotesMessages.NATURAL_ORDER);
+ orderMenu.add(menu);
+
+ menubar.add(orderMenu);
+ addMenuBar(menubar);
+
+ TextBox infobar = ScilabTextBox.createTextBox();
+ addInfoBar(infobar);
+ }
+
+ /**
+ * Init the tree
+ */
+ public void initTree() {
+ mapNode.clear();
+ mapFunPath.clear();
+ if (functionNavigator == null) {
+ functionNavigator = new JTree();
+ }
+ DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
+ model = new DefaultTreeModel(root);
+
+ for (ScilabEditorPane sep : panes) {
+ DefaultMutableTreeNode base = new DefaultMutableTreeNode(sep);
+ mapNode.put(sep, base);
+ DefaultMutableTreeNode funs = new DefaultMutableTreeNode(SciNotesMessages.FUNCTIONS);
+ ScilabDocument scidoc = (ScilabDocument) sep.getDocument();
+ scidoc.fillTreeFuns(funs);
+ DefaultMutableTreeNode anchors = new DefaultMutableTreeNode(SciNotesMessages.ANCHORS);
+ scidoc.fillTreeAnchors(anchors);
+ base.add(funs);
+ base.add(anchors);
+ root.add(base);
+ mapFunPath.put(sep, new TreePath(model.getPathToRoot(funs)));
+ mapAnchorPath.put(sep, new TreePath(model.getPathToRoot(anchors)));
+ }
+
+ functionNavigator.setModel(model);
+ functionNavigator.setRootVisible(false);
+ }
+
+ /**
+ * Update the tree
+ */
+ public void updateTree() {
+ DefaultMutableTreeNode current = mapNode.get(pane);
+ TreePath funPath = mapFunPath.get(pane);
+ TreePath anchorPath = mapAnchorPath.get(pane);
+ DefaultMutableTreeNode funs = (DefaultMutableTreeNode) current.getFirstChild();
+ DefaultMutableTreeNode anchors = (DefaultMutableTreeNode) current.getChildAt(1);
+ boolean expFuns = false;
+ boolean expAnchors = false;
+
+ if (functionNavigator.isExpanded(funPath) || funs.isLeaf()) {
+ current.removeAllChildren();
+ funs.removeAllChildren();
+ doc.fillTreeFuns(funs);
+ current.add(funs);
+ current.add(anchors);
+ model.reload(current);
+ expFuns = true;
+ }
+
+ if (functionNavigator.isExpanded(anchorPath) || anchors.isLeaf()) {
+ current.removeAllChildren();
+ anchors.removeAllChildren();
+ doc.fillTreeAnchors(anchors);
+ current.add(funs);
+ current.add(anchors);
+ model.reload(current);
+ expAnchors = true;
+ }
+
+ if (expFuns) {
+ functionNavigator.expandPath(funPath);
+ }
+
+ if (expAnchors) {
+ functionNavigator.expandPath(anchorPath);
+ }
+ }
+
+ /**
+ * Update a branch Functions in the tree
+ */
+ private void updateFunctions() {
+ DefaultMutableTreeNode current = mapNode.get(pane);
+ DefaultMutableTreeNode funs = (DefaultMutableTreeNode) current.getFirstChild();
+ DefaultMutableTreeNode anchors = (DefaultMutableTreeNode) current.getChildAt(1);
+ current.removeAllChildren();
+ funs.removeAllChildren();
+ doc.fillTreeFuns(funs);
+ current.add(funs);
+ current.add(anchors);
+ model.reload(current);
+ }
+
+ /**
+ * Update a branch Anchors in the tree
+ */
+ private void updateAnchors() {
+ DefaultMutableTreeNode current = mapNode.get(pane);
+ DefaultMutableTreeNode funs = (DefaultMutableTreeNode) current.getFirstChild();
+ DefaultMutableTreeNode anchors = (DefaultMutableTreeNode) current.getChildAt(1);
+ current.removeAllChildren();
+ anchors.removeAllChildren();
+ doc.fillTreeAnchors(anchors);
+ current.add(funs);
+ current.add(anchors);
+ model.reload(current);
+ }
+
+ /**
+ * Creates a popup menu on right click
+ */
+ private void createPopupMenuOnJTree() {
+ final JPopupMenu popup = new JPopupMenu();
+
+ final JMenuItem alpha = new JMenuItem(SciNotesMessages.ALPHABETIC_ORDER);
+ final JMenuItem natural = new JMenuItem(SciNotesMessages.NATURAL_ORDER);
+
+ alpha.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent actionEvent) {
+ handleOrder(true);
+ }
+ });
+ popup.add(alpha);
+
+ natural.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent actionEvent) {
+ handleOrder(false);
+ }
+ });
+ popup.add(natural);
+ functionNavigator.setComponentPopupMenu(popup);
+ }
+
+ /**
+ * @param alpha true for alphabetic order
+ */
+ private void handleOrder(boolean alpha) {
+ int row = functionNavigator.getMinSelectionRow();
+ if (row == -1) {
+ functionNavigator.setSelectionRow(0);
+ row = 0;
+ }
+
+ TreePath path = functionNavigator.getPathForRow(row);
+ ScilabDocument saveDoc = doc;
+ ScilabEditorPane savePane = pane;
+ doc = getDocumentInNode((DefaultMutableTreeNode) path.getLastPathComponent());
+ pane = getPaneInNode((DefaultMutableTreeNode) path.getLastPathComponent());
+ doc.setAlphaOrderInTree(alpha);
+ updateTree();
+ doc = saveDoc;
+ pane = savePane;
+ }
+
+ /**
+ * Update the line numbering on a change in the document
+ * @param offset offset where the event occurred
+ * @param length length of inserted or removed text
+ */
+ private void handleEvent(int offset, int length) {
+ Element root = doc.getDefaultRootElement();
+ Element line = root.getElement(root.getElementIndex(offset));
+ if (line instanceof ScilabDocument.ScilabLeafElement) {
+ ((ScilabDocument.ScilabLeafElement) line).resetType();
+ updateTree();
+ }
+ }
+
+ /**
+ * Handle a selected item in the JTree
+ * @param row to handle
+ */
+ private void handleSelectedItem(int row) {
+ TreePath path = functionNavigator.getPathForRow(row);
+ if (row != -1) {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+ if (node.isLeaf() && node.getUserObject() instanceof ScilabDocument.ScilabLeafElement) {
+ ScilabEditorPane sep = (ScilabEditorPane) ((DefaultMutableTreeNode) node.getParent().getParent()).getUserObject();
+ int pos = ((ScilabDocument.ScilabLeafElement) node.getUserObject()).getStartOffset();
+ if (pos != -1) {
+ sep.getEditor().getTabPane().setSelectedComponent(sep.getEditorComponent());
+ sep.scrollTextToPos(pos);
+ pos = sep.getDocument().getDefaultRootElement().getElementIndex(pos) + 1;
+ numType.setSelectedItem(SciNotesMessages.ABSOLUTE);
+ lineNumber.setText(Integer.toString(pos));
+ }
+ }
+ }
+ }
+
+ /**
+ * Update the caret position when a number is entered in the field
+ */
+ private void updateCaretPosition() {
+ int line = 0;
+ boolean correct = false;
+ TreePath path = functionNavigator.getSelectionPath();
+ DefaultMutableTreeNode node = null;
+ if (path != null) {
+ node = (DefaultMutableTreeNode) path.getLastPathComponent();
+ }
+
+ try {
+ line = Integer.decode(lineNumber.getText()).intValue();
+ if (isAbsolute) {
+ correct = true;
+ line = correctLineNumber(line);
+ updatePaneDoc(node);
+ } else if (functionNavigator.getRowCount() >= 2) {
+ if (functionNavigator.isSelectionEmpty()) {
+ functionNavigator.setSelectionRow(1);
+ }
+
+ if (node.isLeaf() && node.getUserObject() instanceof ScilabDocument.ScilabLeafElement) {
+ int pos = ((ScilabDocument.ScilabLeafElement) node.getUserObject()).getStartOffset();
+ if (pos != -1) {
+ updatePaneDoc(node);
+ line += doc.getDefaultRootElement().getElementIndex(pos);
+ correct = true;
+ line = correctLineNumber(line);
+ }
+ }
+ }
+ } catch (NumberFormatException e) {
+ correct = false;
+ }
+
+ setLineNumberColor(correct);
+ if (correct) {
+ pane.scrollTextToLineNumber(line, false);
+ }
+ }
+
+ /**
+ * @param node corresponding to the pane to select
+ */
+ private void updatePaneDoc(DefaultMutableTreeNode node) {
+ if (node != null) {
+ ScilabEditorPane sep = getPaneInNode(node);
+ if (sep != pane) {
+ pane = sep;
+ doc = (ScilabDocument) pane.getDocument();
+ pane.getEditor().getTabPane().setSelectedComponent(pane.getEditorComponent());
+ }
+ }
+ }
+
+ /**
+ * @param node corresponding to the document to get
+ * @return the doc
+ */
+ private ScilabDocument getDocumentInNode(DefaultMutableTreeNode node) {
+ return (ScilabDocument) getPaneInNode(node).getDocument();
+ }
+
+ /**
+ * @param node corresponding to the pane to get
+ * @return the pane
+ */
+ private ScilabEditorPane getPaneInNode(DefaultMutableTreeNode node) {
+ if (node.isLeaf()) {
+ DefaultMutableTreeNode node1 = (DefaultMutableTreeNode) node.getParent();
+ if (node1 != null) {
+ DefaultMutableTreeNode node2 = (DefaultMutableTreeNode) node1.getParent();
+ if (node2 != null && node2.getUserObject() instanceof ScilabEditorPane) {
+ return (ScilabEditorPane) node2.getUserObject();
+ }
+ }
+ } else if (node.getUserObject() instanceof String && SciNotesMessages.FUNCTIONS.equals(node.getUserObject())) {
+ return (ScilabEditorPane) ((DefaultMutableTreeNode) node.getParent()).getUserObject();
+ } else if (node.getUserObject() instanceof ScilabEditorPane) {
+ return (ScilabEditorPane) node.getUserObject();
+ }
+
+ return pane;
+ }
+
+ /**
+ * Checks if a line number is correct or not
+ * @param line the line number
+ * @return a correct line number
+ */
+ private int correctLineNumber(int line) {
+ if (line < 0) {
+ return 0;
+ }
+
+ int maxLine = doc.getDefaultRootElement().getElementCount();
+ if (line >= maxLine) {
+ return maxLine - 1;
+ }
+
+ return line;
+ }
+
+ /**
+ * @param correct true if the lineNumber contains a number
+ */
+ private void setLineNumberColor(boolean correct) {
+ if (correct && !lineNumberActive) {
+ lineNumber.setForeground(Color.BLACK);
+ lineNumberActive = true;
+ } else if (!correct && lineNumberActive) {
+ lineNumber.setForeground(Color.RED);
+ lineNumberActive = false;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ private static class NavigatorFocusTraversalPolicy extends FocusTraversalPolicy {
+
+ private List<Component> cycle;
+
+ /**
+ * Default constructor
+ * @param cycle the componenents where the focus move
+ */
+ public NavigatorFocusTraversalPolicy(List<Component> cycle) {
+ this.cycle = cycle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Component getComponentAfter(Container focusCycleRoot, Component aComponent) {
+ int n = (cycle.indexOf(aComponent) + 1) % cycle.size();
+ return cycle.get(n);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Component getComponentBefore(Container focusCycleRoot, Component aComponent) {
+ int n = (cycle.size() + cycle.indexOf(aComponent) - 1) % cycle.size();
+ return cycle.get(n);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Component getDefaultComponent(Container focusCycleRoot) {
+ return cycle.get(0);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Component getLastComponent(Container focusCycleRoot) {
+ return cycle.get(cycle.size() - 1);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Component getFirstComponent(Container focusCycleRoot) {
+ return cycle.get(0);
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SaveFile.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SaveFile.java
new file mode 100755
index 000000000..d1f2f9313
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SaveFile.java
@@ -0,0 +1,231 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ *
+ */
+package org.scilab.modules.scinotes.utils;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+
+import javax.swing.JEditorPane;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.EditorKit;
+
+import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.AnswerOption;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.ButtonType;
+import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
+import org.scilab.modules.scinotes.SciNotesAutosave;
+import org.scilab.modules.scinotes.ScilabDocument;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SciNotesOptions;
+
+/**
+ * Save File utility class
+ * @author Allan CORNET
+ * @author Calixte DENIZET
+ */
+public final class SaveFile {
+
+ private static final String LINE_SEPARATOR = "line.separator";
+
+ /**
+ * private Constructor
+ */
+ private SaveFile() { }
+
+ /**
+ * save text in JEditorPane
+ * @param textPane JEditorPane
+ * @param fOut File
+ * @param editorKit EditorKit
+ * @return true if saved
+ */
+ public static boolean doSave(ScilabEditorPane textPane, int index, File fOut, EditorKit editorKit) {
+ return doSave(textPane, index, fOut, editorKit, true, false);
+ }
+
+ /**
+ * save a document
+ * @param doc the document to save
+ * @param fOut File
+ * @param editorKit EditorKit
+ * @return true if saved
+ */
+ public static boolean doSave(ScilabDocument doc, File fOut, EditorKit editorKit) throws IOException {
+ // get default eol
+ String defaultEol = System.getProperty(LINE_SEPARATOR);
+ boolean bReturn = false;
+ BufferedWriter bw = null;
+ OutputStreamWriter osw = null;
+ FileOutputStream fos = null;
+
+ // set eol used to save file
+ if (doc.getEOL().compareTo(defaultEol) != 0) {
+ System.setProperty(LINE_SEPARATOR, doc.getEOL());
+ }
+
+ try {
+ fos = new FileOutputStream(fOut);
+ osw = new OutputStreamWriter(fos, SciNotesOptions.getSciNotesPreferences().encoding);
+ bw = new BufferedWriter(osw);
+ editorKit.write(bw, doc, 0, doc.getLength());
+ bw.flush();
+ bReturn = true;
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ } finally {
+ try {
+ if (fos != null) {
+ fos.close();
+ }
+ if (osw != null) {
+ osw.close();
+ }
+ if (bw != null) {
+ bw.close();
+ }
+ } catch (IOException e) {
+ System.err.println(e);
+ }
+ }
+
+ // restore default eol
+ System.setProperty(LINE_SEPARATOR, defaultEol);
+
+ return bReturn;
+ }
+
+ /**
+ * save text in JEditorPane
+ * @param textPane JEditorPane
+ * @param fOut File
+ * @param editorKit EditorKit
+ * @return true if saved
+ */
+ public static boolean doSave(ScilabEditorPane textPane, int index, File fOut, EditorKit editorKit, boolean addEOL, boolean silent) {
+ return doSave(textPane, index, fOut, editorKit, addEOL, silent, SciNotesOptions.getSciNotesAutosave().autoSave);
+ }
+
+ /**
+ * save text in JEditorPane
+ * @param textPane JEditorPane
+ * @param fOut File
+ * @param editorKit EditorKit
+ * @return true if saved
+ */
+ public static boolean doSave(ScilabEditorPane textPane, int index, File fOut, EditorKit editorKit, boolean addEOL, boolean silent, boolean backup) {
+ ScilabDocument styledDocument = (ScilabDocument) textPane.getDocument();
+ boolean enc = false;
+ File backupOut = null;
+ if (!styledDocument.getEncoding().equalsIgnoreCase(SciNotesOptions.getSciNotesPreferences().encoding)) {
+ if (!silent) {
+ String msg = String.format(SciNotesMessages.DIFFERENT_ENCODINGS, styledDocument.getEncoding(), SciNotesOptions.getSciNotesPreferences().encoding);
+ if (ScilabModalDialog.show(textPane.getEditor(), msg, SciNotesMessages.DIFFERENT_ENCODINGS_TITLE, IconType.QUESTION_ICON, ButtonType.YES_NO) == AnswerOption.NO_OPTION) {
+ return false;
+ }
+ enc = true;
+ } else {
+ return false;
+ }
+ }
+
+ if (backup) {
+ backupOut = SciNotesAutosave.getBackupFile(fOut.getName());
+ }
+
+ try {
+ fOut.createNewFile();
+ if (backupOut != null) {
+ backupOut.createNewFile();
+ }
+ } catch (IOException e) {
+ System.err.println(e);
+ }
+
+ if (!fOut.canWrite()) {
+ if (!silent) {
+ ScilabModalDialog.show(textPane.getEditor(), SciNotesMessages.NOTWRITABLE, SciNotesMessages.SCINOTES_ERROR, IconType.ERROR_ICON);
+ }
+ return false;
+ }
+
+ if (backupOut != null && !backupOut.canWrite()) {
+ backupOut = null;
+ }
+
+ // get default eol
+ String defaultEol = System.getProperty(LINE_SEPARATOR);
+
+ // set eol used to save file
+ if (styledDocument.getEOL().compareTo(defaultEol) != 0) {
+ System.setProperty(LINE_SEPARATOR, styledDocument.getEOL());
+ }
+ if (addEOL) {
+ styledDocument.addEOL();
+ }
+
+ boolean bReturn = false;
+
+ BufferedWriter bw = null;
+ OutputStreamWriter osw = null;
+ FileOutputStream fos = null;
+
+ File[] files = new File[] {fOut, backupOut};
+
+ for (File file : files) {
+ if (file != null) {
+ try {
+ fos = new FileOutputStream(file);
+ osw = new OutputStreamWriter(fos, SciNotesOptions.getSciNotesPreferences().encoding);
+ bw = new BufferedWriter(osw);
+ editorKit.write(bw, styledDocument, 0, styledDocument.getLength());
+ bw.flush();
+ bReturn = true;
+ } catch (IOException e) {
+ System.err.println(e);
+ bReturn = false;
+ } catch (BadLocationException e) {
+ System.err.println(e);
+ bReturn = false;
+ } finally {
+ try {
+ if (fos != null) {
+ fos.close();
+ }
+ if (osw != null) {
+ osw.close();
+ }
+ if (bw != null) {
+ bw.close();
+ }
+ } catch (IOException e) {
+ System.err.println(e);
+ }
+ }
+ }
+ }
+
+ // restore default eol
+ System.setProperty(LINE_SEPARATOR, defaultEol);
+ if (enc) {
+ textPane.getEditor().reload(index);
+ }
+
+ return bReturn;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.java
new file mode 100755
index 000000000..6695875ec
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesCompletionWindow.java
@@ -0,0 +1,151 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Vincent COUVERT
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Component;
+import java.awt.Point;
+import java.util.List;
+
+import javax.swing.JComponent;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.BadLocationException;
+
+import com.artenum.rosetta.interfaces.core.CompletionItem;
+import com.artenum.rosetta.interfaces.core.CompletionManager;
+
+import org.scilab.modules.completion.AbstractSciCompletionWindow;
+import org.scilab.modules.completion.Completion;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+
+/**
+ * Scilab completion window main class
+ * @author Vincent COUVERT
+ * @author Calixte DENIZET
+ */
+public class SciNotesCompletionWindow extends AbstractSciCompletionWindow {
+
+ private SciNotes editor;
+ private CompletionManager completionManager;
+
+ /**
+ * Default constructor
+ * @param editor the editor
+ * @param completionManager the CompletionManager
+ */
+ public SciNotesCompletionWindow(SciNotes editor, CompletionManager completionManager) {
+ this.editor = editor;
+ this.completionManager = completionManager;
+ }
+
+ /**
+ * @return the JTextComponent where the CompletionWindow will be drawn
+ */
+ public JTextComponent getTextComponent() {
+ return (JTextComponent) editor.getTextPane();
+ }
+
+ /**
+ * @return the list of the possibilities to complete
+ */
+ public List<CompletionItem> getCompletionItems() {
+ return completionManager.getCompletionItems();
+ }
+
+ /**
+ * Set the parent component for the completion window
+ * @param component the parent component
+ * Caution, the component shouldn't be null otherwise the completion window
+ * will never get the focus
+ */
+ public void setGraphicalContext(Component component) {
+ setFocusOut((JComponent) component);
+ super.setGraphicalContext(component);
+ }
+
+ /**
+ * Make the completion window visible and update its content
+ * @param list list of items matching completion
+ * @param location position of the top left corner of the window
+ * @see com.artenum.rosetta.interfaces.ui.CompletionWindow#show(java.util.List, java.awt.Point)
+ */
+ public void show(List<CompletionItem> list, Point location) {
+ currentCaretPosition = inputParsingManager.getCaretPosition();
+ /* Display only in completion items list is not empty */
+ if (list != null) {
+ /* If completion window size bigger than input command view size
+ put the window on the top of the current line */
+ ScilabEditorPane first = editor.getTextPane();
+ int height;
+ int value;
+ value = first.getScrollPane().getVerticalScrollBar().getValue();
+ height = first.getScrollPane().getHeight();
+ if (first.getOtherPaneInSplit() != null) {
+ getTextComponent().add(window);
+ }
+ if (window.getHeight() + location.y > value + height) {
+ try {
+ int ypos = first.modelToView(currentCaretPosition).height;
+ location.y = location.y - window.getHeight() - ypos;
+ } catch (BadLocationException e) { }
+ }
+
+ model.updateData(list);
+
+ /* Display completion window */
+ window.setLocation(location);
+ window.setVisible(true);
+
+ scrollPane.getViewport().setViewPosition(new Point(0, 0));
+
+ if (model.getSize() > 0) {
+ listUI.setSelectedIndex(0);
+ }
+ listUI.grabFocus();
+ }
+ }
+
+ /**
+ * Set the visibility status of the completion window
+ * @param status true if the window is visible (false else)
+ */
+ public void setVisible(boolean status) {
+ window.setVisible(status);
+ if (!status) {
+ editor.getTextPane().grabFocus();
+ }
+ }
+
+ /**
+ * Add the completed word in the TextComponent
+ * @param position where to append the completed word
+ */
+ public void addCompletedWord(int position) {
+ addCompletedWord(((CompletionItem) listUI.getSelectedValue()).getReturnValue(), position);
+ }
+
+ /**
+ * Add the completed word in the TextComponent
+ * @param str the string to add
+ * @param position where to append the completed word
+ */
+ public void addCompletedWord(String str, int position) {
+ String currentLine = inputParsingManager.getCommandLine();
+
+ String newLine = currentLine.substring(0, currentLine.length() - Completion.getPartLevel(currentLine).length());
+ newLine += str;
+ inputParsingManager.reset();
+ inputParsingManager.append(newLine);
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesContents.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesContents.java
new file mode 100755
index 000000000..2fb2deaf2
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesContents.java
@@ -0,0 +1,80 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2011 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+
+import javax.swing.JPanel;
+
+import org.scilab.modules.scinotes.SciNotes;
+
+/**
+ * Content pane for SciNotes.
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class SciNotesContents extends JPanel {
+
+ private ScilabTabbedPane stp;
+ private Component bottom;
+
+ /**
+ * Default constructor
+ * @param editor the editor where to put this pane
+ */
+ public SciNotesContents(final SciNotes editor) {
+ super(new BorderLayout());
+ stp = new ScilabTabbedPane(editor);
+ add(stp);
+ addFocusListener(new FocusListener() {
+ public void focusGained(FocusEvent e) {
+ if (editor.getTextPane() != null) {
+ editor.getTextPane().requestFocus();
+ }
+ }
+ public void focusLost(FocusEvent e) { }
+ });
+ }
+
+ /**
+ * @return the tabbed pane used in this content pane
+ */
+ public ScilabTabbedPane getScilabTabbedPane() {
+ return stp;
+ }
+
+ /**
+ * @param comp the component to insert at the bottom of this panel
+ */
+ public void insertBottomComponent(Component comp) {
+ if (comp == null) {
+ if (bottom != null) {
+ remove(bottom);
+ }
+ } else {
+ bottom = comp;
+ add(comp, BorderLayout.PAGE_END);
+ }
+ revalidate();
+ }
+
+ /**
+ * @return the component at the bottom
+ */
+ public Component getBottom() {
+ return bottom;
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java
new file mode 100755
index 000000000..2bff7f087
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesMessages.java
@@ -0,0 +1,346 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+//CHECKSTYLE:OFF
+
+package org.scilab.modules.scinotes.utils;
+
+import org.scilab.modules.localization.Messages;
+
+/**
+ * All messages used in SciNotes menus, dialogs, ...
+ * @author Bruno JOFRET
+ * @author Calixte DENIZET
+ */
+public class SciNotesMessages {
+
+ public static final String DOTS = "...";
+ public static final String QUOTE = "'";
+
+ public static final String SCILAB_EDITOR = Messages.gettext("SciNotes");
+ public static final String ERROR_WITH_STRING = Messages.gettext("Error while reading the String");
+ public static final String CORRUPTED_CONF_FILE = Messages.gettext("The configuration file has been corrupted and reset to default one.");
+
+ public static final String INVALID_FILE = Messages.gettext("File not found: %s");
+ public static final String IO_EXCEPTION = Messages.gettext("I/O error: %s");
+ public static final String ASK_TO_RELOAD = Messages.gettext("The file %s has been modified by an other program. Reload it ?");
+
+ /** FILE MENU */
+ public static final String FILE = Messages.gettext("File");
+ public static final String NEW = Messages.gettext("New") + DOTS;
+ public static final String OPEN = Messages.gettext("Open") + DOTS;
+ public static final String OPEN_SOURCE_FILE_ON_KEYWORD = Messages.gettext("Open function source file") + DOTS;
+ public static final String OPEN_URL = Messages.gettext("Open URL") + DOTS;
+ public static final String SOURCE_OF = Messages.gettext("Source of '");
+ public static final String RECENT_FILES = Messages.gettext("Recent Files");
+ public static final String SAVE = Messages.gettext("Save");
+ public static final String SAVE_AS = Messages.gettext("Save as") + DOTS;
+ public static final String OPEN_ERROR = Messages.gettext("The file could not be created, check the path");
+ public static final String READONLY = Messages.gettext("The file is not writable so it is opened in read-only mode");
+ public static final String NOTWRITABLE = Messages.gettext("You do not have the permissions to write this file");
+ public static final String NOTREADABLE = Messages.gettext("You do not have the permissions to read this file");
+
+ /**
+ * "Save All" message
+ */
+ public static final String SAVE_ALL = Messages.gettext("Save All");
+ public static final String PAGE_SETUP = Messages.gettext("Page Setup") + DOTS;
+ public static final String PRINT_PREVIEW = Messages.gettext("Print Preview") + DOTS;
+ public static final String PRINT = Messages.gettext("Print") + DOTS;
+ public static final String EXPORTERROR = Messages.gettext("An error occurred when exporting the code using FOP");
+ public static final String PRINTERERROR = Messages.gettext("An error occurred when printing");
+ public static final String CLOSE = Messages.gettext("Close");
+ public static final String CLOSEALL = Messages.gettext("Close All");
+ public static final String CLOSEALLBUTTHIS = Messages.gettext("Close All But This");
+ public static final String EXIT = Messages.gettext("Exit");
+ public static final String QUESTION_MARK = Messages.gettext("?");
+
+ /** EDIT MENU */
+ public static final String EDIT = Messages.gettext("Edit");
+ public static final String UNDO = Messages.gettext("Undo");
+ public static final String REDO = Messages.gettext("Redo");
+ public static final String CUT = Messages.gettext("Cut");
+ public static final String COPY = Messages.gettext("Copy");
+ public static final String PASTE = Messages.gettext("Paste");
+ public static final String SELECT_ALL = Messages.gettext("Select All");
+ public static final String DELETE = Messages.gettext("Delete");
+
+ /** TOOLS MENU */
+ public static final String TOOLS = Messages.gettext("Tools");
+ public static final String COMMENT_SELECTION = Messages.gettext("Comment Selection");
+ public static final String UNCOMMENT_SELECTION = Messages.gettext("Uncomment Selection");
+ public static final String TABIFY_SELECTION = Messages.gettext("Shift Right");
+ public static final String UNTABIFY_SELECTION = Messages.gettext("Shift Left");
+ public static final String INDENT = Messages.gettext("Correct Indentation");
+ public static final String HELP_ON_TYPING = Messages.gettext("Help on typing");
+ public static final String GENERATE_HELP = Messages.gettext("Generate help from function");
+ public static final String OPEN_TAB_IN_NEW_WINDOW = Messages.gettext("Clone tab in a new window");
+ public static final String CCLOSE_TAB_IN_NEW_WINDOW = Messages.gettext("Clone and close tab in a new window");
+ public static final String REMOVE_TRAILING_WHITE = Messages.gettext("Remove trailing whitespaces");
+
+ /** SEARCH MENU */
+ public static final String SEARCH = Messages.gettext("Search");
+ public static final String FIND_REPLACE = Messages.gettext("Find/Replace");
+ public static final String FIND_NEXT = Messages.gettext("Find Next");
+ public static final String FIND_PREVIOUS = Messages.gettext("Find Previous");
+ public static final String GOTO_LINE = Messages.gettext("Goto line");
+
+ /** VIEW MENU */
+ public static final String VIEW = Messages.gettext("View");
+ public static final String SHOW_HIDE_TOOLBAR = Messages.gettext("Show/Hide ToolBar");
+ public static final String HIGHLIGHT_CURRENT_LINE = Messages.gettext("Highlight current line");
+ public static final String WORD_WRAP = Messages.gettext("Word Wrap");
+ public static final String LINE_NUMBERS_WHEREAMI = Messages.gettext("Whereami Line Numbering");
+ public static final String LINE_NUMBERS_NOWHEREAMI = Messages.gettext("Normal Line Numbering");
+ public static final String NO_LINE_NUMBERS = Messages.gettext("No Line Numbering");
+
+ public static final String SET_COLORS = Messages.gettext("Set Colors") + DOTS;
+ public static final String SET_FONT = Messages.gettext("Set Font") + DOTS;
+ public static final String RESET_DEFAULT_FONT = Messages.gettext("Reset default font");
+
+ public static final String SPLIT_HORIZONTALLY = Messages.gettext("Split horizontally");
+ public static final String SPLIT_VERTICALLY = Messages.gettext("Split vertically");
+ public static final String NO_SPLIT = Messages.gettext("No split");
+
+ /** DOCUMENT MENU */
+ public static final String DOCUMENT = Messages.gettext("Document");
+ public static final String SYNTAX_TYPE = Messages.gettext("Syntax Type");
+ public static final String SCILAB_STYLE = Messages.gettext("Scilab");
+ public static final String PLAIN_TEXT_STYLE = "Plain Text";
+ public static final String XML_STYLE = "XML";
+ public static final String ENCODING_TYPE = Messages.gettext("Encoding");
+ public static final String COLORIZE = Messages.gettext("Colorize");
+ public static final String AUTO_INDENT = Messages.gettext("Enable Auto Reformat");
+ public static final String EOL_TYPE = Messages.gettext("Line Endings");
+ public static final String EOL_AUT0 = Messages.gettext("Auto (Default)");
+ public static final String EOL_WINDOWS = Messages.gettext("Windows/DOS (CR + LF)");
+ public static final String EOL_MACOS = Messages.gettext("Mac Classic (CR)");
+ public static final String EOL_LINUX = Messages.gettext("Unix (LF)");
+
+ /** EXECUTE MENU */
+ public static final String EXECUTE = Messages.gettext("Execute");
+ public static final String LOAD_INTO_SCILAB = Messages.gettext("Load Into Scilab");
+ public static final String EVALUATE_SELECTION = Messages.gettext("Evaluate Selection");
+ public static final String EVALUATE_FROM_BEGINNING = Messages.gettext("Evaluate from beginning...");
+ public static final String EXECUTE_FILE_INTO_SCILAB = Messages.gettext("Execute File Into Scilab");
+
+ /** HELP MENU */
+ public static final String HELP = Messages.gettext("SciNotes help") + DOTS;
+ public static final String HELP_ON_KEYWORD = Messages.gettext("Help on the current keyword");
+ public static final String HELP_ON_SELECTED = Messages.gettext("Help on the selected text");
+ public static final String HELP_ON_FOO = Messages.gettext("Help on selected text or keyword");
+ public static final String HELP_ABOUT = Messages.gettext("Help about '");
+ public static final String ABOUT = Messages.gettext("About") + DOTS;
+ public static final String SCINOTES_VERSION = Messages.gettext("SciNotes");
+
+ /** FIND/REPLACE DIALOG */
+ public static final String FIND = Messages.gettext("Find:");
+ public static final String FIND_BUTTON = Messages.gettext("Find");
+ public static final String REPLACE_FIND = Messages.gettext("Replace/Find");
+ public static final String REPLACE_WITH = Messages.gettext("Replace With :");
+ public static final String DIRECTION = Messages.gettext("Direction");
+ public static final String FORWARD = Messages.gettext("Forward");
+ public static final String BACKWARD = Messages.gettext("Backward");
+ public static final String SCOPE = Messages.gettext("Scope");
+ public static final String ALL = Messages.gettext("All");
+ public static final String SELECTED_LINES = Messages.gettext("Selected lines");
+ public static final String SELECT_FROM_CARET = Messages.gettext("Select from caret");
+ public static final String OPTIONS = Messages.gettext("Options");
+ public static final String CASE_SENSITIVE = Messages.gettext("Case sensitive");
+ public static final String CIRCULAR_SEARCH = Messages.gettext("Circular search");
+ public static final String RESTART_FROM_BEGINNING = Messages.gettext("Restart the search from the beginning");
+ public static final String WHOLE_WORD = Messages.gettext("Whole word");
+ public static final String REGULAR_EXPRESSIONS = Messages.gettext("Regular expressions");
+ public static final String REPLACE = Messages.gettext("Replace");
+ public static final String REPLACE_ALL = Messages.gettext("Replace All");
+ public static final String INVALID_REGEXP = Messages.gettext("Invalid regular expression : %s");
+ public static final String PASSED_END_OF_DOCUMENT = Messages.gettext("You have passed the end of the document");
+ public static final String PASSED_BEGIN_OF_DOCUMENT = Messages.gettext("You have passed the beginning of the document");
+ public static final String END_OF_DOCUMENT = Messages.gettext("You have reached the end of the document");
+ public static final String BEGIN_OF_DOCUMENT = Messages.gettext("You have reached the beginning of the document");
+ public static final String STRING_NOT_FOUND = Messages.gettext("String %s not found");
+
+ public static final String FILE_DOESNT_EXIST = Messages.gettext("The file %s does not exist. Do you want to create it?");
+ public static final String CLOSE_TAB_TIP = Messages.gettext("close this tab");
+ public static final String THIS_FILE = Messages.gettext("This file");
+ public static final String MODIFIED = Messages.gettext("The file %s has been modified since last save. Save it?");
+ public static final String EXTERNAL_MODIFICATION = Messages.gettext("The file %s has been modified by another program ! Overwrite it ?");
+ public static final String EXTERNAL_MODIFICATION_INFO = Messages.gettext("Warning: the file has been modified by another program !");
+ public static final String RELOAD = Messages.gettext("Reload");
+ public static final String OVERWRITE = Messages.gettext("Overwrite");
+ public static final String IGNORE = Messages.gettext("Ignore");
+ public static final String REPLACE_FILE_TITLE = Messages.gettext("Replace File?");
+ public static final String FILE_ALREADY_EXIST = Messages.gettext("File already exists");
+ public static final String UNTITLED = Messages.gettext("Untitled ");
+ public static final String OK = Messages.gettext("Ok");
+ public static final String APPLYREINDENT = Messages.gettext("Apply & Reindent");
+ public static final String CANCEL = Messages.gettext("Cancel");
+ public static final String DEFAULT = Messages.gettext("Default");
+ public static final String NEXT_TAB = Messages.gettext("Next tab");
+ public static final String PREVIOUS_TAB = Messages.gettext("Previous tab");
+ public static final String EXECUTE_WARNING = Messages.gettext("You need to save your modifications before executing this file into Scilab.");
+ public static final String BIG_FILE_WARNING = Messages.gettext("This file is very long. \"Execute File Into Scilab\" could be better.\nAre you sure to continue ?");
+
+
+ public static final String ENTER_LINE_NUMBER = Messages.gettext("Enter line number");
+ public static final String BINARY_FILE = Messages.gettext("This file is a binary, saving it will result in a corrupt file.");
+
+ /* Status bar messages */
+ public static final String LOADING = Messages.gettext("Loading") + DOTS;
+ public static final String COLORIZATION_CANCELED = Messages.gettext("Colorization canceled");
+ public static final String BINARY_FILE_MODE = Messages.gettext("Binary file: read-only mode");
+ public static final String READ_ONLY_MODE = Messages.gettext("Read-only mode");
+ public static final String CLICKABLE_URL = Messages.gettext("Press CTRL and move the mouse over the link to activate it");
+ public static final String OPENURL = Messages.gettext("Open in the navigator the URL ");
+ public static final String MAILTO = Messages.gettext("Mail to ");
+ public static final String OPENSOURCE = Messages.gettext("Open the source of the macro ");
+ public static final String SHOWSOURCE = Messages.gettext("Show the definition of the macro ");
+ public static final String POSFUN_IN_DOC = Messages.gettext("Line %s, Column %s. Function '%s' at Line %s.");
+ public static final String UNKNOWN_FUNCTION = Messages.gettext("Unknown function");
+ public static final String POS_IN_DOC = Messages.gettext("Line %s, Column %s.");
+
+ /* About box */
+ public static final String VERSION = Messages.gettext("SciNotes") + " 1.1";
+ public static final String COPYRIGHT = Messages.gettext("Copyright (c)") + " 2009-2012";
+
+ public static final String SCINOTES_ERROR = Messages.gettext("SciNotes error");
+ public static final String COULD_NOT_SAVE_FILE = Messages.gettext("The file could not be saved.");
+ public static final String COULD_NOT_CONVERT_FILE = Messages.gettext("The file could not be converted.");
+ public static final String CANNOT_LOAD_DIRECTORY = Messages.gettext("%s is a directory.");
+ public static final String MODIFICATIONS_WILL_BE_LOST = Messages.gettext("Your modifications will be lost, change encoding anyway?");
+ public static final String CONTINUE = Messages.gettext("Continue ?");
+ public static final String CANNOT_LOAD_COLORIZE = Messages.gettext("Cannot load \"scinotesConfiguration.xml\"");
+
+ public static final String COULD_NOT_FIND_CONSOLE = Messages.gettext("Could not find the console nor the InterpreterManagement.");
+ public static final String COULD_NOT_FIND_TMPFILE = Messages.gettext("Could not find the temporary file.");
+ public static final String NO_TEXT_SELECTED = Messages.gettext("No text selected.");
+ public static final String NO_TEXT_TO_EXECUTE = Messages.gettext("No text to execute.");
+ public static final String COMPLETE = Messages.gettext("Complete");
+ public static final String EDIT_SELECTION = Messages.gettext("Copy selection in a new tab");
+
+ public static final String DIFFERENT_ENCODINGS = Messages.gettext("The file encoding is actually %s and it will be saved in using %s. Continue ?");
+ public static final String DIFFERENT_ENCODINGS_TITLE = Messages.gettext("Encoding problems");
+ public static final String CANNOT_GUESS_ENCODING = Messages.gettext("Cannot guess the file encoding.");
+
+ public static final String AUTOSAVE_ERROR = Messages.gettext("Cannot save the file %s... stop the backup process");
+ public static final String AUTOSAVE_FINISHED = Messages.gettext("Backup finished...");
+ public static final String NO_EXISTING_DIR = Messages.gettext("The directory %s does not exist. Do you want to create it?");
+ public static final String UNABLE_TO_CREATE_DIR = Messages.gettext("The directory %s cannot be created. Please check your access rights.");
+ public static final String NOT_WRITABLE_DIR = Messages.gettext("Impossible to write a file in %s. Please check your access rights.");
+ public static final String NOT_A_DIR = Messages.gettext("Invalid directory name: %s.");
+ public static final String AUTOSAVE = Messages.gettext("SciNotes autosave");
+
+ public static final String OCCURENCES_FOUND = Messages.gettext("%s occurences found.");
+
+ /**
+ * "Change Colors" message
+ */
+ public static final String CHANGE_COLORS = Messages.gettext("Change Colors");
+
+ /**
+ * "Change Color" message
+ */
+ public static final String CARET_COLOR = Messages.gettext("Cursor Color");
+ public static final String BGCOLOR = Messages.gettext("Background Color");
+ public static final String CHANGE_COLOR = Messages.gettext("Change Color");
+ public static final String ITALIC = Messages.gettext("Italic");
+ public static final String STRIKETHROUGH = Messages.gettext("Strike Through");
+ public static final String PREVIEW = Messages.gettext("Preview");
+ public static final String UNDERLINE = Messages.gettext("Underline");
+ public static final String SETTINGS = Messages.gettext("Settings");
+ public static final String COLOR = Messages.gettext("Color");
+ public static final String BOLD = Messages.gettext("Bold");
+
+ /**
+ * Navigator labels
+ */
+ public static final String CODE_NAVIGATOR = Messages.gettext("Code Navigator");
+ public static final String ABSOLUTE = Messages.gettext("Absolute");
+ public static final String RELATIVE = Messages.gettext("Relative");
+ public static final String GO_TO_LINE = Messages.gettext("Go to line: ");
+ public static final String NUMEROTATION = Messages.gettext("Numeration");
+ public static final String ALPHABETIC_ORDER = Messages.gettext("Alphabetic order");
+ public static final String NATURAL_ORDER = Messages.gettext("Natural order");
+ public static final String ORDER = Messages.gettext("Order");
+ public static final String FUNCTIONS = Messages.gettext("Functions");
+ public static final String ANCHORS = Messages.gettext("Anchors");
+
+ /**
+ * Anchor
+ */
+ public static final String ANCHOR_NAME = Messages.gettext("Anchor's name: ");
+ public static final String SET_ANCHOR = Messages.gettext("Set an anchor");
+ public static final String ANCHOR = Messages.gettext("Anchor: ");
+
+ /**
+ * Open source
+ */
+ public static final String OPEN_SOURCE_FILE_OF = Messages.gettext("Open source file of the function:");
+ public static final String OPEN_SOURCE = Messages.gettext("Open source") + DOTS;
+
+ /**
+ * Exit confirm message
+ */
+ public static final String EXIT_CONFIRM = Messages.gettext("Are you sure that you want to close SciNotes ?");
+
+ /**
+ * Restore previous session's files query message
+ */
+ public static final String RESTORE_FILES_QUERY = Messages.gettext("Restore files from your last SciNotes session ?");
+ public static final String RESTORE_FILES_TITLE = Messages.gettext("Restore the last sessions");
+
+ /**
+ * Tabulations configuration
+ */
+ public static final String CONFIGTAB = Messages.gettext("Configure Tabulation");
+ public static final String TABSTYLE = Messages.gettext("Tab style");
+ public static final String TABUSEWHITES = Messages.gettext("Use spaces");
+ public static final String TABLENGTH = Messages.gettext("Length");
+ public static final String TABREPRESENTATION = Messages.gettext("Tab representation");
+ public static final String TABHRULE = Messages.gettext("Horizontal rule");
+ public static final String TABVRULE = Messages.gettext("Vertical rule");
+ public static final String TABDOUBLECHEVRONS = Messages.gettext("Double chevrons");
+
+ public static final String COPYFULLFILEPATH = Messages.gettext("Copy full path");
+
+ /**
+ * Incremental search
+ */
+ public static final String EXACT = Messages.gettext("Exact");
+
+ /**
+ * Find in files
+ */
+ public static final String SEARCHFILES = Messages.gettext("Search Files...");
+ public static final String SEARCHINFILES = Messages.gettext("Search in Files...");
+ public static final String MATCHES = Messages.gettext("<html>%s <i>(%s matches)</i></html>");
+ public static final String MATCH = Messages.gettext("<html>%s <i>(%s match)</i></html>");
+ public static final String ELAPSEDTIME = Messages.gettext("Elapsed time: %s sec.");
+ public static final String BASEDIRECTORY = Messages.gettext("Base directory:");
+ public static final String RECURSIVE = Messages.gettext("Recursive");
+ public static final String FILEPATTERN = Messages.gettext("File pattern");
+ public static final String FILEPATTERNEXP = Messages.gettext("(* for any string and ? for any character)");
+ public static final String BASEDIREXP = Messages.gettext("(~ for user home dir. and SCI for Scilab base dir.)");
+ public static final String WORDPATTERN = Messages.gettext("Word pattern");
+ public static final String FILELINEBYLINE = Messages.gettext("Read file line by line");
+ public static final String CHOOSEDIR = Messages.gettext("Choose...");
+ public static final String STOPBUTTON = Messages.gettext("Stop");
+ public static final String REGEXPATTERN = Messages.gettext("Regex");
+ public static final String WORD = Messages.gettext("Word");
+ public static final String WORDCASESENSITIVE = Messages.gettext("Case-sensitivity (Word)");
+ public static final String FILECASESENSITIVE = Messages.gettext("Case-sensitivity (File name)");
+ public static final String RECURSIVESEARCH = Messages.gettext("Recursive search");
+ public static final String LINEBYLINE = Messages.gettext("Line by line");
+ public static final String WORDREGEX = Messages.gettext("Regular expression (Word)");
+ public static final String CHOOSEBASEDIR = Messages.gettext("Choose the search base directory");
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabScrollPane.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabScrollPane.java
new file mode 100755
index 000000000..183ce99c1
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabScrollPane.java
@@ -0,0 +1,130 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - DIGITEO - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
+import javax.swing.plaf.ScrollBarUI;
+import javax.swing.plaf.basic.BasicScrollBarUI;
+
+/**
+ * A ScrollPane where the vertical scrollbar can contains marks to indicate particular positions in the document.
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class ScilabScrollPane extends JScrollPane {
+
+ private static final Color MARKCOLOR = new Color(229, 192, 0);
+ private List<Rectangle> marks;
+
+ /**
+ * Default constructor
+ * @param view the view to put in the scrollpane
+ */
+ public ScilabScrollPane(Component view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public JScrollBar createVerticalScrollBar() {
+ return new ScilabVerticalScrollBar();
+ }
+
+ /**
+ * Put marks in the vertical scrollbar
+ * @param marks a list of the rectangle corresponding to the line in the document
+ */
+ public void putMarks(List<Rectangle> marks) {
+ this.marks = marks;
+ getVerticalScrollBar().repaint();
+ }
+
+ /**
+ * Remove all the marks
+ */
+ public void removeMarks() {
+ this.marks = null;
+ getVerticalScrollBar().repaint();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected class ScilabVerticalScrollBar extends ScrollBar {
+
+ private Field trackRect;
+ private Field thumbRect;
+ private ScrollBarUI ui;
+
+ /**
+ * Default constructor
+ */
+ public ScilabVerticalScrollBar() {
+ super(JScrollBar.VERTICAL);
+ ui = getUI();
+ initFields();
+ }
+
+ /**
+ * Init the protected fields in BasicScrollBarUI. These fields are used to get the dimension of the thumb and of the track.
+ */
+ private void initFields() {
+ if (ui instanceof BasicScrollBarUI) {
+ try {
+ trackRect = BasicScrollBarUI.class.getDeclaredField("trackRect");
+ trackRect.setAccessible(true);
+ thumbRect = BasicScrollBarUI.class.getDeclaredField("thumbRect");
+ thumbRect.setAccessible(true);
+ } catch (Exception e) { }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void paint(Graphics g) {
+ super.paint(g);
+ g.setColor(MARKCOLOR);
+ ScrollBarUI ui = getUI();
+ if (this.ui != ui) {
+ this.ui = ui;
+ initFields();
+ }
+ if (ui instanceof BasicScrollBarUI && trackRect != null && thumbRect != null) {
+ BasicScrollBarUI basicUI = (BasicScrollBarUI) ui;
+ try {
+ Rectangle track = (Rectangle) trackRect.get(basicUI);
+ Rectangle thumb = (Rectangle) thumbRect.get(basicUI);
+ double ratio = (double) track.height / (double) getMaximum();
+ if (marks != null) {
+ for (Rectangle mark : marks) {
+ Rectangle r = new Rectangle(track.x, track.y + (int) ((mark.y + mark.height) * ratio), track.width, 2);
+ if (!thumb.contains(r)) {
+ g.fillRect(r.x, r.y, r.width, r.height);
+ }
+ }
+ }
+ } catch (Exception e) { }
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabTabbedPane.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabTabbedPane.java
new file mode 100755
index 000000000..22eb202d3
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabTabbedPane.java
@@ -0,0 +1,506 @@
+/*
+ * Scilab (http://www.scilab.org/) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.DefaultFocusTraversalPolicy;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DragSourceDragEvent;
+import java.awt.dnd.DragSourceDropEvent;
+import java.awt.dnd.DragSourceEvent;
+import java.awt.dnd.DragSourceListener;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JRootPane;
+import javax.swing.JTabbedPane;
+import javax.swing.KeyStroke;
+import javax.swing.SwingUtilities;
+
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+
+import org.scilab.modules.scinotes.EditorComponent;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.actions.CloseAction;
+import org.scilab.modules.scinotes.actions.CloseAllButThisAction;
+import org.scilab.modules.scinotes.actions.RestoreOpenedFilesAction;
+import org.scilab.modules.scinotes.actions.SaveAction;
+
+/**
+ * Class for a tabbedpane with close-button
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class ScilabTabbedPane extends JTabbedPane implements DragGestureListener,
+ DragSourceListener,
+ DropTargetListener,
+ Transferable {
+
+ private static final ImageIcon CLOSEICON = new ImageIcon(System.getenv("SCI") + "/modules/gui/images/icons/close-tab.png");
+ private static final ImageIcon CLOSEONICON = new ImageIcon(System.getenv("SCI") + "/modules/gui/images/icons/close-tab-on.png");
+ private static final int BUTTONSIZE = 18;
+
+ private static DataFlavor DATAFLAVOR;
+ private static ScilabTabbedPane currentWhenDragged;
+
+ static {
+ try {
+ DATAFLAVOR = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + ";class=" + ScilabTabbedPane.class.getName());
+ } catch (ClassNotFoundException e) { }
+ }
+
+ private SciNotes editor;
+ private int draggedIndex;
+
+ /**
+ * Constructor
+ * @param editor the editor
+ */
+ public ScilabTabbedPane(SciNotes editor) {
+ super();
+ this.editor = editor;
+ setFocusTraversalPolicy(new java.awt.DefaultFocusTraversalPolicy() {
+ public Component getComponentAfter(Container aContainer, Component aComponent) {
+ if (aComponent instanceof ScilabEditorPane) {
+ return aComponent;
+ }
+ return super.getComponentAfter(aContainer, aComponent);
+ }
+ });
+
+ setFocusCycleRoot(true);
+
+ setComponentPopupMenu(createPopupMenu());
+ DragSource dragsource = DragSource.getDefaultDragSource();
+ dragsource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_MOVE, this);
+ DropTarget droptarget = new DropTarget(this, this);
+ addMouseListener(new MouseAdapter() {
+ public void mouseClicked(MouseEvent e) {
+ if (e.getClickCount() == 1 && SwingUtilities.isMiddleMouseButton(e)) {
+ int index = indexAtLocation(e.getX(), e.getY());
+ ((CloseTabButton) getTabComponentAt(index)).closeTab();
+ e.consume();
+ }
+ }
+ });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void insertTab(String title, Icon icon, Component component, String tip, int index) {
+ super.insertTab(title, icon, component, tip, index);
+ setTabComponentAt(index, new CloseTabButton(title));
+ }
+
+ /**
+ * @param index the index of the tab
+ * @return the title of the tab
+ */
+ public String getScilabTitleAt(int index) {
+ CloseTabButton tab = (CloseTabButton) getTabComponentAt(index);
+ if (tab != null) {
+ return tab.getText();
+ }
+
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getTitleAt(int index) {
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTitleAt(int index, String title) {
+ CloseTabButton tab = (CloseTabButton) getTabComponentAt(index);
+ if (tab != null) {
+ tab.setText(title);
+ }
+ }
+
+ /**
+ * Implements getTransferData in Transferable
+ * @param flavor to get
+ * @return the object to transfer
+ * @throws UnsupportedFlavorException for an unknown flavor
+ */
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
+ if (!flavor.equals(DATAFLAVOR)) {
+ throw new UnsupportedFlavorException(flavor);
+ }
+
+ return this;
+ }
+
+ /**
+ * Implements getTransferDataFlavors in Transferable
+ * @return the supported flavors
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ return new DataFlavor[] {DATAFLAVOR};
+ }
+
+ /**
+ * Implements isDataFlavorSupported in Transferable
+ * @param flavor to support
+ * @return true if the flavor is supported
+ */
+ public boolean isDataFlavorSupported(DataFlavor flavor) {
+ return flavor.equals(DATAFLAVOR);
+ }
+
+ /**
+ * Interface DropTargetListener
+ * {@inheritDoc}
+ */
+ public void dragEnter(DropTargetDragEvent dtde) {
+ if (dtde.isDataFlavorSupported(DATAFLAVOR)) {
+ dtde.acceptDrag(DnDConstants.ACTION_MOVE);
+ Component c = dtde.getDropTargetContext().getComponent();
+ if (c instanceof ScilabTabbedPane) {
+ currentWhenDragged = (ScilabTabbedPane) c;
+ }
+ } else {
+ dtde.rejectDrag();
+ }
+ }
+
+ /**
+ * Interface DropTargetListener
+ * {@inheritDoc}
+ */
+ public void dragOver(DropTargetDragEvent dtde) {
+ if (dtde.isDataFlavorSupported(DATAFLAVOR)) {
+ dtde.acceptDrag(DnDConstants.ACTION_MOVE);
+ } else {
+ dtde.rejectDrag();
+ }
+ }
+
+ /**
+ * Interface DropTargetListener
+ * {@inheritDoc}
+ */
+ public void drop(DropTargetDropEvent dtde) {
+ if (!dtde.isDataFlavorSupported(DATAFLAVOR) || dtde.getSourceActions() != DnDConstants.ACTION_MOVE) {
+ dtde.rejectDrop();
+ } else {
+ try {
+ ScilabTabbedPane tabbedPane = (ScilabTabbedPane) dtde.getTransferable().getTransferData(DATAFLAVOR);
+ int index = indexAtLocation(dtde.getLocation().x, dtde.getLocation().y);
+ if (tabbedPane == this && (index == tabbedPane.draggedIndex || getTabCount() == 1)) {
+ dtde.rejectDrop();
+ } else {
+ Component c = tabbedPane.getComponentAt(tabbedPane.draggedIndex);
+ String title = tabbedPane.getScilabTitleAt(tabbedPane.draggedIndex);
+ ConfigSciNotesManager.removeFromOpenFiles(tabbedPane.editor, tabbedPane.editor.getTextPane(tabbedPane.draggedIndex));
+ if (tabbedPane.editor.getNavigator() != null) {
+ tabbedPane.editor.getNavigator().removePane(tabbedPane.editor.getTextPane(tabbedPane.draggedIndex));
+ }
+ tabbedPane.remove(c);
+ if (tabbedPane.getTabCount() == 0) {
+ SciNotes.closeEditor(tabbedPane.editor);
+ }
+ if (index == -1) {
+ index = getTabCount();
+ }
+
+ insertTab(title, null, c, null, index);
+ ScilabEditorPane sep = editor.getTextPane(indexOfComponent(c));
+
+ if (tabbedPane != this) {
+ sep.setEditor(editor);
+ editor.initInputMap(sep);
+ }
+
+ if (sep.getName() != null) {
+ ConfigSciNotesManager.saveToOpenFiles(sep.getName(), editor, sep, index);
+ } else if (tabbedPane != this) {
+ int n = editor.getNumberForEmptyTab();
+ sep.setShortName(SciNotesMessages.UNTITLED + n);
+ sep.setTitle(SciNotesMessages.UNTITLED + n);
+ setTitleAt(index, SciNotesMessages.UNTITLED + n);
+ editor.setTitle(sep.getTitle());
+ }
+
+ setSelectedIndex(index);
+ editor.updateTabTitle();
+
+ dtde.acceptDrop(DnDConstants.ACTION_MOVE);
+ }
+ } catch (IOException e) {
+ dtde.rejectDrop();
+ } catch (UnsupportedFlavorException e) {
+ dtde.rejectDrop();
+ }
+ }
+ }
+
+ /**
+ * Interface DropTargetListener
+ * {@inheritDoc}
+ */
+ public void dropActionChanged(DropTargetDragEvent dtde) { }
+
+ /**
+ * Interface DropTargetListener
+ * {@inheritDoc}
+ */
+ public void dragExit(DropTargetEvent dte) { }
+
+ /**
+ * Interface DragSourceListener
+ * {@inheritDoc}
+ */
+ public void dragDropEnd(DragSourceDropEvent dsde) {
+ Component c = null;
+ for (SciNotes sn : SciNotes.getSciNotesList()) {
+ Point point = new Point(dsde.getLocation());
+ SwingUtilities.convertPointFromScreen(point, sn);
+ c = SwingUtilities.getDeepestComponentAt(sn, (int) point.getX(), (int) point.getY());
+ if (c != null) {
+ break;
+ }
+ }
+
+ if (c == null) {
+ SciNotes.cloneAndCloseCurrentTab(editor, true, dsde.getX(), dsde.getY());
+ }
+ }
+
+ /**
+ * Interface DragSourceListener
+ * {@inheritDoc}
+ */
+ public void dragExit(DragSourceEvent dse) { }
+
+ /**
+ * Interface DragSourceListener
+ * {@inheritDoc}
+ */
+ public void dragOver(DragSourceDragEvent dsde) {
+ Point pt = new Point(dsde.getX(), dsde.getY());
+ JRootPane rootpane = (JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentWhenDragged);
+
+ if (rootpane != null) {
+ SwingUtilities.convertPointFromScreen(pt, rootpane);
+ Component c = SwingUtilities.getDeepestComponentAt(rootpane, pt.x, pt.y);
+
+ if (c != null && !(c instanceof ScilabEditorPane) && !(c instanceof ScilabTabbedPane)) {
+ c = SwingUtilities.getAncestorOfClass(ScilabTabbedPane.class, c);
+ }
+ }
+ }
+
+ /**
+ * Interface DragSourceListener
+ * {@inheritDoc}
+ */
+ public void dragEnter(DragSourceDragEvent dsde) { }
+
+ /**
+ * Interface DragSourceListener
+ * {@inheritDoc}
+ */
+ public void dropActionChanged(DragSourceDragEvent dsde) { }
+
+ /**
+ * Interface DragGestureListener
+ * {@inheritDoc}
+ */
+ public void dragGestureRecognized(DragGestureEvent dge) {
+ InputEvent inputEvent = dge.getTriggerEvent();
+ if (inputEvent instanceof MouseEvent) {
+ MouseEvent mouseEvent = (MouseEvent) inputEvent;
+ int index = indexAtLocation(mouseEvent.getX(), mouseEvent.getY());
+ if (index == -1 || (getComponentAt(index) instanceof EditorComponent)) {
+ currentWhenDragged = this;
+
+ if (index != -1) {
+ draggedIndex = index;
+ dge.startDrag(DragSource.DefaultMoveDrop, this, this);
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a popupmenu for the tabs
+ * @return the created popupmenu
+ */
+ private JPopupMenu createPopupMenu() {
+ JPopupMenu popup = new JPopupMenu() {
+ public void show(Component invoker, int x, int y) {
+ int index = ScilabTabbedPane.this.indexAtLocation(x, y);
+ ScilabTabbedPane.this.setSelectedIndex(index);
+ super.show(invoker, x, y);
+ }
+ };
+
+ Map<String, KeyStroke> map = SciNotes.getActionKeys();
+
+ SwingScilabMenuItem menuItem;
+ menuItem = (SwingScilabMenuItem) SaveAction.createMenu(SciNotesMessages.SAVE, editor, map.get("scinotes-save")).getAsSimpleMenuItem();
+ popup.add(menuItem);
+
+ menuItem = (SwingScilabMenuItem) CloseAction.createMenu(SciNotesMessages.CLOSE, editor, map.get("scinotes-close")).getAsSimpleMenuItem();
+ popup.add(menuItem);
+
+ menuItem = (SwingScilabMenuItem) CloseAllButThisAction.createMenu(SciNotesMessages.CLOSEALLBUTTHIS, editor, map.get("scinotes-close-all-but")).getAsSimpleMenuItem();
+ popup.add(menuItem);
+
+ popup.addSeparator();
+
+ final JMenuItem menuitem = new JMenuItem(SciNotesMessages.COPYFULLFILEPATH);
+ menuitem.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent actionEvent) {
+ if (editor.getTextPane() != null) {
+ StringSelection sel = new StringSelection(editor.getTextPane().getName());
+ Toolkit.getDefaultToolkit().getSystemClipboard().setContents(sel, sel);
+ }
+ }
+ });
+ menuitem.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent e) {
+ if (editor.getTextPane() != null) {
+ String name = editor.getTextPane().getName();
+ menuitem.setEnabled(name != null && !name.isEmpty());
+ }
+ }
+ });
+ popup.add(menuitem);
+
+ return popup;
+ }
+
+ /**
+ * Inner class to have a label and a button
+ */
+ class CloseTabButton extends JPanel {
+
+ private JLabel label;
+
+ /**
+ * Constructor
+ * @param title the title of the tab
+ */
+ public CloseTabButton(String title) {
+ super(new FlowLayout(FlowLayout.LEFT, 0, 0));
+ setOpaque(false);
+ label = new JLabel(title);
+ add(label);
+ add(new JLabel(" "));
+ add(new CloseButton());
+ }
+
+ /**
+ * @param text the text for the tab
+ */
+ public void setText(String text) {
+ label.setText(text);
+ }
+
+ /**
+ * @return the text of the tab
+ */
+ public String getText() {
+ return label.getText();
+ }
+
+ public void closeTab() {
+ ScilabEditorPane sep = editor.getTextPane(editor.getTabPane().indexOfTabComponent(this));
+ if (sep != null) {
+ String name = sep.getName();
+ editor.closeTabAt(editor.getTabPane().indexOfTabComponent(this));
+ if (getTabCount() == 0) {
+ if (name != null) {
+ editor.addEmptyTab();
+ } else {
+ SciNotes.closeEditor(editor);
+ }
+ }
+ } else if (editor.getTabPane().getTabComponentAt(editor.getTabPane().indexOfTabComponent(this)) != null) {
+ editor.getTabPane().remove(editor.getTabPane().indexOfTabComponent(this));
+ if (editor.getTabPane().getTabCount() == 0) {
+ editor.addEmptyTab();
+ }
+ RestoreOpenedFilesAction.restoreEnabledComponents(editor);
+ }
+ }
+
+ /**
+ * Inner class for the close-button
+ */
+ class CloseButton extends JButton {
+
+ /**
+ * Constructor
+ */
+ CloseButton() {
+ super(CLOSEICON);
+ setFocusable(false);
+ setContentAreaFilled(true);
+ setOpaque(false);
+ setRolloverEnabled(true);
+ setRolloverIcon(CLOSEONICON);
+ setBorderPainted(false);
+ setPreferredSize(new Dimension(BUTTONSIZE, BUTTONSIZE));
+ addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ closeTab();
+ }
+ });
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SearchFile.java b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SearchFile.java
new file mode 100755
index 000000000..ffccb3791
--- /dev/null
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SearchFile.java
@@ -0,0 +1,632 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+package org.scilab.modules.scinotes.utils;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+import java.util.regex.Pattern;
+
+import javax.swing.JComponent;
+import javax.swing.JScrollPane;
+import javax.swing.JTree;
+import javax.swing.KeyStroke;
+import javax.swing.SwingUtilities;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreePath;
+import javax.swing.tree.TreeSelectionModel;
+
+import org.flexdock.docking.event.DockingEvent;
+import org.scilab.modules.commons.ScilabCommons;
+import org.scilab.modules.commons.ScilabConstants;
+import org.scilab.modules.commons.xml.ScilabXMLUtilities;
+import org.scilab.modules.gui.bridge.menuitem.SwingScilabMenuItem;
+import org.scilab.modules.gui.bridge.tab.SwingScilabDockablePanel;
+import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
+import org.scilab.modules.gui.events.callback.CommonCallBack;
+import org.scilab.modules.gui.menu.Menu;
+import org.scilab.modules.gui.menu.ScilabMenu;
+import org.scilab.modules.gui.menubar.MenuBar;
+import org.scilab.modules.gui.menubar.ScilabMenuBar;
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.menuitem.ScilabMenuItem;
+import org.scilab.modules.gui.tab.SimpleTab;
+import org.scilab.modules.gui.tabfactory.ScilabTabFactory;
+import org.scilab.modules.gui.textbox.ScilabTextBox;
+import org.scilab.modules.gui.textbox.TextBox;
+import org.scilab.modules.gui.toolbar.ToolBar;
+import org.scilab.modules.gui.utils.ClosingOperationsManager;
+import org.scilab.modules.gui.utils.WindowsConfigurationManager;
+import org.scilab.modules.scinotes.SciNotes;
+import org.scilab.modules.scinotes.SciNotesGUI;
+import org.scilab.modules.scinotes.ScilabEditorPane;
+import org.scilab.modules.scinotes.SearchManager;
+import org.scilab.modules.scinotes.tabfactory.SearchInFilesTabFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Class SearchFile: open a window with a JTree to show the results of a search in files.
+ * @author Calixte DENIZET
+ */
+@SuppressWarnings(value = { "serial" })
+public class SearchFile extends SwingScilabDockablePanel {
+
+ public static final String SEARCHDONE = "SearchFile.SearchDone";
+
+ static {
+ ScilabTabFactory.getInstance().addTabFactory(SearchInFilesTabFactory.getInstance());
+ }
+
+ private SwingScilabWindow parentWindow;
+ private SciNotes editor;
+ private MyBackgroundSearch mySearch;
+ private JTree tree;
+
+ /**
+ * Default constructor
+ * @param editor the editor where to open a file
+ * @param uuid the tab uuid
+ */
+ public SearchFile(SciNotes editor, String uuid) {
+ super(SciNotesMessages.SEARCHINFILES, uuid == null ? UUID.randomUUID().toString() : uuid);
+ this.editor = editor;
+ editor.addSearchInFiles(this);
+ ConfigSciNotesManager.saveSearchInFilesState(editor.getPersistentId(), getPersistentId());
+ initTab();
+ restoreSearchFile();
+ WindowsConfigurationManager.restorationFinished(this);
+ }
+
+ /**
+ * Default constructor
+ * @param editor the editor where to open a file
+ */
+ public SearchFile(SciNotes editor) {
+ this(editor, null);
+ }
+
+ /**
+ * Set the parent window
+ */
+ public void setParentWindow() {
+ parentWindow = SwingScilabWindow.createWindow(true);
+ parentWindow.addTab(this);
+ parentWindow.setVisible(true);
+ }
+
+ /**
+ * Get the parent window for this tab
+ * @return the parent window
+ */
+ public SwingScilabWindow getParentWindow() {
+ return this.parentWindow;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SimpleTab getAsSimpleTab() {
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addInfoBar(TextBox infoBarToAdd) {
+ setInfoBar(infoBarToAdd);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addMenuBar(MenuBar menuBarToAdd) {
+ setMenuBar(menuBarToAdd);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addToolBar(ToolBar toolBarToAdd) {
+ setToolBar(toolBarToAdd);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dockingComplete(DockingEvent evt) {
+ super.dockingComplete(evt);
+ changeToolBar();
+ }
+
+ /**
+ * Try to add a SciNotes toolbar
+ */
+ public void changeToolBar() {
+ SwingScilabWindow win = (SwingScilabWindow) SwingUtilities.getAncestorOfClass(SwingScilabWindow.class, this);
+ Set<SwingScilabDockablePanel> set = win.getDockingPort().getDockables();
+ for (SwingScilabDockablePanel tab : set) {
+ if (tab == editor) {
+ addToolBar(editor.getToolBar());
+ break;
+ }
+ }
+ }
+
+ /**
+ * Close the current window
+ */
+ public void closeSearchInFiles() {
+ saveSearchFile();
+ editor.removeSearchInFiles();
+ editor = null;
+ parentWindow = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void undockingComplete(DockingEvent evt) {
+ super.undockingComplete(evt);
+ addToolBar(null);
+ }
+
+ /**
+ * Set a MyBackgroundSearch to this SearchFile
+ * @param search a MyBackgroundSearch
+ */
+ public void setMyBackgroundSearch(MyBackgroundSearch search) {
+ mySearch = search;
+ }
+
+ private void saveSearchFile() {
+ if (mySearch != null) {
+ try {
+ FileWriter fwriter = new FileWriter(ScilabConstants.SCIHOME.toString() + File.separator + getPersistentId() + ".xml");
+ BufferedWriter buffer = new BufferedWriter(fwriter);
+ buffer.append("<SearchResults editor=\"" + editor.getUUID() + "\"");
+ buffer.append(" base=\"" + mySearch.base + "\"");
+ buffer.append(" recursive=\"" + mySearch.recursive + "\"");
+ buffer.append(" ignoreCR=\"" + mySearch.ignoreCR + "\"");
+ buffer.append(" filePattern=\"" + ScilabXMLUtilities.getXMLString(mySearch.filePattern) + "\"");
+ buffer.append(" fileCaseSensitive=\"" + mySearch.fileCaseSensitive + "\"");
+ if (mySearch.wordPattern != null && !mySearch.wordPattern.isEmpty()) {
+ buffer.append(" wordPattern=\"" + ScilabXMLUtilities.getXMLString(mySearch.wordPattern) + "\"");
+ }
+ buffer.append(" wordCaseSensitive=\"" + mySearch.wordCaseSensitive + "\"");
+ buffer.append(" wholeWord=\"" + mySearch.wholeWord + "\"");
+ buffer.append(" regexp=\"" + mySearch.regexp + "\"");
+ buffer.append(">\n");
+ mySearch.getResults().toXML(buffer, 1);
+ buffer.append("</SearchResults>");
+ buffer.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private void restoreSearchFile() {
+ File f = new File(ScilabConstants.SCIHOME + File.separator + getPersistentId() + ".xml");
+ if (f.exists()) {
+ Document doc = ScilabXMLUtilities.readDocument(f.getAbsolutePath());
+ if (doc != null) {
+ Element root = doc.getDocumentElement();
+ NodeList list = root.getElementsByTagName("Position");
+ SearchManager.MatchingPositions pos;
+ if (list.getLength() != 0) {
+ pos = new SearchManager.MatchingPositions((Element) list.item(0));
+ } else {
+ return;
+ }
+
+ String base = root.getAttribute("base");
+ boolean recursive = Boolean.parseBoolean(root.getAttribute("recursive"));
+ boolean ignoreCR = Boolean.parseBoolean(root.getAttribute("ignoreCR"));
+ String filePattern = root.getAttribute("filePattern").replaceAll("&quot;", "\"");
+ boolean fileCaseSensitive = Boolean.parseBoolean(root.getAttribute("fileCaseSensitive"));
+ String wordPattern = root.getAttribute("filePattern").replaceAll("&quot;", "\"");
+ boolean wordCaseSensitive = Boolean.parseBoolean(root.getAttribute("wordCaseSensitive"));
+ boolean wholeWord = Boolean.parseBoolean(root.getAttribute("wholeWord"));
+ boolean regexp = Boolean.parseBoolean(root.getAttribute("regexp"));
+
+ fillTab(pos, base, recursive, ignoreCR, filePattern, fileCaseSensitive, wordPattern, wordCaseSensitive, wholeWord, regexp);
+ }
+ }
+ }
+
+ public void fillTab(SearchManager.MatchingPositions pos, String base, boolean recursive, boolean ignoreCR,
+ String filePattern, boolean fileCaseSensitive, String wordPattern,
+ boolean wordCaseSensitive, boolean wholeWord, boolean regexp) {
+ String title;
+
+ if (wordPattern == null || wordPattern.isEmpty()) {
+ title = SciNotesMessages.SEARCHFILES;
+ } else {
+ title = SciNotesMessages.SEARCHINFILES;
+ }
+
+ title += " " + SciNotesMessages.FILEPATTERN + ": " + filePattern;
+ title += ", " + SciNotesMessages.FILECASESENSITIVE + ": " + fileCaseSensitive;
+ title += ", " + SciNotesMessages.RECURSIVE + ": " + recursive;
+ if (wordPattern != null && !wordPattern.isEmpty()) {
+ title += ", " + SciNotesMessages.LINEBYLINE + ": " + !ignoreCR;
+ if (regexp) {
+ title += ", " + SciNotesMessages.REGEXPATTERN + ": " + wordPattern;
+ } else {
+ title += ", " + SciNotesMessages.WORD + ": " + wordPattern;
+ }
+ title += ", " + SciNotesMessages.WORDCASESENSITIVE + ": " + wordCaseSensitive;
+ title += ", " + SciNotesMessages.WHOLE_WORD + ": " + wholeWord;
+ }
+
+ tree = getJTree(pos, editor, getInfoBar(), base, recursive, ignoreCR, filePattern, fileCaseSensitive, wordPattern, wordCaseSensitive, wholeWord, regexp);
+
+ setTitle(title);
+ JScrollPane scrollpane = new JScrollPane();
+ setContentPane(scrollpane);
+ scrollpane.setViewportView(tree);
+ setVisible(true);
+ }
+
+ /**
+ * Initialize the tab
+ */
+ private void initTab() {
+ final TextBox infobar = ScilabTextBox.createTextBox();
+ setWindowIcon("system-search");
+ updateUI();
+
+ CommonCallBack callback = new CommonCallBack(null) {
+ @Override
+ public void callBack() {
+ ClosingOperationsManager.startClosingOperation((SwingScilabDockablePanel) SearchFile.this);
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ callBack();
+ }
+ };
+
+ setCallback(callback);
+ MenuBar menubar = ScilabMenuBar.createMenuBar();
+ Menu fileMenu = ScilabMenu.createMenu();
+ fileMenu.setText(SciNotesMessages.FILE);
+ fileMenu.setMnemonic('F');
+ MenuItem menu = ScilabMenuItem.createMenuItem();
+ menu.setCallback(callback);
+ ((SwingScilabMenuItem) menu.getAsSimpleMenuItem()).setAccelerator(SciNotes.getActionKeys().get("scinotes-exit"));
+ menu.setText(SciNotesMessages.EXIT);
+ fileMenu.add(menu);
+ menubar.add(fileMenu);
+
+ addMenuBar(menubar);
+ addInfoBar(infobar);
+
+ setPreferredSize(new Dimension(650, 250));
+ }
+
+ /**
+ * @return the JTree int this tab
+ */
+ public JTree getJTree() {
+ return tree;
+ }
+
+ /**
+ * Get a JTree with the results of a search
+ * @param editor the editor where to open a file
+ * @param statusbar if non null the status bar where to write file info
+ * @param base the base directory
+ * @param recursive, if true then a recursive search is made
+ * @param ignoreCR, if true then the read file is considered as one line and regex pattern can include \n
+ * @param filePattern the pattern to use to select the files. * is equivalent to .* and ? to .?
+ * @param fileCaseSensitive, if true then the file pattern is case sensitive
+ * @param wordPattern the pattern of the word to search
+ * @param wordCaseSensitive, if true then the word pattern is case sensitive
+ * @param wholeWord, if true only whole word will be matched, e.g. in "foobar foo bar", if the pattern is "foo", then only the second "foo" will be matched
+ * @param regexp, if true the word pattern is considered as a regex
+ * @return the corresponding JTree
+ */
+ public static JTree getJTree(SearchManager.MatchingPositions files, final SciNotes editor, final TextBox statusbar,
+ String base, boolean recursive, boolean ignoreCR,
+ String filePattern, boolean fileCaseSensitive,
+ String wordPattern, boolean wordCaseSensitive, boolean wholeWord, boolean regexp) {
+ if (files == null) {
+ List<SearchManager.MatchingPositions> list = new ArrayList<SearchManager.MatchingPositions>();
+ files = new SearchManager.MatchingPositions(new File(base).getAbsolutePath(), list);
+ files.setRoot();
+ }
+
+ Pattern word = null;
+ if (wordPattern != null && wordPattern.length() != 0) {
+ word = SearchManager.generatePattern(wordPattern, wordCaseSensitive, wholeWord, regexp);
+ }
+ final Pattern p = word;
+
+ files.setRoot();
+ final JTree tree = new JTree(files.toDefaultMutableTreeNode());
+ MouseListener ml = new MouseAdapter() {
+ @Override
+ public void mousePressed(MouseEvent e) {
+ int row = tree.getRowForLocation(e.getX(), e.getY());
+ if (row != -1) {
+ if (e.getClickCount() == 2) {
+ validNode(editor, p, tree.getPathForRow(row));
+ }
+ }
+ }
+ };
+ tree.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "toggle");
+ tree.addKeyListener(new KeyAdapter() {
+ public void keyTyped(KeyEvent e) {
+ if (e.getKeyChar() == '\n') {
+ int row = tree.getMinSelectionRow();
+ if (row != -1) {
+ validNode(editor, p, tree.getPathForRow(row));
+ }
+ }
+ }
+ });
+ tree.addMouseListener(ml);
+ DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer() {
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected,
+ boolean expanded, boolean leaf, int row, boolean hasFocus) {
+ super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
+ DefaultMutableTreeNode mtn = (DefaultMutableTreeNode) value;
+ SearchManager.Iconable pos = (SearchManager.Iconable) mtn.getUserObject();
+ this.setIcon(pos.getIcon());
+ return this;
+ }
+ };
+ if (statusbar != null) {
+ tree.addTreeSelectionListener(new TreeSelectionListener() {
+ @Override
+ public void valueChanged(TreeSelectionEvent e) {
+ TreePath path = e.getNewLeadSelectionPath();
+ Object userObj = ((DefaultMutableTreeNode) path.getLastPathComponent()).getUserObject();
+ if (userObj instanceof SearchManager.MatchingPositions) {
+ statusbar.setText(((SearchManager.MatchingPositions) userObj).getFileName());
+ } else if (userObj instanceof SearchManager.Line) {
+ userObj = ((DefaultMutableTreeNode) ((DefaultMutableTreeNode) path.getLastPathComponent()).getParent()).getUserObject();
+ statusbar.setText(((SearchManager.MatchingPositions) userObj).getFileName());
+ }
+ }
+ });
+ }
+ tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
+ tree.setCellRenderer(renderer);
+
+ return tree;
+ }
+
+ /**
+ * Display a window containing the results of the search.
+ * @param component the component which start the search. It is prevented that search is done via a firePropertyChange (SEARCHDONE).
+ * @param editor the editor where to open a file
+ * @param base the base directory
+ * @param recursive, if true then a recursive search is made
+ * @param ignoreCR, if true then the read file is considered as one line and regex pattern can include \n
+ * @param filePattern the pattern to use to select the files. * is equivalent to .* and ? to .?
+ * @param fileCaseSensitive, if true then the file pattern is case sensitive
+ * @param wordPattern the pattern of the word to search
+ * @param wordCaseSensitive, if true then the word pattern is case sensitive
+ * @param wholeWord, if true only whole word will be matched, e.g. in "foobar foo bar", if the pattern is "foo", then only the second "foo" will be matched
+ * @param regexp, if true the word pattern is considered as a regex
+ * @return a key, can be used to stop the search
+ */
+ public static Object getSearchResultsWindow(JComponent component, SciNotes editor, String base,
+ boolean recursive, boolean ignoreCR,
+ String filePattern, boolean fileCaseSensitive,
+ String wordPattern, boolean wordCaseSensitive, boolean wholeWord, boolean regexp) {
+ MyBackgroundSearch searcher = new MyBackgroundSearch(component, editor, base, recursive, ignoreCR, filePattern, fileCaseSensitive, wordPattern, wordCaseSensitive, wholeWord, regexp);
+ searcher.start();
+ return searcher;
+ }
+
+ /**
+ * Stop the current search
+ * @param searcher the key returned by getSearchResultsWindow
+ */
+ public static void stopSearch(Object searcher) {
+ if (searcher != null && (searcher instanceof MyBackgroundSearch)) {
+ ((MyBackgroundSearch) searcher).stop();
+ }
+ }
+
+ /**
+ * Stop the current search
+ * @param searcher the key returned by getSearchResultsWindow
+ */
+ public static boolean isDone(Object searcher) {
+ if (searcher != null && (searcher instanceof MyBackgroundSearch)) {
+ return ((MyBackgroundSearch) searcher).isDone();
+ }
+ return true;
+ }
+
+ /**
+ * If the user hits ENTER key or double-click on a node, the corresponding file is open in SciNotes.
+ * @param editor the editor where to open the file
+ * @param the word pattern used
+ * @param path the path of the node
+ */
+ private static void validNode(SciNotes editor, final Pattern pat, TreePath path) {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
+ Object userObj = node.getUserObject();
+ int lineNumber = -1;
+ String fileName = null;
+ boolean line = false;
+ if (userObj instanceof SearchManager.MatchingPositions) {
+ SearchManager.MatchingPositions pos = (SearchManager.MatchingPositions) userObj;
+ lineNumber = 0;
+ if (!pos.isDirectory()) {
+ fileName = pos.getFileName();
+ }
+ } else if (userObj instanceof SearchManager.Line) {
+ SearchManager.Line l = (SearchManager.Line) userObj;
+ lineNumber = l.getNumber();
+ fileName = ((SearchManager.MatchingPositions) ((DefaultMutableTreeNode) node.getParent()).getUserObject()).getFileName();
+ line = true;
+ }
+
+ if (fileName != null) {
+ final boolean fline = !line;
+ final int ln = lineNumber;
+ if (lineNumber != -1) {
+ editor.openFile(fileName, 0, null);
+ final ScilabEditorPane sep = editor.getTextPane();
+ if (sep.getName().equals(fileName)) {
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ sep.highlightWords(pat, fline);
+ if (ln != 0) {
+ sep.scrollTextToLineNumber(ln, false, false, true);
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+
+ /**
+ * Inner class to allow the make the search as a background task (with a SwingWorker).
+ * The task does not block SciNotes and can be killed by the user.
+ */
+ private static class MyBackgroundSearch extends SearchManager.BackgroundSearch {
+
+ SciNotes editor;
+ JComponent component;
+ String base;
+ boolean recursive;
+ boolean ignoreCR;
+ String filePattern;
+ boolean fileCaseSensitive;
+ String wordPattern;
+ boolean wordCaseSensitive;
+ boolean wholeWord;
+ boolean regexp;
+
+ /**
+ * Default constructor
+ * @param component the component which start the search. It is prevented that search is done via a firePropertyChange (SEARCHDONE).
+ * @param editor the editor where to open a file
+ * @param base the base directory
+ * @param recursive, if true then a recursive search is made
+ * @param ignoreCR, if true then the read file is considered as one line and regex pattern can include \n
+ * @param filePattern the pattern to use to select the files. * is equivalent to .* and ? to .?
+ * @param fileCaseSensitive, if true then the file pattern is case sensitive
+ * @param wordPattern the pattern of the word to search
+ * @param wordCaseSensitive, if true then the word pattern is case sensitive
+ * @param wholeWord, if true only whole word will be matched, e.g. in "foobar foo bar", if the pattern is "foo", then only the second "foo" will be matched
+ * @param regexp, if true the word pattern is considered as a regex
+ */
+ public MyBackgroundSearch(JComponent component, SciNotes editor, String base, boolean recursive, boolean ignoreCR,
+ String filePattern, boolean fileCaseSensitive,
+ String wordPattern, boolean wordCaseSensitive, boolean wholeWord, boolean regexp) {
+ super();
+ this.component = component;
+ this.editor = editor;
+ this.base = base;
+ this.recursive = recursive;
+ this.ignoreCR = ignoreCR;
+ this.filePattern = filePattern;
+ this.fileCaseSensitive = fileCaseSensitive;
+ this.wordPattern = wordPattern;
+ this.wordCaseSensitive = wordCaseSensitive;
+ this.wholeWord = wholeWord;
+ this.regexp = regexp;
+ }
+
+ /**
+ * Starts the search
+ */
+ synchronized public void start() {
+ SearchManager.searchInFiles(this, base, recursive, ignoreCR, filePattern, fileCaseSensitive, wordPattern, wordCaseSensitive, wholeWord, regexp);
+ }
+
+ /**
+ * Stop the search and fire a propertyChange
+ */
+ @Override
+ synchronized public void stop() {
+ super.stop();
+ if (component != null) {
+ component.firePropertyChange(SEARCHDONE, false, true);
+ }
+ }
+
+ /**
+ * Called when the results are available
+ */
+ @Override
+ synchronized public void done() {
+ SearchManager.MatchingPositions pos = getResults();
+ if (pos == null) {
+ if (component != null) {
+ component.firePropertyChange(SEARCHDONE, false, true);
+ }
+ return;
+ }
+
+ SearchFile searchFile = editor.getSearchInFiles();
+ final SearchFile sf;
+ if (searchFile == null) {
+ editor.addSearchInFiles();
+ sf = editor.getSearchInFiles();
+ } else {
+ sf = searchFile;
+ }
+
+ sf.fillTab(pos, base, recursive, ignoreCR, filePattern, fileCaseSensitive, wordPattern, wordCaseSensitive, wholeWord, regexp);
+ sf.setMyBackgroundSearch(this);
+
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ sf.getJTree().addSelectionRow(0);
+ sf.getJTree().requestFocus();
+ long time = getElapsedTime();
+
+ sf.getInfoBar().setText(String.format(SciNotesMessages.ELAPSEDTIME, ((double) time) / 1000));
+ }
+ });
+
+ if (component != null) {
+ component.firePropertyChange(SEARCHDONE, false, true);
+ }
+ }
+ }
+}
diff --git a/modules/scinotes/src/jni/.deps/.dirstamp b/modules/scinotes/src/jni/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/jni/.deps/.dirstamp
diff --git a/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-SciNotes.Plo b/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-SciNotes.Plo
new file mode 100755
index 000000000..ab65a4066
--- /dev/null
+++ b/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-SciNotes.Plo
@@ -0,0 +1,341 @@
+src/jni/libsciscinotes_algo_la-SciNotes.lo: src/jni/SciNotes.cpp \
+ /usr/include/stdc-predef.h src/jni/SciNotes.hxx \
+ /usr/include/c++/5/iostream \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \
+ /usr/include/c++/5/ostream /usr/include/c++/5/ios \
+ /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \
+ /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \
+ /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \
+ /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \
+ /usr/include/c++/5/bits/atomic_lockfree_defines.h \
+ /usr/include/c++/5/bits/char_traits.h \
+ /usr/include/c++/5/bits/stl_algobase.h \
+ /usr/include/c++/5/bits/functexcept.h \
+ /usr/include/c++/5/bits/exception_defines.h \
+ /usr/include/c++/5/bits/cpp_type_traits.h \
+ /usr/include/c++/5/ext/type_traits.h \
+ /usr/include/c++/5/ext/numeric_traits.h \
+ /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \
+ /usr/include/c++/5/bits/concept_check.h \
+ /usr/include/c++/5/bits/stl_iterator_base_types.h \
+ /usr/include/c++/5/bits/stl_iterator_base_funcs.h \
+ /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \
+ /usr/include/c++/5/bits/ptr_traits.h \
+ /usr/include/c++/5/bits/predefined_ops.h \
+ /usr/include/c++/5/bits/localefwd.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \
+ /usr/include/c++/5/clocale /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \
+ /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \
+ /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/bits/sched.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/timex.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
+ /usr/include/x86_64-linux-gnu/bits/setjmp.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \
+ /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \
+ /usr/include/c++/5/bits/allocator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \
+ /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \
+ /usr/include/c++/5/bits/ostream_insert.h \
+ /usr/include/c++/5/bits/cxxabi_forced.h \
+ /usr/include/c++/5/bits/stl_function.h \
+ /usr/include/c++/5/backward/binders.h \
+ /usr/include/c++/5/bits/range_access.h \
+ /usr/include/c++/5/bits/basic_string.h \
+ /usr/include/c++/5/ext/alloc_traits.h \
+ /usr/include/c++/5/bits/basic_string.tcc \
+ /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \
+ /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \
+ /usr/include/c++/5/bits/basic_ios.h \
+ /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \
+ /usr/include/wctype.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \
+ /usr/include/c++/5/bits/streambuf_iterator.h \
+ /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \
+ /usr/include/c++/5/bits/locale_facets.tcc \
+ /usr/include/c++/5/bits/basic_ios.tcc \
+ /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \
+ /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \
+ /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \
+ ../../modules/commons/src/jni/GiwsException.hxx
+
+/usr/include/stdc-predef.h:
+
+src/jni/SciNotes.hxx:
+
+/usr/include/c++/5/iostream:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h:
+
+/usr/include/c++/5/ostream:
+
+/usr/include/c++/5/ios:
+
+/usr/include/c++/5/iosfwd:
+
+/usr/include/c++/5/bits/stringfwd.h:
+
+/usr/include/c++/5/bits/memoryfwd.h:
+
+/usr/include/c++/5/bits/postypes.h:
+
+/usr/include/c++/5/cwchar:
+
+/usr/include/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/wchar2.h:
+
+/usr/include/c++/5/exception:
+
+/usr/include/c++/5/bits/atomic_lockfree_defines.h:
+
+/usr/include/c++/5/bits/char_traits.h:
+
+/usr/include/c++/5/bits/stl_algobase.h:
+
+/usr/include/c++/5/bits/functexcept.h:
+
+/usr/include/c++/5/bits/exception_defines.h:
+
+/usr/include/c++/5/bits/cpp_type_traits.h:
+
+/usr/include/c++/5/ext/type_traits.h:
+
+/usr/include/c++/5/ext/numeric_traits.h:
+
+/usr/include/c++/5/bits/stl_pair.h:
+
+/usr/include/c++/5/bits/move.h:
+
+/usr/include/c++/5/bits/concept_check.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_types.h:
+
+/usr/include/c++/5/bits/stl_iterator_base_funcs.h:
+
+/usr/include/c++/5/debug/debug.h:
+
+/usr/include/c++/5/bits/stl_iterator.h:
+
+/usr/include/c++/5/bits/ptr_traits.h:
+
+/usr/include/c++/5/bits/predefined_ops.h:
+
+/usr/include/c++/5/bits/localefwd.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:
+
+/usr/include/c++/5/clocale:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+/usr/include/c++/5/cctype:
+
+/usr/include/ctype.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/c++/5/bits/ios_base.h:
+
+/usr/include/c++/5/ext/atomicity.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:
+
+/usr/include/pthread.h:
+
+/usr/include/sched.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/sched.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/timex.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/x86_64-linux-gnu/bits/setjmp.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h:
+
+/usr/include/c++/5/bits/locale_classes.h:
+
+/usr/include/c++/5/string:
+
+/usr/include/c++/5/bits/allocator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:
+
+/usr/include/c++/5/ext/new_allocator.h:
+
+/usr/include/c++/5/new:
+
+/usr/include/c++/5/bits/ostream_insert.h:
+
+/usr/include/c++/5/bits/cxxabi_forced.h:
+
+/usr/include/c++/5/bits/stl_function.h:
+
+/usr/include/c++/5/backward/binders.h:
+
+/usr/include/c++/5/bits/range_access.h:
+
+/usr/include/c++/5/bits/basic_string.h:
+
+/usr/include/c++/5/ext/alloc_traits.h:
+
+/usr/include/c++/5/bits/basic_string.tcc:
+
+/usr/include/c++/5/bits/locale_classes.tcc:
+
+/usr/include/c++/5/stdexcept:
+
+/usr/include/c++/5/streambuf:
+
+/usr/include/c++/5/bits/streambuf.tcc:
+
+/usr/include/c++/5/bits/basic_ios.h:
+
+/usr/include/c++/5/bits/locale_facets.h:
+
+/usr/include/c++/5/cwctype:
+
+/usr/include/wctype.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h:
+
+/usr/include/c++/5/bits/streambuf_iterator.h:
+
+/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h:
+
+/usr/include/c++/5/bits/locale_facets.tcc:
+
+/usr/include/c++/5/bits/basic_ios.tcc:
+
+/usr/include/c++/5/bits/ostream.tcc:
+
+/usr/include/c++/5/istream:
+
+/usr/include/c++/5/bits/istream.tcc:
+
+/usr/include/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h:
+
+../../modules/commons/src/jni/GiwsException.hxx:
diff --git a/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo b/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo
new file mode 100755
index 000000000..e771b537b
--- /dev/null
+++ b/modules/scinotes/src/jni/.deps/libsciscinotes_algo_la-ScilabKeywords_wrap.Plo
@@ -0,0 +1,134 @@
+src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo: \
+ src/jni/ScilabKeywords_wrap.c /usr/include/stdc-predef.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/stdio.h \
+ /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \
+ /usr/include/x86_64-linux-gnu/bits/types.h \
+ /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
+ /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio.h \
+ /usr/include/x86_64-linux-gnu/bits/stdio2.h \
+ /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \
+ /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
+ /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/endian.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap.h \
+ /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
+ /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
+ /usr/include/x86_64-linux-gnu/sys/select.h \
+ /usr/include/x86_64-linux-gnu/bits/select.h \
+ /usr/include/x86_64-linux-gnu/bits/sigset.h \
+ /usr/include/x86_64-linux-gnu/bits/time.h \
+ /usr/include/x86_64-linux-gnu/bits/select2.h \
+ /usr/include/x86_64-linux-gnu/sys/sysmacros.h \
+ /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \
+ /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/string.h \
+ /usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
+ /usr/include/x86_64-linux-gnu/bits/string2.h \
+ /usr/include/x86_64-linux-gnu/bits/string3.h \
+ ../../modules/core/includes/MALLOC.h \
+ ../../modules/core/includes/sci_mem_alloc.h src/c/ScilabKeywords.h
+
+/usr/include/stdc-predef.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/x86_64-linux-gnu/bits/types.h:
+
+/usr/include/x86_64-linux-gnu/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
+
+/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdio2.h:
+
+/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitflags.h:
+
+/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/endian.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap.h:
+
+/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
+
+/usr/include/x86_64-linux-gnu/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/x86_64-linux-gnu/sys/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/select.h:
+
+/usr/include/x86_64-linux-gnu/bits/sigset.h:
+
+/usr/include/x86_64-linux-gnu/bits/time.h:
+
+/usr/include/x86_64-linux-gnu/bits/select2.h:
+
+/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
+
+/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
+
+/usr/include/x86_64-linux-gnu/bits/stdlib.h:
+
+/usr/include/string.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/x86_64-linux-gnu/bits/string.h:
+
+/usr/include/x86_64-linux-gnu/bits/string2.h:
+
+/usr/include/x86_64-linux-gnu/bits/string3.h:
+
+../../modules/core/includes/MALLOC.h:
+
+../../modules/core/includes/sci_mem_alloc.h:
+
+src/c/ScilabKeywords.h:
diff --git a/modules/scinotes/src/jni/.dirstamp b/modules/scinotes/src/jni/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/jni/.dirstamp
diff --git a/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-SciNotes.o b/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-SciNotes.o
new file mode 100755
index 000000000..c2fa947b9
--- /dev/null
+++ b/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-SciNotes.o
Binary files differ
diff --git a/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-ScilabKeywords_wrap.o b/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-ScilabKeywords_wrap.o
new file mode 100755
index 000000000..f13b87035
--- /dev/null
+++ b/modules/scinotes/src/jni/.libs/libsciscinotes_algo_la-ScilabKeywords_wrap.o
Binary files differ
diff --git a/modules/scinotes/src/jni/SciNotes.cpp b/modules/scinotes/src/jni/SciNotes.cpp
new file mode 100755
index 000000000..4aeb80ed9
--- /dev/null
+++ b/modules/scinotes/src/jni/SciNotes.cpp
@@ -0,0 +1,313 @@
+#include "SciNotes.hxx"
+/* Generated by GIWS (version 2.0.2) with command:
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/SciNotes.giws.xml
+*/
+/*
+
+This is generated code.
+
+This software is a computer program whose purpose is to hide the complexity
+of accessing Java objects/methods from C++ code.
+
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software. You can use,
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info".
+
+As a counterpart to the access to the source code and rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors have only limited
+liability.
+
+In this respect, the user's attention is drawn to the risks associated
+with loading, using, modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean that it is complicated to manipulate, and that also
+therefore means that it is reserved for developers and experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or
+data to be ensured and, more generally, to use and operate it in the
+same conditions as regards security.
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
+*/
+
+namespace org_scilab_modules_scinotes {
+
+ // Static declarations (if any)
+
+// Returns the current env
+
+JNIEnv * SciNotes::getCurrentEnv() {
+JNIEnv * curEnv = NULL;
+jint res=this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+if (res != JNI_OK) {
+throw GiwsException::JniException(getCurrentEnv());
+}
+return curEnv;
+}
+// Destructor
+
+SciNotes::~SciNotes() {
+JNIEnv * curEnv = NULL;
+this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+curEnv->DeleteGlobalRef(this->instance);
+curEnv->DeleteGlobalRef(this->instanceClass);
+curEnv->DeleteGlobalRef(this->stringArrayClass);}
+// Constructors
+SciNotes::SciNotes(JavaVM * jvm_) {
+jmethodID constructObject = NULL ;
+jobject localInstance ;
+jclass localClass ;
+
+const std::string construct="<init>";
+const std::string param="()V";
+jvm=jvm_;
+
+JNIEnv * curEnv = getCurrentEnv();
+
+localClass = curEnv->FindClass( this->className().c_str() ) ;
+if (localClass == NULL) {
+ throw GiwsException::JniClassNotFoundException(curEnv, this->className());
+}
+
+this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+
+/* localClass is not needed anymore */
+curEnv->DeleteLocalRef(localClass);
+
+if (this->instanceClass == NULL) {
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+
+
+constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ;
+if(constructObject == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+
+localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ;
+if(localInstance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+
+this->instance = curEnv->NewGlobalRef(localInstance) ;
+if(this->instance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+/* localInstance not needed anymore */
+curEnv->DeleteLocalRef(localInstance);
+
+ /* Methods ID set to NULL */
+voidscinotesID=NULL;
+voidscinotesjstringjava_lang_StringID=NULL;
+voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID=NULL;
+voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL;
+voidcloseSciNotesFromScilabID=NULL;
+
+
+}
+
+SciNotes::SciNotes(JavaVM * jvm_, jobject JObj) {
+ jvm=jvm_;
+
+ JNIEnv * curEnv = getCurrentEnv();
+
+jclass localClass = curEnv->GetObjectClass(JObj);
+ this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+ curEnv->DeleteLocalRef(localClass);
+
+ if (this->instanceClass == NULL) {
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+ }
+
+ this->instance = curEnv->NewGlobalRef(JObj) ;
+ if(this->instance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+ }
+ /* Methods ID set to NULL */
+ voidscinotesID=NULL;
+voidscinotesjstringjava_lang_StringID=NULL;
+voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID=NULL;
+voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL;
+voidcloseSciNotesFromScilabID=NULL;
+
+
+}
+
+// Generic methods
+
+void SciNotes::synchronize() {
+if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) {
+throw GiwsException::JniMonitorException(getCurrentEnv(), "SciNotes");
+}
+}
+
+void SciNotes::endSynchronize() {
+if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) {
+throw GiwsException::JniMonitorException(getCurrentEnv(), "SciNotes");
+}
+}
+// Method(s)
+
+void SciNotes::scinotes (JavaVM * jvm_){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidscinotesID = curEnv->GetStaticMethodID(cls, "scinotes", "()V" ) ;
+if (voidscinotesID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "scinotes");
+}
+
+ curEnv->CallStaticVoidMethod(cls, voidscinotesID );
+ if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
+void SciNotes::scinotes (JavaVM * jvm_, char const* fileName){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidscinotesjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "scinotes", "(Ljava/lang/String;)V" ) ;
+if (voidscinotesjstringjava_lang_StringID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "scinotes");
+}
+
+jstring fileName_ = curEnv->NewStringUTF( fileName );
+if (fileName != NULL && fileName_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+
+ curEnv->CallStaticVoidMethod(cls, voidscinotesjstringjava_lang_StringID ,fileName_);
+ curEnv->DeleteLocalRef(fileName_);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
+void SciNotes::scinotes (JavaVM * jvm_, char const* fileName, int lineNumber, char const* functionName){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "scinotes", "(Ljava/lang/String;ILjava/lang/String;)V" ) ;
+if (voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "scinotes");
+}
+
+jstring fileName_ = curEnv->NewStringUTF( fileName );
+if (fileName != NULL && fileName_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+
+jstring functionName_ = curEnv->NewStringUTF( functionName );
+if (functionName != NULL && functionName_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+
+ curEnv->CallStaticVoidMethod(cls, voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID ,fileName_, lineNumber, functionName_);
+ curEnv->DeleteLocalRef(fileName_);
+curEnv->DeleteLocalRef(functionName_);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
+void SciNotes::scinotes (JavaVM * jvm_, char const* fileName, char const* const* option, int optionSize){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "scinotes", "(Ljava/lang/String;[Ljava/lang/String;)V" ) ;
+if (voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "scinotes");
+}
+
+jstring fileName_ = curEnv->NewStringUTF( fileName );
+if (fileName != NULL && fileName_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+jclass stringArrayClass = curEnv->FindClass("java/lang/String");
+
+// create java array of strings.
+jobjectArray option_ = curEnv->NewObjectArray( optionSize, stringArrayClass, NULL);
+if (option_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+// convert each char * to java strings and fill the java array.
+for ( int i = 0; i < optionSize; i++)
+{
+jstring TempString = curEnv->NewStringUTF( option[i] );
+if (TempString == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
+
+curEnv->SetObjectArrayElement( option_, i, TempString);
+
+// avoid keeping reference on too many strings
+curEnv->DeleteLocalRef(TempString);
+}
+ curEnv->CallStaticVoidMethod(cls, voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID ,fileName_, option_);
+ curEnv->DeleteLocalRef(stringArrayClass);
+curEnv->DeleteLocalRef(fileName_);
+curEnv->DeleteLocalRef(option_);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
+void SciNotes::closeSciNotesFromScilab (JavaVM * jvm_){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = initClass(curEnv);
+if ( cls == NULL) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+
+static jmethodID voidcloseSciNotesFromScilabID = curEnv->GetStaticMethodID(cls, "closeSciNotesFromScilab", "()V" ) ;
+if (voidcloseSciNotesFromScilabID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "closeSciNotesFromScilab");
+}
+
+ curEnv->CallStaticVoidMethod(cls, voidcloseSciNotesFromScilabID );
+ if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
+}
+
+}
diff --git a/modules/scinotes/src/jni/SciNotes.giws.xml b/modules/scinotes/src/jni/SciNotes.giws.xml
new file mode 100755
index 000000000..1ffa0e667
--- /dev/null
+++ b/modules/scinotes/src/jni/SciNotes.giws.xml
@@ -0,0 +1,18 @@
+ <package name="org.scilab.modules.scinotes">
+ <object name="SciNotes">
+ <method name="scinotes" returnType="void" modifier="static"/>
+ <method name="scinotes" returnType="void" modifier="static">
+ <parameter name="fileName" type="String"/>
+ </method>
+ <method name="scinotes" returnType="void" modifier="static">
+ <parameter name="fileName" type="String"/>
+ <parameter name="lineNumber" type="int"/>
+ <parameter name="functionName" type="String"/>
+ </method>
+ <method name="scinotes" returnType="void" modifier="static">
+ <parameter name="fileName" type="String"/>
+ <parameter name="option" type="String[]"/>
+ </method>
+ <method name="closeSciNotesFromScilab" returnType="void" modifier="static"/>
+ </object>
+</package>
diff --git a/modules/scinotes/src/jni/SciNotes.hxx b/modules/scinotes/src/jni/SciNotes.hxx
new file mode 100755
index 000000000..27fc3f132
--- /dev/null
+++ b/modules/scinotes/src/jni/SciNotes.hxx
@@ -0,0 +1,191 @@
+/* Generated by GIWS (version 2.0.2) with command:
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/SciNotes.giws.xml
+*/
+/*
+
+This is generated code.
+
+This software is a computer program whose purpose is to hide the complexity
+of accessing Java objects/methods from C++ code.
+
+This software is governed by the CeCILL-B license under French law and
+abiding by the rules of distribution of free software. You can use,
+modify and/ or redistribute the software under the terms of the CeCILL-B
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info".
+
+As a counterpart to the access to the source code and rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors have only limited
+liability.
+
+In this respect, the user's attention is drawn to the risks associated
+with loading, using, modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean that it is complicated to manipulate, and that also
+therefore means that it is reserved for developers and experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or
+data to be ensured and, more generally, to use and operate it in the
+same conditions as regards security.
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL-B license and that you accept its terms.
+*/
+
+
+#ifndef __ORG_SCILAB_MODULES_SCINOTES_SCINOTES__
+#define __ORG_SCILAB_MODULES_SCINOTES_SCINOTES__
+#include <iostream>
+#include <string>
+#include <string.h>
+#include <stdlib.h>
+#include <jni.h>
+
+#include "GiwsException.hxx"
+
+ #if defined(_MSC_VER) /* Defined anyway with Visual */
+ #include <Windows.h>
+ #else
+ typedef signed char byte;
+ #endif
+
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+# if defined(STATIC_LINKED)
+# define GIWSEXPORT
+# else
+# define GIWSEXPORT __declspec(dllexport)
+# endif
+# else
+# if __GNUC__ >= 4
+# define GIWSEXPORT __attribute__ ((visibility ("default")))
+# else
+# define GIWSEXPORT
+# endif
+# endif
+#endif
+
+namespace org_scilab_modules_scinotes {
+class GIWSEXPORT SciNotes {
+
+private:
+JavaVM * jvm;
+
+protected:
+jmethodID voidscinotesID; // cache method id
+jmethodID voidscinotesjstringjava_lang_StringID; // cache method id
+jmethodID voidscinotesjstringjava_lang_Stringjintintjstringjava_lang_StringID; // cache method id
+jmethodID voidscinotesjstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID; // cache method id
+jclass stringArrayClass;
+jmethodID voidcloseSciNotesFromScilabID; // cache method id
+
+
+
+jobject instance;
+jclass instanceClass; // cache class
+
+
+// Caching (if any)
+
+
+/**
+* Get the environment matching to the current thread.
+*/
+virtual JNIEnv * getCurrentEnv();
+
+public:
+// Constructor
+/**
+* Create a wrapping of the object from a JNIEnv.
+* It will call the default constructor
+* @param JEnv_ the Java Env
+*/
+SciNotes(JavaVM * jvm_);
+
+/**
+* Create a wrapping of an already existing object from a JNIEnv.
+* The object must have already been instantiated
+* @param JEnv_ the Java Env
+* @param JObj the object
+*/
+SciNotes(JavaVM * jvm_, jobject JObj);
+
+
+/**
+* This is a fake constructor to avoid the constructor
+* chaining when dealing with extended giws classes
+*/
+#ifdef FAKEGIWSDATATYPE
+SciNotes(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
+#endif
+
+// Destructor
+~SciNotes();
+
+// Generic method
+// Synchronization methods
+/**
+* Enter monitor associated with the object.
+* Equivalent of creating a "synchronized(obj)" scope in Java.
+*/
+void synchronize();
+
+/**
+* Exit monitor associated with the object.
+* Equivalent of ending a "synchronized(obj)" scope.
+*/
+void endSynchronize();
+
+// Methods
+static void scinotes(JavaVM * jvm_);
+
+static void scinotes(JavaVM * jvm_, char const* fileName);
+
+static void scinotes(JavaVM * jvm_, char const* fileName, int lineNumber, char const* functionName);
+
+static void scinotes(JavaVM * jvm_, char const* fileName, char const* const* option, int optionSize);
+
+static void closeSciNotesFromScilab(JavaVM * jvm_);
+
+
+ /**
+ * Get class name to use for static methods
+ * @return class name to use for static methods
+ */
+
+ static const std::string className()
+ {
+ return "org/scilab/modules/scinotes/SciNotes";
+ }
+
+
+ /**
+ * Get class to use for static methods
+ * @return class to use for static methods
+ */
+
+ static jclass initClass(JNIEnv * curEnv)
+ {
+ static jclass cls = 0;
+
+ if (cls == 0)
+ {
+ jclass _cls = curEnv->FindClass(className().c_str());
+ if (_cls)
+ {
+ cls = static_cast<jclass>(curEnv->NewGlobalRef(_cls));
+ }
+ }
+
+ return cls;
+ }
+
+};
+
+
+}
+#endif
diff --git a/modules/scinotes/src/jni/ScilabKeywords.i b/modules/scinotes/src/jni/ScilabKeywords.i
new file mode 100755
index 000000000..6a20c6c26
--- /dev/null
+++ b/modules/scinotes/src/jni/ScilabKeywords.i
@@ -0,0 +1,108 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * Copyright (C) 2010 - Calixte DENIZET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/* ScilabKeywords.i */
+/**
+ * Windows: swig -java -package org.scilab.modules.scinotes -outdir ../java/org/scilab/modules/scinotes/ ScilabKeywords.i
+ * Other: Use the option --enable-build-swig to the configure
+ */
+%module ScilabKeywords
+
+%{
+#include "MALLOC.h"
+#include "ScilabKeywords.h"
+%}
+
+%include "../../../jvm/src/jni/scilab_typemaps.i"
+
+/* JavaDoc for ScilabKeywordsJNI class */
+%pragma(java) jniclassclassmodifiers=%{
+/* It is generated code. Disable checkstyle */
+//CHECKSTYLE:OFF
+ /**
+ * @author Allan CORNET - DIGITEO 2009
+ * @author Calixte DENIZET
+ */
+public class%}
+
+/* Constructor for ScilabKeywordsJNI class */
+%pragma(java) jniclasscode="
+ /**
+ * Constructor
+ */
+ protected ScilabKeywordsJNI() {
+ throw new UnsupportedOperationException();
+ }";
+
+/* static load of library */
+%pragma(java) jniclasscode=%{
+ static {
+ try {
+ System.loadLibrary("sciscinotes");
+ } catch (SecurityException e) {
+ System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
+ System.err.println(e.getLocalizedMessage());
+ e.printStackTrace(System.err);
+ } catch (UnsatisfiedLinkError e) {
+ if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
+ System.err.println("The native library scinotes does not exist or cannot be found.");
+ System.err.println(e.getLocalizedMessage());
+ e.printStackTrace(System.err);
+ }
+ }
+ }
+%}
+
+/* JavaDoc for ScilabKeywords class */
+%pragma(java) moduleclassmodifiers="
+ /**
+ * @author Allan CORNET - DIGITEO 2009
+ * @author Calixte DENIZET
+ */
+public class";
+
+/* Constructor for ScilabKeywords class */
+%pragma(java) modulecode="
+ /**
+ * Constructor
+ */
+ protected ScilabKeywords() {
+ throw new UnsupportedOperationException();
+ }";
+
+
+/* JavaDoc */
+%javamethodmodifiers GetVariablesName() "
+/**
+* get Variables Name
+* @return an array of chars
+*/
+public";
+char **GetVariablesName(void);
+
+/* JavaDoc */
+%javamethodmodifiers GetFunctionsName() "
+/**
+* get Functions Name
+* @return an array of chars
+*/
+public";
+char **GetFunctionsName(void);
+
+/* JavaDoc */
+%javamethodmodifiers GetMacrosName() "
+/**
+* get Macros Name
+* @return an array of chars
+*/
+public";
+char **GetMacrosName(void);
diff --git a/modules/scinotes/src/jni/ScilabKeywords_wrap.c b/modules/scinotes/src/jni/ScilabKeywords_wrap.c
new file mode 100755
index 000000000..b5eadd6d0
--- /dev/null
+++ b/modules/scinotes/src/jni/ScilabKeywords_wrap.c
@@ -0,0 +1,303 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * This file is not intended to be easily readable and contains a number of
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGJAVA
+
+/* -----------------------------------------------------------------------------
+ * This section contains generic SWIG labels for method/variable
+ * declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+# define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+# define SWIGINLINE inline
+# else
+# define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+# elif defined(__ICC)
+# define SWIGUNUSED __attribute__ ((__unused__))
+# else
+# define SWIGUNUSED
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+# pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+# define SWIGUNUSEDPARM(p)
+# else
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# ifndef GCC_HASCLASSVISIBILITY
+# define GCC_HASCLASSVISIBILITY
+# endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# if defined(STATIC_LINKED)
+# define SWIGEXPORT
+# else
+# define SWIGEXPORT __declspec(dllexport)
+# endif
+# else
+# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+# define SWIGEXPORT __attribute__ ((visibility("default")))
+# else
+# define SWIGEXPORT
+# endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+# define SWIGSTDCALL __stdcall
+# else
+# define SWIGSTDCALL
+# endif
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Fix for jlong on some versions of gcc on Windows */
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+ typedef long long __int64;
+#endif
+
+/* Fix for jlong on 64-bit x86 Solaris */
+#if defined(__x86_64)
+# ifdef _LP64
+# undef _LP64
+# endif
+#endif
+
+#include <jni.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* Support for throwing Java exceptions */
+typedef enum {
+ SWIG_JavaOutOfMemoryError = 1,
+ SWIG_JavaIOException,
+ SWIG_JavaRuntimeException,
+ SWIG_JavaIndexOutOfBoundsException,
+ SWIG_JavaArithmeticException,
+ SWIG_JavaIllegalArgumentException,
+ SWIG_JavaNullPointerException,
+ SWIG_JavaDirectorPureVirtual,
+ SWIG_JavaUnknownError
+} SWIG_JavaExceptionCodes;
+
+typedef struct {
+ SWIG_JavaExceptionCodes code;
+ const char *java_exception;
+} SWIG_JavaExceptions_t;
+
+
+static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
+ jclass excep;
+ static const SWIG_JavaExceptions_t java_exceptions[] = {
+ { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
+ { SWIG_JavaIOException, "java/io/IOException" },
+ { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
+ { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
+ { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
+ { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
+ { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
+ { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
+ { SWIG_JavaUnknownError, "java/lang/UnknownError" },
+ { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
+ };
+ const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
+
+ while (except_ptr->code != code && except_ptr->code)
+ except_ptr++;
+
+ (*jenv)->ExceptionClear(jenv);
+ excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
+ if (excep)
+ (*jenv)->ThrowNew(jenv, excep, msg);
+}
+
+
+/* Contract support */
+
+#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
+
+
+#include "MALLOC.h"
+#include "ScilabKeywords.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT jobjectArray JNICALL Java_org_scilab_modules_scinotes_ScilabKeywordsJNI_GetVariablesName(JNIEnv *jenv, jclass jcls) {
+ jobjectArray jresult = 0 ;
+ char **result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char **)GetVariablesName();
+ {
+ if (result != NULL)
+ {
+ int i;
+ int len=0;
+ jstring temp_string;
+ const jclass clazz = (*jenv)->FindClass(jenv, "java/lang/String");
+
+ while (result[len]) len++;
+ jresult = (*jenv)->NewObjectArray(jenv, len, clazz, NULL);
+ /* exception checking omitted */
+
+ for (i=0; i<len; i++) {
+ temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
+ (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
+ (*jenv)->DeleteLocalRef(jenv, temp_string);
+ FREE(result[i]);
+ result[i] = NULL;
+ }
+ FREE(result);
+ result = NULL;
+ }
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT jobjectArray JNICALL Java_org_scilab_modules_scinotes_ScilabKeywordsJNI_GetFunctionsName(JNIEnv *jenv, jclass jcls) {
+ jobjectArray jresult = 0 ;
+ char **result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char **)GetFunctionsName();
+ {
+ if (result != NULL)
+ {
+ int i;
+ int len=0;
+ jstring temp_string;
+ const jclass clazz = (*jenv)->FindClass(jenv, "java/lang/String");
+
+ while (result[len]) len++;
+ jresult = (*jenv)->NewObjectArray(jenv, len, clazz, NULL);
+ /* exception checking omitted */
+
+ for (i=0; i<len; i++) {
+ temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
+ (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
+ (*jenv)->DeleteLocalRef(jenv, temp_string);
+ FREE(result[i]);
+ result[i] = NULL;
+ }
+ FREE(result);
+ result = NULL;
+ }
+ }
+ return jresult;
+}
+
+
+SWIGEXPORT jobjectArray JNICALL Java_org_scilab_modules_scinotes_ScilabKeywordsJNI_GetMacrosName(JNIEnv *jenv, jclass jcls) {
+ jobjectArray jresult = 0 ;
+ char **result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char **)GetMacrosName();
+ {
+ if (result != NULL)
+ {
+ int i;
+ int len=0;
+ jstring temp_string;
+ const jclass clazz = (*jenv)->FindClass(jenv, "java/lang/String");
+
+ while (result[len]) len++;
+ jresult = (*jenv)->NewObjectArray(jenv, len, clazz, NULL);
+ /* exception checking omitted */
+
+ for (i=0; i<len; i++) {
+ temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
+ (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
+ (*jenv)->DeleteLocalRef(jenv, temp_string);
+ FREE(result[i]);
+ result[i] = NULL;
+ }
+ FREE(result);
+ result = NULL;
+ }
+ }
+ return jresult;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/modules/scinotes/src/jni/libsciscinotes_algo_la-SciNotes.lo b/modules/scinotes/src/jni/libsciscinotes_algo_la-SciNotes.lo
new file mode 100755
index 000000000..9d1db71d4
--- /dev/null
+++ b/modules/scinotes/src/jni/libsciscinotes_algo_la-SciNotes.lo
@@ -0,0 +1,12 @@
+# src/jni/libsciscinotes_algo_la-SciNotes.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_algo_la-SciNotes.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo b/modules/scinotes/src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo
new file mode 100755
index 000000000..614b6c93a
--- /dev/null
+++ b/modules/scinotes/src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo
@@ -0,0 +1,12 @@
+# src/jni/libsciscinotes_algo_la-ScilabKeywords_wrap.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_algo_la-ScilabKeywords_wrap.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/src/noscinotes/.deps/.dirstamp b/modules/scinotes/src/noscinotes/.deps/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/.deps/.dirstamp
diff --git a/modules/scinotes/src/noscinotes/.deps/libsciscinotes_disable_la-noscinotes.Plo b/modules/scinotes/src/noscinotes/.deps/libsciscinotes_disable_la-noscinotes.Plo
new file mode 100755
index 000000000..bddd4932b
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/.deps/libsciscinotes_disable_la-noscinotes.Plo
@@ -0,0 +1,57 @@
+src/noscinotes/libsciscinotes_disable_la-noscinotes.lo: \
+ src/noscinotes/noscinotes.c /usr/include/stdc-predef.h \
+ src/noscinotes/noscinotes.h \
+ ../../modules/output_stream/includes/Scierror.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \
+ ../../modules/output_stream/includes/do_error_number.h \
+ ../../modules/core/includes/machine.h \
+ ../../modules/localization/includes/localization.h \
+ /usr/include/libintl.h /usr/include/features.h \
+ /usr/include/x86_64-linux-gnu/sys/cdefs.h \
+ /usr/include/x86_64-linux-gnu/bits/wordsize.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs.h \
+ /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \
+ /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h \
+ ../../modules/core/includes/scilabmode.h \
+ ../../modules/core/includes/machine.h ../../modules/core/includes/BOOL.h
+
+/usr/include/stdc-predef.h:
+
+src/noscinotes/noscinotes.h:
+
+../../modules/output_stream/includes/Scierror.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h:
+
+../../modules/output_stream/includes/do_error_number.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/localization/includes/localization.h:
+
+/usr/include/libintl.h:
+
+/usr/include/features.h:
+
+/usr/include/x86_64-linux-gnu/sys/cdefs.h:
+
+/usr/include/x86_64-linux-gnu/bits/wordsize.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs.h:
+
+/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h:
+
+/usr/include/locale.h:
+
+/usr/include/x86_64-linux-gnu/bits/locale.h:
+
+/usr/include/xlocale.h:
+
+../../modules/core/includes/scilabmode.h:
+
+../../modules/core/includes/machine.h:
+
+../../modules/core/includes/BOOL.h:
diff --git a/modules/scinotes/src/noscinotes/.dirstamp b/modules/scinotes/src/noscinotes/.dirstamp
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/.dirstamp
diff --git a/modules/scinotes/src/noscinotes/.libs/libsciscinotes_disable_la-noscinotes.o b/modules/scinotes/src/noscinotes/.libs/libsciscinotes_disable_la-noscinotes.o
new file mode 100755
index 000000000..1b605f26d
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/.libs/libsciscinotes_disable_la-noscinotes.o
Binary files differ
diff --git a/modules/scinotes/src/noscinotes/libsciscinotes_disable_la-noscinotes.lo b/modules/scinotes/src/noscinotes/libsciscinotes_disable_la-noscinotes.lo
new file mode 100755
index 000000000..6e0d61653
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/libsciscinotes_disable_la-noscinotes.lo
@@ -0,0 +1,12 @@
+# src/noscinotes/libsciscinotes_disable_la-noscinotes.lo - a libtool object file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/libsciscinotes_disable_la-noscinotes.o'
+
+# Name of the non-PIC object
+non_pic_object=none
+
diff --git a/modules/scinotes/src/noscinotes/noscinotes.c b/modules/scinotes/src/noscinotes/noscinotes.c
new file mode 100755
index 000000000..5fdfeb88d
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/noscinotes.c
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#include "noscinotes.h"
+#include "Scierror.h"
+#include "localization.h"
+#include "scilabmode.h"
+/*--------------------------------------------------------------------------*/
+int gw_scinotes(void)
+{
+ if (getScilabMode() == SCILAB_NWNI)
+ {
+ Scierror(999, _("Scilab '%s' module disabled in -nogui or -nwni mode.\n"), "scinotes");
+ }
+ else
+ {
+ Scierror(999, _("Scilab '%s' module not installed.\n"), "scinotes");
+ }
+ return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/src/noscinotes/noscinotes.h b/modules/scinotes/src/noscinotes/noscinotes.h
new file mode 100755
index 000000000..e444d76db
--- /dev/null
+++ b/modules/scinotes/src/noscinotes/noscinotes.h
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+/**
+ * This function is a wrapper / fake when Scilab is compiled without scinotes
+ *
+ * @return 0
+ */
+int gw_scinotes(void);
+/*--------------------------------------------------------------------------*/
diff --git a/modules/scinotes/tests/benchmarks/is_binary_file.tst b/modules/scinotes/tests/benchmarks/is_binary_file.tst
new file mode 100755
index 000000000..fcdf6278c
--- /dev/null
+++ b/modules/scinotes/tests/benchmarks/is_binary_file.tst
@@ -0,0 +1,12 @@
+// ============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO
+//
+// This file is distributed under the same license as the Scilab package.
+// ============================================================================
+
+//==============================================================================
+// Benchmark for launching editor with a binary file
+//==============================================================================
+
+editor('SCI/modules/core/macros/add_demo.bin')
diff --git a/modules/scinotes/tests/nonreg_tests/bug_10354.tst b/modules/scinotes/tests/nonreg_tests/bug_10354.tst
new file mode 100755
index 000000000..799f1554a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_10354.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 10354 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/10354
+//
+// <-- Short Description -->
+// Bad caret position after action on selection
+
+mputl('Hello World', TMPDIR + '/bug_10354.sce')
+scinotes(TMPDIR + '/bug_10354.sce');
+
+// Select "Hello World" from left to right and CTRL+D, the caret must be at the end
+// Select "Hello World" from right to left and CTRL+D, the caret must be at the beginning \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_10868.tst b/modules/scinotes/tests/nonreg_tests/bug_10868.tst
new file mode 100755
index 000000000..72a1d3006
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_10868.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 10868 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/10868
+//
+// <-- Short Description -->
+//
+
+mputl('xtitle(""TITLE"", ""$LaTeXed a^b$"", ""y"")', TMPDIR + '/bug_10868.sce')
+scinotes(TMPDIR + '/bug_10868.sce');
+
+// Select the string and execute the selection with echo (CTRL+E)
+// The string should appear in the console and executed. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_11048.tst b/modules/scinotes/tests/nonreg_tests/bug_11048.tst
new file mode 100755
index 000000000..63b690bb8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_11048.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 11048 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/11048
+//
+// <-- Short Description -->
+//
+
+mputl('a=1', TMPDIR + '/bug_11048.sce')
+scinotes(TMPDIR + '/bug_11048.sce');
+
+// Put the caret before a
+// CTRL+D to comment
+// CTRL+SHIFT+D to uncomment
+// Move the caret after =
+// CTRL+D to comment
+// CTRL+SHIFT+D to uncomment
diff --git a/modules/scinotes/tests/nonreg_tests/bug_11423.tst b/modules/scinotes/tests/nonreg_tests/bug_11423.tst
new file mode 100755
index 000000000..1dc11f8d0
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_11423.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 11423 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/11423
+//
+// <-- Short Description -->
+// When select the variable "a" all the a are highlighted rather than only the
+// variable "a"
+
+mputl(['function s=foo(a)', 'a=type(a)', 's=''scilab type'''], TMPDIR + '/bug_11423.sce')
+scinotes(TMPDIR + '/bug_11423.sce');
+
+// Select the variable "a", the a in scilab must not be highlighted
+// Select the function type, the type in the string must not be highlighted. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_12439.dia.ref b/modules/scinotes/tests/nonreg_tests/bug_12439.dia.ref
new file mode 100755
index 000000000..84b599a7d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_12439.dia.ref
@@ -0,0 +1,18 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Paul Bignier
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 12439 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/12439
+//
+// <-- Short Description -->
+// edit_error returned a wrong message when there was no last recorded error.
+refMsg = _("There is no recorded error");
+assert_checkequal(edit_error(), refMsg);
diff --git a/modules/scinotes/tests/nonreg_tests/bug_12439.tst b/modules/scinotes/tests/nonreg_tests/bug_12439.tst
new file mode 100755
index 000000000..c2313b897
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_12439.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Paul Bignier
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 12439 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/12439
+//
+// <-- Short Description -->
+// edit_error returned a wrong message when there was no last recorded error.
+
+refMsg = _("There is no recorded error");
+
+assert_checkequal(edit_error(), refMsg);
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4054.tst b/modules/scinotes/tests/nonreg_tests/bug_4054.tst
new file mode 100755
index 000000000..29c6541a9
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4054.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4054 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4054
+//
+// <-- Short Description -->
+// load into scilab a file with editor can crash scilab
+
+
+// editor SCI/modules/scinotes/tests/nonreg_tests/bug_4054_testfile.sce
+// launch in menu 'Execute' --> 'Load into Scilab'
+// select all and
+// launch in menu 'Execute' --> 'Evaluate Selection'
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4054_testfile.sce b/modules/scinotes/tests/nonreg_tests/bug_4054_testfile.sce
new file mode 100755
index 000000000..7eef12348
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4054_testfile.sce
@@ -0,0 +1,132 @@
+clear
+close
+clc
+
+dt = 0.01;
+tf = 10;
+t = [0:dt:tf];
+
+x = t;
+y = ones(1,length(t));
+psi = zeros(1,length(t));
+v = ones(1,length(t));
+r = zeros(1,length(t));
+
+Obsx = tf + 1;
+Obsy = 0;
+L = 2;
+theta = 1/L;
+
+thetahat(1) = 1/2.25;
+Gamma = 1000;
+c = 100;
+
+
+G = 10;
+Am = -1*eye(2,2);
+Q = -2*eye(2,2);
+P = lyap(Am,Q,"c");
+
+for j = 1:length(t) - 1
+ //Actual measurements
+ z(j) = sqrt((Obsx - x(j))^2 + (Obsy - y(j))^2);
+ zx(j) = (Obsx - x(j));
+ zy(j) = (Obsy - y(j));
+
+ Beta(j) = psi(j) - atan(zy(j)/zx(j));
+ //Beta(l,k) = beta(l,k)*(1 + 0.005*randn);
+
+ // if j ~= 1 && Obsx - x(j) < 0
+ // Beta(j) = Beta(j) + pi;
+ // end
+
+ alpha(j) = 2*atan(L/z(j));
+ //alpha(l,k) = alpha(l,k)*(1 + 0.005*randn);
+ f1(j) = 2*v(j)*(sin(alpha(j)/2))^2*cos(Beta(j));
+ f2(j) = v(j)*tan(alpha(j)/2)*sin(Beta(j));
+
+ //Estimator initial conditions
+ Xhat(:,1) = [alpha(1); Beta(1)];
+ Phih1(1) = thetahat(1)*f1(1);
+ Phih2(1) = thetahat(1)*f2(1);
+ Phie1(1) = Phih1(1);
+ Phie2(1) = Phih2(1);
+
+ //IBO Estimator
+ thetahatdot = -1*G^2*[f1(j) f2(j)]*P*[Xhat(:,j) - [alpha(j); Beta(j)]] + 0;
+ Xhatdot = G*Am*[Xhat(:,j) - [alpha(j); Beta(j)]] + [f1(j); f2(j)]*thetahat(j) + [0;r(j)];
+
+ thetahat(j+1) = thetahat(j) + thetahatdot*dt;
+ Xhat(:,j+1) = Xhat(:,j) + Xhatdot*dt;
+
+ if thetahat(j) <= 0.01
+ thetahat(j) = 0.01;
+ elseif thetahat(j) >= 2
+ thetahat(j) = 2;
+ end
+
+ Lhat(j) = 1/thetahat(j);
+ zhat(j) = Lhat(j)/tan(alpha(j)/2);
+
+ // Fast estimator
+ alphah(1) = alpha(1);
+ Betah(1) = Beta(1);
+
+ alphahdot = Am(1,:)*[alphah(j) - alpha(j); Betah(j) - Beta(j)] + 0 + Phih1(j);
+ Betahdot = Am(2,:)*[alphah(j) - alpha(j); Betah(j) - Beta(j)] + r(j) + Phih2(j);
+ alphah(j+1) = alphah(j) + alphahdot*dt;
+ Betah(j+1) = Betah(j) + Betahdot*dt;
+
+ Y = -P*[alphah(j) - alpha(j); Betah(j) - Beta(j)];
+ Phihdot = Gamma*Y;
+
+ Phih1(j+1) = Phih1(j) + Phihdot(1)*dt;
+ Phih2(j+1) = Phih2(j) + Phihdot(2)*dt;
+ Phiedot = c*[Phih1(j) - Phie1(j); Phih2(j) - Phie2(j)];
+
+ Phie1(j+1) = Phie1(j) + Phiedot(1)*dt;
+ Phie2(j+1) = Phie2(j) + Phiedot(2)*dt;
+
+ thetahatF(j) = sqrt((Phie1(j)^2 + Phie2(j)^2)/(f1(j)^2 + f2(j)^2));
+
+ if thetahatF(j) <= 0.01
+ thetahatF(j) = 0.01;
+ elseif thetahatF(j) >= 2
+ thetahatF(j) = 2;
+ end
+ LhatF(j) = 1/thetahatF(j);
+ zhatF(j) = LhatF(j)/tan(alpha(j)/2);
+
+
+end
+z(length(t)) = z(length(zhat));
+zhat(length(t)) = zhat(length(zhat));
+Lhat(length(t)) = Lhat(length(Lhat));
+zhatF(length(t)) = zhatF(length(zhatF));
+LhatF(length(t)) = LhatF(length(LhatF));
+
+subplot(2,1,1)
+plot(t,L + 0*t,t,Lhat,"r--",t,LhatF,"g","linewidth",3)
+xlabel("time, t in sec")
+
+ylabel("L in m")
+xgrid
+
+subplot(2,1,2)
+plot(t,z,"c",t,zhat,"g--",,t,zhatF,"m-.","linewidth",3)
+xlabel("time, t in sec")
+ylabel("z(t) in m")
+xgrid
+
+alpha(length(t)) = alpha(length(alpha));
+Beta(length(t)) = Beta(length(Beta));
+alphah(length(t)) = alphah(length(alphah));
+Betah(length(t)) = Betah(length(Betah));
+
+pi = 3.14159;
+figure
+plot(t,alpha*180/pi,t,Beta*180/pi,"r",t,Xhat(1,:)*180/pi,"c--",t,Xhat(2,:)*180/pi,"m--",t,alphah*180/pi,"y:",t,Betah*180/pi,"g:","linewidth",3)
+xgrid
+xlabel("time, t in sec")
+ylabel("degrees")
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4399.tst b/modules/scinotes/tests/nonreg_tests/bug_4399.tst
new file mode 100755
index 000000000..2f1aa34d8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4399.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4399 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/4399
+//
+// <-- Short Description -->
+// It was not possible to distinguish lines from inner functions and from normal functions
+
+tmpfile = TMPDIR + "/bug_4399.sce";
+mputl(["a" "function foo()" "b" "c" "function bar()" "a" "b" "c" "endfunction" "d" "e" "endfunction"], tmpfile);
+scinotes(tmpfile);
+
+// Change the line numbering to be in whereami mode
+// You must see two differents colors to distinguish lines from foo() and from bar() \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4780.tst b/modules/scinotes/tests/nonreg_tests/bug_4780.tst
new file mode 100755
index 000000000..b710ea406
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4780.tst
@@ -0,0 +1,34 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4780 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4780
+//
+// <-- Short Description -->
+// The insertion point goes to the end of the document at each newly entered char.
+// Once unchecked The Document/Colorize menu item is impossible to check again.
+// If there is no selected line and one execute the Execute/EvaluateSelection menu a java exeception is reported.
+
+editor()
+
+// In colorize and autoindent mode and an empty new document
+// if one first writes:
+// for k=1:3
+// a=k
+// end
+// Now try to append a line after the instruction a=k
+
+// Menu : Document -> Colorize
+// No more check option for Colorize instruction
+
+// Menu : Execute -> EvaluateSelection
+// Without selecting any line
+// With selecting line(s)
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4859.tst b/modules/scinotes/tests/nonreg_tests/bug_4859.tst
new file mode 100755
index 000000000..34e676401
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4859.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+// <-- MACOSX ONLY -->
+//
+// <-- Non-regression test for bug 4859 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4859
+//
+// <-- Short Description -->
+// SciNotes default font is not fixed under MacOSX.
+
+// Launch editor
+// Check the default font is Monospaced
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4861.tst b/modules/scinotes/tests/nonreg_tests/bug_4861.tst
new file mode 100755
index 000000000..a26efc21a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4861.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4861 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4861
+//
+// <-- Short Description -->
+// Replace All in Scilab editor should preserve caret position
+
+// scinotes("SCI/etc/scilab.start")
+
+// Wait for end of file loading
+
+// perform "Replace All" on a string that is not is the document
+
+// ensure that the document is not marked as changed.
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4862.tst b/modules/scinotes/tests/nonreg_tests/bug_4862.tst
new file mode 100755
index 000000000..933f6ff97
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4862.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan.Simon@scilab.org
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4862 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4862
+//
+// <-- Short Description -->
+// The "Scilab editor" query-replace window is not closed when closing scilab editor.
+
+//editor()
+//<ctlr + f>
+//Menu : File -> Quit
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4863.tst b/modules/scinotes/tests/nonreg_tests/bug_4863.tst
new file mode 100755
index 000000000..378559cf4
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4863.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4863 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4863
+//
+// <-- Short Description -->
+// If there is no more action to undo, Ctrl+Z delete lines after lines at end of the file.
+
+
+editor SCI/modules/atoms/macros/atomsInstall.sci
+// <CTRL+Z>
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4864.tst b/modules/scinotes/tests/nonreg_tests/bug_4864.tst
new file mode 100755
index 000000000..6c557d00f
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4864.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4864 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4864
+//
+// <-- Short Description -->
+// Ctrl-z should remove "modifed flag" when undoing the last (in fact first) modification
+
+// scinotes(SCI/modules/scinotes/tests/nonreg_tests/scinotes_indent_test.sci)
+
+// Do some modifications (insert/deletions)
+
+// Undo them with Ctrl-z
+
+
+// Ensure that the tab name is not prefixed by a "*" anymore
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4867.tst b/modules/scinotes/tests/nonreg_tests/bug_4867.tst
new file mode 100755
index 000000000..9ca530fed
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4867.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4867 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4867
+//
+// <-- Short Description -->
+// Close the last opened file should close SciNotes or create a blank file named "untitled xx".
+
+// editor()
+
+// close the last file (CTRL-W)
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4868.tst b/modules/scinotes/tests/nonreg_tests/bug_4868.tst
new file mode 100755
index 000000000..656f9cd98
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4868.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4868 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4868
+//
+// <-- Short Description -->
+// editor() deletes blanks lines when commenting region
+
+editor()
+
+//Type :
+// "comment 1"
+// ""
+// "comment 2"
+//
+//
+// Select the previous text
+//
+// <CTRL+D>
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4869.tst b/modules/scinotes/tests/nonreg_tests/bug_4869.tst
new file mode 100755
index 000000000..31bfda1c8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4869.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4869 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4869
+//
+// <-- Short Description -->
+// "Save As" windows is titled "Save"
+
+// editor
+// File -> Save As...
+// Check that the dialog title is "Save As..." \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4870.tst b/modules/scinotes/tests/nonreg_tests/bug_4870.tst
new file mode 100755
index 000000000..14815fc77
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4870.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4870 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4870
+//
+// <-- Short Description -->
+// In my mind, the comment/uncomment shortcut should be changed.
+// CTRL+T is more and more used as "open a new tab" (exemple: Firefox or Internet Explorer)
+// selected, if the edition zone is focused, "Menu→Edit→Comment Region" should comment
+
+editor()
+// <CTRL+D>
+// <CTRL+SHIFT+D>
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4871.tst b/modules/scinotes/tests/nonreg_tests/bug_4871.tst
new file mode 100755
index 000000000..00a9bbfbb
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4871.tst
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4871 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4871
+//
+// <-- Short Description -->
+// If SciNotes edition zone is not focused (just after starting SciNotes for example), "Menu->Edit->Paste" pastes
+// strings into the scilab console.
+
+// Copy a string
+
+editor()
+// Don't focus the edition zone
+// menu -> Edit -> Paste
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4872.tst b/modules/scinotes/tests/nonreg_tests/bug_4872.tst
new file mode 100755
index 000000000..598d367c2
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4872.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4872 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4872
+//
+// <-- Short Description -->
+// editor(<binary file>) opens a blank file without any warning.
+
+
+editor('SCI/modules/core/macros/add_demo.bin')
+
+// A warning message is now added when a binary file is opened
+
+// For now we have decided to do not show a warning message
+// due to binary file detection problems
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4873.tst b/modules/scinotes/tests/nonreg_tests/bug_4873.tst
new file mode 100755
index 000000000..ca4b8fb94
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4873.tst
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4873 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4873
+//
+// <-- Short Description -->
+// ""undo" doesn't work if the last action affects several lines.
+
+
+editor()
+// Select several lines
+// <ctlr+T>
+// <ctlr+Z>
+
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4874.tst b/modules/scinotes/tests/nonreg_tests/bug_4874.tst
new file mode 100755
index 000000000..1fddf01d0
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4874.tst
@@ -0,0 +1,31 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4874 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4874
+//
+// <-- Short Description -->
+// "query-replace" insert unwanted spaces in the middle of lines that have nothing to do with the searched pattern.
+
+
+editor SCI/modules/atoms/macros/atomsInstall.sci
+// <ctrl+F>
+// Find : result
+// Replace : result10
+// See the line before last
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4875.tst b/modules/scinotes/tests/nonreg_tests/bug_4875.tst
new file mode 100755
index 000000000..e16883274
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4875.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4875 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4875
+//
+// <-- Short Description -->
+// Replace All in Scilab editor should preserve caret position
+
+// scinotes("SCI/etc/scilab.start")
+
+// Wait for end of file loading
+
+// perform "Replace All"
+
+// ensure caret is still at the same position
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4876.tst b/modules/scinotes/tests/nonreg_tests/bug_4876.tst
new file mode 100755
index 000000000..8295b935a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4876.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan.Simon@scilab.org
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4876 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4876
+//
+// <-- Short Description -->
+// The cancel button of the "Goto Line" window doesn't work. The original position is forgotten.
+
+editor SCI/modules/atoms/macros/atomsInstall.sci
+<ctlr+G>
+// Enter a line number, it doesn't matter what.
+// Press the cancel buttonm, it doesn't return to original position
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4877.tst b/modules/scinotes/tests/nonreg_tests/bug_4877.tst
new file mode 100755
index 000000000..56d45334f
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4877.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4877 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4877
+//
+// <-- Short Description -->
+// When commenting several lines :
+// Even if the first one isn't completely selected, the comment should be added at the begginning of it.
+
+editor SCI/modules/atoms/macros/atomsInstall.sci
+// Put the cursor in the middle of a line
+// Select several lines
+// <Ctlr+D>
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4878.tst b/modules/scinotes/tests/nonreg_tests/bug_4878.tst
new file mode 100755
index 000000000..c945e6c34
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4878.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4878 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4878
+//
+// <-- Short Description -->
+// If a line starts with a comment, "Menu→Edit→Comment Selection" uncomment it.
+//
+// A contrario, "Menu→Edit→Uncomment Selection" with a line not commented add a comment.
+//
+// => These commands should be totally splitted : "Menu→Edit→Comment Selection" should only comment and "Menu→Edit→Uncomment Selection" should only uncomment.
+// => These commands should not have the same shortcut.
+// => "Menu→Edit→Comment Selection" should add a second "//" even if the line is already commented.
+
+editor()
+// Type the following line : "// A comment"
+// Select it
+// Menu→Edit→Comment Selection
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4879.tst b/modules/scinotes/tests/nonreg_tests/bug_4879.tst
new file mode 100755
index 000000000..70794a905
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4879.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4879 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4879
+//
+// <-- Short Description -->
+// Even if no text is selected, if the edition zone is focused, "Menu→Edit→Comment Region" should comment
+// the current line.
+
+editor()
+// Type some Scilab code
+// Put the cursor wherever you want
+// "Menu→Edit→Comment Region"
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4880.tst b/modules/scinotes/tests/nonreg_tests/bug_4880.tst
new file mode 100755
index 000000000..fabc1abb8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4880.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan.Simon@scilab.org
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4880 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4880
+//
+// <-- Short Description -->
+// regular expressions with "^" and "$" match only one expression
+
+// editor()
+// add several line with "aa bb"
+// "Menu→Search→Find/Replace"
+// Find : "^aa"
+// => should hilight all the aa
+
+
+editor SCI/modules/atoms/macros/atomsSearch.sci
+// "Menu→Search→Find/Replace"
+// Find : "atom(.)*earch"
+// Replace : "------"
+// Check the "Regular expressions" box
+// Click on Replace All
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4881.tst b/modules/scinotes/tests/nonreg_tests/bug_4881.tst
new file mode 100755
index 000000000..6f82d01fa
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4881.tst
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan.Simon@scilab.org
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4881 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4881
+//
+// <-- Short Description -->
+// In the "Menu→Search→find/replace" dialog window, check the radio box "Selected lines" has no effect : The whole file is always processed.
+
+editor (SCI/modules/atoms/macros/atomsInstall.sci)
+
+//"Menu→Search→Find/Replace"
+//Find : " "
+//Replace : ""
+//Check the "Selected lines" box
+//Select the 3 first lines
+
+//Press the button "Replace All"
+
+//=> All spaces are erased.
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4883.tst b/modules/scinotes/tests/nonreg_tests/bug_4883.tst
new file mode 100755
index 000000000..7f2832670
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4883.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan SIMON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4883 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4883
+//
+// <-- Short Description -->
+// "Menu→Document→Auto Indent" preference is not saved.
+
+
+//scinotes()
+//uncheck "Menu→Document→Auto Indent"
+//close scinotes
+//scinotes()
+//=> "Menu→Document→Auto Indent" should stay unchecked
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4884.tst b/modules/scinotes/tests/nonreg_tests/bug_4884.tst
new file mode 100755
index 000000000..d95cbb97a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4884.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4884 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4884
+//
+// <-- Short Description -->
+// SciNotes should preserve end of line (\n \r\n or \n)
+
+// for f=["scinotes_dos_eol.sci","scinotes_macosx_eol.sci","scinotes_linux_eol.sci"], scinotes("SCI/modules/scinotes/tests/nonreg_tests/"+f),end;
+
+// Wait for end of files loading
+
+// Save files
+
+// check that they did not change (same md5sum)
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4885.tst b/modules/scinotes/tests/nonreg_tests/bug_4885.tst
new file mode 100755
index 000000000..6f6565d0d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4885.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4885 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4885
+//
+// <-- Short Description -->
+// Undo / redo of comment line should be done in one step
+
+//scinotes()
+//Type "A comment"
+//Select the line
+//"Menu→Edit→Comment Region"
+//"Menu→Edit→Undo"
+
+//=> The line is back to its original state
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4887.tst b/modules/scinotes/tests/nonreg_tests/bug_4887.tst
new file mode 100755
index 000000000..8cdaf5519
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4887.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - INRIA - Allan.Simon@scilab.org
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 4592 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4887
+//
+// <-- Short Description -->
+// remove configuration.xml , make scinotes launch exception while trying to open file
+
+//rm -rf ~/.Scilab
+//editor()
+//
+//Menu : File -> Open
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4888.tst b/modules/scinotes/tests/nonreg_tests/bug_4888.tst
new file mode 100755
index 000000000..7dae47572
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4888.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4888 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4888
+//
+// <-- Short Description -->
+// SciNotes deletes selected lines when typing <tab>. It should add a tab at the beginning of each selected lines instead.
+
+// editor SCI/modules/atoms/macros/atomsInstall.sci
+// Select the 3 first line
+// <tab>
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4891.tst b/modules/scinotes/tests/nonreg_tests/bug_4891.tst
new file mode 100755
index 000000000..801162688
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4891.tst
@@ -0,0 +1,33 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4891 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4891
+//
+// <-- Short Description -->
+// Warn when we would be saving on a file that has been modified on disk
+
+// scinotes()
+
+// Save empty document in a file.
+
+// touch the file
+
+// Save again
+
+// Ensure that there is a warning
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4892.tst b/modules/scinotes/tests/nonreg_tests/bug_4892.tst
new file mode 100755
index 000000000..031e5026a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4892.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4892 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4892
+//
+// <-- Short Description -->
+// scilab editor under MacOSX :
+//
+// Shortcuts are not managed at all. They should use the Command key ("Apple key").
+//
+// For example :
+//
+// Command-C Copy selected item/text
+// Command-N New file
+//
+// etc.
+
+
+editor()
+// Just type Command+N
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4894.tst b/modules/scinotes/tests/nonreg_tests/bug_4894.tst
new file mode 100755
index 000000000..78e9330b4
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4894.tst
@@ -0,0 +1,35 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4894 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4894
+//
+// <-- Short Description -->
+// SciNotes should detect when the same file is opened twice.
+
+// scinotes("SCI/etc/scilab.start")
+
+// Wait for end of file loading
+
+// scinotes("SCI/etc/scilab.quit")
+
+// Wait for end of file loading
+
+// scinotes("SCI/etc/scilab.start")
+
+// Wait for end of file loading
+
+// Check that current tab in named "scilab.start"
+// Check that scilab.start is opened just once
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4895.tst b/modules/scinotes/tests/nonreg_tests/bug_4895.tst
new file mode 100755
index 000000000..325192a89
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4895.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4895 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4895
+//
+// <-- Short Description -->
+// Options set in "File"->"Page Setup..." are reset when opening de "Page Setup..." dialog (previously set options are lost).
+
+// Open Editor
+// Change some options from "File/Page Setup..." dialog.
+// Open again "File/Page Setup..." dialog: the options must have been kept.
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4903.tst b/modules/scinotes/tests/nonreg_tests/bug_4903.tst
new file mode 100755
index 000000000..a5805c4ac
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4903.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4903 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4903
+//
+// <-- Short Description -->
+// In SciNotes, closing the last tab + another closing tab action generates an exception in the console.
+
+// editor()
+
+// close the last file (CTRL-W) + another fils close action
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4911.tst b/modules/scinotes/tests/nonreg_tests/bug_4911.tst
new file mode 100755
index 000000000..a214db324
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4911.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4911 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4911
+//
+// <-- Short Description -->
+// Update the title of the Scilab editor window when saving
+
+// scinotes()
+
+// Save empty document in a file.
+
+// Ensure that the title of the editor window is up to date.
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4955.tst b/modules/scinotes/tests/nonreg_tests/bug_4955.tst
new file mode 100755
index 000000000..fbc0e0a71
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4955.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4955 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4955
+//
+// <-- Short Description -->
+// Ctrl-i should indent
+
+// scinotes(SCI/modules/scinotes/tests/nonreg_tests/scinotes_indent_test.sci)
+
+// Select all with Ctrl-a
+
+// Indent selection with Ctrl-i
+
+
+// Ensure that the program is indented
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4989.tst b/modules/scinotes/tests/nonreg_tests/bug_4989.tst
new file mode 100755
index 000000000..23f706a95
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4989.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4989 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4989
+//
+// <-- Short Description -->
+// editor('myfolder/myfile.sci')
+// The correct file is opened. But when I modify and save this file,
+// it is saved in ./myfile.sci instead of myfolder/myfile.sci
+
+//editor('myfolder/myfile.sci')
+// modify and save the file
+//file should be saved in 'myfolder'
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4991.tst b/modules/scinotes/tests/nonreg_tests/bug_4991.tst
new file mode 100755
index 000000000..ae7d45004
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4991.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4991 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4991
+//
+// <-- Short Description -->
+// No check if there is modification when doing "Execute Into Scilab" in the editor.
+
+
+//Load a file in the editor. Modify it. Then do "Execute Into Scilab". No question about the fact that the file has been
+//modified in the editor.
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4995.tst b/modules/scinotes/tests/nonreg_tests/bug_4995.tst
new file mode 100755
index 000000000..5c98405fe
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4995.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 4995 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4995
+//
+// <-- Short Description -->
+// The "Cancel" (Annuler) box which appears when closing the Editor after the file has been modified does not work.
+
+// Load a file in the editor
+// Modify it.
+// Close editor
diff --git a/modules/scinotes/tests/nonreg_tests/bug_4998.tst b/modules/scinotes/tests/nonreg_tests/bug_4998.tst
new file mode 100755
index 000000000..018db4c8e
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_4998.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Yann COLLETTE
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 4998 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4998
+//
+// <-- Short Description -->
+// The size of the search and replace dialog of the scilab text editor is too big to fit on a EEEPC screen.
+
+//
+// This test must be performed on an eeepc
+// Open the Scilab editor
+// Open the "Search->Find/Replace" dialog
+// Check if the dialog fits correctly on the screen.
+// \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5000.tst b/modules/scinotes/tests/nonreg_tests/bug_5000.tst
new file mode 100755
index 000000000..22599cba0
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5000.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Yann COLLETTE
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 5000 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5000
+//
+// <-- Short Description -->
+// The size of the edit lines in the search and replace dialog is too small.
+
+//
+// Open the Scilab editor
+// Open the "Search->Find/Replace" dialog
+// Enter "test_test" in the Find edit line and check if the underscore is
+// correctly displayed
+// \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5001.tst b/modules/scinotes/tests/nonreg_tests/bug_5001.tst
new file mode 100755
index 000000000..1c3dee643
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5001.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5001 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5001
+//
+// <-- Short Description -->
+// The dialog box when opening a non-existing file is not the right one :
+// The file "xxx" doesn't exist. Do you want to create it. <Cancel> <No> <Yes>
+// Only <no> & <yes> buttons should appear. <Cancel> button is unnecessary.
+
+editor('my_file.sci')
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5002.tst b/modules/scinotes/tests/nonreg_tests/bug_5002.tst
new file mode 100755
index 000000000..c3dc27f58
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5002.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5002 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5002
+//
+// <-- Short Description -->
+// The dialog box when opening a non-existing file doesn't work.
+// The file "xxx" doesn't exist. Do you want to create it. <Cancel> <No> <Yes>
+// If <No> button is pressed, the tab is created anyway.
+
+editor('my_file.sci')
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5003.tst b/modules/scinotes/tests/nonreg_tests/bug_5003.tst
new file mode 100755
index 000000000..ca1c48913
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5003.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5003 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5003
+//
+// <-- Short Description -->
+// When opening a non-existing file, MSG: "The file "xxx" doesn't exist. Do you want to create it. <Cancel> <No> <Yes>"
+// If <Yes> is pressed, 2 tabs with the same name are created.
+
+// No more 2 tabs with the same name
+editor('my_file.sci')
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5004.tst b/modules/scinotes/tests/nonreg_tests/bug_5004.tst
new file mode 100755
index 000000000..d2f851422
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5004.tst
@@ -0,0 +1,34 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5004 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5004
+//
+// <-- Short Description -->
+// Opening a file with accented characters with text-editor crashes Scilab very frequently.
+
+
+//(With a terminal encoded into UTF-8)
+
+//[$SHELL] echo 'éééééé' > with_accent.txt
+//[$SHELL] echo 'eeeeee' > without_accent.txt
+
+//--> editor("without_accent.txt"); // Open/Close editor ten times → Never crash
+//--> editor("with_accent.txt"); // Open/Close editor ten times
+
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5006.tst b/modules/scinotes/tests/nonreg_tests/bug_5006.tst
new file mode 100755
index 000000000..cc1ad7600
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5006.tst
@@ -0,0 +1,37 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - Digiteo - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+
+// <-- Non-regression test for bug 5006 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5006
+//
+// <-- Short Description -->
+//
+
+// editor does not save my modifications in a new file
+
+cd TMPDIR
+
+mdelete('fun1.sci') // to be sure that file does not exist
+editor fun1.sci
+
+//copy/paste in fun1.sci
+
+//function fun1()
+// disp('OK')
+//endfunction
+
+
+// save file in editor
+// close editor
+
+editor fun1.sci // checks that you have text
+
+mgetl('fun1.sci')
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5007.tst b/modules/scinotes/tests/nonreg_tests/bug_5007.tst
new file mode 100755
index 000000000..6b77671e7
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5007.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5007 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5007
+//
+// <-- Short Description -->
+// When opening a non-existing file, If you answer <yes> to the following dialog box :
+// The file "xxx" doesn't exist. Do you want to create it. <Cancel> <No> <Yes>
+// The file is always saved in SCI instead of the current directory
+
+
+editor('my_file.sci')
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5013.tst b/modules/scinotes/tests/nonreg_tests/bug_5013.tst
new file mode 100755
index 000000000..0a0f45292
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5013.tst
@@ -0,0 +1,33 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5013 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5013
+//
+// <-- Short Description -->
+// Text editor - Find/Replace dialog box : Buttons are resized after the search.
+
+
+editor(SCI+'/modules/time/macros/datenum.sci')
+
+// CTRL+F
+// Enter "datenum" in the find input zone
+// Then press the Find button
+
+// → Have a look to buttons, their size must not change
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5075.tst b/modules/scinotes/tests/nonreg_tests/bug_5075.tst
new file mode 100755
index 000000000..9599ab02f
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5075.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5075 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5075
+//
+// <-- Short Description -->
+// This scilab script is considerer as a binary file by the Scilab text editor.
+// So, it is opened read only and it's not possible to modify it.
+
+editor('SCI/modules/core/macros/add_demo.bin')
+// try with any other type of file
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5083.tst b/modules/scinotes/tests/nonreg_tests/bug_5083.tst
new file mode 100755
index 000000000..e969213e4
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5083.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5083 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5083
+//
+// <-- Short Description -->
+// If lines are selected and user call the "Find/replace" dialog box, the radiobox "Selected lines" in
+// the frame "Scope" should be checked by default.
+
+editor SCI/modules/atoms/macros/atomsSearch.sci
+// Select several lines
+// CTRL + F
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5086.tst b/modules/scinotes/tests/nonreg_tests/bug_5086.tst
new file mode 100755
index 000000000..45aadaabc
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5086.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5086 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5086
+//
+// <-- Short Description -->
+// Syntax highlighting forgets some important Scilab variables :
+// %e, %pi, %inf, %i, %z, %s, %nan, %eps,
+// SCI, SCIHOME, TMPDIR
+
+editor()
+// type those Scilab variables, they should be colored
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5103.tst b/modules/scinotes/tests/nonreg_tests/bug_5103.tst
new file mode 100755
index 000000000..0aad86f1a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5103.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5103 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5103
+//
+// <-- Short Description -->
+//
+
+// open editor
+// File --> Save
+// Check the file selection dialog is opened
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5128.tst b/modules/scinotes/tests/nonreg_tests/bug_5128.tst
new file mode 100755
index 000000000..e97fb60ac
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5128.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5128 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5128
+//
+// <-- Short Description -->
+// Modified file saved as the other file when there are 2 files loaded in the editor.
+
+
+// Load file "toto1.sce" in the editor
+// Load file "toto2.sce" in the editor
+// Modify "toto1.sce"
+// Quit the editor and asks yes for saving "toto1.sce"
+// Have a Look to the content of both files
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5130.tst b/modules/scinotes/tests/nonreg_tests/bug_5130.tst
new file mode 100755
index 000000000..c9f9de915
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5130.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5130 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5130
+//
+// <-- Short Description -->
+// No warning is displayed when "Save As" command failed (because you have no write access on the directory for example) and an exception is printed in the terminal.
+
+editor()
+// Write some characters
+// CTRL+W
+// Try save the file in a directory where you do not have write access to.
+ \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5131.tst b/modules/scinotes/tests/nonreg_tests/bug_5131.tst
new file mode 100755
index 000000000..46b94ad7c
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5131.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5131 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5131
+//
+// <-- Short Description -->
+// editor('') opens a non-existing file which name is the current directory base-name.
+
+editor("");
+// Check that you get an error message and editor is opened with a new Untitled file
+
+editor(SCI);
+// Check that you get an error message and editor is opened with a new Untitled file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5137.tst b/modules/scinotes/tests/nonreg_tests/bug_5137.tst
new file mode 100755
index 000000000..d40c4c80a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5137.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5137 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5137
+//
+// <-- Short Description -->
+// drag & drop on editor was not enabled
+
+// launch editor
+// select some files from your O.S explorer and drop on editor
+// editor should open these files \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5140.tst b/modules/scinotes/tests/nonreg_tests/bug_5140.tst
new file mode 100755
index 000000000..581d7204a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5140.tst
@@ -0,0 +1,56 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5140 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5140
+//
+// <-- Short Description -->
+// "Load into Scilab" from the text editor on a big file is taking forever.
+// All are executed line by line.
+// we should save into a file and ask Scilab to load it. It will be much faster.
+
+// launch editor
+// paste some line in a tab
+// try "Load into Scilab
+
+// paste theses lines:
+1+1
+2
+A= 3
+disp(A)
+
+// do "Load into Scilab"
+// result display in console should be:
+
+
+//-->editor
+
+-->1+1
+ ans =
+
+ 2.
+-->2
+ ans =
+
+ 2.
+-->A= 3
+ A =
+
+ 3.
+-->disp(A)
+
+ 3.
+
+
+// creates a file with more 100 lines or more than 80 * 100 characters
+// do "Load into Scilab"
+// a message box should be opened , try 'yes' and 'no'
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5172.tst b/modules/scinotes/tests/nonreg_tests/bug_5172.tst
new file mode 100755
index 000000000..ae97932e7
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5172.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5172 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5172
+//
+// <-- Short Description -->
+// when i try to open a file, editor indicates that it is already modified + sometimes we have exceptions.
+
+
+editor SCI/modules/helptools/macros/xmltoformat.sci
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5189.tst b/modules/scinotes/tests/nonreg_tests/bug_5189.tst
new file mode 100755
index 000000000..279cf0595
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5189.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5189 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5189
+//
+// <-- Short Description -->
+// A message saying that the file could not be saved when I cancel file selection, it should not.
+
+// open editor
+// File --> Save As
+// Click on Cancel button
+// Check there is no error messagebox
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5210.tst b/modules/scinotes/tests/nonreg_tests/bug_5210.tst
new file mode 100755
index 000000000..622db4632
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5210.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5210 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5210
+//
+// <-- Short Description -->
+// editor("SCI/etc/scilab.start") freezes Scilab.
+
+editor("SCI/etc/scilab.start")
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5220.tst b/modules/scinotes/tests/nonreg_tests/bug_5220.tst
new file mode 100755
index 000000000..876ca15cf
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5220.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5220 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5220
+//
+// <-- Short Description -->
+// In editor, "Colorize" action in "Document" menu should be implemented as check box.
+
+editor()
+// Play with Colorize action (menu : Document => Colorize)
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5224.tst b/modules/scinotes/tests/nonreg_tests/bug_5224.tst
new file mode 100755
index 000000000..d39d52a06
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5224.tst
@@ -0,0 +1,38 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5224 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5224
+//
+// <-- Short Description -->
+// Maj+Tab modify the text selection
+
+editor()
+
+// write the 3 following line :
+
+//Eminuit autem inter humilia
+// supergressa iam impotentia
+// fines mediocrium delictorum
+
+// Select line the whole line 2 & 3
+
+// <Maj+Tab>
+
+// The selection should no more start at the end of the line 1
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5269.tst b/modules/scinotes/tests/nonreg_tests/bug_5269.tst
new file mode 100755
index 000000000..ccb80aeee
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5269.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5269 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5269
+//
+// <-- Short Description -->
+// Missing feature in the Text Editor: In Scipad, Ctrl-F1 opened Scilab's help
+
+editor()
+// try CTRL-F1
+// shoul load scilab's help page
+
+// CTRL-F1 + selecting a keyword in editor should open the corresponding help page
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5270.tst b/modules/scinotes/tests/nonreg_tests/bug_5270.tst
new file mode 100755
index 000000000..b4b0a0e36
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5270.tst
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5270 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5270
+//
+// <-- Short Description -->
+// In editor, change the shortcut for the line numbering (CTRL+L) and assign it to "Load into Scilab"
+// in order to match the old behavior.
+
+
+editor()
+// type some lines
+// CTRL-L
+// shoul load document into scilab
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5290.tst b/modules/scinotes/tests/nonreg_tests/bug_5290.tst
new file mode 100755
index 000000000..1e80e235a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5290.tst
@@ -0,0 +1,36 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5290 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5290
+//
+// <-- Short Description -->
+// Having two functions in Scilab for the editor is useless: editorHighlightLine & editor
+// We could add only one function with the profile:
+// editor(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci'],[10,23]);
+// which will open datenum.sci at the line 10 and datevec.sci at the line 23
+
+// It will avoid many duplication (help pages, gateway) and the fact that editorHighlightLine does not accept the
+// following syntax (ie a matrix of filename as input argument):
+// editorHighlightLine(["/etc/resolv.conf","/etc/hosts"],[2,2]);
+// or
+// editorHighlightLine(["/etc/resolv.conf","/etc/hosts"],2);
+
+
+
+editor(['SCI/modules/time/macros/datenum.sci','SCI/modules/time/macros/datevec.sci'],[10,23]);
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5308.tst b/modules/scinotes/tests/nonreg_tests/bug_5308.tst
new file mode 100755
index 000000000..c1bd839a3
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5308.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+//
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5308 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5308
+//
+// <-- Short Description -->
+// editor does not check input arguments type
+
+// Interactive since it could have some modal messagebox
+
+ierr = execstr('editor([], [])','errcatch');
+if ierr <> 999 then pause,end
+
+ierr = execstr('editor([])','errcatch');
+if ierr <> 999 then pause,end
+
+ierr = execstr('editor(''fff'',''fff'')','errcatch');
+if ierr <> 0 then pause,end
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5317.tst b/modules/scinotes/tests/nonreg_tests/bug_5317.tst
new file mode 100755
index 000000000..c1eac1585
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5317.tst
@@ -0,0 +1,30 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5317 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5317
+//
+// <-- Short Description -->
+// Inserting a tab inside a line tabifies the whole line instead of only its queue.
+
+editor()
+// Type some text
+// Insert a tab at the middle of the text
+// A tabulation must be inserted.
+
+// If we select a part or the entire text, the text is right-shifted.
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5319.tst b/modules/scinotes/tests/nonreg_tests/bug_5319.tst
new file mode 100755
index 000000000..633793efa
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5319.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5319 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5319
+//
+// <-- Short Description -->
+// The 'Save as' dialog box should set as initial (default) name the present file name (instead of blank), whenever the file to be saved is already named.
+
+editor("SCI/modules/dynamic_link/macros/haveacompiler.sci")
+// File -> Save As
+// Check the default file name proposed is 'haveacompiler.sci'
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5327.tst b/modules/scinotes/tests/nonreg_tests/bug_5327.tst
new file mode 100755
index 000000000..b3032d2f1
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5327.tst
@@ -0,0 +1,37 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5327 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5327
+//
+// <-- Short Description -->
+// When indenting a block, the selection area is shifted one line down with respect to the previously selected one.
+
+
+editor()
+
+// Write the following lines :
+
+// for i=1:10
+// if i>5, disp("Hi !"); end
+// if (i==1)
+// disp("starting test");
+// end
+// end
+
+// <CTRL+A>
+// <CTRL+I>
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5355.tst b/modules/scinotes/tests/nonreg_tests/bug_5355.tst
new file mode 100755
index 000000000..d64d8b93e
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5355.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5355 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5355
+//
+// <-- Short Description -->
+// There is no automatic indentation in the editor when commands such as "try" or "catch" are entered.
+
+editor()
+// Try automactic indentation with kewords "try, catch end"
+
+
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5386.tst b/modules/scinotes/tests/nonreg_tests/bug_5386.tst
new file mode 100755
index 000000000..deed25b27
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5386.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5386 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5386
+//
+// <-- Short Description -->
+// Wrong title for auto indent action in menu.
+
+
+editor()
+// "Auto Reformat Selection" has become "Enable Auto Reformat"
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5404.tst b/modules/scinotes/tests/nonreg_tests/bug_5404.tst
new file mode 100755
index 000000000..358fcd3a1
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5404.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Sylvestre KOUMAR
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5404 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5404
+//
+// <-- Short Description -->
+// Open & close Editor creates a java exception.
+
+
+// open editor by 'toolbar' 'Launch Scilab Text editor'
+// and close text editor with cross (close) of Text editor
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5459.tst b/modules/scinotes/tests/nonreg_tests/bug_5459.tst
new file mode 100755
index 000000000..3073c09e8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5459.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan SIMON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5459 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5459
+//
+// <-- Short Description -->
+// editor "block" scilab with example
+
+cd SCI/modules/overloading/macros
+a=ls('*.sci')
+size(a)
+editor(a)
+// all the files should open normally
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5460.tst b/modules/scinotes/tests/nonreg_tests/bug_5460.tst
new file mode 100755
index 000000000..d7eb6e8d5
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5460.tst
@@ -0,0 +1,32 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5460 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5460
+//
+// <-- Short Description -->
+// added menus 'Close All' and Close all but this' in editor.
+
+editor()
+
+// opens some files with editor
+// Goto in Editor File --> Close All
+// it should close all files and opens a untitled
+
+// opens some files with editor
+// Select a file
+// Goto in Editor File --> Close All But This
+// it should close all file except selected file
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5465.tst b/modules/scinotes/tests/nonreg_tests/bug_5465.tst
new file mode 100755
index 000000000..c0edcdfaa
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5465.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan SIMON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5465 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5465
+//
+// <-- Short Description -->
+// "unmodified reference" was not change after saving a file
+
+editor SCI/modules/atoms/macros/atomsAutoload.sci
+// <SPACE> (for example)
+// CTRL+S
+// CTRL+Z
+// the file should appear as modified
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5482.tst b/modules/scinotes/tests/nonreg_tests/bug_5482.tst
new file mode 100755
index 000000000..d62bbf6f8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5482.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5482 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5482
+//
+// <-- Short Description -->
+// added a menu to choose EOL type when you save a file with editor
+
+// launch editor
+// type text & save
+// check that text file uses O.S EOL
+
+// menu --> document --> End Of Line --> choose another style
+// save
+// check that text file uses EOL that you choose
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5497.tst b/modules/scinotes/tests/nonreg_tests/bug_5497.tst
new file mode 100755
index 000000000..04d6b8722
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5497.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH SCINOTES -->
+// <-- INTERACTIVE TEST -->
+//
+// <-- Non-regression test for bug 5497 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5497
+//
+// <-- Short Description -->
+// Can not drag region inside Scilab editor
+
+editor()
+// Enter some text
+// Select the text
+// Try to drag selection
+
+
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5516.tst b/modules/scinotes/tests/nonreg_tests/bug_5516.tst
new file mode 100755
index 000000000..6306150de
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5516.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan SIMON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5516 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5516
+//
+// <-- Short Description -->
+// Encoding preference is not saved
+
+
+//scinotes()
+//choose "Menu→Document→Encoding US-ASCII"
+//close scinotes
+//scinotes()
+//=> "Menu→Document→Encoding" should be US-ASCII
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5519.tst b/modules/scinotes/tests/nonreg_tests/bug_5519.tst
new file mode 100755
index 000000000..2810b4d7c
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5519.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5519 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5519
+//
+// <-- Short Description -->
+// added a message asking the user if he wants to exit the
+// editor when he clicks on the cross.
+
+// launch editor
+// opens some file or not
+// click on cross to exit
+// a message box ask to confirm exit of text editor
+//
+// use file menu --> exit
+// no message box
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5532.tst b/modules/scinotes/tests/nonreg_tests/bug_5532.tst
new file mode 100755
index 000000000..f09bd12a4
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5532.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5532 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5532
+//
+// <-- Short Description -->
+// added a menu "Save All" to save all modified file by editor
+
+// launch editor
+// opens many files
+// modify three files and click on menu "Save All"
+// modified should saved
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5649.tst b/modules/scinotes/tests/nonreg_tests/bug_5649.tst
new file mode 100755
index 000000000..4e3c0687a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5649.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan SIMON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH EDITOR -->
+//
+// <-- Non-regression test for bug 5649 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5649
+//
+// <-- Short Description -->
+// The Editor does not undo properly after a find/replace.
+
+
+//editor(SCI+"\modules\optimization\macros\derivative.sci")
+//* Search> Find/Replace
+//Find: Copyright
+//Replace With: Copyleft
+//* Push "Find"
+//* Push "Replace"
+//* Push "Close"
+// undo
+// Copyright should appear again
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_5707.tst b/modules/scinotes/tests/nonreg_tests/bug_5707.tst
new file mode 100755
index 000000000..82d30a35c
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_5707.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2009 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 5707 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=5707
+//
+// <-- Short Description -->
+// cmd-e executed the wrong editor file
+
+edit tic
+edit toc
+edit calendar
+
+// select toc & cmd-e toc.sci must be executed
+// select calendar & cmd-e calendar.sci must be executed
+// select tic & cmd-e tic.sci must be executed
+
+
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7276.tst b/modules/scinotes/tests/nonreg_tests/bug_7276.tst
new file mode 100755
index 000000000..19e83b2b9
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7276.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7276 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7276
+//
+// <-- Short Description -->
+// There was a problem of highlighting with default font.
+
+// In SciNotes (with default font)
+// function foo(aaaaa,bbbbb,ccccc,ddddd)
+
+// Put the caret near one of the parenthesis, they should match !
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7352.tst b/modules/scinotes/tests/nonreg_tests/bug_7352.tst
new file mode 100755
index 000000000..973213d08
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7352.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7352 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7352
+//
+// <-- Short Description -->
+// No completion in the popup menu on the right click
+
+// launch editor
+// just type pr and right click and see a "Complete" menu
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7376.tst b/modules/scinotes/tests/nonreg_tests/bug_7376.tst
new file mode 100755
index 000000000..b42d56412
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7376.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Clément DAVID
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7376 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7376
+//
+// <-- Short Description -->
+// The toolbar is not present when launching with a filename argument
+
+scinotes(SCI+"/etc/scilab.start");
+// check that the toolbar is present
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7421.tst b/modules/scinotes/tests/nonreg_tests/bug_7421.tst
new file mode 100755
index 000000000..3eacc6421
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7421.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7421 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7421
+//
+// <-- Short Description -->
+// Could not open the source file of a selected keyword on the right click
+
+// launch editor
+// just type legend, select it, right click and menu Source of 'legend'
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7477.tst b/modules/scinotes/tests/nonreg_tests/bug_7477.tst
new file mode 100755
index 000000000..24093afe3
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7477.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7477 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7477
+//
+// <-- Short Description -->
+// Bad detection of a function declaration when the line was
+// ended with a comment.
+
+// launch editor
+// just type: function foo(a,b) // A comment
+// a,b must be bold (as local varibales)
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7491.tst b/modules/scinotes/tests/nonreg_tests/bug_7491.tst
new file mode 100755
index 000000000..015b917ed
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7491.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7491 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7491
+//
+// <-- Short Description -->
+// Lines broken with a .. were not correctly handled and caused
+// a freeze of SciNotes.
+
+// launch SciNotes
+// just type: "Hello..
+// World..
+// How are you..
+// ?"
+// SciNotes froze when the second point after World was typed
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7546.tst b/modules/scinotes/tests/nonreg_tests/bug_7546.tst
new file mode 100755
index 000000000..1281cdbbe
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7546.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7546 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7546
+//
+// <-- Short Description -->
+// It was not possible to select easily a block.
+
+path=get_function_path('test_run');
+scinotes(path, 147);
+
+// Put the caret on the 'if' and use ctrl+B to select all the block if...end
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7550.tst b/modules/scinotes/tests/nonreg_tests/bug_7550.tst
new file mode 100755
index 000000000..25b873c0d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7550.tst
@@ -0,0 +1,27 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7550 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7550
+//
+// <-- Short Description -->
+// The keyword case was misplaced in particular conditions
+
+// launch SciNotes
+// just type:
+// \t\t\tselect\n
+// case\n // when \n is entered 'case' go to the same level as 'select'
+// // OK
+// so you have:
+// \t\t\tselect
+// \t\t\tcase
+// Enter a new CR just after 'case' and now it doesn't move
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7557.tst b/modules/scinotes/tests/nonreg_tests/bug_7557.tst
new file mode 100755
index 000000000..4dcf9b0d6
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7557.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7557 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7557
+//
+// <-- Short Description -->
+// Unselected line was tabified
+
+// launch SciNotes
+// just type:
+// ab
+// cd
+
+// select ab in putting the caret just at the beginning of the second line
+// tabify with key <TAB>, only the first line must be tabify
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7558.tst b/modules/scinotes/tests/nonreg_tests/bug_7558.tst
new file mode 100755
index 000000000..b491904e9
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7558.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7558 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7558
+//
+// <-- Short Description -->
+// Global variables were reached before local ones.
+
+// In Scilab's console :
+c = 1;
+// launch SciNotes
+// just type:
+// function toto(c,v)\n
+// end
+
+// the local var 'c' should be bold. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7564.tst b/modules/scinotes/tests/nonreg_tests/bug_7564.tst
new file mode 100755
index 000000000..d2751acfa
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7564.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7564 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7564
+//
+// <-- Short Description -->
+// No message was displayed when an unsuccessful search occurred.
+
+// Open SciNotes
+// Make a search on "toto", a message is displayed at the bottom of the search
+// window \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7595.tst b/modules/scinotes/tests/nonreg_tests/bug_7595.tst
new file mode 100755
index 000000000..930626df0
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7595.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7595 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7595
+//
+// <-- Short Description -->
+// In SciNotes, a string was broken if '..' was encountered.
+
+// Open SciNotes
+// disp("Hello .. World");
+// disp("Hello .. //comment");
+
+// In the first case "Hello .. World" must be colorized as a string
+// In the second the comment must be green and "Hello " as a string
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7623.tst b/modules/scinotes/tests/nonreg_tests/bug_7623.tst
new file mode 100755
index 000000000..229d5b81a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7623.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7623 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7623
+//
+// <-- Short Description -->
+// An extra char was added to the selection with action "Evaluate Selection"
+
+// Open SciNotes in the console and type (take care to the comma):
+// "Hello World",
+// Select "Hello World" (but not the comma)
+// and click on menu "Evaluate Selection"
+
+// In the console, you should just see "Hello World" not followed by the comma
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7673.tst b/modules/scinotes/tests/nonreg_tests/bug_7673.tst
new file mode 100755
index 000000000..2286d5395
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7673.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7673 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7673
+//
+// <-- Short Description -->
+// The ".dem" extension was not available in Open action
+
+// In SciNotes, choose "Open" in the menu "File" and look at the "(*.dem)" extension
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7676.tst b/modules/scinotes/tests/nonreg_tests/bug_7676.tst
new file mode 100755
index 000000000..935b583c8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7676.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7676 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7676
+//
+// <-- Short Description -->
+// The SaveAs action didn't remove the readonly mode
+
+// In the console:
+// scinotes(get_function_path("test_run"), "readonly")
+
+// In SciNotes, choose "Save As" in the menu "File" and save it as
+// you want, the file is now editable.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7677.tst b/modules/scinotes/tests/nonreg_tests/bug_7677.tst
new file mode 100755
index 000000000..30703caae
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7677.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7677 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7677
+//
+// <-- Short Description -->
+// User hadn't the possibilty to open files in his favorite directories.
+
+// In SciNotes, in the menu File there is now a menu "Open file in ..." where
+// you can add or remove your favorite directories.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7678.tst b/modules/scinotes/tests/nonreg_tests/bug_7678.tst
new file mode 100755
index 000000000..770eb3b5b
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7678.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7678 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7678
+//
+// <-- Short Description -->
+// Help action didn't give help on selection
+
+// In SciNotes, select a word or a group of words (from left to right or from right to left)
+// it should be passed to help command. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7682.tst b/modules/scinotes/tests/nonreg_tests/bug_7682.tst
new file mode 100755
index 000000000..e745fb782
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7682.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7682 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7682
+//
+// <-- Short Description -->
+// The knob of the vertical scrollbar moved badly on resize.
+
+// In console
+// edit help_from_sci
+// In SciNotes, go to the last line of the file and resize the window with the mouse,
+// the knob must stay near of its initial position.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7718.tst b/modules/scinotes/tests/nonreg_tests/bug_7718.tst
new file mode 100755
index 000000000..63973e469
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7718.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7718 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7718
+//
+// <-- Short Description -->
+// There was a bad detection of a function when the list of args was broken.
+
+// In SciNotes:
+// function foo(a,..
+// b,..
+// c)
+// endfunction
+
+// a,b and c should be colorized (maroon+bold) as function's arguments.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7719.tst b/modules/scinotes/tests/nonreg_tests/bug_7719.tst
new file mode 100755
index 000000000..eb5fbc805
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7719.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7719 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7719
+//
+// <-- Short Description -->
+// There was not the possibility to open several files at the same time.
+
+// In SciNotes, in menu File, use menuitem Open, select several files with shift or ctrl keys
+// and open them.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7722.tst b/modules/scinotes/tests/nonreg_tests/bug_7722.tst
new file mode 100755
index 000000000..4a21f47cd
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7722.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7722 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7722
+//
+// <-- Short Description -->
+// Several FindReplace windows could be opened.
+
+// In SciNotes, open two files, select the first and open a find/replace window (ctrl+F)
+// and repeat the process in the second file, the first find/replace window should closed
+// and an other on should be opened.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7731.tst b/modules/scinotes/tests/nonreg_tests/bug_7731.tst
new file mode 100755
index 000000000..6ef7fcf02
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7731.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7731 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7731
+//
+// <-- Short Description -->
+// In Find/Replace window, the buttons were not updated when an item was
+// choosen in the combobox Find.
+
+// In SciNotes, launch Find/Replace.
+// i) In the field "Find", put foo and search it !
+// ii) In the field "Find", remove the contents, normally the buttons
+// are disabled, and select "foo" in the list of the combo, the buttons
+// should be enabled.
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7762.tst b/modules/scinotes/tests/nonreg_tests/bug_7762.tst
new file mode 100755
index 000000000..fe6cbf49e
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7762.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7762 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/7762
+//
+// <-- Short Description -->
+// A keyword was not fully helpable depending on the caret position
+
+scinotes(get_function_path("test_run"), 110);
+
+// Put the caret like these "|test_run" or "tes|t_run" or "test_run|"
+// In the three cases, in the help menu, we should have "Help on test_run" \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7764.tst b/modules/scinotes/tests/nonreg_tests/bug_7764.tst
new file mode 100755
index 000000000..1f45fc84a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7764.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7764 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7764
+//
+// <-- Short Description -->
+// The CR in comments was removed when executing from SciNotes.
+
+// In SciNotes, open the source file of sprand and ctrl+A, ctrl+E and look at
+// the console, normally nothing !
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7806.tst b/modules/scinotes/tests/nonreg_tests/bug_7806.tst
new file mode 100755
index 000000000..beca9288a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7806.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7806 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/7806
+//
+// <-- Short Description -->
+// Blocks elseif...end and else...end were not highlighted.
+
+tmpfile = TMPDIR + "/bug_7806.sci";
+code = ["if a then", "b", "elseif c then", "d", "else", "e", "end"];
+mputl(code, tmpfile);
+scinotes(tmpfile);
+
+// Put the mouse over "if", the block if...end must be highlighted
+// Put the mouse over "elseif", the block elseif...end must be highlighted
+// Put the mouse over "else", the block else...end must be highlighted
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7830.tst b/modules/scinotes/tests/nonreg_tests/bug_7830.tst
new file mode 100755
index 000000000..021aa145d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7830.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7830 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7830
+//
+// <-- Short Description -->
+// There was a problem when opening a file at a line number.
+
+editor(get_function_path("prettyprint"), 123);
+
+// the file prettyprint must be opened at line 123 and it must be highlighted.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_7842.tst b/modules/scinotes/tests/nonreg_tests/bug_7842.tst
new file mode 100755
index 000000000..dd5d0d06a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_7842.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 7842 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7842
+//
+// <-- Short Description -->
+// There was not the filepath in the title bar.
+
+scinotes("SCI/modules/graphics/demos/2d_3d_plots/plotyyy.dem.sce");
+
+// the window's title must be the full path of plotyyy.dem.sce
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8024.tst b/modules/scinotes/tests/nonreg_tests/bug_8024.tst
new file mode 100755
index 000000000..f28fbfa76
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8024.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8024 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8024
+//
+// <-- Short Description -->
+// The key INSERT had no effect
+
+edit foo;
+
+// Hit the key "Insert", the caret should become a filled rectangle, a message
+// is displayed in the infoBar and the entered text overwrites the previous one.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8027.tst b/modules/scinotes/tests/nonreg_tests/bug_8027.tst
new file mode 100755
index 000000000..3caee1353
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8027.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8027 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8027
+//
+// <-- Short Description -->
+// In a splitted view, a frame was not informed of a change in the other frame.
+
+edit foo;
+
+// Split the view (Window > Split View > Horizontally)
+// Make a modif in the left frame and save (CTRL + S) and go to the right one
+// No warning about an external modif !
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8056.tst b/modules/scinotes/tests/nonreg_tests/bug_8056.tst
new file mode 100755
index 000000000..1f49a40e1
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8056.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8056 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8056
+//
+// <-- Short Description -->
+// Bad colorization of the comments after a command without parenthesis.
+
+tmpfile = TMPDIR+'/bug_8056.sci';
+fd = mopen(tmpfile,'wt');
+mputl('cd ""directory"" /abc //comment',fd);
+mclose(fd);
+editor(tmpfile)
+
+// the string //comment must be green and /abc must be "pink"
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8085.tst b/modules/scinotes/tests/nonreg_tests/bug_8085.tst
new file mode 100755
index 000000000..3293e8169
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8085.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8085 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8085
+//
+// <-- Short Description -->
+// It was not possible to disable the horizontal line wrapping.
+
+edit('test_run')
+
+// Go to the menu 'Preference' and uncheck the menu Horizontal wrapping,
+// an horizontal scrollbar should appear and the lines of the document
+// should not be wrapped.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8135.tst b/modules/scinotes/tests/nonreg_tests/bug_8135.tst
new file mode 100755
index 000000000..5b9991a21
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8135.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8135 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8135
+//
+// <-- Short Description -->
+// An exception was thrown when restoring files on MacOS X.
+
+edit test_run;
+closeEditor;
+edit test_run;
+
+// Check in the terminal if an exception is thrown.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8166.tst b/modules/scinotes/tests/nonreg_tests/bug_8166.tst
new file mode 100755
index 000000000..2c9a2a07a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8166.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8166 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=8166
+//
+// <-- Short Description -->
+// All the checkboxes in SciNotes 'Preferences' menu were inefficient.
+
+// Launch SciNotes and (des)activate options in the 'Preferences' menu
+// Check that the menus are (un)checked when clicking on them
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8227.tst b/modules/scinotes/tests/nonreg_tests/bug_8227.tst
new file mode 100755
index 000000000..47b2e029d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8227.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8227 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8227
+//
+// <-- Short Description -->
+// The commands evaluated with "Evaluate selection" were not stored in history.
+
+tmpfile = TMPDIR+'/bug_8227.sci';
+fd = mopen(tmpfile,'wt');
+mputl(['a=1','b=2'],fd);
+mclose(fd);
+editor(tmpfile)
+
+// Select all, right click and evaluate the selection.
+// In the console, a pression on <UP> key should show b=2 and a second should
+// show a=1
+
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8229.tst b/modules/scinotes/tests/nonreg_tests/bug_8229.tst
new file mode 100755
index 000000000..bebf46afb
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8229.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8229 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8229
+//
+// <-- Short Description -->
+// Problem of selection after an indentation
+
+tmpfile = TMPDIR + "/bug_8229.sce";
+mputl(["a";"";"b"], tmpfile);
+scinotes(tmpfile);
+
+// select the lines 2 and 3, ctrl+I to reindent, the lines 2 and 3 must be selected
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8230.tst b/modules/scinotes/tests/nonreg_tests/bug_8230.tst
new file mode 100755
index 000000000..fdb8048c9
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8230.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8230 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8230
+//
+// <-- Short Description -->
+// Save As action did not propose the current file name as default.
+
+edit SCI/modules/graphics/demos/2d_3d_plots/champ.dem.sce
+
+// ctrl+shift+S to save as and champ.dem.sce should be proposed rather
+// than demo_champ.sci
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8277.tst b/modules/scinotes/tests/nonreg_tests/bug_8277.tst
new file mode 100755
index 000000000..b09626ce8
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8277.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8277 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8277
+//
+// <-- Short Description -->
+// SciNotes generated exceptions when the keyboard is switched in Chinese mode
+// under Windows
+
+// open SciNotes
+// switch the keyboard in Chinese mode (maybe ALT+SHIFT to switch)
+// and hit several times the key A, chinese chars should appear.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8304.tst b/modules/scinotes/tests/nonreg_tests/bug_8304.tst
new file mode 100755
index 000000000..fd7295e72
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8304.tst
@@ -0,0 +1,19 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8304 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8304
+//
+// <-- Short Description -->
+// A Java exception was thrown on Exit menu.
+
+// open SciNotes and quit it with the Exit menu.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8309.tst b/modules/scinotes/tests/nonreg_tests/bug_8309.tst
new file mode 100755
index 000000000..64f611260
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8309.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8309 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8309
+//
+// <-- Short Description -->
+// Bad display of the line number in whereami mode with broken lines
+
+tmpfile = TMPDIR + "/bug_8309.sce";
+mputl(["function toto()", "a=""a ." + ".//a", "b ." + ".//b", "c""", "endfunction"], tmpfile);
+scinotes(tmpfile);
+
+// Change the line numbering to be in whereami mode
+// All the lines in the body of toto must be numbered \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8359.tst b/modules/scinotes/tests/nonreg_tests/bug_8359.tst
new file mode 100755
index 000000000..41825324b
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8359.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8359 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8359
+//
+// <-- Short Description -->
+// An execption was thrown on Save As action
+
+tmpfile = TMPDIR + "/bug_8359.sce";
+mputl(["a"], tmpfile);
+scinotes(tmpfile);
+
+// Choose Save As action in menu File and check the console. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8368.tst b/modules/scinotes/tests/nonreg_tests/bug_8368.tst
new file mode 100755
index 000000000..e7f2b51d7
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8368.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8368 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8368
+//
+// <-- Short Description -->
+// Incremental search did not highlight correctly the pattern under Windows.
+
+edit derivative
+
+// F3 to make an incremental search, put f in the text field and hit 2 times
+// the ENTER key, a 'f' must be highlighted rather than a 'u'. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8465.tst b/modules/scinotes/tests/nonreg_tests/bug_8465.tst
new file mode 100755
index 000000000..1b679a3d6
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8465.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8465 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8465
+//
+// <-- Short Description -->
+// Under GNU/Linux, it was not possible to paste with the middle click.
+
+scinotes
+
+// select something where you want and paste it in the editor in clicking with
+// middle button \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8627.tst b/modules/scinotes/tests/nonreg_tests/bug_8627.tst
new file mode 100755
index 000000000..d82e0be58
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8627.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8627 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8627
+//
+// <-- Short Description -->
+// A bad identifier was not shew as invalid.
+
+tmpfile = TMPDIR + "/bug_8627.sce";
+mputl(["42identifier = a"; "a != 2"], tmpfile);
+scinotes(tmpfile);
+
+// 42identifier should be red with little waves under it. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8697.tst b/modules/scinotes/tests/nonreg_tests/bug_8697.tst
new file mode 100755
index 000000000..ffe70e854
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8697.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8697 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8697
+//
+// <-- Short Description -->
+// An exception was thrown when an empty document was reload.
+
+scinotes();
+
+// Choose menu File > Reload and no exception should occurred. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8714.tst b/modules/scinotes/tests/nonreg_tests/bug_8714.tst
new file mode 100755
index 000000000..df5d2086a
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8714.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8714 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8714
+//
+// <-- Short Description -->
+// Problem with Incremental Search bar when Code Navigator is docked
+
+scinotes();
+
+// F3 to start an Incremental Search.
+// ctrl+G to have the Code Navigator.
+// Dock the Code Navigator, undock it
+// In the two previous cases the Search bar must stay at its place. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8715.tst b/modules/scinotes/tests/nonreg_tests/bug_8715.tst
new file mode 100755
index 000000000..c64876bf7
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8715.tst
@@ -0,0 +1,28 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8715 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8715
+// http://bugzilla.scilab.org/8716
+//
+// <-- Short Description -->
+// Problem of order when dnd'ing the tabs
+
+scinotes();
+
+// Open two files
+// ctrl+G to open the Code Navigator
+// Switch them in dnd'ing one of them
+// Look at the Code Nav., the order must have been updated.
+// Look at the order of the tabs and close SciNotes
+// Reopen SciNotes
+// The order should the same as previous \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8764.tst b/modules/scinotes/tests/nonreg_tests/bug_8764.tst
new file mode 100755
index 000000000..400683f8e
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8764.tst
@@ -0,0 +1,41 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8764 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8764
+//
+// <-- Short Description -->
+// File permissions were not checked
+
+tmpfile = TMPDIR + "/testwrite.sce";
+mputl("disp(""hello"");", tmpfile);
+
+if getos() <> 'Windows' then
+ unix("chmod u-w " + tmpfile);
+else
+ dos("attrib +R " + tmpfile);
+end
+scinotes(tmpfile);
+
+// The file must be open in read-only mode
+
+tmpfile = TMPDIR + "/testread.sce";
+mputl("disp(""hello"");", tmpfile);
+
+if getos() <> 'Windows' then
+ unix("chmod u-r " + tmpfile);
+ scinotes(tmpfile);
+end
+
+// on Windows, try to open a file without rights on it.
+
+// The file must not be opened !
diff --git a/modules/scinotes/tests/nonreg_tests/bug_8885.tst b/modules/scinotes/tests/nonreg_tests/bug_8885.tst
new file mode 100755
index 000000000..cf92e1aa5
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_8885.tst
@@ -0,0 +1,26 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 8885 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/8885
+//
+// <-- Short Description -->
+// Anchors were removed on a Replace All action.
+
+edit test_run;
+
+// Add anchors (ctrl+M)
+// Find action (ctrl+F)
+// In Search field put a 'a'
+// In Replace Field put a 'b'
+// Replace all
+// All the anchors should be here ! \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9012.tst b/modules/scinotes/tests/nonreg_tests/bug_9012.tst
new file mode 100755
index 000000000..17ea265e4
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9012.tst
@@ -0,0 +1,20 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9012 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9012
+//
+// <-- Short Description -->
+// Print preview triggered a java exception.
+
+// Open a script
+// File => Print preview
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9060.tst b/modules/scinotes/tests/nonreg_tests/bug_9060.tst
new file mode 100755
index 000000000..432c0f1ee
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9060.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9060 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9060
+//
+// <-- Short Description -->
+// It was not possible to create a new file
+
+scinotes();
+
+// ctrl+S to save
+// choose an unexisting file foobarfoo
+// OK \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9129.tst b/modules/scinotes/tests/nonreg_tests/bug_9129.tst
new file mode 100755
index 000000000..b3f11485b
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9129.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9129 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9129
+//
+// <-- Short Description -->
+// Completion on field did not propose graphics handle fields by default.
+
+mputl('a.', TMPDIR + '/bug_9129.sce')
+scinotes(TMPDIR + '/bug_9129.sce');
+
+// Put the caret after the dot and <CTRL>+<SPACE>
+// Graphic handle fields should be proposed \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9132.tst b/modules/scinotes/tests/nonreg_tests/bug_9132.tst
new file mode 100755
index 000000000..bfe5202f2
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9132.tst
@@ -0,0 +1,25 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9132 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9132
+//
+// <-- Short Description -->
+// Comments inside a string were removed when executing
+
+f=TMPDIR+"/plop.sce"
+mputl(["a=""abcd // efgh"" // ijkl"], f);
+scinotes(f,2);
+
+// ctrl+E
+// Look at the console
+// you should see a="abcd // efgh"
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9171.tst b/modules/scinotes/tests/nonreg_tests/bug_9171.tst
new file mode 100755
index 000000000..e9a04f990
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9171.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9171 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9171
+//
+// <-- Short Description -->
+// Problem to enter Japanese chars under Windows with IME
+
+scinotes();
+
+// Switch to Japanese language
+// Enter something... \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9183.tst b/modules/scinotes/tests/nonreg_tests/bug_9183.tst
new file mode 100755
index 000000000..bd5e2ce8f
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9183.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9183 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9183
+//
+// <-- Short Description -->
+// Display problem when code is selected
+
+edit test_run
+
+// Disable the horizontal wrapping in Preferences menu.
+// Select three lines, the first and the last line should look good ! \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9186.tst b/modules/scinotes/tests/nonreg_tests/bug_9186.tst
new file mode 100755
index 000000000..92cbe1cc1
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9186.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9186 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9186
+//
+// <-- Short Description -->
+// In code navigator, an exception was thrown when the textfield got the focus.
+
+edit ilib_compile;
+
+// CTRL+G and click in the textfield at the bottom. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9189.tst b/modules/scinotes/tests/nonreg_tests/bug_9189.tst
new file mode 100755
index 000000000..c1600d9ac
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9189.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9189 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9189
+//
+// <-- Short Description -->
+// Certains keywords were not helpable.
+
+mputl('fft', TMPDIR + '/bug_9189.sce')
+scinotes(TMPDIR + '/bug_9189.sce');
+
+// Right click on fft and at Help on 'fft' should be available. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9301.tst b/modules/scinotes/tests/nonreg_tests/bug_9301.tst
new file mode 100755
index 000000000..201f97c85
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9301.tst
@@ -0,0 +1,29 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9301 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9301
+//
+// <-- Short Description -->
+// Exception when one tryed to paste a column to replace a column selection
+
+mputl(['a(1, :) = [1 2 3];';
+ 'a(2, :) = [1 2 3];';
+ 'a(3, :) = [1 2 3];'], TMPDIR + '/bug_9301.sce')
+
+scinotes(TMPDIR + '/bug_9301.sce');
+
+// Select the column of 1 with <CTRL>+<MOUSE DRAGGED> and copy with <CTRL>+C
+// Select the column of 2
+// <CTRL>+V to paste, should replace each 2 by 1\n1\n1
+// <CTRL>+Z to cancel, select the column of 2 and <CTRL+SHIFT>+V should replace
+// the 2s with 1s.
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9348.tst b/modules/scinotes/tests/nonreg_tests/bug_9348.tst
new file mode 100755
index 000000000..c99461de6
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9348.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9348 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9348
+//
+// <-- Short Description -->
+// Miscolorization of a transposed field
+
+mputl('a.b'' //cdefg', TMPDIR + '/bug_9348.sce')
+scinotes(TMPDIR + '/bug_9348.sce');
+
+// the comment should be colorized as a comment and not as a string \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9358.tst b/modules/scinotes/tests/nonreg_tests/bug_9358.tst
new file mode 100755
index 000000000..dd8969144
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9358.tst
@@ -0,0 +1,24 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9358 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9358
+//
+// <-- Short Description -->
+// A simple quoted string was not always correctly convert into double quoted one.
+
+mputl("''''''i''''''''m done dude''''''", TMPDIR + '/bug_9358.sce')
+scinotes(TMPDIR + '/bug_9358.sce');
+
+// Menu Edition
+// Submenu "Single to double quote strings"
+// the string must be transformed in "''i''''m done dude''" \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9480.tst b/modules/scinotes/tests/nonreg_tests/bug_9480.tst
new file mode 100755
index 000000000..cf106419d
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9480.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9480 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9480
+//
+// <-- Short Description -->
+// Highlighted words after selection were wrong under Windows.
+
+edit bar
+
+// Select "This" on the first line, the other "This" should be correctly highlighted. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9505.tst b/modules/scinotes/tests/nonreg_tests/bug_9505.tst
new file mode 100755
index 000000000..c6939858c
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9505.tst
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9505 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9505
+//
+// <-- Short Description -->
+// A LaTeX string in a comment was not considered as a comment
+
+mputl('//abc$xyz$', TMPDIR + '/bug_9505.sce')
+scinotes(TMPDIR + '/bug_9505.sce');
+
+// Put the caret just after the second $ and <CTRL>+E
+// Nothing happen: normal, it is the expected behaviour. \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/bug_9854.tst b/modules/scinotes/tests/nonreg_tests/bug_9854.tst
new file mode 100755
index 000000000..659ee0646
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/bug_9854.tst
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Calixte DENIZET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- INTERACTIVE TEST -->
+// <-- TEST WITH SCINOTES -->
+//
+// <-- Non-regression test for bug 9854 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/9854
+//
+// <-- Short Description -->
+// Miscolorization when a string contains several dots
+
+mputl('a=""..""', TMPDIR + '/bug_9854.sce')
+scinotes(TMPDIR + '/bug_9854.sce');
+
+// All the string must have the same color.
diff --git a/modules/scinotes/tests/nonreg_tests/scinotes_intend_test.sci b/modules/scinotes/tests/nonreg_tests/scinotes_intend_test.sci
new file mode 100755
index 000000000..3b29eb7f0
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/scinotes_intend_test.sci
@@ -0,0 +1,11 @@
+function y=f(x)
+ a=1;
+ if x==1 then
+ y=2
+ else
+ y=3
+ for i=1:20
+ y=12;
+ end
+ end
+endfunction \ No newline at end of file
diff --git a/modules/scinotes/tests/nonreg_tests/scinotes_linux_eol.sci b/modules/scinotes/tests/nonreg_tests/scinotes_linux_eol.sci
new file mode 100755
index 000000000..c77f036ab
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/scinotes_linux_eol.sci
@@ -0,0 +1,10 @@
+
+function result = atomsInstall(packages,allusers)
+
+ // Load Atoms Internals lib if it's not already loaded
+ // =========================================================================
+ if ~ exists("atomsinternalslib") then
+ load("SCI/modules/atoms/macros/atoms_internals/lib");
+ end
+
+endfunction
diff --git a/modules/scinotes/tests/nonreg_tests/scinotes_macosx_eol.sci b/modules/scinotes/tests/nonreg_tests/scinotes_macosx_eol.sci
new file mode 100755
index 000000000..63ee4f1f1
--- /dev/null
+++ b/modules/scinotes/tests/nonreg_tests/scinotes_macosx_eol.sci
@@ -0,0 +1 @@
+ function result = atomsInstall(packages,allusers) // Load Atoms Internals lib if it's not already loaded // ========================================================================= if ~ exists("atomsinternalslib") then load("SCI/modules/atoms/macros/atoms_internals/lib"); end endfunction \ No newline at end of file
diff --git a/modules/scinotes/tests/unit_tests/Actions.dia.ref b/modules/scinotes/tests/unit_tests/Actions.dia.ref
new file mode 100755
index 000000000..a549689a8
--- /dev/null
+++ b/modules/scinotes/tests/unit_tests/Actions.dia.ref
@@ -0,0 +1,49 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+f=TMPDIR + "/file_to_correct.sci";
+mputl(["a=''abcdef'' ";
+ "if a==1";
+ " b=1+""abcdef'' ";
+ " c=2";
+ " d=3 ";
+ " if ";
+ "a=''abcdef""""""";
+ " end";
+ " end "], f);
+scinotes(f, ["indent" "trailing" "quote"]);
+good = ["a=""abcdef""";
+ "if a==1";
+ " b=1+""abcdef""";
+ " c=2";
+ " d=3";
+ " if";
+ " a=""abcdef""""""";
+ " end";
+ "end"]
+ good =
+
+!a="abcdef" !
+! !
+!if a==1 !
+! !
+! b=1+"abcdef" !
+! !
+! c=2 !
+! !
+! d=3 !
+! !
+! if !
+! !
+! a="abcdef""" !
+! !
+! end !
+! !
+!end !
+corrected = mgetl(f);
+if (good <> corrected) then bugmes();quit;end;
diff --git a/modules/scinotes/tests/unit_tests/Actions.tst b/modules/scinotes/tests/unit_tests/Actions.tst
new file mode 100755
index 000000000..0aee68d4e
--- /dev/null
+++ b/modules/scinotes/tests/unit_tests/Actions.tst
@@ -0,0 +1,35 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+f=TMPDIR + "/file_to_correct.sci";
+mputl(["a=''abcdef'' ";
+ "if a==1";
+ " b=1+""abcdef'' ";
+ " c=2";
+ " d=3 ";
+ " if ";
+ "a=''abcdef""""""";
+ " end";
+ " end "], f);
+
+scinotes(f, ["indent" "trailing" "quote"]);
+
+good = ["a=""abcdef""";
+ "if a==1";
+ " b=1+""abcdef""";
+ " c=2";
+ " d=3";
+ " if";
+ " a=""abcdef""""""";
+ " end";
+ "end"]
+
+corrected = mgetl(f);
+
+if (good <> corrected) then pause, end; \ No newline at end of file
diff --git a/modules/scinotes/tests/unit_tests/CompletionOnMlist.tst b/modules/scinotes/tests/unit_tests/CompletionOnMlist.tst
new file mode 100755
index 000000000..eed1440ac
--- /dev/null
+++ b/modules/scinotes/tests/unit_tests/CompletionOnMlist.tst
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- INTERACTIVE TEST -->
+
+test = TMPDIR + "/testCompletionOnMlist.sci";
+ML = mlist(["type" "a" "ab" "abc" "abcd" "bcd"],1,2,3,4,5);
+mputl(["// Put the cursor after ML."; ..
+ "ML."; ..
+ "// and hit CTRL+<SPACE>, you should have a, ab, abc, abcd, bcd"; ..
+ "ML.ab"
+ "// now put the cursor after ab and CTRL+<SPACE>, you should have ab, abc, abcd"], test);
+scinotes(test);
diff --git a/modules/scinotes/tests/unit_tests/CopyAsHTML.tst b/modules/scinotes/tests/unit_tests/CopyAsHTML.tst
new file mode 100755
index 000000000..2f699a13b
--- /dev/null
+++ b/modules/scinotes/tests/unit_tests/CopyAsHTML.tst
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- INTERACTIVE TEST -->
+
+edit test_run;
+
+// select all the code with ctrl+a
+// copy the selection with ctrl+c
+// paste it in OpenOffice and look at how it is nice...
+// paste it scinotes and it must be normal code as usual. \ No newline at end of file
diff --git a/modules/scinotes/tests/unit_tests/LaTeXPreview.tst b/modules/scinotes/tests/unit_tests/LaTeXPreview.tst
new file mode 100755
index 000000000..af03ac17b
--- /dev/null
+++ b/modules/scinotes/tests/unit_tests/LaTeXPreview.tst
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Calixte DENIZET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+// <-- INTERACTIVE TEST -->
+
+test = TMPDIR + "/testLaTeXPreview.sci";
+mputl(["// $\sum_{n=1}^{+\infty}\frac{1}{n^2}=\frac{\pi^2}{6}$"; ..
+ "xtitle(''$\huge\int_\Omega f\,\mathrm{d}\mu$'')"; ..
+ ""], test);
+scinotes(test);
+
+// Move the mouse on the LaTeX formulas