Compare commits

...

274 commits

Author SHA1 Message Date
Riccardo Mottola
b7fcad40f8 Merge branch 'master' of https://github.com/gnustep/apps-projectcenter 2025-01-26 19:10:08 +01:00
Riccardo Mottola
1b7cc44ff1 update FSF address 2025-01-26 19:09:57 +01:00
Gregory John Casamento
6c0063600d Update resources for Application project so that it includes a window, a connection to the window and a slightly improved AppController 2024-12-07 14:05:18 -05:00
Gregory Casamento
4405dcc8c4
Update CODEOWNERS 2024-07-18 14:38:04 -04:00
Riccardo Mottola
de5e8f63c5 merge 2023-01-16 21:31:01 +01:00
Riccardo Mottola
63af855c24 nil the delegates of the split-view, avoid a crash on close window. 2023-01-16 21:24:21 +01:00
Riccardo Mottola
5964418bb1 bump year 2023-01-13 19:42:50 +01:00
Riccardo Mottola
ac3fad4b6f fix some NSLogs 2023-01-13 19:36:29 +01:00
Riccardo Mottola
05e4b859be Don't assign nil, it is useless, just destroy it: retaining nil is useless. 2023-01-13 19:36:00 +01:00
Riccardo Mottola
f5bdb40882 fix redundant format parameters 2023-01-13 19:28:07 +01:00
Riccardo Mottola
7ce2cd367a minor casts 2023-01-13 18:23:17 +01:00
Riccardo Mottola
fdebc6367f Reduce scope of _extScrollView _intScrollView from ivar to local variables, release after setting to content view and fix double-release of _intScrollView. 2023-01-12 23:33:25 +01:00
Riccardo Mottola
fc194db093 Merge branch 'master' of https://github.com/gnustep/apps-projectcenter 2022-04-21 08:06:39 +02:00
Riccardo Mottola
c37b1dbe05 remove debug log 2022-04-12 22:24:52 +02:00
Riccardo Mottola
79150d285b remove spurious 2022-04-12 00:27:19 +02:00
Riccardo Mottola
5932086c64 cleanup 2022-02-02 16:37:30 +01:00
Riccardo Mottola
cdfebcedba update copyright 2022-01-12 01:20:36 +01:00
Riccardo
7f100b4ecd
Merge pull request #31 from gnustep/DebuggerRefactor
fix label sizes in application inspector
2022-01-11 00:08:22 +01:00
Riccardo Mottola
cc48c443fa fix label sizes in applicatoin inspector 2022-01-11 00:06:24 +01:00
Riccardo Mottola
5244eb1037 minor fix for helpfile nil check 2022-01-10 18:56:01 +01:00
Riccardo Mottola
aeeaf4c3ab fix connection 2021-12-15 01:15:07 +01:00
Riccardo Mottola
8c3ebba096 bump version 2021-12-14 13:33:09 +01:00
Riccardo Mottola
beb93d83e3 make copyright come from info plist and not hard-coded in the gorm file 2021-12-14 13:00:46 +01:00
Riccardo Mottola
7e64e50cda remove some debug logs 2021-12-13 23:49:56 +01:00
Riccardo Mottola
2c1c01f807 put timer delays in constants; run highlighting on a timer too 2021-12-01 01:37:45 +01:00
Riccardo Mottola
52539893eb Merge branch 'LineStatus' 2021-11-30 23:37:13 +01:00
Riccardo Mottola
522edc8cf6 Use a timer also for line calculation and status update 2021-11-30 23:26:02 +01:00
Riccardo
0d75eae5d0
Merge pull request #30 from svgol/tmp_textColor_unbalanced
the ivar PCEditor->textColor is assigned in the unbalanced manner
2021-11-30 16:49:58 +01:00
Sergei Golovin
d63d77b98e * fixed a memory leak
* Modules/Editors/ProjectCenter/PCEditor.m:
  - replaced RETAIN() with ASSIGN() to avoid memory leaking;
2021-11-29 12:20:33 +04:00
Sergei Golovin
377359a92f * fixed a unbalanced retain/release ivar
* Modules/Editors/ProjectCenter/PCEditor.m:
  - changed the -[openFileAtPath:editorManager:editable:] to retain
    the ivar 'textColor'... to balance its retain/release count;
2021-11-29 07:59:31 +04:00
Riccardo Mottola
cf1b7a3215 merge from master 2021-11-29 01:40:58 +01:00
Riccardo
c8c3b2fc0e
Merge pull request #28 from gnustep/ImproveHighlighting
Improve highlighting
2021-11-29 00:13:09 +01:00
Riccardo
008b192d99
Merge branch 'master' into ImproveHighlighting 2021-11-28 23:59:25 +01:00
Riccardo Mottola
c0f24a756f cleanup some debug logs 2021-11-28 23:40:43 +01:00
Riccardo Mottola
0b8ae1f554 manual cherry-pick of event cleanup 2021-11-26 12:30:05 +01:00
Riccardo Mottola
4216c13cda Do not send double computeNewParenthesisNesting: on key pressed.
Furthermore, use a timer so that in case of rapid re-computing it gets invalidated before and only calculated at the last event.
2021-11-26 02:20:40 +01:00
Riccardo Mottola
01a3a61b2e do not change font on highlight, just the background: thus storing the old font attributes becomes needless 2021-11-23 01:22:54 +01:00
Riccardo Mottola
a0856faf21 remane textBackground to textBackgroundColor and use that for restoring highlit characters, without resding/storing such attribute 2021-11-23 01:09:50 +01:00
Riccardo Mottola
1749847eac minor optimizations 2021-11-23 00:42:13 +01:00
Riccardo Mottola
8ab1b66eb5 fix spelling error in ivar 2021-10-28 01:40:01 +02:00
Riccardo Mottola
d6a2ce3650 remove foreground color, we do not change it when highlighting 2021-10-28 01:36:39 +02:00
Riccardo Mottola
60db8c598f refactor some of the character highlighting, trying to rely only on the start-end pair of locations without old extra variables 2021-10-21 23:36:13 +02:00
Riccardo
49a778a8ad
Merge pull request #27 from gnustep/Improve_IndentHandling
cleanup insertText
2021-10-21 20:41:59 +02:00
Riccardo Mottola
ae35ca4c10 Remove insertText and handle keys through appropriate methods (inserTab, cancelOperation)Remove insertText and handle keys through appropriate methods (inserTab, cancelOperation) 2021-10-19 00:17:03 +02:00
Riccardo Mottola
61eff93341 fix status lin in internal view 2021-09-22 00:34:36 +02:00
Riccardo Mottola
5b988495cc fix external view 2021-09-21 23:40:21 +02:00
Riccardo Mottola
aaaea5965b update the line status 2021-09-17 01:25:58 +02:00
Riccardo
07c911b995
Merge pull request #26 from gnustep/master
keep branch up-to-date
2021-09-17 01:18:43 +02:00
Riccardo Mottola
aff171ceff instead of using getLineStart which returns a character after scanning lines, we directly scan lines and count the newlines, so the string is needs to be scanned once only to know hoe many newlines. Some IMP caching to improve this ineffcient o(n) at every cursor movement 2021-09-17 00:53:40 +02:00
Riccardo Mottola
bae62a963b actually store the preference color in textColor ivar 2021-09-16 00:52:15 +02:00
Gregory John Casamento
bedce090f9 Merge branch 'master' of github.com:gnustep/apps-projectcenter 2021-08-29 06:44:17 -04:00
Gregory John Casamento
aa76e6406c Release infoController and projectManager 2021-08-29 06:44:08 -04:00
Riccardo Mottola
b701d1a40b also keep ligatures off when reverting 2021-08-19 14:57:24 +02:00
Riccardo Mottola
b3fa5f1949 turn off ligatures in the code editor 2021-08-19 14:50:58 +02:00
Riccardo Mottola
d49d4d6e5f cleanup inforpanel init and proper centering 2021-08-18 23:11:45 +02:00
Riccardo
77972b4abb
Merge pull request #25 from gnustep/revert-20-master
Revert "Centered information panel."
2021-08-18 19:16:46 +02:00
Riccardo
994aff232c
Revert "Centered information panel." 2021-08-18 19:16:05 +02:00
Gregory Casamento
0b9e2ddb8d
Merge pull request #20 from armm77/master
Centered information panel.
2021-08-17 07:43:19 -04:00
Riccardo Mottola
538016b372 Revert "Merge branch 'dock_fix'"
This commit is a hack, for an unclean environment. It is especially bad
to copy an environment and then remove just a single environment
variable.

This reverts commit 82d4d12f82, reversing
changes made to 0bce146347.
2021-08-16 15:45:53 +02:00
Gregory John Casamento
82d4d12f82 Merge branch 'dock_fix' 2021-08-14 07:58:12 -04:00
Gregory John Casamento
0bce146347 Add codeowners file 2021-08-11 00:17:59 -04:00
Gregory John Casamento
ffcf6cfff6 Add code to set environment explicitly to prevent build failure. 2021-08-11 00:14:59 -04:00
Gregory John Casamento
c0742c88a3 Changelog update 2021-08-10 10:06:00 -04:00
Gregory Casamento
af4e9fffe4
Merge pull request #19 from gnustep/debugger_editor 2021-08-09 19:23:57 -04:00
armm77
0f6ce6ba95 Centered information panel. 2021-08-08 17:53:48 -04:00
Gregory John Casamento
aed50386f7 Merge branch 'LineStatus' of github.com:gnustep/apps-projectcenter into LineStatus 2021-08-03 19:45:51 -04:00
Gregory John Casamento
6c59f53df4 Changes to use _containerView as main internal view. 2021-08-03 19:45:30 -04:00
Riccardo Mottola
7504a154e1 status bar, still incomplete resizes badly / does not show internally 2021-08-03 19:45:30 -04:00
Gregory John Casamento
f9633b2db6 Changes to use _containerView as main internal view. 2021-08-03 19:44:29 -04:00
Riccardo Mottola
18136e7678 get selected range of selection 2021-08-04 01:42:08 +02:00
Riccardo Mottola
f9d8e56a2e actually register NSTextViewDidChangeSelectionNotification 2021-08-04 00:53:34 +02:00
Gregory John Casamento
736093b0c1 Fix centering issue 2021-08-03 18:48:00 -04:00
Gregory John Casamento
87988f435c Make update of file appear in the in-window editor instead of external editors 2021-08-03 17:16:26 -04:00
Gregory John Casamento
56d789e232 Add capability to debugger to focus on file and line which has been stopped on 2021-08-01 17:01:58 -04:00
Riccardo Mottola
991b7fba21 status bar, still incomplete resizes badly / does not show internally 2021-07-30 02:29:59 +02:00
Riccardo
25f423bebd
Merge pull request #18 from gnustep/DebuggerRefactor
Debugger refactor
2021-07-30 01:20:55 +02:00
Riccardo Mottola
dd9a827b30 cleanup and add a debug log 2021-07-28 01:22:08 +02:00
Riccardo Mottola
56f5d087b9 Do not release window when clesed, since now we re-use it on re-show 2021-07-21 23:00:28 +02:00
Riccardo Mottola
7dedd5871f log gotten PID 2021-07-19 02:03:34 +02:00
Riccardo Mottola
7c30ee1f38 camel case 2021-07-19 01:47:32 +02:00
Riccardo Mottola
b7cfa30f20 increase parsing of stream and async records, also log LogStreamOutput as aid 2021-07-19 01:46:01 +02:00
Riccardo Mottola
f68e83ad6f Don't send keystrokes directly to gdb, but accumulate a line until return and send, allows to handle backspaces. 2021-07-16 19:49:23 +02:00
Riccardo Mottola
c567c110a3 move special del handling into typeString away from keyDown 2021-07-15 01:16:15 +02:00
Riccardo Mottola
725da9e9c8 move debugger arguments down into the wrapper, since they are GDB specific. Interpret now the Path as the executable path, requiring the debugger path to be set earlier in the wrapper setup 2021-07-15 00:03:48 +02:00
Gregory Casamento
4d19c42454 Add scripts 2021-07-14 11:11:22 -04:00
Gregory Casamento
822e7f0d3a
Create main.yml 2021-07-14 11:09:58 -04:00
Riccardo Mottola
08cd658b6d cleanup 2021-07-13 22:31:02 +02:00
Riccardo Mottola
b3a968b8a3 remove now unused ivar, moved into the controller 2021-07-09 10:31:24 +02:00
Riccardo Mottola
dd1c1e75ba start the debugger only if it was never started, else, reuse it 2021-07-09 01:18:20 +02:00
Riccardo Mottola
ec805871c3 If we already instantiated a Debugger, reuse it. 2021-07-09 01:03:33 +02:00
Riccardo Mottola
b1533c4a02 remove unused accessors 2021-07-09 00:44:02 +02:00
Riccardo Mottola
81e6f3b82a fix constants types 2021-07-09 00:41:04 +02:00
Riccardo Mottola
7adfa56357 the wrapper should be property of the controller, not the view 2021-07-08 23:43:09 +02:00
Riccardo Mottola
67381ab3cc comment out some logs 2021-07-06 22:53:28 +02:00
Riccardo Mottola
a26fbaa6c1 document LAR 2021-07-06 22:45:53 +02:00
Riccardo Mottola
cd0c4972a3 document methods 2021-07-06 22:43:59 +02:00
Riccardo Mottola
c0fd3f8df7 fix skipping of the first opening brace in key-value lists 2021-07-06 22:36:51 +02:00
Riccardo Mottola
8970a0617d parse filename and line on stop 2021-07-06 05:12:13 +02:00
Riccardo Mottola
079467ccc1 make the parser recursive on a single scanner instead of using substrings 2021-07-06 04:58:20 +02:00
Riccardo Mottola
34a07aa4d5 we release what we retain 2021-07-06 02:33:29 +02:00
Riccardo Mottola
a43aff41cf fix access 2021-07-05 02:26:54 +02:00
Riccardo Mottola
5aa4b5813c Make the parser much more recursive and use it also for AsyncStatus records 2021-07-05 02:26:30 +02:00
Riccardo Mottola
5beb3dfe39 move debugger version into the wrapper 2021-07-05 01:07:16 +02:00
Riccardo Mottola
7c741d63e6 more work on debuggerWrappe 2021-06-29 23:42:52 +02:00
Riccardo Mottola
b672b3b77c rename PipeDelegate to GDBWrapper 2021-06-29 00:36:27 +02:00
Riccardo Mottola
244e03d542 handle arrays inside maps 2021-06-25 17:48:52 +02:00
Riccardo Mottola
5aed0a18c2 add crude Array parsing 2021-06-25 04:36:12 +02:00
Riccardo Mottola
058a60fbf4 merge conflict 2021-06-25 04:34:41 +02:00
Riccardo Mottola
08c40f31f3 parse file and line in case of a gdb breakpoint stop 2021-06-22 02:01:47 +02:00
Riccardo Mottola
0375286dcf generalize gdb version to debugger version 2021-06-22 01:49:12 +02:00
Riccardo Mottola
17b6359ba9 Accessor methods for specific debugger information as wellas filename and line. 2021-06-22 01:42:00 +02:00
Riccardo Mottola
6ab80ec17d improve gdb parser to understand information in {} as a sub-dictionary and look-ahead for it 2021-06-22 01:19:38 +02:00
Riccardo Mottola
5da063f7e7 Fix HelpFile by saving the property in the app project and generating the plist. 2021-05-13 03:21:16 +02:00
Riccardo
82c6aa3162
Merge pull request #17 from gnustep/checkExtFileMod
Check ext file mod
2021-05-12 22:23:01 +02:00
Gregory John Casamento
a186488b30 Highlight IBAction/IBOutlet 2021-04-10 06:16:43 -04:00
Gregory John Casamento
196914ef14 Minor fix to syntax highlighting to make it the same as C for equivalent keywords in ObjC 2021-04-10 06:09:54 -04:00
Riccardo Mottola
f9ed96a3e4 offer option to reload file 2021-04-05 19:51:42 +02:00
Riccardo Mottola
2ace3c327a re-set modification date on save, show alert panel 2021-03-31 23:25:50 +02:00
Riccardo Mottola
a6fc84bc9b saveFileTo should not update the save time 2021-02-22 16:55:13 +01:00
Riccardo Mottola
78e4f47c8f use path passed as parameter 2021-02-22 16:00:48 +01:00
Riccardo Mottola
059e105652 Keep track of the file modification date on each open/save, compare it to the current file to detect external modifications. 2021-02-19 10:45:30 +01:00
Riccardo Mottola
aa2ce8fd73 notify Gorm only if the file was really saved, or it will reload the old file 2021-02-18 00:32:47 +01:00
Riccardo
80d0c2575e
Merge pull request #12 from svgol/save_new_in_recent
* save just created projects to the list of recent documents
2021-02-17 23:09:42 +01:00
Riccardo Mottola
209f71d692 Open in project directory preferentially if no last open dir (quick version, ignores file type). 2021-02-12 08:45:16 +01:00
Riccardo Mottola
6544ff872e assure color is in RGB color space vefore calculating inverse 2021-02-11 12:01:48 +01:00
Riccardo
59a0afd3df
Merge pull request #11 from svgol/gorm_rename
* fixed an issue with gorm-file renaming
2021-02-11 00:23:23 +01:00
Sergei Golovin
e618c988a4 * save just created projects to the list of recent documents 2021-02-08 18:44:33 +04:00
Sergei Golovin
19d497c4d1 * fixed an issue with gorm-file renaming
* Framework/PCProject.m:
  - renaming of a gorm file during another file' editor being active
    led to exception  (the case is because we don't have
    editors for gorm files so the last viewed file, not the renamed
    gorm, is present currently to the user)... the cause is not checking
    NSRange on NSNotFound (the active editor's path can have nothing
    common with the renamed path)... added required check to the
    -[renameFile:toFile:]... may be worth to reactivate any editor when
    a gorm file is selected;

