aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
Commit message (Collapse)AuthorAgeFilesLines
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-3/+1
| | | | | | | | | | | | | | | - Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
* • Comment current Query/SelectionBibiko2009-07-151-5/+0
| | | | | | | - changed comment string to "-- " - fixed bug in uncomment - added gear menu item -- TODO: change menu item title according to selection/current query (coming soon)
* • initial support for ⌘/ in CustomQuery editor to (un)comment out the ↵Bibiko2009-07-151-1/+5
| | | | | | current query or selection by inserting "# " at the begin of each line - Note: not yet finished completely
* • fixed dealloc of 'suggestions' in SPNarrowDownCompletionBibiko2009-07-151-15/+11
| | | | | • deleted (void)paste hook from CMTextView (not needed anymore) • decreased iteration cycles for 'normal' completion (ESC) by getting only the unique words from the current textView
* • narrow-down completion (F5)Bibiko2009-07-151-20/+10
| | | | | - added view icon for Views - improved some tiny code snippets
* - Make the DBView window the document window. This allows the document to ↵rowanbeentje2009-07-151-1/+3
| | | | | | | | | | be closed when the window is closed, freeing the document's memory - Update a number of dealloc methods to include more retained memory, and to avoid releasing non-retained memory - Remove notification observers and delegates where appropriate to avoid issues after document closing - Fix a couple of memory leaks - Support window cascading for all windows past the first, using the first window as the autosave window
* • fix for completion in CustomQuery editorBibiko2009-07-141-78/+26
| | | | | | | - now the gathering of suggestions does not query the MySQL connection, instead it uses the TableList/TableDocument tableView data as a kind of cache - this approach should improve the speed for slow server connections TODO: auto-update for TableList and Database List resp. (it could happen that an other user changed the name of a table/db meanwhile)
* Fixed some memory leaksbamse162009-07-061-8/+12
|
* • trial to improve the Undo behaviour in the Custom Query editorBibiko2009-06-251-1/+3
|
* • some code cleaning and tiny performance enhancements for syntax highlightingBibiko2009-06-211-39/+31
|
* • added support to drag&drop textClipping files to Custom Query Editor and ↵Bibiko2009-06-191-1/+13
| | | | | | | to editSheet • fixed tiny issue for narrow-down completion
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-5/+6
| | | | | | | | | - id o = NSArrayObjectAtIndex(anArray, index) :== id o = [anArray objectAtIndex:index] - this speed up it ~3µs per call - replaced that inline function for such calls within loops to speed up them • used IMP function pointers for keepAlive calls within queryString: • set -O3 (Fastest) compiler option • allow in preference pane "Tables" to set the Limit up to 50000
* • introduced inline function NSStringUTF8String() to SPStringAdditions.hBibiko2009-06-181-1/+2
| | | | | | - NSData *d = [aStr UTF8String]; :== NSData *d = NSStrignUTF8String(aStr) but a tick faster • implemented NSStringUTF8String() in queryString: and for the lex parser (syntax highlighting)
* • deleted the drag&drop feature of file path or content from ↵Bibiko2009-06-151-0/+172
| | | | | | | | | | | SPTextViewAdditions - that feature should be added by subclassing NSTextView • fixed focus setting of editSheet • fixed general issue if SP tries to execute a query which is longer than max_allowed_packet - now it reconnects after changing max_allowed_packet (if it's editable) - the user will be informed via a log entry about that change - the new max_allowed_packet size will be valid during the current session; after reconnection to that db the default size will be used
* • moved code for de/increasing font and drag&drop feature (content or ↵Bibiko2009-06-131-214/+0
| | | | | | | | | | | | | | while holding ⌘ path) to SPTextViewAddition - two finger zooming gesture is disabled for NSTableView cells - i.e. all NSTextViews including NSTableView cells inherit these feature • simplified QuickLookFormat IBActions - added bin/text storing type to each action • QuickLook animation set to SP's window middle point • fixed issue that while having an image in editSheet an attribute change (font/size) in the editTextView destroyed the image data • fix to allow again drag&drop an image to editSheet • hide text/image/hex segment controll and QuickLook pull down button if user chose multipleLineEditingButton for non-blob fields • disabled NSLog of print result in TableDocument
* • fixed bug for "Show help while typing" - prevent an internal loop of ↵Bibiko2009-06-091-1/+2
| | | | calling ShowMySQLHelpForCurrentWord if "Highlight the current Query" is activated.
* • improved "Copy as SQL INSERT" (still hidden)Bibiko2009-06-071-1/+8
| | | | • disabled "Copy with Column Names" if Custom Query editor is active
* • improved: sped up removing the background color for query highlightingBibiko2009-06-061-0/+3
| | | | • added: DELIMITER to the completion suggestions
* • reload table list, database pull-down menu according to user's ↵Bibiko2009-06-051-1/+4
| | | | | | | | | statements in the Custom Query editor if necessary - if statement begins with: use, create, alter, rename, drop • reload table list, database pull-down menu according to imported statements • sped up "Import MySQL Dump" • fixed some tiny issues of the last commit
* Fixed some memory leaks found using llvm/clang. There are still some to fixbamse162009-06-051-5/+11
|
* • added: syntax highlighting to the HUD window "Show Create Syntax"Bibiko2009-06-041-0/+8
| | | | • fixed: context menu item validation for "Show MySQL Help": hide it when no connection to the customQueryInstance is found
* • fixed typo for "Select Active Query" key-binding ^Y not ^QBibiko2009-06-041-2/+2
|
* • fixed: suppress highlighting of the current query if something is selectedBibiko2009-06-041-2/+28
| | | | • added: "Select Active Query ^Y" context menu item to the Custom Query Editor
* • control editable status of CMTextView while changing the font size via ↵Bibiko2009-05-281-0/+6
| | | | ⌘+/- or finger gesture since CMTextVIew is also used for other views
* • added two finger zoom gesture for de/increasing the font size of the ↵Bibiko2009-05-251-0/+15
| | | | Custom Query Editor
* • improved narrow-down completionBibiko2009-05-251-15/+50
| | | | | - first trial to use images for suggestions (up to now supported: tables/views, funcs, procs, dbs, otherwise show a transparent dummy)
* • improved narrow-down completionBibiko2009-05-251-1/+1
| | | | | - if suggestion list contains a space add a space to the allowed textual input characters if not a space closes the pull-down list - some minor fine-tuning
* • improved narrow-down completionBibiko2009-05-241-13/+43
| | | | | - added support for "in-quote completion" based on suggestions of the spell checker dict and the current used words in the textView - still bound to F5
* • activate Preference setting for caret colorBibiko2009-05-241-1/+157
| | | | | | | | • added prototype for new completion (ESC -> Cocoa, F5 -> new completion) - not yet finished - TODO: -- support for NSSpellChecker items -- images for different types of suggestions like proc/func/tabkle/view/sql statement, db name, etc.
* - Few Changes to Query Editor Preferenceavenjamin2009-05-221-13/+13
| | | | | - Cleaned up a few preference keys - Added Caret Color to Query Editor Prefs - disabled for now.
* • fixed several issues for completion Bibiko2009-05-201-14/+29
| | | | | | | - suppress auto-uppercasing of certain keyword combinations after insertion of a suggestion • syntax highlighting will only be invoked if the user really changed the text buffer • moved the deletion of all kQuote attributes to completionsForPartialWordRange:... method
* • made mySQLConnection reachable for CMTextViewBibiko2009-05-201-19/+67
| | | | | | | • for MySQL version > 4 added proc/func names to the completion suggestion list • changed the way of adding the table names to the completion suggestion list - now it uses [mySQLConnection listTables] instead of taking the names from the table view list due to the header items • added some pragma marks to CMTextView
* • added "Copy as RTF" to CustomQuery's context menu and bound it to CTRL+C ↵Bibiko2009-05-201-2/+16
| | | | (other format could also be added - waiting for user feedback)
* • removed unused variable 'keyCode'Bibiko2009-05-201-1/+0
|
* • added ⌘+ and ⌘- for increasing/decreasing the font size by 1 in the ↵Bibiko2009-05-201-0/+31
| | | | Custom Query Editor quickly
* • improved completion suggestion for variable name; added delimiter ↵Bibiko2009-05-201-1/+1
| | | | “@” for word detection
* • fixed some issues for drag&drop a file to the CustomQuery editorBibiko2009-05-191-1/+2
| | | | | - close sheet before inserting - ensure that a file with the extension "sql" will be inserted (UNIX "file" could detect a file as being a non plain text file)
* • improved "Update Help while typing"Bibiko2009-05-191-4/+9
| | | | - it recognizes any keyDown event including arrow keys
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-1/+2
|
* • skip auto-pairing if the caret is adjoined to an alphanumeric character ↵Bibiko2009-05-191-2/+30
| | | | except if the inserted character will be a “(” and the caret is located at the end of a string then process the auto-pairing
* • added drag 'n' drop functionality to CMTextView to allow to drag a file ↵Bibiko2009-05-081-107/+292
| | | | | | | | | | path onto the Custom Query editor in order to insert the file content - ⌘ + drag inserts the file name - if file's content size > 1MB it asks for confirmation - it tries to auto-detect the file's encoding (stable for UTF8/16/32, Latin1, MacRoman) - it tries to insert only plain text files (by using of the UNIX 'file -I' command) - error messages etc. are written to the console.log + NSBeep
* • added "Query Editor" preference pane for setting colors, font, and modes ↵Bibiko2009-05-071-88/+205
| | | | | | | | | | | | | | | | | (from the CQ's action gear which are still customizable there) - in addition to the syntax colors it's now possible to change the fore/background color as well • added "Update Help while typing" feature in the Custom Query editor • first trial to improve syntax highlighting for large text in the Custom Query editor - if the text is larger than 10k the highlighting is performed only for the visible text area ±bias (3.5k) - if the user changes the visible area the highlighting follows time-delayed 500ms) to assure user interaction - a test with a 45MB SQL dump worked (of course a tick slowier) -- todo: improve prev/current query detection (mainly the SQLParser) - if the text size is > 6MB the completion list won't show words from the text due to parsing time - if the text size is > 6MB the line numbering will be disabled due to performance issue (improvements should follow) • some tiny clarification changes in the syntax highlighting code • some minor code cosmetics
* • improved completion in CQ's text viewBibiko2009-05-021-38/+81
| | | | | | | - added database names - fixed logic for detecting if caret is inside quotes - if caret inside backticks show only db, table, column names • outsourced syntax highlighting into a method for further improvements
* - Fix indentation behaviour when there are spaces after as well as before ↵rowanbeentje2009-04-301-1/+9
| | | | the cursor on the current line; now indents to the correct level, instead of increasing indentation incorrectly
* • changed context menu item in CQ's textview to support "MySQL Help"Bibiko2009-04-301-34/+27
| | | | | • prepared code to work with autoHelp • improved getRangeForCurrentWord (fix for " |a")
* • MySQL HelpBibiko2009-04-301-11/+27
| | | | | | - updated autoHelp, now it recognizes cursor movement via mouse • if the chunk in CQ's textview is too large remove all attributes • some minor code cosmetics
* • MySQL HelpBibiko2009-04-291-11/+57
| | | | | - first trial to implement an "autoHelp" function This function calls showHelpForCurrentWord (or selection) 1 sec after stopping typing and shows the Help in the Help window if the caret is not inside of quotes. To invoke it set autohelpEnabled=YES in CMTextView.m's awakeFromNib method.
* • MySQL Help refactoringBibiko2009-04-291-1/+1
|
* • added a prototype to support an Help view for the current word in the ↵Bibiko2009-04-241-0/+9
| | | | | | Custom Query text view - work in progress!
* • updated completion list and added core functionsBibiko2009-04-231-5/+317
| | | | | • improved separator list for word list completion coming from the text view • minor update for syntax highlighting
2' href='#n1312'>1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095