* Framework/PCProjectEditor.m:
  - deactivate the active editor on a .gorm file selection;
2021-02-07 14:59:49 +04:00
Riccardo Mottola
dcc9e0ef14 activate project only in one place 2021-02-06 19:55:14 +01:00
Riccardo Mottola
963700e3d6 provide project description for debugging 2021-02-06 19:40:35 +01:00
Riccardo Mottola
b87670431a fix: activate project also if coming from open project 2021-02-06 19:16:17 +01:00
Riccardo Mottola
ad65327732 Respect background selection preferences and infer text as inverse. 2021-02-06 12:31:10 +01:00
Riccardo Mottola
17182aea86 fix return value, avoid warning 2021-02-05 12:39:59 +01:00
Riccardo Mottola
24ede72e4a fixed a segfault due to return void instead of nil- fix by Sergei Golovin 2021-02-04 18:29:54 +01:00
Riccardo Mottola
263106b117 Cleanup a bit the setting of the active project and the key win. 2021-02-04 17:57:40 +01:00
Riccardo Mottola
b5324e9581 pass the sender to the window, log, if enabled, also the window title 2021-02-04 15:21:05 +01:00
Riccardo Mottola
76b8316b5c Check for invalid filenames and in case, reset to the original file name. 2021-02-03 23:17:42 +01:00
Riccardo Mottola
1541788856 Do not open an external editor if an in-window is requested. 2021-02-03 22:16:32 +01:00
Riccardo
eb5837315c
Merge pull request #3 from onflapp/fix-project-builder-log-selection
fix project builder log selection color
2021-02-03 21:14:02 +01:00
Riccardo Mottola
c0a820612c Access preferences directly without going through PCPrefController which is not part of the PC Framework (only its protocol PCPreferences is) 2020-09-09 00:25:28 +02:00
Riccardo Mottola
445b31db3f Separate font accessors in to class and instance methods.
Do not use preferences in class methods, since they are outside the protocol.
2020-09-08 23:52:03 +02:00
Riccardo Mottola
3df9137f39 Add setters for fonts. 2020-09-08 23:28:44 +02:00
rmottola
79125b35a8 use instance variable after setting it correctly 2020-09-08 20:51:23 +02:00
Riccardo Mottola
334bfd1f37 Access Preferences through its protocol, since the launcher is in the Framework. 2020-09-08 17:43:31 +02:00
Riccardo Mottola
654aca86ef ignore swap files 2020-09-08 17:41:42 +02:00
OnFlApp
f911af422f fix selection color of project builder log 2020-08-30 15:19:28 +02:00
Gregory Casamento
acf38c1b62
Merge pull request #2 from enzuru/fix-editor-preference
Fix broken editor preference
2020-04-20 01:50:15 -04:00
Ahmed Khanzada
3b006be691 Fix broken editor preference 2020-04-18 15:48:58 -07:00
Riccardo Mottola
75785db7e4 Fix range to use characters and not glyphs, sicne highlighting is based on chars. 2020-04-16 23:45:12 +02:00
Riccardo Mottola
8b48d77cbb Uniform font defaults to use PCPreferenceController, fix Debugger to actually make setFont work thorugh the view-delegate chain. 2020-03-24 23:54:22 +01:00
Riccardo Mottola
5d80d86a0c do not set delegate to NSOwner, we set it prorgammatically anyway 2020-03-24 23:50:33 +01:00
Riccardo Mottola
5f360ca78b Fix loading of font from preferences. 2020-03-24 17:24:41 +01:00
fredkiefer
0cdbc996a9 Remove compiler warnings by removing unneeded code. 2019-12-29 13:37:39 +01:00
Riccardo Mottola
6c4099258c Uniform context type to NSUInteger 2019-05-25 18:02:29 +02:00
Riccardo Mottola
97aa34218f Remove custom ToolTip implementation now present in GUI 2019-05-21 23:15:16 +02:00
Riccardo Mottola
0f8d024577 Add some GSDoc makefile aids 2018-06-19 00:21:26 +02:00
Riccardo Mottola
bf394dce9c Fix for nill bundle identifier. 2017-08-16 07:26:43 +02:00
Graham Lee
b4a148712e Add property keywords to ObjC syntax highlighting 2017-07-31 12:13:38 +01:00
Riccardo Mottola
5792e6dbfc Fix wrong declaration and missing subtype option
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40294 72102866-910b-0410-8b05-ffd578937521
2017-01-17 14:42:37 +00:00
Riccardo Mottola
d894b87557 Pass options to createProjectAt and use those to create Gorm/Renaissance subtypes, enable the former by default
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40290 72102866-910b-0410-8b05-ffd578937521
2017-01-13 01:33:37 +00:00
Riccardo Mottola
f1db0b7265 Conditionally split on windows with CR-LF
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40268 72102866-910b-0410-8b05-ffd578937521
2016-12-16 01:24:14 +00:00
Riccardo Mottola
af6ec6a874 Fix off-by-one in length when checking the last character
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40240 72102866-910b-0410-8b05-ffd578937521
2016-11-28 16:07:19 +00:00
Riccardo Mottola
478033988a improve parsing of initial and ending, fix pasing of quoted quotes as well
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40238 72102866-910b-0410-8b05-ffd578937521
2016-11-25 17:27:15 +00:00
Riccardo Mottola
340d101ffd skip and report empty lines as PCDBEmptyRecord
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40234 72102866-910b-0410-8b05-ffd578937521
2016-11-25 15:51:28 +00:00
Riccardo Mottola
6e70451153 do not show string
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40233 72102866-910b-0410-8b05-ffd578937521
2016-11-25 14:05:02 +00:00
Gregory John Casamento
19997eb5c1 Implemented debuggerSetup method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40227 72102866-910b-0410-8b05-ffd578937521
2016-11-19 16:25:37 +00:00
Riccardo Mottola
b9df6e5d27 Commands need new-line
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40224 72102866-910b-0410-8b05-ffd578937521
2016-11-18 00:23:54 +00:00
Riccardo Mottola
3edc315827 Connect add/remove buttons.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40223 72102866-910b-0410-8b05-ffd578937521
2016-11-18 00:13:35 +00:00
Gregory John Casamento
eab302cc30 Change debuggerStarted to YES.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40222 72102866-910b-0410-8b05-ffd578937521
2016-11-17 14:21:29 +00:00
Gregory John Casamento
b7fc2a0ccf Added notification to fix breakpoint loading.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40221 72102866-910b-0410-8b05-ffd578937521
2016-11-17 14:18:48 +00:00
Riccardo Mottola
db013f327c differentiate line and method insert commands
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40147 72102866-910b-0410-8b05-ffd578937521
2016-10-13 23:12:24 +00:00
Riccardo Mottola
98d05ffe44 Add skeleton to handle breakpoints, add breakpoint types
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40114 72102866-910b-0410-8b05-ffd578937521
2016-09-29 08:58:57 +00:00
Riccardo Mottola
4e2edf5d4f add missing import
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40072 72102866-910b-0410-8b05-ffd578937521
2016-09-07 13:04:38 +00:00
Riccardo Mottola
4228651008 no resources currently
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@40071 72102866-910b-0410-8b05-ffd578937521
2016-09-07 13:04:28 +00:00
Riccardo Mottola
6139623d1e delegate getter
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39963 72102866-910b-0410-8b05-ffd578937521
2016-07-07 09:23:52 +00:00
Riccardo Mottola
93a9d4bb47 make NSIS packageable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39889 72102866-910b-0410-8b05-ffd578937521
2016-06-21 07:37:23 +00:00
Gregory John Casamento
dab7063bc1 Add code to make commands appear when buttons are pressed in the debugger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39839 72102866-910b-0410-8b05-ffd578937521
2016-06-06 15:47:39 +00:00
Riccardo Mottola
0e1fad82d3 tweak label positioning and sizing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39809 72102866-910b-0410-8b05-ffd578937521
2016-05-25 23:40:24 +00:00
Riccardo Mottola
78c6f1622a Transition to NSInteger/NSUInteger
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39798 72102866-910b-0410-8b05-ffd578937521
2016-05-22 20:00:54 +00:00
Riccardo Mottola
2dff311c2a Comply to protocol
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39797 72102866-910b-0410-8b05-ffd578937521
2016-05-22 19:39:04 +00:00
Riccardo Mottola
f06ea6a5b6 some clean up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39796 72102866-910b-0410-8b05-ffd578937521
2016-05-22 18:50:22 +00:00
Richard Frith-MacDonald
9e127b1771 mingw64 fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39783 72102866-910b-0410-8b05-ffd578937521
2016-05-19 07:35:46 +00:00
Riccardo Mottola
196afa593c clean PID before running
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39770 72102866-910b-0410-8b05-ffd578937521
2016-05-16 09:36:35 +00:00
Riccardo Mottola
58ced060bf move header inclusion up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39769 72102866-910b-0410-8b05-ffd578937521
2016-05-15 22:57:30 +00:00
Riccardo Mottola
bd2c3557bc For GDB < v. 7 (on win), attempt to grab process id from Windows thread information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39767 72102866-910b-0410-8b05-ffd578937521
2016-05-15 08:28:57 +00:00
Riccardo Mottola
3c0c85f3a5 On windows kill with DebugBreakProcess() and not tskill. Available only on WinXP or higher.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39766 72102866-910b-0410-8b05-ffd578937521
2016-05-15 08:27:14 +00:00
Riccardo Mottola
27f8ec6f47 minor
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39765 72102866-910b-0410-8b05-ffd578937521
2016-05-15 08:26:40 +00:00
Riccardo Mottola
f2a5703959 parse GDB version from initial information
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39749 72102866-910b-0410-8b05-ffd578937521
2016-05-12 23:41:27 +00:00
Riccardo Mottola
2a05234abb gdb version ivar and accessors. Plus, do not start quiet or version is not shown
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39748 72102866-910b-0410-8b05-ffd578937521
2016-05-12 23:29:47 +00:00
Gregory John Casamento
486dfc7197 Remove PTYView.* classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39733 72102866-910b-0410-8b05-ffd578937521
2016-05-09 05:27:06 +00:00
Riccardo Mottola
684a1b9836 actually set arguments
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39727 72102866-910b-0410-8b05-ffd578937521
2016-05-05 23:27:58 +00:00
Gregory John Casamento
be30cbfa45 Minor changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39726 72102866-910b-0410-8b05-ffd578937521
2016-05-05 19:44:43 +00:00
Gregory John Casamento
7bb6b0a2cc Partial parsing of result records.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39725 72102866-910b-0410-8b05-ffd578937521
2016-05-05 17:15:21 +00:00
Gregory John Casamento
21907bf78c Handle more escaped sequences.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39724 72102866-910b-0410-8b05-ffd578937521
2016-05-05 15:24:23 +00:00
Gregory John Casamento
71a0c53576 Parser code for MI output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39720 72102866-910b-0410-8b05-ffd578937521
2016-05-03 23:41:18 +00:00
Gregory John Casamento
13412a4318 Parse pid from MI output.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39719 72102866-910b-0410-8b05-ffd578937521
2016-05-03 22:01:00 +00:00
Riccardo Mottola
21ddb6e18a call self, not the view, to interrupt
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39718 72102866-910b-0410-8b05-ffd578937521
2016-05-03 21:47:41 +00:00
Riccardo Mottola
18d31ca7ee initialize the PID and use it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39717 72102866-910b-0410-8b05-ffd578937521
2016-05-03 21:31:37 +00:00
Riccardo Mottola
55b4d1a424 move process id into the debugger from the view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39716 72102866-910b-0410-8b05-ffd578937521
2016-05-03 21:26:31 +00:00
Riccardo Mottola
1ab5955e3d move interrupt method to the debugger class and add windows implementation through tskill
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39714 72102866-910b-0410-8b05-ffd578937521
2016-05-03 16:37:37 +00:00
Riccardo Mottola
9396623f6f also update the protocol to executablePath
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39713 72102866-910b-0410-8b05-ffd578937521
2016-05-03 16:24:30 +00:00
Riccardo Mottola
18d49572ee Do not permit deletion beyond the new line or the gdb prompt
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39710 72102866-910b-0410-8b05-ffd578937521
2016-05-02 22:39:25 +00:00
Riccardo Mottola
1efa2a8783 Refactor path to executablePath
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39709 72102866-910b-0410-8b05-ffd578937521
2016-05-02 22:34:57 +00:00
Riccardo Mottola
94cdea40d3 accessors for the pipe delegate to have the debugger
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39704 72102866-910b-0410-8b05-ffd578937521
2016-04-28 13:56:31 +00:00
Riccardo Mottola
ce45c22ac0 reconnect some outlets
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39628 72102866-910b-0410-8b05-ffd578937521
2016-04-06 01:23:34 +00:00
Riccardo Mottola
f1f0317cce make outlets explicit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39624 72102866-910b-0410-8b05-ffd578937521
2016-04-05 23:54:51 +00:00
Riccardo Mottola
cc279c49d0 make outlets explicit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39623 72102866-910b-0410-8b05-ffd578937521
2016-04-05 23:41:26 +00:00
Riccardo Mottola
bc6d46ce5d inherit from NSObject protocol
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39592 72102866-910b-0410-8b05-ffd578937521
2016-03-23 01:32:01 +00:00
Riccardo Mottola
20aaffe6bd view delegate not super
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39591 72102866-910b-0410-8b05-ffd578937521
2016-03-23 01:28:08 +00:00
Riccardo Mottola
9d1a01891c deisable PTY in build
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39590 72102866-910b-0410-8b05-ffd578937521
2016-03-23 00:31:14 +00:00
Riccardo Mottola
0bc7e0d6b1 make ptyview follow the delegate protocol
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39589 72102866-910b-0410-8b05-ffd578937521
2016-03-23 00:19:46 +00:00
Riccardo Mottola
98712ea405 Merge in from pipes branch: stdio/stdout over pipes handled in a separate delegate class
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39588 72102866-910b-0410-8b05-ffd578937521
2016-03-22 23:30:14 +00:00
Riccardo Mottola
ffe529218b add bundle identifier
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39587 72102866-910b-0410-8b05-ffd578937521
2016-03-22 23:17:36 +00:00
Riccardo Mottola
34c9eb4279 Merge from branch: check bundle loading and warn
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39586 72102866-910b-0410-8b05-ffd578937521
2016-03-22 23:16:45 +00:00
Riccardo Mottola
b531ee6acb rename ptyview to pipedelegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39585 72102866-910b-0410-8b05-ffd578937521
2016-03-22 22:36:05 +00:00
Riccardo Mottola
d8e498111e rename ptyview to pipedelegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39583 72102866-910b-0410-8b05-ffd578937521
2016-03-22 22:34:07 +00:00
Riccardo Mottola
be6efbe7ba split view to delegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39582 72102866-910b-0410-8b05-ffd578937521
2016-03-22 22:08:30 +00:00
Riccardo Mottola
715c206bab use fixed font size
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39560 72102866-910b-0410-8b05-ffd578937521
2016-03-17 18:07:59 +00:00
Riccardo Mottola
d32078bd43 color output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39559 72102866-910b-0410-8b05-ffd578937521
2016-03-17 17:05:51 +00:00
Riccardo Mottola
4e43654f0a make more robust and warn if called empty
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39558 72102866-910b-0410-8b05-ffd578937521
2016-03-17 15:21:50 +00:00
Riccardo Mottola
fc3846ac2f warn if no debugger found
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39557 72102866-910b-0410-8b05-ffd578937521
2016-03-17 15:21:11 +00:00
Riccardo Mottola
12c4b63b33 enable debugger on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39556 72102866-910b-0410-8b05-ffd578937521
2016-03-17 15:20:49 +00:00
Riccardo Mottola
e082b8e3d7 treat keyboard input special and log it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39555 72102866-910b-0410-8b05-ffd578937521
2016-03-17 11:09:21 +00:00
Riccardo Mottola
d1a269c0cb handle CR to LF
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39552 72102866-910b-0410-8b05-ffd578937521
2016-03-16 00:50:17 +00:00
Gregory John Casamento
b964564325 Move riccardo's change to a branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39551 72102866-910b-0410-8b05-ffd578937521
2016-03-15 22:48:44 +00:00
Gregory John Casamento
233b83b218 Move Riccardo's recent change to a branch and back it out on trunk so I can continue with MI work.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/ptyview_with_pipes@39550 72102866-910b-0410-8b05-ffd578937521
2016-03-15 22:46:05 +00:00
Riccardo Mottola
4e885f7c5c Use stdio/stdout over pipes instead of a tty
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39545 72102866-910b-0410-8b05-ffd578937521
2016-03-15 18:13:29 +00:00
Riccardo Mottola
372a9c4b82 Update debug executable path search to run, make it work on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39483 72102866-910b-0410-8b05-ffd578937521
2016-03-08 16:54:34 +00:00
Riccardo Mottola
e0617baf52 add bundle identifier in project template
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39479 72102866-910b-0410-8b05-ffd578937521
2016-03-08 12:07:48 +00:00
Riccardo Mottola
4998c77d29 remove my_abs which is not used
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39165 72102866-910b-0410-8b05-ffd578937521
2015-11-09 11:00:28 +00:00
Riccardo Mottola
dcacd40e33 Allocate a Mutable Array before assagning an Array to a MutableArray
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39164 72102866-910b-0410-8b05-ffd578937521
2015-11-09 10:56:56 +00:00
Richard Frith-MacDonald
da18e28fbf Add helpful warning about setting path in main make file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39155 72102866-910b-0410-8b05-ffd578937521
2015-11-05 17:16:02 +00:00
Riccardo Mottola
950ad36c3a CFBundleIdentifier support for Apps.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39153 72102866-910b-0410-8b05-ffd578937521
2015-11-05 01:19:53 +00:00
Riccardo Mottola
e28350370e declare missing method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39128 72102866-910b-0410-8b05-ffd578937521
2015-11-02 22:47:38 +00:00
Riccardo Mottola
75af5d310e Cleanups and NSInteger conversion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39127 72102866-910b-0410-8b05-ffd578937521
2015-11-02 22:35:04 +00:00
Riccardo Mottola
35f05690ed make defaults more sensible, since otherwise with syntax highlighting where the foreground can't be changed (yet) text was unreadable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38941 72102866-910b-0410-8b05-ffd578937521
2015-08-28 21:32:25 +00:00
Riccardo Mottola
17c636f2f7 fix color space and gamma
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38695 72102866-910b-0410-8b05-ffd578937521
2015-06-26 13:43:27 +00:00
Riccardo Mottola
bd84b332de copyright bump
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38642 72102866-910b-0410-8b05-ffd578937521
2015-06-15 22:36:27 +00:00
Riccardo Mottola
711ddd72ab Enable project addition of obj-c++ classes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38641 72102866-910b-0410-8b05-ffd578937521
2015-06-15 22:26:14 +00:00
Riccardo Mottola
f46b6e594a If we have a directory, we check if it is a bundle that an app can open it and open it through NSWorkspace
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38631 72102866-910b-0410-8b05-ffd578937521
2015-06-13 18:01:17 +00:00
Riccardo Mottola
94538f96d0 Re-enable wrongly uncommented statement
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38630 72102866-910b-0410-8b05-ffd578937521
2015-06-13 17:54:03 +00:00
Riccardo Mottola
15b5d6052c clean up initialization
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38629 72102866-910b-0410-8b05-ffd578937521
2015-06-12 23:30:26 +00:00
Riccardo Mottola
1a519dc39d enable syntax highlighting for obj-c++
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38628 72102866-910b-0410-8b05-ffd578937521
2015-06-12 23:25:49 +00:00
Riccardo Mottola
fcd0c869e2 Enable parsing of obj-c++
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38627 72102866-910b-0410-8b05-ffd578937521
2015-06-12 23:17:06 +00:00
Riccardo Mottola
9fb7764ebc add obj-c++ icon resource and associate it in the editor
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38625 72102866-910b-0410-8b05-ffd578937521
2015-06-12 13:37:44 +00:00
Riccardo Mottola
fdae99568e Handle missing image better
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38624 72102866-910b-0410-8b05-ffd578937521
2015-06-12 09:55:32 +00:00
Riccardo Mottola
635a857419 Use the internal editor if it is available, even if no parser is available
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38623 72102866-910b-0410-8b05-ffd578937521
2015-06-12 09:00:49 +00:00
Riccardo Mottola
ebe3320d03 Use the internal editor if it is available, even if no parser is available
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38622 72102866-910b-0410-8b05-ffd578937521
2015-06-12 09:00:40 +00:00
Riccardo Mottola
5abf1258c2 Enable Obj-C++ extension
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38621 72102866-910b-0410-8b05-ffd578937521
2015-06-12 09:00:16 +00:00
Riccardo Mottola
6f7585f7a4 remove debug logs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38618 72102866-910b-0410-8b05-ffd578937521
2015-06-11 21:49:30 +00:00
Riccardo Mottola
be1775dc44 Use console font for the view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38451 72102866-910b-0410-8b05-ffd578937521
2015-04-07 21:17:14 +00:00
Riccardo Mottola
03d439d49c Use constants and not strings as keys.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38450 72102866-910b-0410-8b05-ffd578937521
2015-04-07 21:16:28 +00:00
Riccardo Mottola
7c4cd31b73 set background color with new prefs method, set foreground color (useless)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38427 72102866-910b-0410-8b05-ffd578937521
2015-03-22 23:19:16 +00:00
Riccardo Mottola
1806cf14dc remove debug log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38426 72102866-910b-0410-8b05-ffd578937521
2015-03-22 22:57:16 +00:00
Riccardo Mottola
da0b2d8249 Use Preferences color methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38425 72102866-910b-0410-8b05-ffd578937521
2015-03-22 22:55:22 +00:00
Riccardo Mottola
ea33c39542 Direct preferences method for setting and getting colors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38424 72102866-910b-0410-8b05-ffd578937521
2015-03-22 22:41:10 +00:00
Riccardo Mottola
56f365b1a0 Convert CMYK to RGB before serializing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38423 72102866-910b-0410-8b05-ffd578937521
2015-03-22 21:41:56 +00:00
Riccardo Mottola
cb8e9ca4d7 fix warning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38422 72102866-910b-0410-8b05-ffd578937521
2015-03-22 20:54:24 +00:00
Riccardo Mottola
2bb51c8462 Actually use the background color preference
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38421 72102866-910b-0410-8b05-ffd578937521
2015-03-22 18:26:50 +00:00
Riccardo Mottola
e287500b99 Move colorFromString from PCEditorFSCPrefs to PCPrefsController and make it thus generally available
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38420 72102866-910b-0410-8b05-ffd578937521
2015-03-22 18:06:17 +00:00
Riccardo Mottola
e60d0be099 Generate the PACKAGE_NAME for Frameworks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38404 72102866-910b-0410-8b05-ffd578937521
2015-03-12 20:48:18 +00:00
Riccardo Mottola
b5e637be5f Bug Fix: Set the font manager with the picked font, not always the same
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38398 72102866-910b-0410-8b05-ffd578937521
2015-03-11 10:19:16 +00:00
Riccardo Mottola
0087c6cd17 Use the preferences Editor font instead of the system one
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38397 72102866-910b-0410-8b05-ffd578937521
2015-03-11 07:22:57 +00:00
Riccardo Mottola
ae829b3ac0 Use the preferences Editor font instead of the system one
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38396 72102866-910b-0410-8b05-ffd578937521
2015-03-11 07:22:48 +00:00
Riccardo Mottola
35b76bb231 Provide Editor and Fixed font preferences, instead of plain and rich
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38395 72102866-910b-0410-8b05-ffd578937521
2015-03-11 07:21:35 +00:00
Riccardo Mottola
a180a70e83 Initialize backup wrapper after wrapperPath since it depends on it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38252 72102866-910b-0410-8b05-ffd578937521
2014-12-16 17:32:09 +00:00
Riccardo Mottola
5c25a46af2 Generate sections only if there are classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38251 72102866-910b-0410-8b05-ffd578937521
2014-12-16 16:06:06 +00:00
Riccardo Mottola
4111197fd7 Create mm sections in makefiles for Objective-C++
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38250 72102866-910b-0410-8b05-ffd578937521
2014-12-14 22:36:09 +00:00
Riccardo Mottola
f4110f9817 add mm to plist
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38244 72102866-910b-0410-8b05-ffd578937521
2014-12-08 21:32:38 +00:00
Riccardo Mottola
6ff7f19613 add mm icon
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38243 72102866-910b-0410-8b05-ffd578937521
2014-12-08 18:37:44 +00:00
Riccardo Mottola
8b3327c10b Accept also Objective-C++ classes as Class files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38237 72102866-910b-0410-8b05-ffd578937521
2014-12-07 23:28:59 +00:00
Riccardo Mottola
cfebdb4e0d slightly revamp InfoPanel, remove maintainer, make larger, show all names
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38191 72102866-910b-0410-8b05-ffd578937521
2014-11-20 11:45:57 +00:00
Riccardo Mottola
37fbd2d382 Force last action on parser if file lacks a new line at EOF
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38189 72102866-910b-0410-8b05-ffd578937521
2014-11-20 09:44:42 +00:00
Riccardo Mottola
c900c7c4ce Fix parser to ignore comments inside strings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38186 72102866-910b-0410-8b05-ffd578937521
2014-11-20 00:29:56 +00:00
169 changed files with 3833 additions and 2041 deletions

23
.github/scripts/build.sh vendored Executable file
View file

@ -0,0 +1,23 @@
#! /usr/bin/env sh
set -ex
echo "Building..."
# build dependencies...
./.github/scripts/dependencies.sh
export LIBRARY_PATH=$HOME/staging/lib:$HOME/staging/lib64:$LIBRARY_PATH;
export LD_LIBRARY_PATH=$HOME/staging/lib:$HOME/staging/lib64:$LD_LIBRARY_PATH;
if [ $LIBRARY_COMBO = 'ng-gnu-gnu' ];
then
export CPATH=$HOME/staging/include;
else
export CPATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/include;
fi;
export PATH=$HOME/staging/bin:$PATH;
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles;
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh;
# Build gorm
make && make install && make check || (cat Tests/tests.log && false);

135
.github/scripts/dependencies.sh vendored Executable file
View file

@ -0,0 +1,135 @@
#! /usr/bin/env sh
set -ex
DEP_SRC=$HOME/dependency_source/
DEP_ROOT=$HOME/staging
install_prerequisites() {
sudo apt-get -qq update
sudo apt-get install -y cmake pkg-config libgnutls28-dev libgmp-dev libffi-dev libicu-dev \
libxml2-dev libxslt1-dev libssl-dev libavahi-client-dev zlib1g-dev
if [ $LIBRARY_COMBO = 'gnu-gnu-gnu' ];
then
if [ $CC = 'gcc' ];
then
sudo apt-get install -y gobjc;
fi;
sudo apt-get install -y libobjc-8-dev libblocksruntime-dev;
else
curl -s -o - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -;
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" && sudo apt-get update -qq;
sudo apt-get install -y clang-9 libkqueue-dev libpthread-workqueue-dev;
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-9;
export PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/clang-7.0.0\/bin//');
if [ "$RUNTIME_VERSION" = "gnustep-2.0" ];
then
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 10;
fi;
fi;
if [ $LIBRARY_COMBO = 'ng-gnu-gnu' ];
then
curl -LO https://cmake.org/files/v3.15/cmake-3.15.5-Linux-x86_64.tar.gz;
tar xf cmake-3.15.5-Linux-x86_64.tar.gz;
mv cmake-3.15.5-Linux-x86_64 $HOME/cmake;
export PATH=$HOME/cmake/:$HOME/cmake/bin:$PATH
fi;
}
install_gnustep_make() {
cd $DEP_SRC
git clone https://github.com/gnustep/tools-make.git
cd tools-make
if [ -n "$RUNTIME_VERSION" ]
then
WITH_RUNTIME_ABI="--with-runtime-abi=${RUNTIME_VERSION}"
else
WITH_RUNTIME_ABI=""
fi
./configure --prefix=$DEP_ROOT --with-library-combo=$LIBRARY_COMBO $WITH_RUNTIME_ABI
make install
echo Objective-C build flags: `$HOME/staging/bin/gnustep-config --objc-flags`
}
install_ng_runtime() {
cd $DEP_SRC
git clone https://github.com/gnustep/libobjc2.git
cd libobjc2
git submodule init
git submodule sync
git submodule update
cd ..
mkdir libobjc2/build
cd libobjc2/build
export CC="clang"
export CXX="clang++"
export CXXFLAGS="-std=c++11"
cmake -DTESTS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_INSTALL_PREFIX:PATH=$DEP_ROOT ../
make install
}
install_libdispatch() {
cd $DEP_SRC
# will reference upstream after https://github.com/apple/swift-corelibs-libdispatch/pull/534 is merged
git clone -b system-blocksruntime https://github.com/ngrewe/swift-corelibs-libdispatch.git
mkdir swift-corelibs-libdispatch/build
cd swift-corelibs-libdispatch/build
export CC="clang"
export CXX="clang++"
export LIBRARY_PATH=$DEP_ROOT/lib;
export LD_LIBRARY_PATH=$DEP_ROOT/lib:$LD_LIBRARY_PATH;
export CPATH=$DEP_ROOT/include;
cmake -DBUILD_TESTING=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=$HOME/staging -DINSTALL_PRIVATE_HEADERS=1 -DBlocksRuntime_INCLUDE_DIR=$DEP_ROOT/include -DBlocksRuntime_LIBRARIES=$DEP_ROOT/lib/libobjc.so ../
make install
}
install_gnustep_base() {
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
cd $DEP_SRC
git clone https://github.com/gnustep/libs-base.git
cd libs-base
./configure
make
make install
}
install_gnustep_gui() {
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
cd $DEP_SRC
git clone https://github.com/gnustep/libs-gui.git
cd libs-gui
./configure
make
make install
}
install_gnustep_back() {
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
cd $DEP_SRC
git clone https://github.com/gnustep/libs-back.git
cd libs-back
./configure
make
make install
}
mkdir -p $DEP_SRC
if [ "$LIBRARY_COMBO" = 'ng-gnu-gnu' ]
then
install_ng_runtime
install_libdispatch
fi
install_prerequisites
install_gnustep_make
install_gnustep_base
install_gnustep_gui
install_gnustep_back

10
.github/scripts/test.sh vendored Executable file
View file

@ -0,0 +1,10 @@
#! /usr/bin/env sh
set -ex
echo "Testing..."
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh;
# Test gorm
make check || (cat Tests/tests.log && false);

38
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,38 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on: push
# A workflow run is made up of one or more jobs that can run
# sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
LIBRARY_COMBO: gnu-gnu-gnu
CC: gcc
# Steps represent a sequence of tasks that will be executed as
# part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE,
# so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Build source
run: ./.github/scripts/build.sh
# Runs a single command using the runners shell
- name: Run tests
run: ./.github/scripts/test.sh
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.

14
.gitignore vendored Normal file
View file

@ -0,0 +1,14 @@
*.app
*.debug
*.profile
*.plugin
*.framework
*.debugger
*.editor
*.parser
*.preferences
*.project
*.swp
derived_src
obj
*~

6
CODEOWNERS Normal file
View file

@ -0,0 +1,6 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @rmottola
* @gcasa

532
ChangeLog
View file

@ -1,3 +1,535 @@
2022-01-16 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectWindow.m
nil the delegates of the split-view, avoid a crash on close window.
2022-01-13 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectInspector.m
Don't assign nil, it is useless, just destroy it: retaining nil is
useless.
2022-01-12 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.h
* Modules/Editors/ProjectCenter/PCEditor.m
Reduce scope of _extScrollView _intScrollView from ivar to local
variables, release after setting to content view and fix
double-release of _intScrollView.
2021-11-30 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.h
* Modules/Editors/ProjectCenter/PCEditorView.m
Use a timer also for line calculation and status update.
2021-11-26 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Do not send double computeNewParenthesisNesting: on key pressed.
Furthermore, use a timer so that in case of rapid re-computing
it gets invalidated before and only calculated at the last event.
2021-10-19 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.h
* Modules/Editors/ProjectCenter/PCEditorView.m
Remove insertText and handle keys through appropriate methods (inserTab, cancelOperation)
2021-08-18 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Turn off ligatures, both when setting up the editor as well as when
loading a file.
2021-08-18 Riccardo Mottola <rm@gnu.org>
* PCInfoContronoller.m
Center info panel correctly the first time on load.
2021-08-10 Gregory John Casamento <greg.casamento@gmail.com>
* Framework/PCEditorManager.m: Add method -gotoFile:atLine:
* Framework/PCProjectEditor.m: Add method openEditorForFilePath:windowed:
* Framework/PCProjectManager.m: Add method openFileAtPath:windowed:
* Headers/ProjectCenter/PCEditorManager.h
* Headers/ProjectCenter/PCProjectEditor.h
* Headers/ProjectCenter/PCProjectManager.h: Declarations for above methods.
* Modules/Debuggers/ProjectCenter/GDBWrapper.h
* Modules/Debuggers/ProjectCenter/GDBWrapper.m: Add code to pull
"thread-selected" dictionary when the debugger stops by using break/pause
or by using up or down. Code to syncronize editor with where the debugger
has stopped.
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m: updateEditor method. This
method makes use of the gotoFile:atLine: method to get the file and show it
in the code editor and go to the line where it has stopped.
* Modules/Editors/ProjectCenter/PCEditor.m: Update internal editor
* Modules/Editors/ProjectCenter/PCEditorView.m: minor bugfixes.
2021-07-16 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/GDBWrapper.h
* Modules/Debuggers/ProjectCenter/GDBWrapper.m
Don't send keystrokes directly to gdb, but accumulate a line until return and send, allows to handle backspaces.
2021-07-09 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m
If we already instantiated a Debugger, reuse it.
2021-07-06 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
Change parsing of MI interface to a LAR parser and avoid issue
of recursive [] {} values in the previous parser.
2021-06-22 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
Accessor methods for specific debugger information as wellas filename and line.
2021-05-13 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Application/PCAppProject+Inspector.h
* Modules/Projects/Application/PCAppProject+Inspector.m
* Modules/Projects/Application/PCAppProject.m
* Modules/Projects/Application/Resources/Inspector.gorm
Fix HelpFile by saving the property in the app project and generating
the plist.
2021-02-19 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.h
* Modules/Editors/ProjectCenter/PCEditor.m
Keep track of the file modification date on each open/save,
compare it to the current file to detect external modifications.
2021-02-12 Riccardo Mottola <rm@gnu.org>
* Framework/PCFileManager.m
Open in project directory preferentially if no last open
dir (quick version, ignores file type).
2021-02-06 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Respect background selection preferences and infer text
as inverse.
2021-02-04 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectManager.m
* PCAppController.m:
Cleanup a bit the setting of the active project and the key win.
2021-02-03 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectInspector.m
Check for invalid filenames and in case, reset to the original
file name.
2021-02-03 Riccardo Mottola <rm@gnu.org>
* Framework/PCEditorManager.m:
Do not open an external editor if an in-window is requested.
2020-09-08 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/SyntaxHighlighter.h
* Modules/Editors/ProjectCenter/SyntaxHighlighter.m
Add setters for fonts.
* Modules/Editors/ProjectCenter/PCEditorView.h
* Modules/Editors/ProjectCenter/PCEditorView.m
Separate font accessors in to class and instance methods.
Do not use preferences in class methods, since they are outside the
protocol.
2020-09-08 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m
Access Preferences through its protocol, since the launcher is in the
Framework.
2020-04-16 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.m:(drawRect:)
Fix range to use characters and not glyphs, sicne highlighting is based on chars.
2020-03-24 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PCDebuggerView.h
* Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
* Modules/Editors/ProjectCenter/PCEditorView.m
Uniform font defaults to use PCPreferenceController, fix Debugger to
actually make setFont work thorugh the view-delegate chain.
2020-03-24 Riccardo Mottola <rm@gnu.org>
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
Fix loading of font from preferences.
2019-12-29 Fred Kiefer <FredKiefer@gmx.de>
* Framework/PCButton.m
* Framework/PCProjectBrowser.m
* Framework/PCProjectLauncherPanel.m
* Framework/PCProjectLoadedFilesPanel.m
* Framework/PCProjectManager.m
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
* Modules/Editors/ProjectCenter/SyntaxHighlighter.m
* Modules/Projects/Library/PCLibProject.h
* Modules/Projects/Library/PCLibProject.m
Remove compiler warnings.
* .gitignore: Add file
2019-05-25 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/SyntaxDefinition.h
* Modules/Editors/ProjectCenter/SyntaxDefinition.m
Uniform context type to NSUInteger.
2019-05-22 Riccardo Mottola <rm@gnu.org>
* Framework/PCButton.m
* Headers/ProjectCenter/PCButton.h
Remove custom ToolTip implementation now present in GUI.
2018-06-19 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Framework/PCFrameworkProject.h
* Modules/Projects/Framework/PCFrameworkProject.m
Add some GSDoc makefile aids
2017-08-16 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Application/PCAppProject.m
Fix for nil bundle identifier.
2017-01-17 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectManager.m
* Modules/Projects/Application/PCAppProject.h
Fix wrong declaration and missing subtype option.
2017-01-13 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectManager.m
* Headers/Protocols/ProjectType.h
* Modules/Projects/Aggregate/PCAggregateProject.h
* Modules/Projects/Aggregate/PCAggregateProject.m
* Modules/Projects/Application/PCAppProject.h
* Modules/Projects/Application/PCAppProject.m
* Modules/Projects/Bundle/PCBundleProject.h
* Modules/Projects/Bundle/PCBundleProject.m
* Modules/Projects/Framework/PCFrameworkProject.h
* Modules/Projects/Framework/PCFrameworkProject.m
* Modules/Projects/ResourceSet/PCResourceSetProject.h
* Modules/Projects/ResourceSet/PCResourceSetProject.m
* Modules/Projects/Tool/PCToolProject.h
* Modules/Projects/Tool/PCToolProject.m
Pass options to createProjectAt and use those to create Gorm/Renaissance subtypes, enable the former by default.
2016-12-16 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Conditionally split on windows with CR-LF
2016-11-28 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/PCParser.m
Fix off-by-one in length when checking the last character.
2016-11-25 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
skip and report empty lines as PCDBEmptyRecord
2016-11-19 11:22-EST Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Added/implemented
debuggerSetup method.
2016-11-18 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Application/PCAppProject+Inspector.h
* Modules/Projects/Application/PCAppProject+Inspector.m
* Modules/Projects/Application/Resources/Inspector.gorm
Connect add/remove buttons.
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Commands need new-line.
2016-11-17 09:20-EST Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Change flag to yes
in parseLine method to indicate debugger has started.
2016-11-17 09:18-EST Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Added notification
to fix breakpoint loading.
2016-09-29 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Add skeleton to handle breakpoints, add breakpoint types.
2016-06-06 11:47-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Add code to
make commands appear when the button is pressed.
2016-05-22 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.h
* Modules/Editors/ProjectCenter/PCEditorView.m
Comply to protocol.
* Modules/Editors/ProjectCenter/SyntaxHighlighter.h
* Modules/Editors/ProjectCenter/SyntaxHighlighter.m
Transition to NSInteger/NSUInteger
2016-05-15 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.m
On windows kill with DebugBreakProcess() and not tskill. Available only on WinXP or higher.
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
For GDB < v. 7 (on win), attempt to grab process id from Windows thread information.
2016-05-05 15:43-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Minor changes.
2016-05-05 13:13-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Partial parsing
of result records to yield correct status in debuggerView.
2016-05-05 11:23-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Handle more
escaped sequences to futher clean up output.
2016-05-03 19:40-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Add parsers
to handle output from various types of MI data. Code to handle
each individual case is being written.
2016-05-03 18:00-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PCDebuggerView.m
* Modules/Debuggers/ProjectCenter/PipeDelegate.m: Changes
to allow pid to be passed back to PCDebugger by calling
setSubProcessId once the pid is parsed from the mi output.
2016-05-03 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
Refactor path to executablePath.
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Do not permit deletion beyond the new line or the gdb prompt.
2016-03-23 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.m
* Modules/Debuggers/ProjectCenter/PCDebuggerView.h
* Modules/Debuggers/ProjectCenter/PCDebuggerView.m
* Modules/Debuggers/ProjectCenter/PipeDelegate.h
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
* Modules/Debuggers/ProjectCenter/PCDebuggerViewDelegateProtocol.h
Merge in from pipes branch: stdio/stdout over pipes handled in a separate delegate class.
2016-03-23 Riccardo Mottola <rm@gnu.org>
* Framework/PCBundleManager.m
* Framework/PCProjectLauncher.m
Merge from branch: check bundle loading and warn.
2016-03-15 18:47-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Modules/Debuggers/ProjectCenter/PTYView.h
* Modules/Debuggers/ProjectCenter/PTYView.m:
Undo previous change. Move Riccardo's change to
branch ptyview_with_pipes.
2016-03-14 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PTYView.h
* Modules/Debuggers/ProjectCenter/PTYView.m
Use stdio/stdout over pipes instead of a tty
2016-03-08 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m
Update debug executable path search to run, make it work on windows.
2015-11-09 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectInspector.m
Allocate a Mutable Array before assagning an Array to a MutableArray
2015-11-05 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Application/PCAppProject+Inspector.h
* Modules/Projects/Application/PCAppProject+Inspector.m
* Headers/ProjectCenter/PCDefines.h
* Modules/Projects/Application/PCAppProject.h
* Modules/Projects/Application/PCAppProject.m
* Modules/Projects/Application/Resources/Inspector.gorm
CFBundleIdentifier support for Apps.
2015-11-02 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.m
Cleanups and NSInteger conversion.
* Modules/Editors/ProjectCenter/LineJumper.h
* Modules/Editors/ProjectCenter/LineJumper.m
declare missing method
2015-06-16 Riccardo Mottola <rm@gnu.org>
* Framework/GNUmakefile
* Framework/PCFileCreator.m
* Headers/ProjectCenter/PCFileCreator.h
* Framework/Resources/ocppclass.template
Enable project addition of obj-c++ classes.
2015-06-13 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectEditor.m
Re-enable wrongly uncommented statement.
* Framework/PCEditorManager.m
If we have a directory, we check if it is a bundle that an app can open it and open it through NSWorkspace.
2015-06-12 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Enable parsing of obj-c++
2015-06-12 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/Resources/Info.table
Enable Obj-C++ extension.
* Framework/PCEditorManager.m
Use the internal editor if it is available, even if no parser is available.
* Modules/Editors/ProjectCenter/PCEditor.m
Handle missing image better.
2015-04-07 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.m
Use constants and not strings as keys.
* Modules/Debuggers/ProjectCenter/PCDebugger.m
Use console font for the view.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
Use Preferences color methods.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Headers/Protocols/Preferences.h
* PCPrefController.m
Direct preferences method for setting and getting colors.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
Convert CMYK to RGB before serializing.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Actually use the background color preference.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Headers/Protocols/Preferences.h
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
* PCPrefController.m
Move colorFromString from PCEditorFSCPrefs to PCPrefsController and make it thus generally available.
2015-03-12 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Framework/PCFrameworkProject.m
Generate the PACKAGE_NAME for Frameworks.
2015-03-11 Riccardo Mottola <rm@gnu.org>
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
Bug Fix: Set the font manager with the picked font, not always the same.
2015-03-11 Riccardo Mottola <rm@gnu.org>
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
* Modules/Preferences/EditorFSC/Resources/EditorFSCPrefs.gorm
Provide Editor and Fixed font preferences, instead of plain and rich.
* Modules/Editors/ProjectCenter/PCEditorView.m
Use the preferences Editor font instead of the system one.
2014-12-16 Riccardo Mottola <rm@gnu.org>
* Framework/PCProject.m
Initialize backup wrapper after wrapperPath since it depends on it!
2014-12-16 Riccardo Mottola <rm@gnu.org>
* Framework/PCMakefileFactory.m
Generate sections only if there are classes.
2014-12-15 Riccardo Mottola <rm@gnu.org>
* Framework/PCMakefileFactory.m
Create mm sections in makefiles for Objective-C++
2014-12-08 Riccardo Mottola <rm@gnu.org>
* Framework/PCProject.m
Accept also Objective-C++ classes as Class files
2014-11-20 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/PCParser.m
Force last action on parser if file lacks a new line at EOF.
2014-11-20 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/ObjCCommentHandler.m
Fix parser to ignore comments inside strings.
2014-10-07 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectManager.m

View file

@ -1,11 +1,19 @@
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"showInfoWindow:"
);
Super = NSObject;
};
PCInfoController = {
Actions = (
"showInfoWindow:"
);
Outlets = (
infoWindow,
versionField
versionField,
copyrightField
);
Super = NSObject;
};

Binary file not shown.

Binary file not shown.

View file

@ -7,9 +7,9 @@ include $(GNUSTEP_MAKEFILES)/common.make
#
# Framework
#
VERSION = 0.6.2
VERSION = 0.7.0
FRAMEWORK_NAME = ProjectCenter
ProjectCenter_CURRENT_VERSION_NAME = 0.6.2
ProjectCenter_CURRENT_VERSION_NAME = 0.7.0
ProjectCenter_DEPLOY_WITH_CURRENT_VERSION = yes
ProjectCenter_HEADER_FILES_DIR = ../Headers/ProjectCenter
@ -104,6 +104,7 @@ ProjectCenter_RESOURCE_FILES = \
Resources/header.template \
Resources/postamble.template \
Resources/protocol.template \
Resources/ocppclass.template \
#
# Localization

View file

@ -20,7 +20,7 @@
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 31 Milk Street #960789 Boston, MA 02196 USAA.
#before-all::
# cd ..;rm -f ProjectCenter;$(LN_S) Library ProjectCenter

View file

@ -22,7 +22,7 @@
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 31 Milk Street #960789 Boston, MA 02196 USAA.
#
# Makefile.preamble

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCLogController.h>

View file

@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCAuxiliaryWindow.h>

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
// TODO: Finish support for third party bundles.
@ -129,6 +129,7 @@
reqBundlesInfo = [self infoForBundlesType:extension];
enumerator = [[reqBundlesInfo allKeys] objectEnumerator];
infoTable = nil;
while ((bundlePath = [enumerator nextObject]))
{
infoTable = [reqBundlesInfo objectForKey:bundlePath];
@ -167,6 +168,7 @@
NSString *bundlePath;
NSDictionary *infoTable;
infoTable = nil;
while ((bundlePath = [enumerator nextObject]))
{
infoTable = [reqBundlesInfo objectForKey:bundlePath];
@ -235,6 +237,7 @@
if (!className)
{
NSLog(@"Bundle for class called with empty className");
return nil;
}

View file

@ -1,11 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003-2014 Free Software Foundation
Copyright (C) 2003-2019 Free Software Foundation
Authors: Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
This file is part of ProjectCenter.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@ -19,15 +20,12 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCDefines.h>
#import <AppKit/NSBezierPath.h>
#import <GNUstepGUI/GSTrackingRect.h>
@implementation PCButton
// ============================================================================
@ -37,346 +35,16 @@
- (id)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
[_cell setGradientType:NSGradientConcaveWeak];
[_cell setImageDimsWhenDisabled:YES];
[self setImagePosition:NSImageOnly];
[self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[self setRefusesFirstResponder:YES];
_hasTooltips = NO;
ttTimer = nil;
ttWindow = nil;
ttTitleAttrs = [[NSMutableDictionary alloc] init];
[ttTitleAttrs setObject:[NSFont systemFontOfSize:10.0]
forKey:NSFontAttributeName];
ttBackground = [NSColor colorWithDeviceRed:1.0 green:1.0 blue:0.90 alpha:1.0];
RETAIN(ttBackground);
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(_updateTrackingRects:)
name:NSViewFrameDidChangeNotification
object:[[self window] contentView]];
if (self)
{
[_cell setGradientType:NSGradientConcaveWeak];
[_cell setImageDimsWhenDisabled:YES];
[self setImagePosition:NSImageOnly];
[self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[self setRefusesFirstResponder:YES];
}
return self;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
if (_hasTooltips)
{
[self removeAllToolTips];
RELEASE(ttTitleAttrs);
RELEASE(ttBackground);
RELEASE(ttWindow);
}
[super dealloc];
}
- (oneway void)release
{
// If retain count is number of tracking rects + superview retain,
// remove tracking rects. It seems that tracking rects retain this object.
if (_hasTooltips && [self retainCount] == [_tracking_rects count] + 1)
{
[self removeAllToolTips];
}
[super release];
}
// ============================================================================
// ==== Private methods
// ============================================================================
- (void)_updateTrackingRects:(NSNotification *)aNotif
{
NSTrackingRectTag tag;
NSRect rect;
NSString *string = nil;
int i, j;
GSTrackingRect *tr = nil;
if (_hasTooltips == NO)
{
return;
}
j = [_tracking_rects count];
for (i = 0; i < j; i++)
{
tr = [_tracking_rects objectAtIndex:i];
// Save tooltip string for next addTrackingRect::::
string = [(NSString *)tr->user_data copy];
[self removeTrackingRect:tr->tag];
// NSLog(@"PCButton: tr: %i data: %@", tr->tag, tr->user_data);
rect = [self frame];
rect.origin.x = 0;
rect.origin.y = 0;
tag = [self addTrackingRect:rect
owner:self
userData:string
assumeInside:NO];
if (tr->tag == mainToolTip)
{
mainToolTip = tag;
}
RELEASE(string);
}
}
- (void)_invalidateTimer
{
if (ttTimer == nil)
{
return;
}
// NSLog(@"_invalidateTimer");
if ([ttTimer isValid])
{
[ttTimer invalidate];
}
ttTimer = nil;
}
- (void)_closeToolTipWindow
{
if (ttWindow)
{
[ttWindow close];
ttWindow = nil;
}
}
- (void)_drawToolTip:(NSAttributedString *)title
{
NSRectEdge sides[] = {NSMinXEdge, NSMaxYEdge, NSMaxXEdge, NSMinYEdge};
NSColor *black = [NSColor blackColor];
NSColor *colors[] = {black, black, black, black};
NSRect bounds = [[ttWindow contentView] bounds];
NSRect titleRect;
titleRect = [ttWindow frame];
titleRect.origin.x = 2;
titleRect.origin.y = -2;
[[ttWindow contentView] lockFocus];
[title drawInRect:titleRect];
NSDrawColorTiledRects(bounds, bounds, sides, colors, 4);
[[ttWindow contentView] unlockFocus];
}
- (void)_showTooltip:(NSTimer *)timer
{
NSString *ttText = [timer userInfo];
[self _invalidateTimer];
// NSLog(@"showTooltip: %@", ttText);
// NSLog(@"toolTips: %@", toolTips);
if (ttWindow == nil)
{
NSAttributedString *attributedTitle = nil;
NSSize titleSize;
NSPoint mouseLocation = [NSEvent mouseLocation];
NSRect windowRect;
attributedTitle =
[[NSAttributedString alloc] initWithString:ttText
attributes:ttTitleAttrs];
titleSize = [attributedTitle size];
// Window
windowRect = NSMakeRect(mouseLocation.x + 8,
mouseLocation.y - 16 - (titleSize.height+3),
titleSize.width + 4, titleSize.height + 4);
ttWindow = [[NSWindow alloc] initWithContentRect:windowRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreRetained
defer:YES];
[ttWindow setBackgroundColor:ttBackground];
[ttWindow setReleasedWhenClosed:YES];
[ttWindow setExcludedFromWindowsMenu:YES];
[ttWindow setLevel:NSStatusWindowLevel];
[ttWindow orderFront:nil];
[self _drawToolTip:attributedTitle];
RELEASE(attributedTitle);
}
}
// ============================================================================
// ==== Tool Tips
// ============================================================================
/*- (void)mouseEntered:(NSEvent *)theEvent
{
NSLog (@"mouseEntered");
if (ttTimer == nil)
{
ttTimer = [NSTimer scheduledTimerWithTimeInterval:0.5
target:self
selector:@selector(_showTooltip:)
userInfo:[theEvent userData]
repeats:YES];
[[self window] setAcceptsMouseMovedEvents:YES];
}
}
- (void)mouseExited:(NSEvent *)theEvent
{
// NSLog (@"mouseExited");
[self _invalidateTimer];
[self _closeToolTipWindow];
[[self window] setAcceptsMouseMovedEvents:NO];
}
- (void)mouseDown:(NSEvent *)theEvent
{
// NSLog (@"mouseDown");
[self _invalidateTimer];
[self _closeToolTipWindow];
[super mouseDown:theEvent];
}
- (void)mouseMoved:(NSEvent *)theEvent
{
NSPoint mouseLocation;
NSPoint origin;
// NSLog(@"mouseMoved");
if (ttWindow == nil)
{
return;
}
mouseLocation = [NSEvent mouseLocation];
origin = NSMakePoint(mouseLocation.x + 8,
mouseLocation.y - 16 - [ttWindow frame].size.height);
[ttWindow setFrameOrigin:origin];
}
// NSView methods
- (NSToolTipTag)addToolTipRect:(NSRect)aRect
owner:(id)anObject
userData:(void *)data
{
SEL ownerSelector;
NSTrackingRectTag tag;
if (NSEqualRects(aRect,NSZeroRect) || ttTimer != nil)
{
return -1;
}
ownerSelector = @selector(view:stringForToolTip:point:userData:);
if (![anObject respondsToSelector:ownerSelector]
&& ![anObject isKindOfClass:[NSString class]])
{
return -1;
}
// Set rect tracking
tag = [self addTrackingRect:aRect
owner:self
userData:data
assumeInside:NO];
return tag;
}
- (void)removeAllToolTips
{
int i, j;
GSTrackingRect *tr = nil;
if (_hasTooltips == NO)
{
return;
}
[self _invalidateTimer];
[self _closeToolTipWindow];
j = [_tracking_rects count];
for (i = 0; i < j; i++)
{
tr = [_tracking_rects objectAtIndex:i];
[self removeTrackingRect:tr->tag];
}
mainToolTip = -1;
_hasTooltips = NO;
}
- (void)removeToolTip:(NSToolTipTag)tag
{
[self removeTrackingRect:tag];
}
- (void)setToolTip:(NSString *)string
{
NSTrackingRectTag tag;
NSRect rect;
if (string == nil) // Remove old tooltip
{
if (_hasTooltips)
{
[self _invalidateTimer];
[self _closeToolTipWindow];
[self removeToolTip:mainToolTip];
mainToolTip = -1;
_hasTooltips = NO;
}
}
else
{
// NSLog(@"setToolTip");
rect = [self frame];
rect.origin.x = 0;
rect.origin.y = 0;
tag = [self addTrackingRect:rect
owner:self
userData:string
assumeInside:NO];
_hasTooltips = YES;
}
}
- (NSString *)toolTip
{
NSEnumerator *enumerator = [_tracking_rects objectEnumerator];
GSTrackingRect *tr = nil;
while ((tr = [enumerator nextObject]))
{
if (tr->tag == mainToolTip)
{
return tr->user_data;
}
}
return nil;
}*/
@end

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2014 Free Software Foundation
Copyright (C) 2002-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -30,10 +30,12 @@
#import <ProjectCenter/PCBundleManager.h>
#import <ProjectCenter/PCEditorManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectEditor.h>
#import <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCSaveModified.h>
#import <Protocols/CodeEditor.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
NSString *PCEditorDidChangeFileNameNotification =
@ -97,15 +99,6 @@ NSString *PCEditorDidResignActiveNotification =
selector:@selector(editorDidChangeFileName:)
name:PCEditorDidChangeFileNameNotification
object:nil];
// Debugger
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(debuggerDidHitBreakpoint:)
name:PCProjectBreakpointNotification
object:nil];
// Preferences
}
return self;
@ -170,7 +163,7 @@ NSString *PCEditorDidResignActiveNotification =
id<CodeParser> parser;
BOOL exists = [fm fileExistsAtPath:filePath isDirectory:&isDir];
// Determine if file not exist or file is directory
// Determine if file does not exist or file is directory
if (!exists)
{
NSRunAlertPanel(@"Open Editor",
@ -191,15 +184,31 @@ NSString *PCEditorDidResignActiveNotification =
@"Couldn't open editor for file '%@'.\n"
@"File is not plain text.",
@"Close", nil, nil, filePath);*/
PCLogInfo(self, @"Not a text file %@", filePath);
return nil;
}
}
else
{
NSString *app;
/* we don't have in-window editors for any bundles right now */
if (!windowed)
return nil;
/* Check for bundles and if possible let them be opened by Workspace but only if windowed */
app = [[NSWorkspace sharedWorkspace] getBestAppInRole:@"Editor" forExtension:[fileName pathExtension]];
if (windowed && app != nil)
{
if ([[NSWorkspace sharedWorkspace] openFile: filePath])
return nil;
}
}
// NSLog(@"EditorManager 1: %@", _editorsDict);
editor = [_editorsDict objectForKey: filePath];
if (editor == nil)
{
NSLog(@"Opening new editor. Editor: %@", editorName);
// Editor
editor = [bundleManager objectForBundleWithName:editorName
type:@"editor"
@ -210,33 +219,33 @@ NSString *PCEditorDidResignActiveNotification =
objectForBundleWithName:@"ProjectCenter"
type:@"editor"
protocol:@protocol(CodeEditor)];
if (editor == nil)
{
return nil;
}
}
// Parser
parser = [bundleManager objectForBundleType:@"parser"
protocol:@protocol(CodeParser)
fileName:fileName];
if(parser != nil)
{
[editor setParser:parser];
[editor openFileAtPath:filePath
editorManager:self
editable:editable];
[_editorsDict setObject:editor forKey:filePath];
RELEASE(editor);
}
/* if we have a valid editor, we try to set a parser */
if (editor)
{
// Parser
parser = [bundleManager objectForBundleType:@"parser"
protocol:@protocol(CodeParser)
fileName:fileName];
if(parser != nil)
{
[editor setParser:parser];
}
[editor openFileAtPath:filePath
editorManager:self
editable:editable];
[_editorsDict setObject:editor forKey:filePath];
RELEASE(editor);
}
else
{
//
// If we don't have an editor or a parser, we fall back to opening the
// file with the editor designated by the system.
//
[[NSWorkspace sharedWorkspace] openFile: filePath];
}
{
//
// If we don't have an editor, we fall back to opening the
// file with the editor designated by the system.
//
[[NSWorkspace sharedWorkspace] openFile: filePath];
}
}
if(editor != nil)
@ -526,16 +535,15 @@ NSString *PCEditorDidResignActiveNotification =
[_editorsDict setObject:_editor forKey:_newFileName];
}
- (void)debuggerDidHitBreakpoint:(NSNotification *)aNotif
- (void)gotoFile: (NSString *)fileName atLine: (NSUInteger)line
{
id object = [aNotif object];
NSString *filePath = [object objectForKey: @"file"];
NSString *line = [object objectForKey: @"line"];
id<CodeEditor> editor = [self openEditorForFile: filePath
editable: YES
windowed: NO];
[self orderFrontEditorForFile:filePath];
[editor scrollToLineNumber: [line integerValue]];
PCProject *project = [_projectManager rootActiveProject];
PCProjectEditor *pe = [project projectEditor];
id<CodeEditor> editor = [pe openEditorForFilePath: fileName windowed: NO];
// [self orderFrontEditorForFile:fileName];
[editor scrollToLineNumber: line];
}
@end

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2013 Free Software Foundation
Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -44,6 +44,7 @@ static NSDictionary *dict = nil;
NSDictionary *headerDict;
NSDictionary *ccDict;
NSDictionary *chDict;
NSDictionary *classPpDict;
NSDictionary *protocolDict;
NSDictionary *gsmarkupDict;
NSString *descr;
@ -108,6 +109,17 @@ static NSDictionary *dict = nil;
template,@"TemplateFile",
nil];
// Objective C++ Class
descr = @"Generic Objective-C++ class.\n\n"
@"This is a plain subclass of NSObject which includes"
@" only Foundation.h. Extend it with c++";
template = [bundle pathForResource:@"ocppclass" ofType:@"template"];
classPpDict = [NSDictionary dictionaryWithObjectsAndKeys:
PCClasses, @"ProjectKey",
descr, @"TypeDescription",
template,@"TemplateFile",
nil];
// GSMarkup
descr = @"Generic GSMarkup File.\n\n"
@"This is the interface description of GNUstep Renaissance.";
@ -125,6 +137,7 @@ static NSDictionary *dict = nil;
protocolDict, ProtocolFile,
headerDict, ObjCHeader,
classDict, ObjCClass,
classPpDict, ObjCppClass,
gsmarkupDict, GSMarkupFile,
nil];
}
@ -195,6 +208,12 @@ static NSDictionary *dict = nil;
newFile = [path stringByAppendingPathExtension:@"m"];
[files setObject:[dict objectForKey:ObjCClass] forKey:newFile];
}
// Objective-C++ Class
else if ([type isEqualToString:ObjCppClass])
{
newFile = [path stringByAppendingPathExtension:@"mm"];
[files setObject:[dict objectForKey:ObjCppClass] forKey:newFile];
}
// C File
else if ([type isEqualToString:CFile])
{

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2011 Free Software Foundation
Copyright (C) 2000-2022 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -20,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -352,8 +353,6 @@ static PCFileManager *_mgr = nil;
while (nil != (candidate = [candidateEnumerator nextObject]))
{
NSString *path = [directory stringByAppendingPathComponent: candidate];
NSLog(@"final candidate path is: %@", path);
if ([manager isExecutableFileAtPath: path])
{
@ -416,6 +415,12 @@ static PCFileManager *_mgr = nil;
}
panel = addFilesPanel;
lastOpenDir = [prefs stringForKey:@"FileAddLastDirectory"];
if (lastOpenDir == nil)
{
PCProject *pr = [projectManager activeProject];
NSString *prPathRoot = [pr projectPath];
lastOpenDir = prPathRoot;
}
break;
default:
return nil;

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCLogController.h>

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2010 Free Software Foundation
Copyright (C) 2002-2014 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -20,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -33,7 +34,8 @@
#define COMMENT_HEADERS @"\n\n#\n# Header files\n#\n"
#define COMMENT_RESOURCES @"\n\n#\n# Resource files\n#\n"
#define COMMENT_CLASSES @"\n\n#\n# Class files\n#\n"
#define COMMENT_CLASSES @"\n\n#\n# Objective-C Class files\n#\n"
#define COMMENT_OCPPCLASSES @"\n\n#\n# Objective-C++ Class files\n#\n"
#define COMMENT_CFILES @"\n\n#\n# Other sources\n#\n"
#define COMMENT_SUBPROJECTS @"\n\n#\n# Subprojects\n#\n"
#define COMMENT_APP @"\n\n#\n# Main application\n#\n"
@ -84,6 +86,18 @@ static PCMakefileFactory *_factory = nil;
[mfile appendString: @"ifeq ($(GNUSTEP_MAKEFILES),)\n"];
[mfile appendString: @" GNUSTEP_MAKEFILES := $(shell gnustep-config "];
[mfile appendString: @"--variable=GNUSTEP_MAKEFILES 2>/dev/null)\n"];
[mfile appendString: @" ifeq ($(GNUSTEP_MAKEFILES),)\n"];
[mfile appendString: @" $(warning )\n"];
[mfile appendString: @" $(warning Unable to obtain GNUSTEP_MAKEFILES"];
[mfile appendString: @" setting from gnustep-config!)\n"];
[mfile appendString: @" $(warning Perhaps gnustep-make is not properly"];
[mfile appendString: @" installed,)\n"];
[mfile appendString: @" $(warning so gnustep-config is not in your"];
[mfile appendString: @" PATH.)\n"];
[mfile appendString: @" $(warning )\n"];
[mfile appendString: @" $(warning Your PATH is currently $(PATH))\n"];
[mfile appendString: @" $(warning )\n"];
[mfile appendString: @" endif\n"];
[mfile appendString: @"endif\n"];
[mfile appendString: @"ifeq ($(GNUSTEP_MAKEFILES),)\n"];
[mfile appendString: @" $(error You need to set GNUSTEP_MAKEFILES"];
@ -337,16 +351,50 @@ static PCMakefileFactory *_factory = nil;
- (void)appendClasses:(NSArray *)array forTarget:(NSString *)target
{
NSEnumerator *oenum;
NSMutableArray *marray = nil;
NSMutableArray *mmarray = nil;
NSString *file;
if (array == nil || [array count] == 0)
{
return;
}
[self appendString:COMMENT_CLASSES];
[self appendString:
[NSString stringWithFormat: @"%@_OBJC_FILES = \\\n",target]];
oenum = [array objectEnumerator];
while ((file = [oenum nextObject]))
{
if ([file hasSuffix: @".m"])
{
if (marray == nil)
{
marray = [NSMutableArray array];
}
[marray addObject: file];
}
else if ([file hasSuffix: @".mm"])
{
if (mmarray == nil)
{
mmarray = [NSMutableArray array];
}
[mmarray addObject: file];
}
}
[self appendString: [array componentsJoinedByString: @" \\\n"]];
if (marray)
{
[self appendString:COMMENT_CLASSES];
[self appendString: [NSString stringWithFormat: @"%@_OBJC_FILES = \\\n",target]];
[self appendString: [marray componentsJoinedByString: @" \\\n"]];
}
if (mmarray)
{
[self appendString:COMMENT_OCPPCLASSES];
[self appendString: [NSString stringWithFormat: @"%@_OBJCC_FILES = \\\n",target]];
[self appendString: [mmarray componentsJoinedByString: @" \\\n"]];
}
}
- (void)appendOtherSources:(NSArray *)array
@ -362,6 +410,7 @@ static PCMakefileFactory *_factory = nil;
- (void)appendOtherSources:(NSArray *)array forTarget: (NSString *)target
{
NSMutableArray *marray = nil;
NSMutableArray *mmarray = nil;
NSMutableArray *oarray = nil;
NSEnumerator *oenum;
NSString *file;
@ -383,6 +432,14 @@ static PCMakefileFactory *_factory = nil;
}
[marray addObject: file];
}
else if ([file hasSuffix: @".mm"])
{
if (mmarray == nil)
{
mmarray = [NSMutableArray array];
}
[mmarray addObject: file];
}
else // non .m file
{
if (oarray == nil)
@ -416,6 +473,19 @@ static PCMakefileFactory *_factory = nil;
[self appendString: [NSString stringWithFormat: @"%@_OBJC_FILES += ",pnme]];
while ((file = [oenum nextObject]))
{
[self appendString: [NSString stringWithFormat: @"\\\n%@ ", file]];
}
}
// Add .mm files if any
if (mmarray && [marray count] != 0)
{
oenum = [mmarray objectEnumerator];
[self appendString: [NSString stringWithFormat: @"%@_OBJCC_FILES += ",pnme]];
while ((file = [oenum nextObject]))
{
[self appendString: [NSString stringWithFormat: @"\\\n%@ ", file]];

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2010 Free Software Foundation
Copyright (C) 2000-2014 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
// TODO: Split into several files with categories
@ -60,6 +60,11 @@ NSString
@implementation PCProject
- (NSString *)description
{
return [NSString stringWithFormat: @"%@: %@ (%@)", [self className], projectName, projectPath];
}
// ============================================================================
// ==== Init and free
// ============================================================================
@ -472,11 +477,11 @@ NSString
- (BOOL)save
{
NSFileManager *fm = [NSFileManager defaultManager];
int spCount = [loadedSubprojects count];
NSUInteger spCount = [loadedSubprojects count];
int i;
NSString *wrapperFile = [projectName stringByAppendingPathExtension: @"pcproj"];
NSString *wrapperFile;
NSString *file = @"PC.project";
NSString *backup = [wrapperPath stringByAppendingPathExtension:@"backup"];
NSString *backup;
NSMutableDictionary *dict = [projectDict mutableCopy];
NSData *dictData = nil;
@ -484,10 +489,12 @@ NSString
[dict removeObjectForKey: PCWindows];
[dict removeObjectForKey: PCLastEditing];
// initialize the wrapper...
// initialize the wrappers..
wrapperFile = [projectName stringByAppendingPathExtension: @"pcproj"];
projectFileWrapper = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:
[NSMutableDictionary dictionaryWithCapacity: 3]];
wrapperPath = [projectPath stringByAppendingPathComponent: wrapperFile];
backup = [wrapperPath stringByAppendingPathExtension:@"backup"];
// load subprojects...
for (i = 0; i < spCount; i++)
@ -973,7 +980,7 @@ NSString
{
if ([key isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
return [NSArray arrayWithObjects:@"m",@"mm",nil];
}
else if ([key isEqualToString:PCHeaders])
{
@ -1461,10 +1468,13 @@ NSString
_editorCategory = [[_editor categoryPath] mutableCopy];
range = [_editorCategory rangeOfString:fromFile];
[_editorCategory replaceCharactersInRange:range withString:toFile];
[_editor setCategoryPath:_editorCategory];
[projectBrowser setPath:_editorCategory];
if (range.location != NSNotFound)
{
[_editorCategory replaceCharactersInRange:range withString:toFile];
[_editor setCategoryPath:_editorCategory];
[projectBrowser setPath:_editorCategory];
}
RELEASE(_editorCategory);
}
else

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -442,13 +442,15 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
if ([self nameOfSelectedFile] != nil)
{
BOOL foundFile = NO;
BOOL foundApp = NO;
// PCLogInfo(self, @"{doubleClick} filePath: %@", filePath);*/
workspace = [NSWorkspace sharedWorkspace];
foundApp = [workspace getInfoForFile:filePath
foundFile = [workspace getInfoForFile:filePath
application:&appName
type:&type];
foundApp = foundFile && appName;
// NSLog (@"Open file: %@ with app: %@", filePath, appName);
// If 'Editor' role was set in .GNUstepExtPrefs application
@ -599,7 +601,6 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
{
NSString *categoryName = nil;
NSString *fileName = nil;
NSString *fileExtension = nil;
NSString *iconName = nil;
NSImage *icon = nil;
PCProject *activeProject = [[project projectManager] activeProject];
@ -611,7 +612,6 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
{
return icon;
}
fileExtension = [fileName pathExtension];
}
else
{

View file

@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>
@ -220,6 +220,11 @@
[logOutput setSelectable:YES];
[logOutput setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[logOutput setBackgroundColor:[NSColor lightGrayColor]];
[logOutput setSelectedTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[NSColor whiteColor], NSBackgroundColorAttributeName,
[NSColor blackColor], NSForegroundColorAttributeName,
nil]];
[[logOutput textContainer] setWidthTracksTextView:YES];
[[logOutput textContainer] setHeightTracksTextView:YES];
[logOutput setHorizontallyResizable:NO];

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCProjectBuilderOptions.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCProjectManager.h>

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2010 Free Software Foundation
Copyright (C) 2002-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -177,6 +177,54 @@
return NO;
}
- (id<CodeEditor>) openEditorForFilePath: (NSString *)filePath
windowed: (BOOL)windowed
{
PCProject *activeProject = [[_project projectManager] activeProject];
NSString *fileName = [filePath lastPathComponent];
BOOL editable = YES;
id<CodeEditor> editor = nil;
NSFileManager *mgr = [NSFileManager defaultManager];
NSLog(@"PCPE: fileName: %@, filePath: %@, project: %@",
fileName, filePath, [activeProject projectName]);
if (![mgr fileExistsAtPath: filePath])
{
return nil;
}
// Determine if file should be opened for read only
if (![_project isEditableFile:fileName])
{
editable = NO;
}
// Set the 'editor' var either by requesting already opened
// editor or by creating the new one.
editor = [self openEditorForFile:filePath
editable:editable
windowed:windowed];
if (!editor)
{
NSLog(@"We don't have editor for file: %@", fileName);
[self setActiveEditor: nil];
return nil;
}
// Category path was changed by user's clicking inside browser.
// That's why new category path must be transfered to editor.
NSString *categoryPath = [NSString stringWithFormat: @"/Classes/%@/", fileName];
[editor setCategoryPath:categoryPath];
[self orderFrontEditorForFile:filePath];
// Reload last column because editor has just been loaded
[[_project projectBrowser] reloadLastColumnAndNotify:NO];
[editor fileStructureItemSelected:fileName];
return editor;
}
// Called by PCProjectBrowser
// categoryPath:
// 1. "/Classes/Class.m/- init"
@ -218,6 +266,7 @@
if (!editor)
{
NSLog(@"We don't have editor for file: %@", fileName);
[self setActiveEditor: nil];
return nil;
}
@ -226,8 +275,8 @@
[editor setCategoryPath:categoryPath];
[self orderFrontEditorForFile:filePath];
/* pathLastObject = [pathArray lastObject];
NSLog(@"pathArray: c: %i %@", [pathArray count], pathArray);
pathLastObject = [pathArray lastObject];
/* NSLog(@"pathArray: c: %i %@", [pathArray count], pathArray);
NSLog(@"pathArray: lastObject %@", [pathArray lastObject]);
NSLog(@"lastObject[1]: %@",
[pathLastObject substringWithRange:NSMakeRange(0,1)]);*/

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2010 Free Software Foundation
Copyright (C) 2000-2023 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -22,7 +22,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -417,19 +417,19 @@
if ([selectedTitle isEqualToString:@"Header Directories Search Order"])
{
ASSIGN(searchItems, searchHeaders);
ASSIGN(searchItems, [NSMutableArray arrayWithArray:searchHeaders]);
}
else if ([selectedTitle isEqualToString:@"Library Directories Search Order"])
{
ASSIGN(searchItems, searchLibs);
ASSIGN(searchItems, [NSMutableArray arrayWithArray:searchLibs]);
}
else if ([selectedTitle isEqualToString:@"Build Targets"])
{
ASSIGN(searchItems,[project buildTargets]);
ASSIGN(searchItems,[NSMutableArray arrayWithArray:[project buildTargets]]);
}
else
{
ASSIGN(searchItems,nil);
DESTROY(searchItems);
}
[searchOrderList reloadData];
@ -977,8 +977,18 @@
- (void)fileNameDidChange:(id)sender
{
if ([fileName isEqualToString:[fileNameField stringValue]])
NSString *newName;
newName = [fileNameField stringValue];
if ([fileName isEqualToString:newName])
{
[fileNameField setStringValue:fileName];
return;
}
if ([[newName stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0)
{
[fileNameField setStringValue:fileName];
return;
}

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2014 Free Software Foundation
Copyright (C) 2000-2020 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -20,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>
@ -32,15 +33,19 @@
#import <ProjectCenter/PCBundleManager.h>
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCLogController.h>
#import <Protocols/Preferences.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h"
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
#endif
#ifndef IMAGE
#define IMAGE(X) [[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForImageResource:(X)]] autorelease]
#define IMAGE(X) [NSImage imageNamed: X]
#endif
enum {
@ -144,10 +149,20 @@ enum {
if ((self = [super init]))
{
NSFont *font = [NSFont userFixedPitchFontOfSize: 10.0];
id <PCPreferences> prefs;
NSFont *font;
NSString *fontName;
CGFloat fontSize;
project = aProject;
prefs = [[project projectManager] prefController];
fontName = [prefs stringForKey:ConsoleFixedFont];
fontSize = [prefs floatForKey:ConsoleFixedFontSize];
font = [NSFont fontWithName:fontName size:fontSize];
if (font == nil)
font = [NSFont userFixedPitchFontOfSize:0];
textAttributes =
[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
[textAttributes retain];
@ -206,14 +221,33 @@ enum {
- (void)debug:(id)sender
{
NSString *projectName = [project projectName];
NSString *fp = nil;
NSString *executablePath;
NSString *gdbPath = nil;
NSFileManager *fm = [NSFileManager defaultManager];
PCBundleManager *bundleManager = [[project projectManager] bundleManager];
// Check if project type is executable
if (![project isExecutable])
executablePath = [project projectPath];
if ([project isExecutable])
{
NSString *prjType;
prjType = [project projectTypeName];
if ([prjType isEqualToString: @"Application"])
{
/* MyApplication.app/MyApplication */
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
executablePath = [executablePath stringByAppendingString:@".app"];
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
}
else if ([prjType isEqualToString: @"Tool"])
{
/* obj/MyTool */
executablePath = [executablePath stringByAppendingPathComponent:@"obj"];
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
}
}
else
{
NSRunAlertPanel(@"Debug",
@"The project is not executable",
@ -222,31 +256,16 @@ enum {
return;
}
/* We try in the order:
* xxx.debug/xxx (gnustep-make v1, application),
* xxx.app/xxx (gnustep-make v1 and v2, application),
* obj/xxx (gnustep-make v1 and v2, tool).
*/
fp = [project projectPath];
fp = [fp stringByAppendingPathComponent: [projectName stringByAppendingPathExtension: @"debug"]];
fp = [fp stringByAppendingPathComponent: projectName];
if (! [fm isExecutableFileAtPath: fp])
#ifdef __MINGW__
/* On windows we need to check the .exe file */
if ([[executablePath pathExtension] length] == 0)
{
fp = [project projectPath];
fp = [fp stringByAppendingPathComponent: [projectName stringByAppendingPathExtension: @"app"]];
fp = [fp stringByAppendingPathComponent: projectName];
if (! [fm isExecutableFileAtPath: fp])
{
fp = [project projectPath];
fp = [fp stringByAppendingPathComponent: @"obj"];
fp = [fp stringByAppendingPathComponent: projectName];
}
executablePath = [executablePath stringByAppendingPathExtension: @"exe"];
}
#endif
if ([fm isExecutableFileAtPath:fp] == NO)
NSLog(@"debug executable launch path: %@", executablePath);
if ([fm isExecutableFileAtPath:executablePath] == NO)
{
NSRunAlertPanel(@"Debug",
@"No executable! Please build the project first.",
@ -274,11 +293,21 @@ enum {
// Debugger
debugger = [bundleManager objectForBundleType: @"debugger"
protocol: @protocol(CodeDebugger)
fileName: [fp stringByDeletingLastPathComponent]];
[debugger debugExecutableAtPath: fp
withDebugger: gdbPath];
if (nil == debugger)
{
debugger = [bundleManager objectForBundleType: @"debugger"
protocol: @protocol(CodeDebugger)
fileName: [executablePath stringByDeletingLastPathComponent]];
[debugger debugExecutableAtPath: executablePath
withDebugger: gdbPath];
}
else
{
[debugger show];
}
if (nil == debugger)
NSLog(@"No debugger module found");
// turn debug button off...
// [debugButton setState:NSOffState];
@ -292,7 +321,7 @@ enum {
NSString *executablePath;
NSFileManager *fm;
executablePath = [NSMutableString stringWithString:[project projectPath]];
executablePath = [project projectPath];
// Check if project type is executable
if ([project isExecutable])

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCProjectManager.h>
@ -35,14 +35,10 @@
- (id)initWithProjectManager:(PCProjectManager *)aManager
{
PCProjectLauncher *projectLauncher = nil;
PCProject *activeProject = nil;
projectManager = aManager;
activeProject = [projectManager rootActiveProject];
projectLauncher = [activeProject projectLauncher];
projectLauncher = [[aManager activeProject] projectLauncher];
self = [super initWithContentRect: NSMakeRect (0, 300, 480, 322)
styleMask: (NSTitledWindowMask

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCProjectManager.h>
@ -35,13 +35,11 @@
- (id)initWithProjectManager:(PCProjectManager *)aManager
{
PCProjectLoadedFiles *projectLoadedFiles = nil;
PCProject *activeProject = nil;
projectManager = aManager;
activeProject = [projectManager rootActiveProject];
currentProject = activeProject;
projectLoadedFiles = [activeProject projectLoadedFiles];
PCLogStatus(self, @"[init]");

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2010 Free Software Foundation
Copyright (C) 2000-2021 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -380,7 +380,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
[[NSNotificationCenter defaultCenter]
postNotificationName:PCActiveProjectDidChangeNotification
object:activeProject];
object:activeProject];
}
}
@ -552,7 +552,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
NSString *projectPath = nil;
NSString *projectFileType = nil;
PCProject *project = nil;
NSDictionary *wap = nil;
NSString *projectPathToSave;
// Check project path for invalid characters
@ -675,14 +674,13 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
[self startSaveTimer];
[project validateProjectDict];
if (!project)
{
return nil;
}
[loadedProjects setObject:project forKey:[project projectPath]];
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: [NSURL fileURLWithPath:projectPathToSave]];
PCLogStatus(self, @"Saved opened Document as %@", projectPathToSave);
if (flag)
{
NSDictionary *wap = nil;
[project setProjectManager:self];
// Windows and panels
@ -699,14 +697,18 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
{
[[project projectWindow] showProjectLoadedFiles:self];
}
[[project projectWindow] makeKeyAndOrderFront:self];
[self setActiveProject: project];
}
PCLogStatus(self, @"Saved opened Document as %@", projectPathToSave);
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: [NSURL fileURLWithPath:projectPathToSave]];
}
else
{
PCLogStatus(self, @"Project %@ already Open", [project projectName]);
}
if (flag)
{
[self setActiveProject: project];
[[project projectWindow] makeKeyAndOrderFront:self];
}
return project;
}
@ -759,6 +761,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
NSString *className = [projectTypes objectForKey:projectType];
PCProject<ProjectType> *projectCreator;
PCProject *project = nil;
NSString *subType = nil;
if ((project = [loadedProjects objectForKey: [aPath stringByDeletingLastPathComponent]]) != nil)
{
@ -766,6 +769,9 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
return project;
}
if ([projectType isEqualToString:@"Application"])
subType = PCProjectInterfaceGorm;
projectCreator = [bundleManager objectForClassName:className
bundleType:@"project"
protocol:@protocol(ProjectType)];
@ -791,7 +797,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
}
// Create project
if (!(project = [projectCreator createProjectAt:aPath]))
if (!(project = [projectCreator createProjectAt:aPath withOption:subType]))
{
NSRunAlertPanel(@"New Project",
@"Project %@ could not be created.\nReport bug, please!",
@ -811,7 +817,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
NSString *filePath;
NSString *projectType;
PCProject *project;
NSString *projectPath;
[self createProjectTypeAccessaryView];
@ -852,7 +858,9 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
return;
}
[loadedProjects setObject:project forKey: [project projectPath]];
projectPath = [project projectPath];
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:projectPath]];
[loadedProjects setObject:project forKey:projectPath];
[self setActiveProject:project];
[[project projectWindow] orderFront:self];
}
@ -1116,6 +1124,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
// ============================================================================
- (void)openFileAtPath:(NSString *)filePath
windowed:(BOOL)windowed
{
editorManager = [self editorManager];
@ -1123,11 +1132,17 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
{
[editorManager openEditorForFile:filePath
editable:YES
windowed:YES];
windowed:windowed];
[editorManager orderFrontEditorForFile:filePath];
}
}
- (void)openFileAtPath:(NSString *)filePath
{
[self openFileAtPath: filePath windowed: YES];
}
- (void)openFile
{
NSArray *files = nil;
@ -1333,6 +1348,9 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
// Create subproject
subproject = [self createSubprojectOfType:spType path:spPath];
// PCLogInfo(self, @"{createSubproject} add to %@", [activeProject projectName]);
[activeProject addSubproject:subproject];
return;
}
@ -1342,11 +1360,15 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
NSString *className = [projectTypes objectForKey:projectType];
PCProject<ProjectType> *projectCreator;
PCProject *subproject = nil;
NSString *subType = nil;
if ([projectType isEqualToString:@"Application"])
subType = PCProjectInterfaceGorm;
projectCreator = [bundleManager objectForClassName:className
bundleType:@"project"
protocol:@protocol(ProjectType)];
if (!(subproject = [projectCreator createProjectAt:aPath]))
if (!(subproject = [projectCreator createProjectAt:aPath withOption:subType]))
{
NSRunAlertPanel(@"New Subproject",
@"Internal error!"
@ -1358,9 +1380,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
[subproject setSuperProject:activeProject];
[subproject setProjectManager:self];
// PCLogInfo(self, @"{createSubproject} add to %@", [activeProject projectName]);
[activeProject addSubproject:subproject];
return subproject;
}

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2014 Free Software Foundation
Copyright (C) 2000-2023 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -20,7 +21,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCDefines.h>
@ -260,6 +261,8 @@
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[h_split setDelegate:nil];
[v_split setDelegate:nil];
[projectWindow close];
[super dealloc];
@ -658,8 +661,9 @@
- (void)makeKeyAndOrderFront:(id)sender
{
// PCLogInfo(self, @"makeKeyAndOrderFront sender: %@", [sender className]);
[projectWindow makeKeyAndOrderFront:nil];
// PCLogInfo(self, @"makeKeyAndOrderFront % @ sender: %@", [projectWindow title], [sender className]);
// NSLog(@"makeKeyAndOrderFront %@ sender: %@", [projectWindow title], [sender className]);
[projectWindow makeKeyAndOrderFront:self];
}
- (void)makeKeyWindow

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <ProjectCenter/PCEditorManager.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import "$FILENAME$.h"

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _$UCFILENAME$_H_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import "$FILENAME$.h"

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _$UCFILENAME$_H_

View file

@ -0,0 +1,35 @@
/*
Project: $PROJECTNAME$
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import "$FILENAME$.h"
// This is an Obj-C++ file... add what you need to mighty Objective-C
// if you need, add your C++ classes
@implementation $FILENAME$
@end
// add your C++ methods here

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
@protocol $FILENAME$ <NSObject>

View file

@ -16,7 +16,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
#
# Main application
#
VERSION = 0.6.2
VERSION = 0.7.0
APP_NAME = ProjectCenter
ProjectCenter_APPLICATION_ICON = Images/ProjectCenter.tiff
@ -131,3 +131,4 @@ ProjectCenter_main.m
include $(GNUSTEP_MAKEFILES)/aggregate.make
include $(GNUSTEP_MAKEFILES)/application.make
-include GNUmakefile.postamble
include $(GNUSTEP_MAKEFILES)/Master/nsis.make

View file

@ -18,7 +18,7 @@
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 31 Milk Street #960789 Boston, MA 02196 USAA.
before-all::

View file

@ -20,7 +20,7 @@
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 31 Milk Street #960789 Boston, MA 02196 USAA.
#
# Flags dealing with compiling and linking

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCAPPCONTROLLER_H

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2021 Free Software Foundation
This file is part of GNUstep.
@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCINFOCONTROLLER_H
@ -28,7 +28,8 @@
@interface PCInfoController : NSObject
{
id infoWindow;
id versionField;
IBOutlet NSTextField* versionField;
IBOutlet NSTextField* copyrightField;
NSDictionary *infoDict;
}

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCMENUCONTROLLER_H

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCPREFCONTROLLER_H

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCAddFilesPanel_h_

View file

@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCBundleManager_h_

View file

@ -1,11 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003-2004 Free Software Foundation
Copyright (C) 2003-2019 Free Software Foundation
Authors: Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
This file is part of ProjectCenter.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@ -19,13 +20,13 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCButton_h_
#define _PCButton_h_
#import <AppKit/AppKit.h>
#import <AppKit/NSButton.h>
/*
* Button
@ -33,14 +34,6 @@
@interface PCButton : NSButton
{
NSToolTipTag mainToolTip;
NSTimer *ttTimer;
NSWindow *ttWindow;
NSMutableDictionary *ttTitleAttrs;
NSColor *ttBackground;
BOOL _hasTooltips;
}
@end

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCDefines_h_
@ -147,6 +147,7 @@ static NSString * const PCLinkerOptions = @"LINKEROPTIONS";
static NSString * const PCObjCCompilerOptions = @"OBJC_COMPILEROPTIONS";
static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS";
static NSString * const PCAuthors = @"PROJECT_AUTHORS";
static NSString * const PCBundleIdentifier = @"BUNDLE_IDENTIFIER";
static NSString * const PCCopyright = @"PROJECT_COPYRIGHT";
static NSString * const PCCopyrightDescription = @"PROJECT_COPYRIGHT_DESC";
static NSString * const PCProjectCreator = @"PROJECT_CREATOR";

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCEditorManager_h_
@ -69,6 +69,7 @@
- (NSArray *)allEditors;
- (void)closeActiveEditor:(id)sender;
- (void)closeEditorForFile:(NSString *)file;
- (void)gotoFile: (NSString *)fileName atLine: (NSUInteger)line;
- (NSArray *)modifiedFiles;
- (BOOL)hasModifiedFiles;

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2004 Free Software Foundation
Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCFileCreator_h_
@ -33,6 +33,7 @@
#define ObjCHeader @"Objective-C Header"
#define CFile @"C File"
#define CHeader @"C Header"
#define ObjCppClass @"Objective-C++ Class"
#define GSMarkupFile @"GNUstep Markup"
@class PCProject;

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCFileManager_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCFileNameField_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCFileNameIcon_h_

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCLOGCONTROLLER_H

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCMakefileFactory_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProject_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectBrowser_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectBuilder_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <AppKit/AppKit.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectBuilderPanel_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectEditor_h_
@ -67,6 +67,9 @@
- (BOOL)editorProvidesBrowserItemsForItem:(NSString *)item;
- (id<CodeEditor>)openEditorForFilePath:(NSString *)categoryPath
windowed:(BOOL)windowed;
- (id<CodeEditor>)openEditorForCategoryPath:(NSString *)categoryPath
windowed:(BOOL)windowed;

View file

@ -22,7 +22,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectInspector_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectDebugger_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCLaunchPanel_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectLoadedFiles_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCLoadedFilesPanel_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectManager_h_
@ -164,6 +164,7 @@ extern NSString *PCActiveProjectDidChangeNotification;
// Also called by PCAppController
- (void)openFileAtPath:(NSString *)filePath;
- (void)openFileAtPath:(NSString *)filePath windowed: (BOOL)windowed;
- (void)openFile;
- (void)newFile;
- (BOOL)saveFile;

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCProjectWindow_h_

View file

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCSaveModified_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _ProjectCenter_h_

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2008 Free Software Foundation
Copyright (C) 2008-2016 Free Software Foundation
Authors: Gregory Casamento
@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _CodeDebugger_h_
@ -45,8 +45,8 @@
- (void)setDebuggerWindow: (NSWindow *)window;
- (NSView *)debuggerView;
- (void)setDebuggerView: (id)view;
- (NSString *)path;
- (void)setPath:(NSString *)path;
- (NSString *)executablePath;
- (void)setExecutablePath:(NSString *)path;
// ===========================================================================
// ==== Accessor methods

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _CodeEditor_h_

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#import <Foundation/Foundation.h>

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _CodeParserProtocol_h_

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2005 Free Software Foundation
Copyright (C) 2005-2015 Free Software Foundation
Authors: Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -19,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PCPreferencesProtocols_h_
@ -32,6 +33,9 @@
@protocol PCPreferences <NSObject>
- (NSColor *)colorFromString:(NSString *)colorString;
- (NSString *)stringFromColor:(NSColor *)color;
- (NSString *)stringForKey:(NSString *)key;
- (NSString *)stringForKey:(NSString *)key
defaultValue:(NSString *)defaultValue;
@ -44,6 +48,10 @@
- (float)floatForKey:(NSString *)key
defaultValue:(float)defaultValue;
- (NSColor *)colorForKey:(NSString *)key;
- (NSColor *)colorForKey:(NSString *)key
defaultValue:(NSColor *)defaultValue;
- (void)setString:(NSString *)stringValue
forKey:(NSString *)aKey
notify:(BOOL)notify;
@ -53,7 +61,9 @@
- (void)setFloat:(float)floatValue
forKey:(NSString *)aKey
notify:(BOOL)notify;
- (void)setColor:(NSColor *)color
forKey:(NSString *)aKey
notify:(BOOL)notify;
@end
@protocol PCPrefsSection <NSObject>

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2017 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
Riccardo Mottola
This file is part of GNUstep.
@ -19,7 +20,7 @@
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
*/
#ifndef _PROJECTTYPE_H
@ -29,15 +30,20 @@
Description: A ProjectType is used to create a project of a certain type.
With this approach this procedure can be implemented as a bundle
and therefore PC remains open for future extensions!
Options are used to further customize types.
*/
#import <Foundation/Foundation.h>
@class PCProject;
static NSString* const PCProjectInterfaceGorm = @"GormInterface";
static NSString* const PCProjectInterfaceRenaissance = @"RenaissanceInterface";
@protocol ProjectType
- (PCProject *)createProjectAt:(NSString *)path;
- (PCProject *)createProjectAt:(NSString *)path withOption:(NSString *)option;
@end

View file

@ -0,0 +1,101 @@
/*
** GDBWrapper
**
** Copyright (c) 2008-2021
**
** Author: Gregory Casamento <greg.casamento@gmail.com>
** Riccardo Mottola <rm@gnu.org>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import "PCDebuggerWrapperProtocol.h"
typedef enum PCDebuggerOutputType_enum {
PCDBNotFoundRecord = 0,
PCDBPromptRecord,
PCDBResultRecord,
PCDBConsoleStreamRecord,
PCDBTargetStreamRecord,
PCDBLogStreamRecord,
PCDBAsyncStatusRecord,
PCDBAsyncExecRecord,
PCDBAsyncNotifyRecord,
PCDBBreakpointRecord,
PCDBFrameRecord,
PCDBThreadRecord,
PCDBAdaExceptionRecord,
PCDBEmptyRecord
} PCDebuggerOutputTypes;
@interface GDBWrapper : NSObject <PCDebuggerWrapperProtocol>
{
NSString *debuggerPath;
PCDebugger *debugger;
NSTextView *tView;
NSMutableString *singleInputLine;
NSTask *task;
NSFileHandle *stdinHandle;
NSFileHandle *stdoutHandle;
NSFileHandle *errorHandle;
NSColor *userInputColor;
NSColor *debuggerColor;
NSColor *messageColor;
NSColor *errorColor;
NSColor *promptColor;
NSFont *font;
BOOL debuggerStarted;
float debuggerVersion;
NSDictionary *lastMIDictionary;
NSString *lastMIString;
}
- (float) debuggerVersion;
- (void) setDebuggerVersion:(float)ver;
- (void)logStdOut:(NSNotification *)aNotif;
- (void)logErrOut:(NSNotification *)aNotif;
- (void) taskDidTerminate: (NSNotification *)notif;
- (NSString *) startMessage;
- (NSString *) stopMessage;
- (void) putChar:(unichar)ch;
// methods for a look-ahead recursive parser which attempts to parse
// gdb's output to a Dictionary/Array structure representable in a plist
// LAR parser - single string element (-> NSString value)
- (NSString *) parseString: (NSScanner *)scanner;
// LAR parser - array element (-> NSArray value)
- (NSArray *) parseArray: (NSScanner *)scanner;
// LAR parser - key-value list (-> NSDictionary value)
- (NSDictionary *) parseKeyValue: (NSScanner *)scanner;
// parses a single line from the debugger or the machine interface
// it splits out the type then recurses in the LAR methods
- (PCDebuggerOutputTypes) parseStringLine: (NSString *)stringInput;
@end

File diff suppressed because it is too large Load diff

View file

@ -37,8 +37,9 @@ ProjectCenter_RESOURCE_FILES= \
#
ProjectCenter_HEADERS= \
PCDebugger.h \
PCDebugggerView.h \
PTYView.h
PCDebuggerView.h \
PCDebuggerWrapperProtocol.h \
GDBWrapper.h
#
# Class files
@ -46,10 +47,10 @@ ProjectCenter_HEADERS= \
ProjectCenter_OBJC_FILES= \
PCDebugger.m \
PCDebuggerView.m \
PTYView.m
GDBWrapper.m
ADDITIONAL_NATIVE_LIBS += util
#ADDITIONAL_OBJC_LIBS=
include ../../GNUmakefile.bundles
include $(GNUSTEP_MAKEFILES)/bundle.make

View file

@ -1,9 +1,10 @@
/*
** PCDebugger
**
** Copyright (c) 2008
** Copyright (c) 2008-2021
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
** Riccardo Mottola <rm@gnu.org>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@ -17,7 +18,7 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#import <stdio.h>
@ -26,16 +27,45 @@
#import <Foundation/Foundation.h>
#import <Protocols/CodeDebugger.h>
#import "PCDebuggerWrapperProtocol.h"
extern NSString *PCBreakTypeKey;
extern NSString *PCBreakTypeByLine;
extern NSString *PCBreakTypeMethod;
extern NSString *PCBreakMethod;
extern NSString *PCBreakFilename;
extern NSString *PCBreakLineNumber;
extern NSString *PCDBDebuggerStartedNotification;
@interface PCDebugger : NSObject <CodeDebugger>
{
id debuggerView;
id debuggerWindow;
id statusField;
NSString *path;
NSString *debuggerPath;
NSString *executablePath;
int subProcessId;
NSDictionary *lastInfoParsed;
NSString *lastFileNameParsed;
NSUInteger lastLineNumberParsed;
NSMutableArray *breakpoints;
id <PCDebuggerWrapperProtocol> debuggerWrapper;
}
- (id <PCDebuggerWrapperProtocol>)debuggerWrapper;
- (void) setStatus: (NSString *) status;
- (NSString *) status;
- (NSString *)executablePath;
- (void)setExecutablePath:(NSString *)p;
- (void) interrupt;
- (int) subProcessId;
- (void) setSubProcessId:(int)pid;
- (NSDictionary *)lastInfoParsed;
- (void)setSetInfoParsed: (NSDictionary *)dict;
- (NSString *)lastFileNameParsed;
- (void) setLastFileNameParsed: (NSString *)fname;
- (NSUInteger)lastLineNumberParsed;
- (void)setLastLineNumberParsed: (NSUInteger)num;
- (void)updateEditor;
@end

View file

@ -1,9 +1,10 @@
/*
** PCDebugger
** PCDebugger.m
**
** Copyright (c) 2008
** Copyright (c) 2008-2021
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
** Author: Gregory Casamento <greg.casamento@gmail.com>
** Riccardo Mottola <rm@gnu.org>>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@ -17,13 +18,30 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#ifdef __MINGW32__
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501 // Minimal target is Windows XP
#include <windows.h>
#endif
#import <AppKit/AppKit.h>
#import "PCDebugger.h"
#import "PCDebuggerView.h"
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCEditorManager.h>
#import "PCAppController.h"
#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h"
#import "PCDebuggerWrapperProtocol.h"
#import "GDBWrapper.h"
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
#endif
@ -38,6 +56,14 @@ static NSImage *stepOutImage = nil;
static NSImage *upImage = nil;
static NSImage *downImage = nil;
NSString *PCBreakTypeKey = @"BreakType";
NSString *PCBreakTypeByLine = @"BreakTypeLine";
NSString *PCBreakTypeMethod = @"BreakTypeMethod";
NSString *PCBreakMethod = @"BreakMethod";
NSString *PCBreakFilename = @"BreakFilename";
NSString *PCBreakLineNumber = @"BreakLineNumber";
NSString *PCDBDebuggerStartedNotification = @"PCDBDebuggerStartedNotification";
@implementation PCDebugger
+ (void) initialize
{
@ -95,10 +121,29 @@ static NSImage *downImage = nil;
}
}
- (NSFont *)consoleFont
{
NSUserDefaults *defs;
NSString *fontName;
CGFloat fontSize;
NSFont *font = nil;
defs = [NSUserDefaults standardUserDefaults];
fontName = [defs stringForKey:ConsoleFixedFont];
fontSize = [defs floatForKey:ConsoleFixedFontSize];
font = [NSFont fontWithName:fontName size:fontSize];
if (font == nil)
font = [NSFont userFixedPitchFontOfSize:0];
return font;
}
- (id) init
{
if((self = [super init]) != nil)
{
NSLog(@"PCDebugger Init");
// initialization here...
if([NSBundle loadNibNamed: @"PCDebugger" owner: self] == NO)
{
@ -106,6 +151,22 @@ static NSImage *downImage = nil;
}
[(PCDebuggerView *)debuggerView setDebugger:self];
debuggerWrapper = [[GDBWrapper alloc] init];
[debuggerWrapper setTextView:debuggerView];
[debuggerWrapper setDebugger:self];
[debuggerView setFont: [self consoleFont]];
subProcessId = 0;
lastInfoParsed = nil;
lastFileNameParsed = nil;
lastLineNumberParsed = NSNotFound;
breakpoints = nil;
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(handleNotification:)
name: PCDBDebuggerStartedNotification
object: nil];
}
return self;
}
@ -113,8 +174,8 @@ static NSImage *downImage = nil;
-(void) debugExecutableAtPath: (NSString *)filePath
withDebugger: (NSString *)debugger
{
ASSIGN(path,filePath);
ASSIGN(debuggerPath,debugger);
ASSIGN(executablePath,filePath);
[debuggerWrapper setDebuggerPath: debugger];
[debuggerWindow setTitle: [NSString stringWithFormat: @"Debugger (%@)",filePath]];
[self show];
}
@ -122,16 +183,44 @@ static NSImage *downImage = nil;
- (void) show
{
[debuggerWindow makeKeyAndOrderFront: self];
[self startDebugger];
if (![debuggerWrapper debuggerStarted])
[self startDebugger];
}
- (void) startDebugger
{
[debuggerView runProgram: debuggerPath
inCurrentDirectory: [path stringByDeletingLastPathComponent]
withArguments: [[NSArray alloc] initWithObjects: @"-f", path, nil]
[debuggerView runProgram: executablePath
inCurrentDirectory: [executablePath stringByDeletingLastPathComponent]
logStandardError: YES];
}
}
- (void) initBreakpoints
{
breakpoints = [[NSMutableArray alloc] init];
/* CRUDE EXAMPLES * TODO FIXME *
NSDictionary *dP;
NSLog(@"initing breakpoints");
dP = [NSDictionary dictionaryWithObjectsAndKeys: PCBreakTypeMethod, PCBreakTypeKey, @"[NSException raise]", PCBreakMethod, nil];
// [breakpoints addObject:dP];
dP = [NSDictionary dictionaryWithObjectsAndKeys: PCBreakTypeByLine, PCBreakTypeKey, @"AppController.m", PCBreakFilename, [NSNumber numberWithInt:100], PCBreakLineNumber, nil];
[breakpoints addObject:dP];
*/
[debuggerWrapper setBreakpoints:breakpoints];
}
- (void) debuggerSetup
{
[debuggerWrapper debuggerSetup];
}
- (void) handleNotification: (NSNotification *)notification
{
[self initBreakpoints];
[self debuggerSetup];
}
- (void) awakeFromNib
{
@ -141,11 +230,15 @@ static NSImage *downImage = nil;
[debuggerWindow setToolbar: toolbar];
RELEASE(toolbar);
[debuggerView setFont: [NSFont userFixedPitchFontOfSize: 0]];
[debuggerWindow setFrameAutosaveName: @"PCDebuggerWindow"];
[self setStatus: @"Idle."];
}
- (id <PCDebuggerWrapperProtocol>)debuggerWrapper
{
return debuggerWrapper;
}
- (NSWindow *)debuggerWindow
{
return debuggerWindow;
@ -166,70 +259,146 @@ static NSImage *downImage = nil;
debuggerView = view;
}
- (NSString *)path
- (NSString *)executablePath
{
return path;
return executablePath;
}
- (void)setPath:(NSString *)p
- (void)setExecutablePath:(NSString *)p
{
ASSIGN(path,p);
ASSIGN(executablePath,p);
}
- (int) subProcessId
{
return subProcessId;
}
- (void) setSubProcessId: (int)pid
{
NSLog(@"PCDebugger setSubProcessId: %d", pid);
subProcessId = pid;
}
- (NSDictionary *)lastInfoParsed
{
return lastInfoParsed;
}
- (void)setSetInfoParsed: (NSDictionary *)dict
{
lastInfoParsed = dict;
}
- (NSString *)lastFileNameParsed
{
return lastFileNameParsed;
}
- (void) setLastFileNameParsed: (NSString *)fname
{
lastFileNameParsed = fname;
}
- (NSUInteger)lastLineNumberParsed
{
return lastLineNumberParsed;
}
- (void)setLastLineNumberParsed: (NSUInteger)num
{
lastLineNumberParsed = num;
}
- (void) updateEditor
{
PCAppController *controller = (PCAppController *)[NSApp delegate];
PCProjectManager *pm = [controller projectManager];
PCEditorManager *em = [pm editorManager];
[em gotoFile: lastFileNameParsed
atLine: lastLineNumberParsed];
}
// kill process
- (void) interrupt
{
if(subProcessId != 0)
{
#ifndef __MINGW32__
kill(subProcessId,SIGINT);
#else
HANDLE proc;
proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)subProcessId);
if (proc == NULL)
{
DWORD lastError = GetLastError();
NSLog(@"error opening process %lu", (unsigned long)lastError);
return;
}
if (DebugBreakProcess(proc))
{
DWORD lastError = GetLastError();
NSLog(@"error sending break %lu", (unsigned long)lastError);
}
else
{
NSLog(@"break sent successfully");
}
CloseHandle(proc);
#endif
}
}
// action methods for toolbar...
- (void) go: (id) sender
{
[self setStatus: @"Running..."];
/* each run makes a new PID but we parse it only if non-zero */
[self setSubProcessId:0];
[debuggerView putString: @"run\n"];
}
- (void) pause: (id) sender
{
[self setStatus: @"Stopped."];
[debuggerView interrupt];
[self interrupt];
}
- (void) continue: (id) sender
{
[self setStatus: @"Continue..."];
[debuggerView putString: @"continue\n"];
}
- (void) restart: (id) sender
{
[self setStatus: @"Restarting..."];
[debuggerView interrupt];
[self interrupt];
/* each run makes a new PID but we parse it only if non-zero */
[self setSubProcessId:0];
[debuggerView putString: @"run\n"];
[self setStatus: @"Running..."];
}
- (void) next: (id) sender
{
[self setStatus: @"Going to next line."];
[debuggerView putString: @"next\n"];
}
- (void) stepInto: (id) sender
{
[self setStatus: @"Stepping into method."];
[debuggerView putString: @"step\n"];
}
- (void) stepOut: (id) sender
{
[self setStatus: @"Finishing method."];
[debuggerView putString: @"finish\n"];
}
- (void) up: (id) sender
{
[self setStatus: @"Up to calling method."];
[debuggerView putString: @"up\n"];
}
- (void) down: (id) sender
{
[self setStatus: @"Down to called method."];
[debuggerView putString: @"down\n"];
}
@ -246,7 +415,8 @@ static NSImage *downImage = nil;
- (void) dealloc
{
[debuggerWindow close];
[debuggerWrapper release];
[breakpoints release];
[super dealloc];
}
@end

View file

@ -1,9 +1,10 @@
/*
** PCDebuggerView
**
** Copyright (c) 2008
** Copyright (c) 2008-2021
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
** Author: Gregory Casamento <greg.casamento@gmail.com>
** Riccardo Mottola <rm@gnu.org>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@ -17,23 +18,29 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#import "PTYView.h"
#import <Foundation/NSString.h>
#import <AppKit/NSTextView.h>
@class PCDebugger;
@class NSString;
@interface PCDebuggerView : PTYView
@interface PCDebuggerView : NSTextView
{
PCDebugger *debugger;
NSString *currentFile;
int subProcessId;
}
- (void) setDebugger:(PCDebugger *)theDebugger;
- (void) setCurrentFile: (NSString *)fileName;
- (NSString *) currentFile;
- (int) subProcessId;
- (void)setFont:(NSFont *)font;
- (void) runProgram: (NSString *)path
inCurrentDirectory: (NSString *)directory
logStandardError: (BOOL)logError;
- (void) putString: (NSString *)string;
@end

View file

@ -1,9 +1,10 @@
/*
** PCDebuggerView
**
** Copyright (c) 2008
** Copyright (c) 2008-2021
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
** Author: Gregory Casamento <greg.casamento@gmail.com>
** Riccardo Mottola <rm@gnu.org>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@ -17,7 +18,7 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#import "PCDebuggerView.h"
@ -40,179 +41,55 @@
debugger = theDebugger;
}
- (void)setFont:(NSFont *)aFont
{
[[debugger debuggerWrapper] setFont:aFont];
}
/**
* Log string to the view.
*/
- (void) logString:(NSString *)str
newLine:(BOOL)newLine
{
NSRange range;
BOOL printLine = YES;
range = [str rangeOfString: @"\032\032"]; // Breakpoint"];
if (range.location != NSNotFound)
{
NSScanner *scanner = [NSScanner scannerWithString: str];
NSCharacterSet *empty = [NSCharacterSet characterSetWithCharactersInString: @""];
NSString *file = nil;
NSString *line = nil;
NSString *bytes = nil;
int l = 0, b = 0;
[scanner setCharactersToBeSkipped: empty];
[scanner scanUpToString: @"\032\032" intoString: NULL];
[scanner scanString: @"\032\032" intoString: NULL];
[scanner scanUpToString: @":" intoString: &file];
[scanner scanString: @":" intoString: NULL];
[scanner scanUpToString: @":" intoString: &line];
if (line != nil)
{
l = [line intValue];
[scanner scanString: @":" intoString: NULL];
[scanner scanUpToString: @":" intoString: &bytes];
if (bytes != nil)
{
b = [bytes intValue];
if (l != 0 && b != 0) // if the line & bytes are parsable, then send the notification.
{
NSDictionary *dict = [NSDictionary
dictionaryWithObjectsAndKeys:
file, @"file", line, @"line", nil];
NSString *statusString = [NSString stringWithFormat: @"Stopped, %@:%@",file,line];
[debugger setStatus: statusString];
[NOTIFICATION_CENTER
postNotificationName: PCProjectBreakpointNotification
object: dict];
[[self window] makeKeyAndOrderFront: self];
printLine = NO;
}
}
}
}
// NOTE: This works on certain versions of gdb, but we need to come up with another way of getting
// the process id in a more generic way.
range = [str rangeOfString: @"[New Thread"];
if (range.location != NSNotFound)
{
NSScanner *scanner = [NSScanner scannerWithString: str];
NSString *process = nil;
[scanner scanUpToString: @"(LWP" intoString: NULL];
[scanner scanString: @"(LWP" intoString: NULL];
[scanner scanUpToString: @")" intoString: &process];
subProcessId = [process intValue];
}
// Check certain status messages from GDB and set the state correctly.
range = [str rangeOfString: @"Starting program:"];
if (range.location != NSNotFound)
{
[debugger setStatus: @"Running..."];
}
// Check certain status messages from GDB and set the state correctly.
range = [str rangeOfString: @"Program received signal"];
if (range.location != NSNotFound)
{
[debugger setStatus: @"Stopped"];
}
// Check certain status messages from GDB and set the state correctly.
range = [str rangeOfString: @"Terminated"];
if (range.location != NSNotFound)
{
[debugger setStatus: @"Terminated"];
}
// Check certain status messages from GDB and set the state correctly.
range = [str rangeOfString: @"Program exited"];
if (range.location != NSNotFound)
{
[debugger setStatus: @"Terminated"];
}
// FIXME: Filter this error, until we find a better way to deal with it.
range = [str rangeOfString: @"[tcsetpgrp failed in terminal_inferior:"];
if (range.location != NSNotFound)
{
printLine = NO;
}
// if the line is not filtered, print it...
if(printLine)
{
[super logString: str newLine: newLine];
}
[[debugger debuggerWrapper] logString: str newLine: newLine withColor:[[debugger debuggerWrapper] debuggerColor]];
}
- (void) setCurrentFile: (NSString *)fileName
{
ASSIGN(currentFile,fileName);
}
- (NSString *) currentFile
{
return currentFile;
}
/**
* lookup the process id.
*/
/*
- (int) subProcessId
{
int task_pid = [task processIdentifier];
int child_pid = 0;
NSArray *entries = [[NSFileManager defaultManager] directoryContentsAtPath: @"/proc"];
NSEnumerator *en = [entries objectEnumerator];
NSString *entry = nil;
// FIXME: I'm looking for a generic way to do this, what we have here is very /proc specific.
// which I don't like since it ties this functionality to systems which have /proc.
while((entry = [en nextObject]) != nil)
{
int pid = [entry intValue];
if (pid != 0)
{
int ppid = getppid(pid);
if (ppid == task_pid)
{
child_pid = pid;
break;
}
}
}
return child_pid;
}
*/
- (int) subProcessId
{
return subProcessId;
}
- (void) interrupt
{
int pid = [self subProcessId];
if(pid != 0)
{
#ifndef __MINGW32__
kill(pid,SIGINT);
#endif
}
}
- (void) terminate
{
[super terminate];
[[debugger debuggerWrapper] terminate];
}
- (void) mouseDown: (NSEvent *)event
{
// do nothing...
}
/**
* Start the program.
*/
- (void) runProgram: (NSString *)path
inCurrentDirectory: (NSString *)directory
logStandardError: (BOOL)logError
{
[[debugger debuggerWrapper] runProgram: path
inCurrentDirectory: directory
logStandardError: logError];
}
- (void) putString: (NSString *)string
{
NSAttributedString* attr = [[NSAttributedString alloc] initWithString:string];
[[self textStorage] appendAttributedString:attr];
[self scrollRangeToVisible:NSMakeRange([[self string] length], 0)];
[[debugger debuggerWrapper] putString:string];
}
- (void) keyDown: (NSEvent*)theEvent
{
[[debugger debuggerWrapper] keyDown:theEvent];
}
@end

View file

@ -1,9 +1,9 @@
/*
** PTYView
** PCDebuggerWrapperProtocol.h
**
** Copyright (c) 2008
** Copyright (c) 2016-2021
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
** Author: Riccardo Mottola <rm@gnu.org>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@ -17,48 +17,54 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA
*/
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <Foundation/NSObject.h>
@interface PTYView : NSTextView
{
NSTask *task;
NSFileHandle *master_handle;
NSFileHandle *slave_handle;
NSFileHandle *error_handle;
int master_fd, slave_fd;
}
@class NSColor;
@class NSTextView;
@class NSArray;
@class NSString;
@class PCDebugger;
- (int)openpty;
@protocol PCDebuggerWrapperProtocol <NSObject>
- (void)logString:(NSString *)str
newLine:(BOOL)newLine;
- (void)setFont:(NSFont *)font;
- (void)logData:(NSData *)data;
- (NSColor *)userInputColor;
- (NSColor *)debuggerColor;
- (NSColor *)messageColor;
- (NSColor *)errorColor;
- (void)logStdOut:(NSNotification *)aNotif;
- (NSTextView *)textView;
- (void)setTextView: (NSTextView *)tv;
- (PCDebugger *)debugger;
- (void)setDebugger:(PCDebugger *)dbg;
- (void)logErrOut:(NSNotification *)aNotif;
- (NSString *)debuggerPath;
- (void)setDebuggerPath:(NSString *)path;
- (void) taskDidTerminate: (NSNotification *)notif;
- (NSString *) startMessage;
- (NSString *) stopMessage;
- (BOOL)debuggerStarted;
- (void) runProgram: (NSString *)path
inCurrentDirectory: (NSString *)directory
withArguments: (NSArray *)array
logStandardError: (BOOL)logError;
- (void)logString:(NSString *)str
newLine:(BOOL)newLine
withColor:(NSColor *)color;
- (void) setBreakpoints:(NSArray *)breakpoints;
- (void) terminate;
- (void) interrupt;
- (void) putString: (NSString *)string;
- (void) putChar:(unichar)ch;
- (void) keyDown: (NSEvent*)theEvent;
- (void) debuggerSetup;
@end

View file

@ -1,417 +0,0 @@
/*
** PTYView
**
** Copyright (c) 2008-2012 Free Software Foundation
**
** Author: Gregory Casamento <greg_casamento@yahoo.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <sys/stat.h>
#include <signal.h>
#include <stdio.h> /* for stderr and perror*/
#include <errno.h> /* for int errno */
#include <fcntl.h>
#include <sys/types.h>
#if defined (__FreeBSD__)
#include <sys/ioctl.h>
#include <termios.h>
#include <libutil.h>
#elif defined (__OpenBSD__)
#include <termios.h>
#include <util.h>
#else
#include <sys/termios.h>
#endif
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
#endif
/* check for solaris */
#if defined (__SVR4) && defined (__sun)
#define __SOLARIS__ 1
#define USE_FORKPTY_REPLACEMENT 1
#endif
#if defined(__SOLARIS__)
#include <stropts.h>
#endif
#if !(defined (__NetBSD__)) && !(defined (__SOLARIS__)) && !(defined (__OpenBSD__)) && !(defined(__FreeBSD__))
# include <pty.h>
#endif
#import "PTYView.h"
#ifdef USE_FORKPTY_REPLACEMENT
int openpty(int *amaster, int *aslave, char *name, const struct termios *termp, const struct winsize *winp)
{
int fdm, fds;
char *slaveName;
fdm = open("/dev/ptmx", O_RDWR); /* open master */
if (fdm == -1)
{
perror("openpty:open(master)");
return -1;
}
if(grantpt(fdm)) /* grant access to the slave */
{
perror("openpty:grantpt(master)");
close(fdm);
return -1;
}
if(unlockpt(fdm)) /* unlock the slave terminal */
{
perror("openpty:unlockpt(master)");
close(fdm);
return -1;
}
slaveName = ptsname(fdm); /* get name of the slave */
if (slaveName == NULL)
{
perror("openpty:ptsname(master)");
close(fdm);
return -1;
}
if (name) /* of name ptr not null, copy it name back */
strcpy(name, slaveName);
fds = open(slaveName, O_RDWR | O_NOCTTY); /* open slave */
if (fds == -1)
{
perror("openpty:open(slave)");
close (fdm);
return -1;
}
/* ldterm and ttcompat are automatically pushed on the stack on some systems*/
#ifdef __SOLARIS__
if (ioctl(fds, I_PUSH, "ptem") == -1) /* pseudo terminal module */
{
perror("openpty:ioctl(I_PUSH, ptem");
close(fdm);
close(fds);
return -1;
}
if (ioctl(fds, I_PUSH, "ldterm") == -1) /* ldterm must stay atop ptem */
{
perror("forkpty:ioctl(I_PUSH, ldterm");
close(fdm);
close(fds);
return -1;
}
#endif
/* set terminal parameters if present */
// if (termp)
// ioctl(fds, TCSETS, termp);
//if (winp)
// ioctl(fds, TIOCSWINSZ, winp);
*amaster = fdm;
*aslave = fds;
return 0;
}
#endif
@implementation PTYView
/**
* Creates master device.
*/
- (int) openpty
{
if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) == -1)
{
NSLog(@"Call to openpty(...) failed.");
}
return master_fd;
}
/**
* Log string to the view.
*/
- (void) logString:(NSString *)str
newLine:(BOOL)newLine
{
NSRange range;
[self replaceCharactersInRange:
NSMakeRange([[self string] length],0) withString:str];
if (newLine)
{
[self replaceCharactersInRange:
NSMakeRange([[self string] length], 0) withString:@"\n"];
}
//
// Is it backspace? If so, remove one character from the terminal to reflect
// the deletion. For some reason backspace sends multiple characters, so I have to remove
// one more character than what is sent in order to appropriately delete from the buffer.
//
range = [str rangeOfString: @"\b"];
if (range.location != NSNotFound)
{
NSString *newString = [[self string] substringToIndex: [[self string] length] - 4];
[self setString: newString];
}
[self scrollRangeToVisible:NSMakeRange([[self string] length], 0)];
[self setNeedsDisplay:YES];
}
/**
* Log data.
*/
- (void) logData:(NSData *)data
{
NSString *dataString;
dataString = [[NSString alloc]
initWithData:data
encoding:[NSString defaultCStringEncoding]];
[self logString: dataString newLine: NO];
RELEASE(dataString);
}
/**
* Log standard out.
*/
- (void) logStdOut:(NSNotification *)aNotif
{
NSData *data;
NSFileHandle *handle = master_handle;
if ((data = [handle availableData]) && [data length] > 0)
{
[self logData: data];
}
if (task)
{
[handle waitForDataInBackgroundAndNotify];
}
else
{
[NOTIFICATION_CENTER removeObserver: self
name: NSFileHandleDataAvailableNotification
object: handle];
}
}
/**
* Log error out.
*/
- (void) logErrOut:(NSNotification *)aNotif
{
NSData *data;
NSFileHandle *handle = error_handle;
if ((data = [handle availableData]) && [data length] > 0)
{
// [self logString: @"\n" newLine: NO];
[self logData: data];
}
if (task)
{
[handle waitForDataInBackgroundAndNotify];
}
else
{
[NOTIFICATION_CENTER removeObserver:self
name: NSFileHandleDataAvailableNotification
object: handle];
}
}
/**
* Notified when the task is completed.
*/
- (void) taskDidTerminate: (NSNotification *)notif
{
NSLog(@"Task Terminated...");
[self logString: [self stopMessage]
newLine:YES];
}
/**
* Message to print when the task starts
*/
- (NSString *) startMessage
{
return @"=== Task Started ===";
}
/**
* Message to print when the task stops
*/
- (NSString *) stopMessage
{
return @"\n=== Task Stopped ===";
}
/**
* Start the program.
*/
- (void) runProgram: (NSString *)path
inCurrentDirectory: (NSString *)directory
withArguments: (NSArray *)array
logStandardError: (BOOL)logError
{
task = [[NSTask alloc] init];
[task setArguments: array];
[task setCurrentDirectoryPath: directory];
[task setLaunchPath: path];
master_fd = [self openpty];
if(master_fd > 0)
{
if(slave_fd > 0)
{
slave_handle = [[NSFileHandle alloc] initWithFileDescriptor: slave_fd];
master_handle = [[NSFileHandle alloc] initWithFileDescriptor: master_fd];
[task setStandardOutput: slave_handle];
[task setStandardInput: slave_handle];
[master_handle waitForDataInBackgroundAndNotify];
// Log standard error, if requested.
if(logError)
{
[task setStandardError: [NSPipe pipe]];
error_handle = [[task standardError] fileHandleForReading];
[error_handle waitForDataInBackgroundAndNotify];
[NOTIFICATION_CENTER addObserver:self
selector:@selector(logErrOut:)
name:NSFileHandleDataAvailableNotification
object:error_handle];
}
// set up notifications to get data.
[NOTIFICATION_CENTER addObserver:self
selector:@selector(logStdOut:)
name:NSFileHandleDataAvailableNotification
object:master_handle];
[NOTIFICATION_CENTER addObserver:self
selector:@selector(taskDidTerminate:)
name:NSTaskDidTerminateNotification
object:task];
// run the task...
NS_DURING
{
[self logString: [self startMessage]
newLine:YES];
[task launch];
}
NS_HANDLER
{
NSRunAlertPanel(@"Problem Launching Debugger",
[localException reason],
@"OK", nil, nil, nil);
NSLog(@"Task Terminated Unexpectedly...");
[self logString: @"\n=== Task Terminated Unexpectedly ===\n"
newLine:YES];
//Clean up after task is terminated
[[NSNotificationCenter defaultCenter]
postNotificationName: NSTaskDidTerminateNotification
object: task];
}
NS_ENDHANDLER
}
}
}
- (void) terminate
{
if(task)
{
[task terminate];
}
}
- (void) dealloc
{
[NOTIFICATION_CENTER removeObserver: self];
[self terminate];
[super dealloc];
}
- (void) putString: (NSString *)string;
{
unichar *str = (unichar *)[string cStringUsingEncoding: [NSString defaultCStringEncoding]];
int len = strlen((char *)str);
NSData *data = [NSData dataWithBytes: str length: len];
[master_handle writeData: data];
}
/**
* Put a single character into the stream.
*/
- (void) putChar:(unichar)ch
{
NSData *data = [NSData dataWithBytes: &ch length: 1];
[master_handle writeData: data];
}
- (void) interrupt
{
[task interrupt];
}
/**
* Respond to key events and pipe them down to the debugger
*/
- (void) keyDown: (NSEvent*)theEvent
{
NSString *chars;
chars = [theEvent characters];
if ([chars length] == 1)
{
unichar c;
c = [chars characterAtIndex: 0];
if (c == 3) // ETX, Control-C
{
[self interrupt]; // send the interrupt signal to the subtask
}
else
{
[self putChar: c];
}
}
}
@end

View file

@ -30,6 +30,7 @@ ProjectCenter_RESOURCE_FILES= \
Resources/FileHH.tiff \
Resources/FileM.tiff \
Resources/FileMH.tiff \
Resources/FileMM.tiff \
Resources/LineJumper.gorm
#

Some files were not shown because too many files have changed in this diff Show more