Compare commits

...

557 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
Riccardo Mottola
8a9d120d5c release bump
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38131 72102866-910b-0410-8b05-ffd578937521
2014-10-24 12:29:48 +00:00
Riccardo Mottola
9f1a78361e fix warning of unused variable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38130 72102866-910b-0410-8b05-ffd578937521
2014-10-24 12:14:51 +00:00
Riccardo Mottola
90b0b362c8 Revert windows-specific hacks by German to make project-type choice work. They would crash when using PC without the WinUX theme.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38111 72102866-910b-0410-8b05-ffd578937521
2014-10-07 15:18:53 +00:00
Germán Arias
5dcf71e0a8 Fix problem with LineJumper panel.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38062 72102866-910b-0410-8b05-ffd578937521
2014-09-09 01:33:49 +00:00
Riccardo Mottola
591040d68e mark key with return shortcut
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38061 72102866-910b-0410-8b05-ffd578937521
2014-09-08 14:11:37 +00:00
Riccardo Mottola
9e041e9b35 Do not use GS internals but standard methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38056 72102866-910b-0410-8b05-ffd578937521
2014-09-02 09:36:30 +00:00
Riccardo Mottola
c312302b39 Implement and add a simple go-to-line panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38051 72102866-910b-0410-8b05-ffd578937521
2014-08-29 00:25:06 +00:00
Wolfgang Lux
e617310415 Fix condition order to prevent out of range array accesses, which may
lead to a segfault when unhighlighting two matching parentheses.

Fix by Markus <desterium@t-online.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38050 72102866-910b-0410-8b05-ffd578937521
2014-08-25 21:20:32 +00:00
Gregory John Casamento
82979d58d8 Update version of gorm file to latest.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38047 72102866-910b-0410-8b05-ffd578937521
2014-08-18 20:07:48 +00:00
Riccardo Mottola
24b85f1573 Fix return value
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38033 72102866-910b-0410-8b05-ffd578937521
2014-08-04 18:47:06 +00:00
Riccardo Mottola
a7673e0ac3 Move GoToLine to the View akin to the NSTextView find panel and declare it in the editor view protocol.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38031 72102866-910b-0410-8b05-ffd578937521
2014-08-03 22:03:38 +00:00
Germán Arias
7fc6faaddc Fix problem with FindPanel.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38024 72102866-910b-0410-8b05-ffd578937521
2014-08-03 07:16:41 +00:00
Riccardo Mottola
ffb201e9cb Convert line numbers to NSUInteger / integerValue
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38021 72102866-910b-0410-8b05-ffd578937521
2014-07-31 10:18:31 +00:00
Riccardo Mottola
57c4c0e22a Enhance clang support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37848 72102866-910b-0410-8b05-ffd578937521
2014-05-06 13:11:53 +00:00
Riccardo Mottola
1293803645 Enhance clang support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37847 72102866-910b-0410-8b05-ffd578937521
2014-05-06 13:11:45 +00:00
Riccardo Mottola
847052d58a Recognize also egcc and clang as compilers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37831 72102866-910b-0410-8b05-ffd578937521
2014-05-03 22:56:55 +00:00
Riccardo Mottola
d52982ba41 Add recognition of fatal errors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37829 72102866-910b-0410-8b05-ffd578937521
2014-05-03 21:16:23 +00:00
Germán Arias
1d906ebdf1 Add a comment.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37791 72102866-910b-0410-8b05-ffd578937521
2014-04-08 23:03:04 +00:00
Germán Arias
761ba276ce Fix problem with launcher panel.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37787 72102866-910b-0410-8b05-ffd578937521
2014-04-06 23:40:32 +00:00
Germán Arias
ae84c3ad36 Fix problem with coding on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37784 72102866-910b-0410-8b05-ffd578937521
2014-04-03 00:56:52 +00:00
Germán Arias
6021cce07b Change class for window SaveModified.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37781 72102866-910b-0410-8b05-ffd578937521
2014-04-02 07:14:38 +00:00
Germán Arias
c92e82d1c2 Remove two last commits.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37780 72102866-910b-0410-8b05-ffd578937521
2014-04-02 06:23:08 +00:00
Germán Arias
8c3ae8ddba Fix last change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37778 72102866-910b-0410-8b05-ffd578937521
2014-03-31 00:52:36 +00:00
Germán Arias
93438554c3 Fix for user name on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37773 72102866-910b-0410-8b05-ffd578937521
2014-03-28 00:59:13 +00:00
Germán Arias
9d220fdfad Improve to work on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37736 72102866-910b-0410-8b05-ffd578937521
2014-03-09 04:15:35 +00:00
Germán Arias
7b95ed074e Fix problem in last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37732 72102866-910b-0410-8b05-ffd578937521
2014-03-08 00:31:35 +00:00
Germán Arias
3da9e8ca27 Changes to allow Windows user make a new project using native Open/Save panels.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37722 72102866-910b-0410-8b05-ffd578937521
2014-03-03 04:24:05 +00:00
Germán Arias
ef3a931684 Connect Line Nubmer... to first responder.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37613 72102866-910b-0410-8b05-ffd578937521
2014-01-17 06:20:18 +00:00
Riccardo Mottola
46dbf0ce36 remove default for the build tool
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37608 72102866-910b-0410-8b05-ffd578937521
2014-01-15 23:36:40 +00:00
Riccardo Mottola
4469cb1820 fix mismatched parentheses
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37589 72102866-910b-0410-8b05-ffd578937521
2014-01-13 11:23:25 +00:00
Riccardo Mottola
f76a08b9a0 Use the convenience method to determine better defaults for make and gdb
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37588 72102866-910b-0410-8b05-ffd578937521
2014-01-13 10:50:50 +00:00
Riccardo Mottola
d6cf2a702d Convenience method to find executables, by Richard Frith-Macdonald
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37587 72102866-910b-0410-8b05-ffd578937521
2014-01-13 10:47:44 +00:00
Riccardo Mottola
ea418f3ff1 append exe on windows before checking
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37585 72102866-910b-0410-8b05-ffd578937521
2014-01-12 21:39:17 +00:00
Riccardo Mottola
842c395eae debug stuff cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37584 72102866-910b-0410-8b05-ffd578937521
2014-01-12 20:12:47 +00:00
Riccardo Mottola
f81be77e3b clean up, remove NSLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37469 72102866-910b-0410-8b05-ffd578937521
2013-12-17 17:42:14 +00:00
Riccardo Mottola
c7e5eeba89 Check that the executable exists before running it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37468 72102866-910b-0410-8b05-ffd578937521
2013-12-17 16:49:10 +00:00
Germán Arias
907f26aab5 Change the height of Preferences panel.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37266 72102866-910b-0410-8b05-ffd578937521
2013-10-20 19:15:14 +00:00
Germán Arias
2d92329112 Remove class TextFinder.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37241 72102866-910b-0410-8b05-ffd578937521
2013-10-16 05:06:29 +00:00
Germán Arias
bdf1f9e902 Use standard menu Find and connect Line Number... to first responder.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37221 72102866-910b-0410-8b05-ffd578937521
2013-10-13 19:04:09 +00:00
Germán Arias
cb04cf2bb5 Improvements in preferences.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37199 72102866-910b-0410-8b05-ffd578937521
2013-10-07 01:05:13 +00:00
Germán Arias
74db97895a Improvements to handle the style NSWindows95InterfaceStyle.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37153 72102866-910b-0410-8b05-ffd578937521
2013-09-25 00:25:49 +00:00
Riccardo Mottola
f0f502f8ab Transition to NSUInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37137 72102866-910b-0410-8b05-ffd578937521
2013-09-22 20:26:06 +00:00
Riccardo Mottola
3dfb67766c NSUInteger / NSInteger transitions for count/length variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37135 72102866-910b-0410-8b05-ffd578937521
2013-09-22 18:53:40 +00:00
Riccardo Mottola
78d4babed7 Do not advance start and get startType if we are at the end anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37134 72102866-910b-0410-8b05-ffd578937521
2013-09-22 18:49:37 +00:00
Riccardo Mottola
f33f962c25 Transition count/length variables to NSUInteger
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37132 72102866-910b-0410-8b05-ffd578937521
2013-09-21 23:22:04 +00:00
Riccardo Mottola
b010cead23 If filename is not absolute, normalize it (happens when invoking with the filename as argument to the application, e.g. 'ProjectCenter myProject').
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37130 72102866-910b-0410-8b05-ffd578937521
2013-09-21 18:01:04 +00:00
Riccardo Mottola
54c00a562f Fix parser check for temrination, do not look past last char.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37129 72102866-910b-0410-8b05-ffd578937521
2013-09-21 17:58:52 +00:00
Riccardo Mottola
560bdde237 Fix parser check for temrination, do not look past last char.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37128 72102866-910b-0410-8b05-ffd578937521
2013-09-21 17:58:39 +00:00
Riccardo Mottola
567dbdeb5b Do not launch replacing if copying was not successful, avoids hang of app.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37123 72102866-910b-0410-8b05-ffd578937521
2013-09-20 09:17:55 +00:00
Riccardo Mottola
d7830b79c8 Fix int vs. float
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37091 72102866-910b-0410-8b05-ffd578937521
2013-09-17 17:18:38 +00:00
Riccardo Mottola
c0007e5b0a replace deprecated makevariable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37090 72102866-910b-0410-8b05-ffd578937521
2013-09-17 17:16:59 +00:00
Sebastian Reitenbach
78bf74dc1d * unsigned int -> NSDragOperation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36197 72102866-910b-0410-8b05-ffd578937521
2013-02-25 17:24:33 +00:00
Sebastian Reitenbach
7c84efcd92 * Framework/PCProjectBrowser.m
* Framework/PCSaveModified.m
        * Framework/PCProjectLoadedFiles.m
        * Framework/PCProjectBuilder.m
        * Headers/ProjectCenter/PCProjectBrowser.h
        * Headers/ProjectCenter/PCSaveModified.h
        * Headers/ProjectCenter/PCProjectLoadedFiles.h
        * Modules/Projects/Application/PCAppProject+Inspector.h
        * Modules/Projects/Application/PCAppProject+Inspector.m
          some more (unsigned) int -> NS(U)Integer transitions
          not catched from clang, but found by libobjc2 in debug mode

OK Fred



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36108 72102866-910b-0410-8b05-ffd578937521
2013-02-10 18:34:12 +00:00
Sebastian Reitenbach
8562d733c5 * Framework/PCProjectInspector.m
* Modules/Editors/ProjectCenter/SyntaxDefinition.m
        * Modules/Editors/ProjectCenter/SyntaxHighlighter.m
        * Modules/Editors/ProjectCenter/TextPattern.m
        * Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m
          some more (unsigned) int -> NS(U)Integer transitions
          and some shutup of clang compiler warnings

OK Fred



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36107 72102866-910b-0410-8b05-ffd578937521
2013-02-10 18:30:25 +00:00
Sebastian Reitenbach
b97e7068dc * Modules/Debuggers/ProjectCenter/PTYView.m
Include right headers for openpty on OpenBSD

OK Fred



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36099 72102866-910b-0410-8b05-ffd578937521
2013-02-09 14:42:13 +00:00
Sebastian Reitenbach
b97769af80 * Modules/Preferences/Build/PCBuildPrefs.m
* Framework/PCButton.m
        * Modules/Parsers/ProjectCenter/ObjCMethodHandler.m
          shutup some clang warnings
        * Framework/PCProjectBrowser.m
          NSInteger conversions

OK Fred 



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36098 72102866-910b-0410-8b05-ffd578937521
2013-02-09 14:33:38 +00:00
Sebastian Reitenbach
e89f88456b * Framework/PCFileCreator.m
* Framework/PCMakefileFactory.m
        * Framework/PCProjectBuilder.m
        * Framework/PCProjectLauncher.m
        * Framework/PCProjectManager.m
        * Framework/PCProject.m
        * Modules/Projects/Application/PCAppProject.m
        * Modules/Projects/Tool/PCToolProject.m
          shutup clang compiler warning about redunant literal
          string usage


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@36097 72102866-910b-0410-8b05-ffd578937521
2013-02-09 14:29:44 +00:00
Germán Arias
ca05e41d9f Fix problem with Library projects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35815 72102866-910b-0410-8b05-ffd578937521
2012-11-22 06:47:03 +00:00
Riccardo Mottola
df3d681858 Do not include stropts.h for most OS's anymore.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35480 72102866-910b-0410-8b05-ffd578937521
2012-08-30 09:08:26 +00:00
Riccardo Mottola
8152e6b4ee recent document menu support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35385 72102866-910b-0410-8b05-ffd578937521
2012-08-09 16:23:39 +00:00
Wolfgang Lux
f3ac6d9d8a ProjectCenter fixes for compilation on 64-bit hosts.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35330 72102866-910b-0410-8b05-ffd578937521
2012-07-30 21:07:19 +00:00
Sergii Stoian
d98014879b * Framework/PCProjectInspector.m: (-removeAuthor): Improve selection
of author list items after item deletion. Inspired by bug #25571. 
Bug should be closed.




git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35271 72102866-910b-0410-8b05-ffd578937521
2012-07-09 00:05:18 +00:00
Riccardo Mottola
8dde4d19e4 Update applicationShouldTerminate signature.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35198 72102866-910b-0410-8b05-ffd578937521
2012-06-12 13:11:04 +00:00
Riccardo Mottola
360e820370 Use centerScanRect to avoid strange problems with AA text in editor.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35197 72102866-910b-0410-8b05-ffd578937521
2012-06-12 10:41:19 +00:00
Riccardo Mottola
078e0502af fix typo in comment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35196 72102866-910b-0410-8b05-ffd578937521
2012-06-12 08:03:03 +00:00
Riccardo Mottola
906750c769 NetBSD doesn't support streams either.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35092 72102866-910b-0410-8b05-ffd578937521
2012-04-20 08:35:30 +00:00
Riccardo Mottola
7b81179dce Fix imports for freebsd
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35087 72102866-910b-0410-8b05-ffd578937521
2012-04-17 10:20:03 +00:00
Riccardo Mottola
912965080b use setAllowedFileTypes method instead of private method which was removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@33818 72102866-910b-0410-8b05-ffd578937521
2011-09-08 13:05:29 +00:00
Riccardo Mottola
c0a699944f Correct cast according to ctypes caveats.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32941 72102866-910b-0410-8b05-ffd578937521
2011-04-28 19:50:54 +00:00
Riccardo Mottola
2ca9202b6e Remove extra parentheses which confuse = and == warning.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32801 72102866-910b-0410-8b05-ffd578937521
2011-04-07 16:28:14 +00:00
Riccardo Mottola
2651233f3f warning fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32800 72102866-910b-0410-8b05-ffd578937521
2011-04-07 13:30:48 +00:00
Riccardo Mottola
4bae7d4a63 change ifdef to detect non-gnustep
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32799 72102866-910b-0410-8b05-ffd578937521
2011-04-07 12:36:32 +00:00
Fred Kiefer
e0fe4ae4e3 * Modules/Parsers/ProjectCenter/PCParser.m [-parse]: Move the
selector and IMP definitions inside the method. Global IMP caching
is always wrong! And this broke compilation with llvm.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32788 72102866-910b-0410-8b05-ffd578937521
2011-04-06 18:46:03 +00:00
Nicola Pero
26fafd712c Added FIXME
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@32574 72102866-910b-0410-8b05-ffd578937521
2011-03-14 10:50:23 +00:00
Wolfgang Lux
405a68887b Ask user for confirmation before reverting a file in PC.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31943 72102866-910b-0410-8b05-ffd578937521
2011-01-24 13:29:44 +00:00
Wolfgang Lux
f8767ee74f Fix an annoying bug in PC's editor where pressing the tab key would
delete whole empty lines. Also register insertions done by the tab key
at the undo manager.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31942 72102866-910b-0410-8b05-ffd578937521
2011-01-24 13:27:52 +00:00
Wolfgang Lux
6abca97576 ... and get the PC inspector panel's display right again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31843 72102866-910b-0410-8b05-ffd578937521
2011-01-06 16:10:59 +00:00
Wolfgang Lux
20d074fc08 Fix PC bug where the document based app flag was reset after opening
the project inspector for the first time.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31842 72102866-910b-0410-8b05-ffd578937521
2011-01-06 15:58:13 +00:00
Wolfgang Lux
3b73fff1fc Add either debug=yes or debug=no to the arguments of a PC build task,
since the debug variable no longer has a clear default for quite some
time.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31791 72102866-910b-0410-8b05-ffd578937521
2010-12-28 14:54:20 +00:00
Germán Arias
2613728937 Added UI controls for languages and its methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31764 72102866-910b-0410-8b05-ffd578937521
2010-12-23 02:22:26 +00:00
Germán Arias
affd155f9c Added Languages option at Inspector
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31748 72102866-910b-0410-8b05-ffd578937521
2010-12-19 03:40:35 +00:00
Wolfgang Lux
615124400c Fix race condition, which could lock PC after running a build task.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31707 72102866-910b-0410-8b05-ffd578937521
2010-12-04 09:35:33 +00:00
Wolfgang Lux
84dc841e64 Don't ask for a project directory with an extension project or pcproj
when creating a new project in PC and do not arbitrarily strip
extensions from the project name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31706 72102866-910b-0410-8b05-ffd578937521
2010-12-04 08:08:50 +00:00
Germán Arias
d334376dd6 Reverted a previous change since extension project is not used anymore
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31704 72102866-910b-0410-8b05-ffd578937521
2010-12-04 06:01:21 +00:00
Riccardo Mottola
4cddbeda45 Removed useless INSTDOMAIN variable during build phase
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31699 72102866-910b-0410-8b05-ffd578937521
2010-12-01 16:48:53 +00:00
Riccardo Mottola
a0f1d6efca version bump
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31698 72102866-910b-0410-8b05-ffd578937521
2010-12-01 15:27:06 +00:00
Riccardo Mottola
e9ecaf9b08 Create project in a path with the project name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31697 72102866-910b-0410-8b05-ffd578937521
2010-12-01 15:26:12 +00:00
Riccardo Mottola
eb2972f8fb Set, use and create makefiles using ain installation DOMAIN and not a director
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31688 72102866-910b-0410-8b05-ffd578937521
2010-11-28 21:38:53 +00:00
Riccardo Mottola
7c094590a7 minor fixes in gorms
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31652 72102866-910b-0410-8b05-ffd578937521
2010-11-26 11:42:42 +00:00
Germán Arias
07308c6ccf Removed Project Languages option on Inspector panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31648 72102866-910b-0410-8b05-ffd578937521
2010-11-24 06:34:02 +00:00
Riccardo Mottola
77f710f67e Initialize isDir value
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31643 72102866-910b-0410-8b05-ffd578937521
2010-11-23 07:15:15 +00:00
Germán Arias
912da0d4b3 Adding Languages panel part I
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31642 72102866-910b-0410-8b05-ffd578937521
2010-11-22 17:25:34 +00:00
Germán Arias
79ae98bbb0 Improvements at Project Inspector
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31640 72102866-910b-0410-8b05-ffd578937521
2010-11-22 03:12:59 +00:00
Germán Arias
102557c7ca Fix on key PCUserLanguages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31639 72102866-910b-0410-8b05-ffd578937521
2010-11-22 01:33:53 +00:00
Riccardo Mottola
2a4aa4f0b8 initialize range to ensure it does not ocntain garbage later
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31628 72102866-910b-0410-8b05-ffd578937521
2010-11-18 16:47:25 +00:00
Riccardo Mottola
d27ac097b1 fix memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31623 72102866-910b-0410-8b05-ffd578937521
2010-11-18 10:38:13 +00:00
Riccardo Mottola
9c2e1a4b7b fix memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31622 72102866-910b-0410-8b05-ffd578937521
2010-11-18 10:01:01 +00:00
Riccardo Mottola
a8749dd060 fix memory leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31620 72102866-910b-0410-8b05-ffd578937521
2010-11-18 09:32:19 +00:00
Riccardo Mottola
da048c3aa0 remove unused variable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31619 72102866-910b-0410-8b05-ffd578937521
2010-11-18 09:23:05 +00:00
Riccardo Mottola
aab308dba1 remove useless instruction and assignment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31618 72102866-910b-0410-8b05-ffd578937521
2010-11-18 09:10:36 +00:00
Riccardo Mottola
099849f7ff Init could return a different object, take it in account
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31617 72102866-910b-0410-8b05-ffd578937521
2010-11-17 23:45:17 +00:00
Germán Arias
95eb255d35 Fix on AddFiles panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31613 72102866-910b-0410-8b05-ffd578937521
2010-11-16 17:13:19 +00:00
Germán Arias
28c343707e Delete the extension .project at the name of the applications
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31590 72102866-910b-0410-8b05-ffd578937521
2010-11-06 05:50:22 +00:00
Sergii Stoian
c1c7f004d4 * Framework/PCProjectBrowser.m:
(-nameOfSelectedCategory): Return 'nil' if name of subproject
selected. Add comments.
(-nameOfSelectedFile): Check if category is selected.
(-click:): check if category is selected.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31105 72102866-910b-0410-8b05-ffd578937521
2010-08-09 23:37:47 +00:00
Sergii Stoian
18efb7552d 2010-07-31 Sergii Stoian <stoyan255@ukr.net>
* Framework/PCProject.m:
        (-assignProjectDict:): Fix setting projectPath to project
        dir (not to *.pcproj dir).
        * Framework/PCFilemanager.m:
        (-filesOfTypes:operation:multiple:title:accView:): Set allowed
        file types to panel of types is not nil.
        (-panel:isValidFilename): Use set allowed file types to panel.

2010-07-30 Sergii Stoian <stoyan255@ukr.net>
        * Framework/PCProject.m:
        (-subprojectWithName:): Pass to openProjectAt: subproject dir.
        openProjectat: can now handle this situation.
        * Framework/PCProjectManager.m:
        (-openProjectAt:): Implement handling of 'aPath' argument as
        project file and as project dir. Select *.pcproj if exists then
        try to load PC.project.
        (-openProject): Implement intelligent selection of project file
        when selected *.pcproj, PC.project or project dir.
        * Framework/PCFilemanager.m:
        (-filesOfTypes:operation:multiple:title:accView:): Remove code
        specific for opening projects (moved to PCProjectManager's
        openProject).
        (-panel:isValidFilename): Fix handling project file detection.
        (-filesWithExtension:atPath:includeDirs:): New method. Returns
        list of files with specified extension. Also returns dirs if
        'includeDirs' set to YES.

2010-07-28 Sergii Stoian <stoyan255@ukr.net>
        * Framework/PCProject.m:
        (close:): Fix closing of subprojects. Remove subproject from
        Projectmanager's list of loaded projects.
        * Framework/PCLogController.m:
        (-init): Change font size to systemFontSize.

2010-07-24 Sergii Stoian <stoyan255@ukr.net>
        * Headers/ProjectCenter/PCProjectBuilder.m:
        * Framework/PCProjectBuilder.m:
        (cleanupAfterMake:): Added new argument (NSString) to method
        containing current status text. Before status text in project window
        always stated "...terminated".


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31093 72102866-910b-0410-8b05-ffd578937521
2010-08-07 21:56:04 +00:00
Riccardo Mottola
039b7f2d99 mark editor undo as done
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31023 72102866-910b-0410-8b05-ffd578937521
2010-07-23 10:33:03 +00:00
Riccardo Mottola
be6c8bbcf1 Log conversion into PC log and not console. Remove unneded keys.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30951 72102866-910b-0410-8b05-ffd578937521
2010-07-13 09:31:38 +00:00
Riccardo Mottola
e1689431f6 remove LAST_EDITING from project template. It is not needed for validation and should not be in an empty project.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30944 72102866-910b-0410-8b05-ffd578937521
2010-07-10 21:29:37 +00:00
Riccardo Mottola
a255e0650c remove LAST_EDITING from project template. It is not needed for validation and should not be in an empty project.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30943 72102866-910b-0410-8b05-ffd578937521
2010-07-10 21:28:37 +00:00
Gregory John Casamento
c3960f94ee * Modules/Editors/ProjectCenter/PCEditor.m: in -save implemented
simple mechanism for propagating changes in classes to Gorm when 
	updating a header file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30941 72102866-910b-0410-8b05-ffd578937521
2010-07-10 05:11:58 +00:00
Riccardo Mottola
b7fb534bb9 do not merge in user entries if they are empty
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30940 72102866-910b-0410-8b05-ffd578937521
2010-07-09 22:28:10 +00:00
Riccardo Mottola
b6ab133ce1 Log missing key
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30938 72102866-910b-0410-8b05-ffd578937521
2010-07-08 23:18:27 +00:00
Riccardo Mottola
760149038d When opening a subproejct pass the bundle of the project, not the project file inside
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30937 72102866-910b-0410-8b05-ffd578937521
2010-07-08 22:45:40 +00:00
Gregory John Casamento
c816587571 Fixed issue with pause button.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30935 72102866-910b-0410-8b05-ffd578937521
2010-07-07 18:39:56 +00:00
Riccardo Mottola
a35a744f7a fixed warning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30843 72102866-910b-0410-8b05-ffd578937521
2010-06-24 10:56:44 +00:00
Riccardo Mottola
e5b908e541 removed floorf()
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30826 72102866-910b-0410-8b05-ffd578937521
2010-06-22 21:36:33 +00:00
Riccardo Mottola
491745fd36 Fix highlighting for standalone editors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30819 72102866-910b-0410-8b05-ffd578937521
2010-06-22 16:03:05 +00:00
Riccardo Mottola
10ccc32c63 Deleted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30818 72102866-910b-0410-8b05-ffd578937521
2010-06-22 16:02:49 +00:00
Riccardo Mottola
85941fac98 clean up parenthesis highlighting
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30805 72102866-910b-0410-8b05-ffd578937521
2010-06-22 00:20:46 +00:00
Wolfgang Lux
1c0d8df3db Add .dylib to ProjectCenter's list of known library extensions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30724 72102866-910b-0410-8b05-ffd578937521
2010-06-15 03:57:31 +00:00
Wolfgang Lux
c546135d3e Fix bug where ProjectCenter could include some localized resources in
the RESOURCE_FILES Makefile variable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30723 72102866-910b-0410-8b05-ffd578937521
2010-06-15 03:52:02 +00:00
Wolfgang Lux
bd0738109c Prevent a crash when opening a subproject in ProjectCenter and fix bug
where ProjectCenter would not quit after opening a subproject.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30721 72102866-910b-0410-8b05-ffd578937521
2010-06-15 03:43:32 +00:00
Wolfgang Lux
082fb0ae70 Attempt to prevent ProjectCenter crashes when a project is closed by
ensuring that project and editor windows are closed before their
owners are deallocated.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30599 72102866-910b-0410-8b05-ffd578937521
2010-06-07 07:04:24 +00:00
Riccardo Mottola
b013152da8 check before replacing and allow undo (by Wolfgang Lux)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30567 72102866-910b-0410-8b05-ffd578937521
2010-06-03 22:39:54 +00:00
Riccardo Mottola
de94278815 declare string constants with @
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30566 72102866-910b-0410-8b05-ffd578937521
2010-06-03 22:02:06 +00:00
Riccardo Mottola
43211ec2b7 declare new code editor view protocol, make the PCEditorView return the editor with a n accessor, make the project window access the undo manager that way
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30551 72102866-910b-0410-8b05-ffd578937521
2010-06-02 23:55:29 +00:00
Riccardo Mottola
7928e2b4e5 keep an Undo manager for the Editor and return that to the window
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30527 72102866-910b-0410-8b05-ffd578937521
2010-06-01 13:35:07 +00:00
Gregory John Casamento
00ca943852 * Modules/Projects/Application/Resources/main.m: Same as below.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30485 72102866-910b-0410-8b05-ffd578937521
2010-05-30 07:34:25 +00:00
Gregory John Casamento
bf26cfe775 * Modules/Projects/Application/Resources/AppController.h
* Modules/Projects/Application/Resources/AppController.m
	* Modules/Projects/Tool/Resources/main.m: Remove licensing
	and copyright information from these since we don't want to 
	assume that the user will be writing a GPLv3 program owned by the
	FSF (while that would be nice) it's not correct to assume it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30484 72102866-910b-0410-8b05-ffd578937521
2010-05-30 07:10:31 +00:00
Gregory John Casamento
b4c12c1a73 * Framework/English.lproj/SaveModified.gorm: Correct issues with
Gorm file.
	* Framework/PCSaveModified.m: Use setTitle: instead of setStringValue:
	to set the titles of the buttons.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30481 72102866-910b-0410-8b05-ffd578937521
2010-05-30 05:47:11 +00:00
Gregory John Casamento
3517ccbc92 * Modules/Editors/ProjectCenter/PCEditor.m: Temporarily comment out
previous change util we find the proper fix as it was preventing 
	files from being saved.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30480 72102866-910b-0410-8b05-ffd578937521
2010-05-30 05:36:36 +00:00
Riccardo Mottola
3ce2f4a4c5 setup undo on the editor view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@29858 72102866-910b-0410-8b05-ffd578937521
2010-03-06 16:07:28 +00:00
Richard Frith-MacDonald
6607fcc0ef update templates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@29063 72102866-910b-0410-8b05-ffd578937521
2009-11-26 12:43:40 +00:00
Sergii Stoian
45320c4c28 * Framework/PCProjectBuilder.m: (parseErrorLine:) prepend filname with current
build path.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28725 72102866-910b-0410-8b05-ffd578937521
2009-09-22 21:59:53 +00:00
Gregory John Casamento
1a3b127a7e * Framework/PCMakefileFactory.m: Check if buildDir is nil before
generating the BUILD_DIR directive in the make file.   Sometimes
	this is coming up with (nil) on Windows which is causing the build
	phase to fail.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28716 72102866-910b-0410-8b05-ffd578937521
2009-09-20 07:46:11 +00:00
Riccardo Mottola
ae023c0c49 added icon drawn by me
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28715 72102866-910b-0410-8b05-ffd578937521
2009-09-19 21:44:23 +00:00
Riccardo Mottola
0d792e2a6d fixed John's name, added Riccardo Mottola
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28706 72102866-910b-0410-8b05-ffd578937521
2009-09-18 23:26:15 +00:00
Riccardo Mottola
2db88e2844 Use path component instead of hard-coded slash
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28705 72102866-910b-0410-8b05-ffd578937521
2009-09-18 21:57:35 +00:00
Nicola Pero
daa35431f2 Output no GNUSTEP_INSTALLATION_DOMAIN if it's not set
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28698 72102866-910b-0410-8b05-ffd578937521
2009-09-17 09:20:21 +00:00
Nicola Pero
1f210b10e8 Fixed typo in last change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28697 72102866-910b-0410-8b05-ffd578937521
2009-09-17 09:08:02 +00:00
Nicola Pero
a2e0ccf011 Try to detect spaces in paths and warn users if they create projects with spaces in paths, and follow the official recommendations of not setting GNUSTEP_INSTALLATION_DOMAIN unless a particular one needs to be specified
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28696 72102866-910b-0410-8b05-ffd578937521
2009-09-17 09:05:45 +00:00
Richard Frith-MacDonald
524a2e7ceb improve generated makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28684 72102866-910b-0410-8b05-ffd578937521
2009-09-15 09:13:43 +00:00
Riccardo Mottola
05c75052d3 launch executable directly without openapp/opentool. Removed execToolName
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28676 72102866-910b-0410-8b05-ffd578937521
2009-09-14 22:38:28 +00:00
Gregory John Casamento
2fc703c5de * Framework/PCProject.m
* Framework/PCProjectManager.m
	* Headers/ProjectCenter/PCProjectManager.h
	* PCAppController.m: Correct issues with project bundle loading.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28369 72102866-910b-0410-8b05-ffd578937521
2009-06-23 22:21:10 +00:00
Gregory John Casamento
6e95a9a1e5 Update changelog.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28359 72102866-910b-0410-8b05-ffd578937521
2009-06-17 22:02:19 +00:00
Gregory John Casamento
09bc065c63 Change file type to allow opening of files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28358 72102866-910b-0410-8b05-ffd578937521
2009-06-17 22:00:44 +00:00
Riccardo Mottola
7a09098880 udpated Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28341 72102866-910b-0410-8b05-ffd578937521
2009-06-11 20:52:10 +00:00
Riccardo Mottola
94ee603288 use PCDefine constant for PC_WINDOWS dictionary key
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28339 72102866-910b-0410-8b05-ffd578937521
2009-06-10 22:38:55 +00:00
Riccardo Mottola
0cd4ab00c7 save last editing in user file inside the wrapper and not main project file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28338 72102866-910b-0410-8b05-ffd578937521
2009-06-10 22:24:14 +00:00
Gregory John Casamento
55f05b710b * Framework/PCEditorManager.m: Added code in -openEditorForFile:
editable:windowed: to open files which are not handled by any editor
	using [NSWorkspace openFile:] as a fallback.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28289 72102866-910b-0410-8b05-ffd578937521
2009-05-19 21:13:24 +00:00
Gregory John Casamento
194e62f47a * Framework/PCProject.m: Add new project directory name.
* Framework/PCProjectManager.m: Fix issue reported with loading of
	subprojects from an aggregate project.   Changed loadProjectAt: method
	to handle both the current and old file locations.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28288 72102866-910b-0410-8b05-ffd578937521
2009-05-18 21:27:56 +00:00
Gregory John Casamento
b8a1ac5612 * Framework/PCProjectManager.m: Remove logic requiring projectWindow
to be key in order to save file.   This was causing files in 
	tear-off editors to not be saved.  This change is in the saveFile
	method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28260 72102866-910b-0410-8b05-ffd578937521
2009-04-27 21:09:30 +00:00
Gregory John Casamento
e885b519a6 remove special characters
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28240 72102866-910b-0410-8b05-ffd578937521
2009-04-22 20:35:39 +00:00
Gregory John Casamento
01c3eadcf5 * Framework/PCProject.m: Changes to make plist output in
human readable format.
	* Resources/Info-gnustep.plist: Changes to read C++ files using
	C editor.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28239 72102866-910b-0410-8b05-ffd578937521
2009-04-22 20:32:36 +00:00
Sergii Stoian
8b186c4ad7 * Framework/PCProjectBuilder.m:
(-startBuild:), (-startClean:): Move _isBuilding and _isCleaning vars
before build: method call for correct determination in cleanupAfterMake
method.
(build:): Initialize build time vars before call to preBuildChecj method.
* Framework/PCProjectBuilderOptions.m: Do not notify when changing project
properties (build options).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28216 72102866-910b-0410-8b05-ffd578937521
2009-04-14 23:24:14 +00:00
Riccardo Mottola
dde3badacc delete custom PCSplitView class no longer used
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28164 72102866-910b-0410-8b05-ffd578937521
2009-03-31 22:21:44 +00:00
Riccardo Mottola
8c5d1ef6ed removed and replaced PCSplitView with standard NSSplitView in all instances, bumped framework release to 0.6.0
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28163 72102866-910b-0410-8b05-ffd578937521
2009-03-31 22:13:37 +00:00
Sergii Stoian
89697c5df2 * Framework/PCProjectBuilder.m:
(updateTargetField): Process args correctly when it has nil value.
(startBuild): Move initializing of currentBuildPath and 
currentBuildFile from here...
(build:):...to here. Rename pipes and handles vars to more appropriate
names. Initialize pipes with alloc, init.
(startClean): Use buildArguments as in startBuild method.
(stopMake:): It seems that [makeTask isRunning] works correctly -
use it. Remove comment.   
(cleanupAfterMake): Use _isBuilding and _isCleaning vars to detect
running mode. Release currentBuildPath and currentBuildFile here.
(buildDidTerminate): Release pipes here.        
(logData:error:): Initialize newLineRange.location before entering
cycle.
(logBuildString:newLine:): Cleanup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28142 72102866-910b-0410-8b05-ffd578937521
2009-03-27 23:39:02 +00:00
Gregory John Casamento
0f642e77d4 Updated TODO.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28139 72102866-910b-0410-8b05-ffd578937521
2009-03-27 07:04:09 +00:00
Gregory John Casamento
f2a055ef97 * Framework/PCProject.m: Implement openWrapperAtPath:
* Framework/PCProjectManager.m: Change method call to use
	openWrapperAtPath:
	* Headers/ProjectCenter/PCProject.h: Add wrapperPath ivar.
	* Modules/Projects/Application/PCAppProject.m:
	Change method to call super.
	* Modules/Projects/Tool/PCToolProject.m: Change method to 
	call super.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28138 72102866-910b-0410-8b05-ffd578937521
2009-03-27 07:01:11 +00:00
Gregory John Casamento
03a7c073c2 * Framework/English.lproj/Builder.gorm: Update icons for stop and
options.
	* Framework/PCProject.m: Added code to put files into packages when
	saving.
	* Headers/ProjectCenter/PCProject.h: Added ivar for file wrapper


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28137 72102866-910b-0410-8b05-ffd578937521
2009-03-27 05:18:53 +00:00
Riccardo Mottola
e8c6874eb1 save windows placements to a separate file with the username as a name
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28136 72102866-910b-0410-8b05-ffd578937521
2009-03-26 23:21:36 +00:00
Sergii Stoian
9f00b0da00 * Documentaion/TODO: Update.
* Documentation/BUGS: Added. Contains reported bugs, not reported but
noticed during my tests, whish list of features, thougths.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28134 72102866-910b-0410-8b05-ffd578937521
2009-03-25 21:03:57 +00:00
Sergii Stoian
9515b6703f * Framework/PCProjectBuilder.m: Add some comments
(parseCompilerLine:): Implemented gcc output for compiling and linking.
Set currentBuildFile var on file compilation.
(cleanupAfterMake),(build:),(parseBuildLine:),(buildDidTerminate): Update 
status field of builder panel and project window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28126 72102866-910b-0410-8b05-ffd578937521
2009-03-24 00:47:32 +00:00
Sergii Stoian
baa1cfbd35 * Framework/PCProjectBuilder.m: Change type of currentBuildPath var
to NSMutableString.
(buildArguments): Always use messages=yes argument internally.
"Verbose ouput" option (Build Options panel) just toogle if build
shows as with make argument 'messages=yes' or not.
(line:startsWithString:): Implemented line start detection.
(parseMakeLine:): Inital implementation of parsing make tool
output.
(parseCompilerLine:): Add for future implementation.
(logBuildString:newLine:): Remove error: argument as it's not used.
Method outputs to build view.
(parseBuildLine:): Add implementation of entry point of build output
parsing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28125 72102866-910b-0410-8b05-ffd578937521
2009-03-23 22:05:36 +00:00
Sergii Stoian
67dfd71e53 * Framework/PCProjectBuilder.m: Some rearrangement of log methods.
Category 'Logging' is for general logging methods, 'BuildLogging'
for stantard output processing, 'ErrorLogging' for error output
processing.
(logBuildString:newLine:): New name of logString:error:newLine:.
Use new name across the file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28119 72102866-910b-0410-8b05-ffd578937521
2009-03-22 01:16:40 +00:00
Sergii Stoian
1a6b1b6f5b Update ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28118 72102866-910b-0410-8b05-ffd578937521
2009-03-22 00:13:42 +00:00
Sergii Stoian
e5681f4a50 * Framework/PCProjectInspector.m:
(searchOrderPopupDidChange:): Clean selection in list. Clean text field.
(searchOrderClick:): Show value of selected item in text field.
(addSearchOrder:): Add check for entered value. More checking will be added
in the future.
* Documentation/TODO: Rearrange some items. Update state.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28117 72102866-910b-0410-8b05-ffd578937521
2009-03-22 00:12:43 +00:00
Sergii Stoian
9f0394f9c3 Update ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28116 72102866-910b-0410-8b05-ffd578937521
2009-03-21 23:01:05 +00:00
Sergii Stoian
a6359c679d * Framework/PCProjectBuilderOptions.m:
(initWithProject:): Listen to PCProjectDictDidChangeNotification notification.
(awakeFromNib): Move loading of project properties from here...
(loadProjectProperties): ...to here. This is a notification action.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28115 72102866-910b-0410-8b05-ffd578937521
2009-03-21 22:59:46 +00:00
Sergii Stoian
0f3a1e0ba4 Update ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28100 72102866-910b-0410-8b05-ffd578937521
2009-03-20 00:56:05 +00:00
Sergii Stoian
d6a49c572a * Framework/PCProject.m:
(buildTargets): Return default build targets only if project file 
doesn't contains list them.
* Framework/PCProjectBuilder.m:
(prebuildCheck): Create build directory only if preference was set.
(build:): Set initial "=== started ===" string.
* Framework/PCProjectInspector.m:
(createBuildAttributes): Set target and action for table view.
(searchOrderPopupDidChange:): Add support for "Build Targets".
(setSearchOrderButtonsState): Enable "Remove" button only if item in 
list was selected.
(syncSearchOrder): Add support for "Build Targets".
* Documentation/TODO: Add some tasks and update status of others.
* Headers/ProjectCenter/PCDefines.h: Add key for build targets support.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28099 72102866-910b-0410-8b05-ffd578937521
2009-03-20 00:53:39 +00:00
Sergii Stoian
a002b0c43c Update Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28096 72102866-910b-0410-8b05-ffd578937521
2009-03-19 00:14:54 +00:00
Sergii Stoian
ace38821ad * Framework/PCProjectManager.m:
(dealloc): Replace if() check with TEST_RELEASE.
(openFileAtPath:): Use class variable instead of method's local.
(saveFile): Call saveFile to project editor if project is active and
project window has key state. Call non-project editor manager otherwise.
* PCPrefController.m:
(stringForKey:defaultValue:): Set value to non-existent key only if
defaultValue is not 'nil' ('nil' when called via stringForKey: method).
(boolForKey:defaultValue:): Set value to non-existent key only if
defaultValue has positive value (has '-1' when called via boolForKey: method).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28095 72102866-910b-0410-8b05-ffd578937521
2009-03-19 00:13:25 +00:00
Sergii Stoian
96516dd723 * Framework/PCProjectManager.m:
(openProjectAt:): Setactive project to loaded after all initalization
completed.
* Framework/PCProject.m:
(saveProjectWindowsAndPanels): Save project windows and panels
according to preferences setting.
(close:): Remove unsused code.
* Framework/PCProjectBuilder.m: Cleanup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28087 72102866-910b-0410-8b05-ffd578937521
2009-03-16 23:32:00 +00:00
Sergii Stoian
f8d2b38fe4 * GNUmakefile,
* Framework/GNUmakefile: Change versions to 0.5.3.
* Modules/Preferences/Build/PCBuildPrefs.m: Cleanup.
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m: Implement editor
color preferences.
* Modules/Preferences/Saving/PCSavingPrefs.m: Cleanup.
* Modules/Preferences/Misc/PCMiscPrefs.m: Cleanup.
* Documentation/TODO: Update.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28079 72102866-910b-0410-8b05-ffd578937521
2009-03-15 22:47:23 +00:00
Sergii Stoian
7756df5dbf Update Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28075 72102866-910b-0410-8b05-ffd578937521
2009-03-15 00:14:56 +00:00
Sergii Stoian
e6ce23e63b * Headers/Protocols/Preferences.h: Add new methods.
* PCPrefController.m: Implemented set/get of preferences value dependent. All
values are stored in preferences as NSString values and converted upon
request to specified type.
* Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m: Use new methods of 
PCPrefController. Implemented setting of editor fonts.
(setDefaults): Removed.

* Modules/Preferences/Build/PCBuildPrefs.m,
* Modules/Preferences/Misc/PCMiscPrefs.m,
* Modules/Preferences/Saving/PCSavingPrefs.m: Use new methods of PCPrefController.
(setDefaults): Removed.

* Framework/PCProjectLoadedFiles.m,
* Framework/PCMakefileFactory.m,
* Framework/PCProject.m,
* Framework/PCProjectLauncherPanel.m,
* Framework/PCFileManager.m,
* Framework/PCProjectBrowser.m,
* Framework/PCProjectBuilder.m,
* Framework/PCEditorManager.m,
* Framework/PCProjectLoadedFilesPanel.m,
* Framework/PCProjectLauncher.m,
* Framework/PCProjectBuilderPanel.m,
* Framework/PCProjectWindow.m,
* PCAppController.m,
* Framework/PCProjectManager.m: Use new methods of PCPrefController.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28074 72102866-910b-0410-8b05-ffd578937521
2009-03-15 00:12:00 +00:00
Sergii Stoian
8300389ecf Clean up code that includes removed PCInterfacePrefs module header file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28066 72102866-910b-0410-8b05-ffd578937521
2009-03-11 22:25:44 +00:00
Sergii Stoian
8c23bab5c2 * Remove compile time files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28059 72102866-910b-0410-8b05-ffd578937521
2009-03-09 20:17:15 +00:00
Sergii Stoian
64995148d5 * Remove compile time files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28058 72102866-910b-0410-8b05-ffd578937521
2009-03-09 20:16:03 +00:00
Sergii Stoian
29d7d59abc * Sswitch to new interface setting.
* Modules/Preferences/EditorFSC: Add new prefs section.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28057 72102866-910b-0410-8b05-ffd578937521
2009-03-09 20:15:10 +00:00
Sergii Stoian
ec139b282b * ChangeLog; Update.
* Modules/Preferences/Misc/PCMiscPrefs.h,
* Modules/Preferences/Misc/PCMiscPrefs.m,
* Modules/Preferences/Misc/Resources/MiscPrefs.gorm/data.classes,
* Modules/Preferences/Misc/Resources/MiscPrefs.gorm/objects.gorm:
Add new setting UseTearOffWindows.
* Framework/PCProjectWindow.m: Use new setting.
* Modules/Editors/ProjectCenter/PCEditor.m:
(dealloc): Add releasing _window.
* Documentation/TODO: Update


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28042 72102866-910b-0410-8b05-ffd578937521
2009-03-05 00:42:59 +00:00
Sergii Stoian
51459e04f9 Update changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28041 72102866-910b-0410-8b05-ffd578937521
2009-03-04 23:01:27 +00:00
Sergii Stoian
628a5ffa00 * Framework/PCProjectManager.m:
(convertLegacyProject:atPath:): Correctly convert legacy application project.
* Framework/PCEditorManager.m;
(openEditorForFile:editable:windowed:): Don't open lert panel if file is
not text file. Situation when editor for non text files called to be opened
must be reviewd.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28040 72102866-910b-0410-8b05-ffd578937521
2009-03-04 23:00:19 +00:00
Sergii Stoian
6ee8943ebf * Update changelog.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28039 72102866-910b-0410-8b05-ffd578937521
2009-03-04 22:08:46 +00:00
Sergii Stoian
9d2a79b3a4 * Framework/PCProjectBrowser.m: Stop using 'SeparateEditor' prefernce.
Remove use of preferences code.
(doubleClick:): Change support of external editor (add support for .app
editors).
* Framework/PCProjectWindow.m: Start implementing two-mode handling of
tear-off windows. New handling will support two modes: 1. all windows 
are opened inside projet window and 2. Build, Launch/Debug, Loaded Files
(Project Find in future) are opened as tear-off windows. This simplifiles
the code and in my opinion more intuitive then current implementation.
* Modules/Editors/ProjectCenter/PCEditor.m:
(_createWindow): Change window attribute ReleasedWhenClosed to NO.
* PCPrefController.m: Add new parameter 'notify' to method setObject. This
parameter is usefull for situation when open and save panels saves its values.
For example: when project are opened 'Open Project' panel save last opened dir
to PC prefernces and post notificaion about prefs changes. Newly created 
objects of projects may lead to PC segfault.
* Modules/Preferences/Build/PCBuildPrefs.m,
* Modules/Preferences/Interface/PCInterfacePrefs.m,
* Modules/Preferences/Saving/PCSavingPrefs.m,
* Modules/Preferences/Misc/PCMiscPrefs.m,
* Framework/PCFileManager: Use new preferences setObject method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28038 72102866-910b-0410-8b05-ffd578937521
2009-03-04 22:05:51 +00:00
Riccardo Mottola
863a0c679b allow authors inside table to scroll during editing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28034 72102866-910b-0410-8b05-ffd578937521
2009-03-03 23:21:57 +00:00
Riccardo Mottola
5b5c07c061 Fix string constants
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28020 72102866-910b-0410-8b05-ffd578937521
2009-03-02 01:01:44 +00:00
Riccardo Mottola
c756ee4dd3 update log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28019 72102866-910b-0410-8b05-ffd578937521
2009-03-02 01:01:35 +00:00
Sergii Stoian
aaab08aa2a * Modules/Preferences/Interface/PCInterfacePrefs.h:
* Modules/Preferences/Interface/Resources/InterfacePrefs.gorm:
* Modules/Preferences/Interface/PCInterfacePrefs.m:
Move options "Remember windows and panels opened in project" and
"Display Log Panel at startup" from here...
* Modules/Preferences/Misc/PCMiscPrefs.h:
* Modules/Preferences/Misc/PCMiscPrefs.m:
* Modules/Preferences/Misc/Resources/MiscPrefs.gorm:
to here.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28010 72102866-910b-0410-8b05-ffd578937521
2009-03-01 01:17:02 +00:00
Sergii Stoian
0e196e0fd1 * Modules/Preferences/Build/Resources/BuildPrefs.gorm: Add missing oulet
for new option.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28009 72102866-910b-0410-8b05-ffd578937521
2009-02-28 22:55:41 +00:00
Sergii Stoian
811a306f55 * Modules/Preferences/Build/PCBuildPrefs.h:
* Modules/Preferences/Build/PCBuildPrefs.m:
* Modules/Preferences/Build/Resources/BuildPrefs.gorm:
Move "Remove files in root build directory on quit" option
from here...
* Modules/Preferences/Misc/PCMiscPrefs.h:
* Modules/Preferences/Misc/PCMiscPrefs.m:
* Modules/Preferences/Misc/Resources/MiscPrefs.gorm:
to here.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28008 72102866-910b-0410-8b05-ffd578937521
2009-02-28 22:47:37 +00:00
Sergii Stoian
9ae293917b * Use new preferences system instead of direct using of NSUserDefaults.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28007 72102866-910b-0410-8b05-ffd578937521
2009-02-28 22:10:30 +00:00
Sergii Stoian
e61398e79c * Add short messages to ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27992 72102866-910b-0410-8b05-ffd578937521
2009-02-27 00:50:18 +00:00
Sergii Stoian
dfb30e2882 * Rewriting of preferences finished
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27991 72102866-910b-0410-8b05-ffd578937521
2009-02-27 00:46:25 +00:00
Sergii Stoian
4b2e398b0d * Start rewriting of PC preferences. "Build" preferences implemented
as loadable module. See Changelog for details.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27969 72102866-910b-0410-8b05-ffd578937521
2009-02-25 00:34:59 +00:00
Sergii Stoian
ecec5ece13 * Documentation/TODO: Update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27961 72102866-910b-0410-8b05-ffd578937521
2009-02-23 19:08:02 +00:00
Sergii Stoian
8f26eb4a77 * Update Documentation/TODO
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27956 72102866-910b-0410-8b05-ffd578937521
2009-02-22 22:32:34 +00:00
Sergii Stoian
e8bc76c5b3 * Set all textfields attributes to 'scrollable'.
* Framework/PCProjectBuilderOptions.m: Set first reponder
after panel is ordereder (call to makeFirstResponder: in
awakeFromNib prevents textfield from draw its' border. 
NUstep bug?).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27955 72102866-910b-0410-8b05-ffd578937521
2009-02-22 22:18:40 +00:00
Sergii Stoian
9724c929cb * Finish alert panels review. All situations that I've missed will
be worked out in future.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27954 72102866-910b-0410-8b05-ffd578937521
2009-02-22 21:46:01 +00:00
Sergii Stoian
c3c4cfcc79 * PCSaveModififedFiles rename to more generic name PCSaveModified.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27953 72102866-910b-0410-8b05-ffd578937521
2009-02-22 21:04:05 +00:00
Sergii Stoian
7a92c39ce5 * Framework/PCSaveModifiedFiles.m: Change to more generic
implementation. PCRunSaveModifiedFilesPanel() implemented.
* Framework/PCProjectBuilder.m:
(prebuildCheck): Use PCRunSaveModifiedFiles().


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27952 72102866-910b-0410-8b05-ffd578937521
2009-02-22 20:57:42 +00:00
Sergii Stoian
5c6a72a7ca * Framework/PCSaveModifiedFiles.m:
* Framework/English.lproj/SaveModifiedFiles.gorm:
* Headers/ProjectCenter/PCSaveModifiedFiles.m:
Add initial implementation of "Save Modified Files" panel.
* Framework/PCProjectBuilder.m:
(prebuildCheck): Use PCSaveModifiedFiles.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27947 72102866-910b-0410-8b05-ffd578937521
2009-02-22 01:31:37 +00:00
Sergii Stoian
c81a433761 * Documentation/TODO: Update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27943 72102866-910b-0410-8b05-ffd578937521
2009-02-21 21:24:24 +00:00
Sergii Stoian
ea0d43d72f * Framework/PCProjectBuilder.m:
(prebuildCheck): Swap button names.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27921 72102866-910b-0410-8b05-ffd578937521
2009-02-19 00:39:10 +00:00
Sergii Stoian
ae3f0a1870 * Framework/PCProjectBuilder.m: Cleanup.
* Framework/PCEditorManager.m:
(openEditorForFile:editable:windowed:): Add alert panel that
ordeder front when file to open doesn't exist. Remove commented
out call to [self orderFrontEditorForFile:filePath] (this method
should be called directly to PCEditorManager or PCProjectEditor
classes).
* Documentation/TODO: Added "Fix reported bugs" to list.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27896 72102866-910b-0410-8b05-ffd578937521
2009-02-17 00:06:13 +00:00
Sergii Stoian
d40f593b64 * Framework/PCProjectBuilder.m:
(prebuildCheck): Check if project has edited files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27875 72102866-910b-0410-8b05-ffd578937521
2009-02-16 00:33:42 +00:00
Sergii Stoian
1699452ef8 * Framework/PCProjectManager.m:
(close): Implemented. Closes not only project but also non
project files editors.
* Framework/PCProject.m: Clean and alert panels in various situations.
* Framework/PCProjectEditor.m: Move closeAllEditors, saveEditedFiles:,
saveAllFiles and saveFileAs: methods to PCEditorManager. Use
<CodeEditor> close: methods instead of closeFile:save:.
(saveFileAs:): Use superclass method.
* Framework/PCEditorManager.m: Adopt moved methods.
(modifiedFiles): Implemented. Return array of file paths.
(hasModifiedFiles): Implemented for future use (e.g. prebuild check
in ProjectBuilder). 
(reviewUnsaved:): Implemented. Go through modified files' editors
and close which results in opening of alert "Save?" panels.
* PCAppController.m: 
(applicationShouldTerminate:): Use PCProjectManager close method
instead of closeAllProjects.
* Modules/Editors/ProjectCenter/PCEditor.m:
(_createWindow): Set "edited" flag according to current state.
(saveFile): Add alert panel on fail.
(closeFile:save:): Rewritten to properly process 'save' flag.
* Headers/Protocols/CodeEditor.h: Added close: method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27873 72102866-910b-0410-8b05-ffd578937521
2009-02-16 00:10:59 +00:00
Gregory John Casamento
41f163d735 * Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Detect when the
program has stopped or exited so that status can be displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27867 72102866-910b-0410-8b05-ffd578937521
2009-02-15 19:06:10 +00:00
Sergii Stoian
7ea7dc4063 * Framework/PCProjectBrowser.m:
(click:): Do not call editor if subproject name selected.
(fileNameIconImage): Set "FileProject" icon if subproject name selected.
* Framework/PCProjectManager.m: Remove unused methods projectPath and
selectedFileName.
* Framework/PCFileManager.m: Add alert panels if operation ends with 
error.
* Framework/PCMakefileFactory.m: Add alert panels on error of creating
files.
* Framework/PCProjectBuilder.m: Review all situations when alert panels
should be opened. Panels text corrected according to OpenStep UIG.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27864 72102866-910b-0410-8b05-ffd578937521
2009-02-15 00:24:12 +00:00
Sergii Stoian
6817d12843 * PCMenuController.m:
(showInfoPanel:): Use appController intead of [NSApp delegate].
* GNUmakefile: Change version to 0.5.1.
* Resources/Info-gnustep.plist: ditto.
* Framework/PCProjectManager.m:
  (open): Move ordering front project window for here...
  (openProjectAt:): to here.
* Framework/PCProjectBrowser.m:
  (nameOfSelectedCategory): Edit comment text.
* Framework/PCLogController.m:
  (showPanel): Call makeKeyAndOrderFront instead of orderFront.
* Headers/PCInfoController.[hm]:
  (showInfoWindow:): Get version info from Info-gnustep.plist.
* PCPrefController.m:
  (showPanel:): Call makeKeyAndOrderFront instead of orderFront.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27861 72102866-910b-0410-8b05-ffd578937521
2009-02-14 15:45:52 +00:00
Nicola Pero
923416f666 Do not compile the ProjectCenter Debugger module on MinGW
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27860 72102866-910b-0410-8b05-ffd578937521
2009-02-14 10:52:43 +00:00
Gregory John Casamento
2c703a94f5 * Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Correct
mispelling of search string.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27855 72102866-910b-0410-8b05-ffd578937521
2009-02-13 03:55:44 +00:00
Gregory John Casamento
2e847b959a * Framework/PCProjectManager.m: openProject to correct
bug #25565.   There was an extra semi-colon after the if
	statement in this method which was causing it to return
	before bringing the project window to the fron


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27853 72102866-910b-0410-8b05-ffd578937521
2009-02-12 16:51:26 +00:00
Gregory John Casamento
cb81af5c42 * Framework/PCEditorManager.m: Switch to editor and line in the
-debuggerDidHitBreakpoint: method.
	* Modules/Debuggers/ProjectCenter/PCDebugger.m: Minor cleanup.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Changes to
	-[PCDebuggerView logString:newLine:] to detect state and change
	it on debugger window.
	* Modules/Debuggers/ProjectCenter/Resources/PCDebugger.gorm:
	Left justify the status field.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27850 72102866-910b-0410-8b05-ffd578937521
2009-02-12 03:02:57 +00:00
Sergii Stoian
bc9f8bb1f3 Update Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27839 72102866-910b-0410-8b05-ffd578937521
2009-02-11 00:23:46 +00:00
Sergii Stoian
e98d337210 * PCMenuController.m:
(subprojectNew): Use renamed [projectManager openNewSubprojectPanel]
method.
* Framework/PCProjectManager.m: Change all alert panel names according to
operation performed. Edit messages text of alert panels. Cleanup.
(newSubproject): Rename to openNewSubprojectPanel which is more informative.
(createSubproject): Change method definition to createSubproject:(id)sender 
and merge code with old createSubproject:(id)sender.
(controlTextDidChange:): Activate 'Create' button only if subproject with
enetered name doesn't exist in project.
* Framework/PCProjectBrowser.m:
(nameOfSelectedCategory): Fix bug which prevent from removing subprojects.
Now selected category is checked against superproject category list. When
subproject name selected, name of superproject's category is returned. As
side effect ProjectBrowser tries to load editor for selected subproject's 
name. Need to fix.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27838 72102866-910b-0410-8b05-ffd578937521
2009-02-11 00:21:23 +00:00
Sergii Stoian
baafc22e05 * Framework/PCFileCreator: (+sharedCeator): Cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27837 72102866-910b-0410-8b05-ffd578937521
2009-02-10 21:33:12 +00:00
Sergii Stoian
375f9098a5 Update Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27836 72102866-910b-0410-8b05-ffd578937521
2009-02-10 21:30:09 +00:00
Sergii Stoian
3c30f7fbd0 * Framework/PCProjectManager.m: Corrections in alert panel names.
Make "Add Files" panel run in modal mode.
* Framework/PCProject.m: Corrections in alert panel names.
* Framework/PCFileCreator.[mh]: Partial rewrite. Check existance of files 
  wich will be added. Make panel run in modal mode. Add "Add Header File"
  option button.
* Documentation/TODO: Update.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27826 72102866-910b-0410-8b05-ffd578937521
2009-02-10 00:31:55 +00:00
Sergii Stoian
58757ae6d4 * Update Changelog.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27808 72102866-910b-0410-8b05-ffd578937521
2009-02-08 00:41:46 +00:00
Sergii Stoian
a417d8581e * PCMenuController.m:
(validateMenuItem:): Enable "File" menu items for files opened
  witout project. It fixes bug #25311 (now file saved).
* Framework/PCProjectManager.m:
  (openFileAtPath:): Call to orderFrontEditorForFile: explicitly because
  of last change in PCEditorManager.
* Framework/PCProjectBrowser.m:
  (doubleClick:): Do not open file in separate window with PCProjectEditor
  not PCProjectManager.
* Framework/PCProjectEditor.m:
  (openEditorForCategoryPath:windowed:): Cleanup.
* Framework/PCEditorManager.m:
  (openEditorForFile:editable:windowed:): Remove call to
  orderFrontEditorForFile:.
* Modules/Editors/ProjectCenter/PCEditor.m:
  (_createWindow): Modify default size and position of window.
  (openFileAtPath:editorManager:editable:): Remove creation of internal view.
  Create it when first requested (editorView and componentView methods).
  (windowDidBecomeKey:) No need to set first responder. It seems first responder
  remembered by window correctly.
  (windowDidResignKey:): Call resignFirstResponder: to notify others.
* Modules/Projects/Application/PCAppProject.m:
  (dealloc): TODO added.
* Documentation/TODO: Mark "Finish FileNameIcon..." task as done.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27807 72102866-910b-0410-8b05-ffd578937521
2009-02-08 00:38:13 +00:00
Sergii Stoian
9b5a3b8e4c * Update Changelog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27799 72102866-910b-0410-8b05-ffd578937521
2009-02-06 00:02:13 +00:00
Sergii Stoian
6f85c6383a * Framework/PCProject.m:
(dealloc): Replace DEVELOPMENT with DEBUG

* Framework/PCProjectBrowser.m:
  (fileNameIconPath): Implement new method.

* Framework/PCFileNameIcon.m:
  (mouseDown:) Finish drag&drop implementation.
  (init): Do not set image by default.
  (dealloc): Replace DEVELOPMENT with DEBUG.
  (setDelegate:): Use ASSIGN.
  (updateIcon): Cleanup.

* Framework/English.lproj/ProjectInspector.gorm: Remove
  'Hide on deactivate' attribute to panel. It allows drag&drop
  operations for external applications (e.g. Workspace).

* Modules/Projects/Application/PCAppProject.*: Use PCFileNameIcon
  in inspector to use drag&drop functionality. Cleanup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27798 72102866-910b-0410-8b05-ffd578937521
2009-02-05 23:59:32 +00:00
Riccardo Mottola
183dfb4adb decrease minimum window height
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27727 72102866-910b-0410-8b05-ffd578937521
2009-01-29 23:48:29 +00:00
Sergii Stoian
719bf01886 Udpdate ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27701 72102866-910b-0410-8b05-ffd578937521
2009-01-26 23:11:40 +00:00
Sergii Stoian
feac055af8 * Correct mistake in PCPrefController.m file name
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27700 72102866-910b-0410-8b05-ffd578937521
2009-01-26 23:02:05 +00:00
Sergii Stoian
d1787e2c9c * Headers/Protocols/Preferences.h: Add protocol for communication
between preferences and sections


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27699 72102866-910b-0410-8b05-ffd578937521
2009-01-26 22:58:02 +00:00
Sergii Stoian
8f3e4f1b6e * Move PCPrefController out of the Framework
* Make modifications to files which use PCPrefController


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27698 72102866-910b-0410-8b05-ffd578937521
2009-01-26 22:56:03 +00:00
Sergii Stoian
5e5fa71d5a * Modules/Projects/Application/Resources/AppController.m:
(awakeFromNib:): Remove setting menu title for better GORM
integration (Thanks to German Arias).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27617 72102866-910b-0410-8b05-ffd578937521
2009-01-17 00:11:12 +00:00
Sergii Stoian
7866230c2c 2009-01-17 Yavor Doganov <yavor@gnu.org>
* Framework/GNUmakefile:
(ProjectCenter_LIBRARIES_DEPEND_UPON): Define to `$(OBJC_LIBS)
$(FND_LIBS) $(GUI_LIBS)' to avoid unresolved symbols. Fixes bug #23792.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27616 72102866-910b-0410-8b05-ffd578937521
2009-01-16 23:59:19 +00:00
Sergii Stoian
62c8affc56 * Framework/PCProject.m:
(fileTypesForCategoryKey:): add "nib" as recognizable interface file type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27615 72102866-910b-0410-8b05-ffd578937521
2009-01-16 23:38:44 +00:00
Sergii Stoian
1d26215e7f Add mentioning about bug #21619
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27614 72102866-910b-0410-8b05-ffd578937521
2009-01-16 23:04:17 +00:00
Sergii Stoian
c3aa1d47a0 2009-01-17 Sergii Stoian <stoyan255@gmail.com>
* Framework/GNUmakefile: Include PCFileNameField.h and
  PCFileNameIcon.h in ProjectCenter_HEADER_FILES as 
  referenced by PCProjectInspector.h


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27613 72102866-910b-0410-8b05-ffd578937521
2009-01-16 23:02:48 +00:00
Riccardo Mottola
ed890b7e2e make textfields scrollable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27592 72102866-910b-0410-8b05-ffd578937521
2009-01-13 21:35:05 +00:00
Riccardo Mottola
f0c308711b OpenBSD portability
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27504 72102866-910b-0410-8b05-ffd578937521
2009-01-02 17:51:00 +00:00
Gregory John Casamento
6a062ed252 * Modules/Debuggers/ProjectCenter/PTYView.[mh]: Changes to use
new openpty replacement code on systems which don't have
	openpty, otherwise use the built-in version.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27493 72102866-910b-0410-8b05-ffd578937521
2009-01-02 00:34:09 +00:00
Gregory John Casamento
90c55771fd Change file extension entry so that tools can be debugged.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27492 72102866-910b-0410-8b05-ffd578937521
2009-01-01 22:34:46 +00:00
Gregory John Casamento
fd51336457 * Modules/Debuggers/ProjectCenter/Resources/PCDebugger.gorm:
Change the status bar size and set minimum window size.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27490 72102866-910b-0410-8b05-ffd578937521
2009-01-01 20:59:06 +00:00
Gregory John Casamento
55e2966fb3 * Modules/Debuggers/ProjectCenter/GNUmakefile
* Modules/Debuggers/ProjectCenter/PTYView.h
	* Modules/Debuggers/ProjectCenter/PTYView.m: Change code to use
	openpty(...).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27487 72102866-910b-0410-8b05-ffd578937521
2009-01-01 18:01:42 +00:00
Richard Frith-MacDonald
763d325c6a quick hack to get this to compile on windows again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27486 72102866-910b-0410-8b05-ffd578937521
2009-01-01 11:39:51 +00:00
Sergii Stoian
cc43e948dc * Framework/PCFileNameIcon.m:
* Headers/ProjectCenter/PCFileNameIcon.h:
  Implementation of dragging functionality.
  
* Framework/PCProjectBrowser.m: Implement file icon delegate methods.
  Dragging files to category icon adds files to project.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27472 72102866-910b-0410-8b05-ffd578937521
2008-12-30 23:58:11 +00:00
Richard Frith-MacDonald
073b6a650d Use #import throughout
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27463 72102866-910b-0410-8b05-ffd578937521
2008-12-30 13:47:27 +00:00
Gregory John Casamento
321b334912 * Modules/Debuggers/ProjectCenter/Resources/continue_button.png:
Add image.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27461 72102866-910b-0410-8b05-ffd578937521
2008-12-30 03:22:13 +00:00
Gregory John Casamento
4b0be76f13 * Modules/Debuggers/ProjectCenter/GNUmakefile: Add continue icon.
* Modules/Debuggers/ProjectCenter/PCDebugger.m: Add continue method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27460 72102866-910b-0410-8b05-ffd578937521
2008-12-30 03:21:13 +00:00
Gregory John Casamento
f41650b9b8 * Documentation/TODO: Update progress.
* Modules/Debuggers/ProjectCenter/GNUmakefile: Add images
	to makefile.
	* Modules/Debuggers/ProjectCenter/PCDebugger.m: Add up and down
	methods to implement this behaviour.
	* Modules/Debuggers/ProjectCenter/Resources/down_button.png
	* Modules/Debuggers/ProjectCenter/Resources/up_button.png:
	Images for the up/down buttons.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27459 72102866-910b-0410-8b05-ffd578937521
2008-12-30 01:17:05 +00:00
Riccardo Mottola
66b546f33f removed troublesome warning parameter gcc 2.95
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27458 72102866-910b-0410-8b05-ffd578937521
2008-12-29 22:47:42 +00:00
Riccardo Mottola
f684926ec8 removed --args parameter
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27457 72102866-910b-0410-8b05-ffd578937521
2008-12-29 22:47:11 +00:00
Riccardo Mottola
38d424a25e removed double ;
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27456 72102866-910b-0410-8b05-ffd578937521
2008-12-29 22:22:17 +00:00
Gregory John Casamento
591ef01a5b * Framework/PCProjectLauncher.m: Remove local variable for debugger from
method.  Also add it to the launcher dealloc method.
	* Headers/ProjectCenter/PCProjectLauncher.h: Add an ivar for the debugger.
	* Modules/Debuggers/ProjectCenter/PCDebugger.m: Add dealloc to shut down
	the debugger window when it's dealloc.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Don't set status when
	terminated, since it causes a crash.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27445 72102866-910b-0410-8b05-ffd578937521
2008-12-29 05:25:52 +00:00
Gregory John Casamento
fc1d806411 * Modules/Debuggers/ProjectCenter/PCDebugger.m: Added code
to do the restart and pause actions in the debugger.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.[hm]: Added
	method subProcessId and an ivar and the logic to parse the
	process id from debugger output.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27444 72102866-910b-0410-8b05-ffd578937521
2008-12-28 16:19:27 +00:00
Gregory John Casamento
eefe748587 * Framework/PCEditorManager.m: Remove log.
* Modules/Debuggers/ProjectCenter/GNUmakefile: Added new images
	to resource list.
	* Modules/Debuggers/ProjectCenter/PCDebugger.[hm]: Added setStatus:
	method to manage status field.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Added code
	to handle the toolbar.
	* Modules/Debuggers/ProjectCenter/PTYView.[hm]: Added method called
	"terminate" so that subclasses can override how the process is
	terminated.
	* Modules/Debuggers/ProjectCenter/Resources/PCDebugger.gorm: Added
	status line.
	* Modules/Debuggers/ProjectCenter/Resources/go_button.png
	* Modules/Debuggers/ProjectCenter/Resources/next_button.png
	* Modules/Debuggers/ProjectCenter/Resources/pause_button.png
	* Modules/Debuggers/ProjectCenter/Resources/restart_button.png
	* Modules/Debuggers/ProjectCenter/Resources/stepin_button.png
	* Modules/Debuggers/ProjectCenter/Resources/stepout_button.png:
	Images for debugger toolbar.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27440 72102866-910b-0410-8b05-ffd578937521
2008-12-28 07:19:45 +00:00
Gregory John Casamento
96c021a74f * Framework/PCEditorManager.m: Changed code to use the filePath
that is passed in, since it is now fully qualified.
	* Modules/Debuggers/ProjectCenter/PCDebugger.m: Pass the "-f" (fullname)
	flag to gdb.  This causes gdb to give a fully qualified pathname back.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.[hm]: Code to 
	extract the line and file information.
	* Modules/Debuggers/ProjectCenter/PTYView.[hm]: New method
	putString:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27439 72102866-910b-0410-8b05-ffd578937521
2008-12-27 05:43:41 +00:00
Gregory John Casamento
ca0d589c85 * Framework/PCEditorManager.m: Scroll to and select the line that
the debugger has stopped at.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: bring the debugger
	window to the front when a breakpoint is detected.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27430 72102866-910b-0410-8b05-ffd578937521
2008-12-26 17:55:11 +00:00
Gregory John Casamento
1d1c796f67 * Framework/PCEditorManager.m
* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Changes to bring
	up the file in which the debugger has stopped in.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27429 72102866-910b-0410-8b05-ffd578937521
2008-12-26 07:18:55 +00:00
Gregory John Casamento
466f1709f2 Changes to allow the debugger to notify the editor when a breakpoint is encountered.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27428 72102866-910b-0410-8b05-ffd578937521
2008-12-26 06:38:46 +00:00
Gregory John Casamento
43e24cad84 * Modules/Debuggers/ProjectCenter/GNUmakefile: Added PTYView.[hm]
* Modules/Debuggers/ProjectCenter/PCDebugger.[hm]: Simplified to 
	call PCDebuggerView instance with the program to start.
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.[hm]: Refactored
	into a subclass of PTYView.
	* Modules/Debuggers/ProjectCenter/PTYView.[hm]: pty based terminal
	view which allows us to read and write from a pseudo-terminal.
	The code in the master/slave methods was inspired by an example
	given in "UNIX Network Programming" by W. Richard Stevens and also
	Nicola Vitacolonna.
	* Modules/Debuggers/ProjectCenter/Resources/PCDebugger.gorm: Added
	PTYView and made the PCDebuggerView a subclass of it.   Also made
	the window release when closed so that the gdb process gets 
	terminated.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27416 72102866-910b-0410-8b05-ffd578937521
2008-12-25 15:46:41 +00:00
Gregory John Casamento
cd2924d9ab Write to the stream directly
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27411 72102866-910b-0410-8b05-ffd578937521
2008-12-23 14:48:11 +00:00
Gregory John Casamento
dad9dde30e * Modules/Debuggers/ProjectCenter/PCDebugger.h
* Modules/Debuggers/ProjectCenter/PCDebugger.m
	* Modules/Debuggers/ProjectCenter/PCDebuggerView.m: Add code
	to write to the file desicriptor.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27410 72102866-910b-0410-8b05-ffd578937521
2008-12-23 00:49:57 +00:00
Gregory John Casamento
3ea83315ba Info table for debugger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27409 72102866-910b-0410-8b05-ffd578937521
2008-12-23 00:01:09 +00:00
Gregory John Casamento
50ac933d43 * English.lproj/ProjectCenter.gorm: Minor changes.
* Framework/PCEditorManager.m: Cleanup.
        * Framework/PCProjectLauncher.m: Cleanup.
        * GNUmakefile: New module.
        * Headers/Protocols/CodeDebugger.h: New methods
        * Modules/Debuggers/ProjectCenter/GNUmakefile: Added debugger
        to resources.
        * Modules/Debuggers/ProjectCenter/PCDebugger.h
        * Modules/Debuggers/ProjectCenter/PCDebugger.m: Changes to talk to
        debugger task
        * Modules/Debuggers/ProjectCenter/Resources/PCDebugger.gorm: Debugger
        gorm file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27407 72102866-910b-0410-8b05-ffd578937521
2008-12-22 23:45:43 +00:00
Sergii Stoian
94baea2b63 * Documentatio/TODO: move unfinshed tasks from 0.5 to 0.6 release
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27406 72102866-910b-0410-8b05-ffd578937521
2008-12-22 22:01:26 +00:00
Riccardo Mottola
0f85f9390c interpret char from the view and send them to the debugger std in
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27394 72102866-910b-0410-8b05-ffd578937521
2008-12-22 00:39:45 +00:00
Riccardo Mottola
61691b8689 interpret char from the view and send them to the debugger std in
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27393 72102866-910b-0410-8b05-ffd578937521
2008-12-22 00:38:35 +00:00
Gregory John Casamento
9feb86a622 Debugger protocol
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27392 72102866-910b-0410-8b05-ffd578937521
2008-12-22 00:31:55 +00:00
Gregory John Casamento
c35bd787df Changes for gorm file and debugger class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27382 72102866-910b-0410-8b05-ffd578937521
2008-12-22 00:09:23 +00:00
Riccardo Mottola
32be29331b new tasks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27367 72102866-910b-0410-8b05-ffd578937521
2008-12-21 16:53:04 +00:00
Sergii Stoian
dfa1083363 Documentation/TODO: update 0.6 release tasks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27361 72102866-910b-0410-8b05-ffd578937521
2008-12-20 23:13:00 +00:00
Nicola Pero
077d9acf41 Removed GNUSTEP_CORE_SOFTWARE=YES from makefiles and instead set PACKAGE_NAME=ProjectCenter
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27352 72102866-910b-0410-8b05-ffd578937521
2008-12-19 13:13:49 +00:00
Nicola Pero
dd04c2f9b6 Set GNUSTEP_CORE_SOFTWARE to YES so that project center is installed by default in SYSTEM if gnustep-make has been configured with --disable-packages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27338 72102866-910b-0410-8b05-ffd578937521
2008-12-18 19:25:05 +00:00
Richard Frith-MacDonald
0fcb14a78f Avoid some confusion when selecting files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27323 72102866-910b-0410-8b05-ffd578937521
2008-12-17 10:46:22 +00:00
Richard Frith-MacDonald
d616702b69 Allow more types of help
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27322 72102866-910b-0410-8b05-ffd578937521
2008-12-17 09:47:48 +00:00
Richard Frith-MacDonald
f3d2771081 Add help
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27318 72102866-910b-0410-8b05-ffd578937521
2008-12-17 07:04:14 +00:00
Gregory John Casamento
173eb165ac Beginnings of debugger interface.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27314 72102866-910b-0410-8b05-ffd578937521
2008-12-16 21:31:41 +00:00
Richard Frith-MacDonald
1597cd9cee Fixups for NSRole
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27312 72102866-910b-0410-8b05-ffd578937521
2008-12-16 20:40:20 +00:00
Riccardo Mottola
b41546414a corrected wrong outlet
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27268 72102866-910b-0410-8b05-ffd578937521
2008-12-09 21:57:33 +00:00
Riccardo Mottola
08029f654a created and connected button outlets for build and debugger
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27264 72102866-910b-0410-8b05-ffd578937521
2008-12-09 00:51:53 +00:00
Riccardo Mottola
8c5c85d4db created set buttons for paths
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27263 72102866-910b-0410-8b05-ffd578937521
2008-12-08 21:08:49 +00:00
Riccardo Mottola
00d1c0f635 handle setting path from buttons
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27236 72102866-910b-0410-8b05-ffd578937521
2008-12-07 00:45:47 +00:00
Gregory John Casamento
5fbc998044 Correct warning in AppController.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27162 72102866-910b-0410-8b05-ffd578937521
2008-11-28 02:09:36 +00:00
Gregory John Casamento
2269ad78ec Fix for bug #24674.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27159 72102866-910b-0410-8b05-ffd578937521
2008-11-27 16:57:29 +00:00
Gregory John Casamento
cf5e1561a9 * Framework/PCProjectBrowser.m: Check return value of
[NSWorkspace getInfoForFile:application:type:].  Corrects crash when
	no editor is available for a type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@27144 72102866-910b-0410-8b05-ffd578937521
2008-11-27 06:25:27 +00:00
274 changed files with 12330 additions and 5592 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

2266
ChangeLog

File diff suppressed because it is too large Load diff

73
Documentation/BUGS Normal file
View file

@ -0,0 +1,73 @@
KNOWN BUGS:
~~~~~~~~~~
- [bug #25571] exception on removing author in project inspector.
This happens to me with project-center-0.5.0.
in the Project Inspector -> Project Description, click the Add button to
add an Author now the text input field is active, to add an author, as
long as this is active, and then pressing remove button, to remove an
author, then PC exits with the following exception:
NSRangeException: Index 1 is out of range 1 (in 'removeObjectAtIndex:')
- [sr #106614] ProjectCenter, document type extensions.
In the project center project properties editor, if there are several
extensions separated bya space, they should be encoded as element arrays
- [bug #25193] pc fails to load project from ImageViewer.pc.project.
- [bug #22815] ProjectCenter won't open a new project .
[doesn't work for me]
- [bug #22411] font types in ProjectCenter Editor.
- [bug #22441] Usability: Project Center should have a separate project type
for Renaissance based applications
- [bug #22124] ProjectCenter doesn't support extra entries in Plist.
- [bug #22008] Project Center should support more flexible directory
configurations.
- [bug #22026] ProjectCenter should split up project file.
- [bug #11931] Build before launch on change.
- [bug #20858] UI components (editor, builder, launcher).
The latest change fixes the initial problem but introduces a new one!
The new issue is that doesn't matter what I check or uncheck on the Interface
Preferences the only thing that is shown is the Editor in the SplitView.
It's reproducable every time, no matter what. All you need to do is check
every option, so that only the browser will be shown, then uncheck random
options.
On another note, but still related, when the Editor is shown (after being
hidden by the preferences) it doesn't preserve it's previous size.
RELEASE CRTITICAL UNKNOWN BUGS:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ProjectBuilder's incorrectly parses output of gnustep-make (incorrect
directories, incorrectly recognises initial point of error etc.).
- Browser must be double checked for correct behaviour on browsing,
file removal, opening editor (currently is bad).
- It seems that changing subproject's attributes doesn't change 'edited'
state of project window.
- Removing files works bad (crashes, strange warnings, exceptions). Check it!
Maybe this happens only in subprojects... It may be connected to browser's
functionality.
- PC tries to load internal editor for .gorm files. Fix it!!!
- Setting localizable resources through inspector works bad. Double check it
and fix!!! Also check this functionality when multiple files selected.
- Double check support for "Resource Set" project type as subproject of
existing projecttypes.
-
WHISH LIST:
~~~~~~~~~~
+ Open panel with list of modified files on project close and project build.
- Think about browser initial responder status: now very uncomfortable
to find some file in browser list when editor is open.
- "Project Attributes" for Application should be reviewed after split of
"Application" to "Application" and "Renaissance" project types.
- Add setting to preferences "Create template-based files on project creation".
It should allow to switch off creation of .m, .h, .gorm files from templates.

View file

@ -1,4 +1,4 @@
TODO
TODO
****
This is the GNUstep ProjectCenter TODO list.
@ -24,7 +24,7 @@ ProjectCenter 0.5
- Add "Resource Set" project type [done!]
- Implement on demand loading of bundles [done!]
- Localization support for projects [done!]
+ Finish save/restore size of split views in Project Window [done!]
- Finish save/restore size of split views in Project Window [done!]
--- Project Editor:
- Implement on demand loading (editor for file type) [done!]
- Open some files read only (Supporting Files) [done!]
@ -38,50 +38,81 @@ ProjectCenter 0.5
- Parse gcc output [95% done!]
- Display warnings,errors,options etc. as clickable list [done!]
- GNUstep make version 2.0 compliance [done!]
- Finish FileNameIcon (draggable, files can be dragged to it) stoyan
- Save last used path separately for different file panels [done!]
- Review all situations when dialogs must be popped up stoyan
ProjectCenter 0.6
-----------------
- Better integration with other tools (GORM) ???
- Rewrite Preferences (3rd party sections etc.) stoyan
- Add "Palette" project type stoyan
- Add "Component" project type stoyan
- Create new Info panel stoyan
- More options for file creation stoyan
- Think about imlementing pending adding/removal of files stoyan
--- Project Editor ---------------------------------------------
- Implement indentation stoyan
- Implement interaction with Builder (errors, warnings) stoyan
- Create new Info panel [done!]
- Implement support for integrated debugging [90% done]
- change project type from file to bundle [done!] casamento/mottola
- Finish FileNameIcon (draggable, files can be dragged to it) [done!]
- More options for file creation [done!]
- Review all situations when dialogs must be popped up [done!]
- Check all textfields if 'scrollable' attribute set [done!]
- Rewrite Preferences (3rd party sections etc.) [done!]
--- Project Builder --------------------------------------------
- Finish parsing gcc output (make errors, etc.)
- Implement interaction with Editor (errors, warnings) stoyan
- New icons. Need volonteers!!! ???
- Review build, compiler, linker options setting
(Build Options, Inspector) [done!]
- Finish parsing build output (compiler errors/warnings,
make errors, gnustep-make verbose mode) stoyan
- Finish interaction with Editor (errors, warnings) stoyan
- Add support for running configurable(Build Options)
command before and after make stoyan
--- Project Editor ---------------------------------------------
- review situations when editor is opened stoyan
- implement go to line stoyan
- Implement interaction with Builder (errors, warnings) stoyan
- Implement indentation stoyan
- implement undo inside editor [done!]
- Add and use basic editor preferences (fonts, colors, sizes) [50% done]
--- Project Inspector ------------------------------------------
- Make sections as loadable bundles stoyan
- Finish functionality of all sections stoyan
- Review all sections for correct behaviour stoyan
- Split "Application" to "Application GORM" and
"Application Renaissance" project types stoyan
- Add "Palette" project type ???
- Add "Component" project type ???
- Process reported bugs ???
- Think about imlementing pending adding/removal of files ???
- New icons. Need volunteers!!! ???
ProjectCenter 0.7
-----------------
- Finish suppor of integrated debugging ???
- Add support for browsing 'Library' category entries ???
- Add support for non-project files ???
- Implement symbols indexing. This feature touches Browser
(class and method list) and Editor (autocompletion) ???
- Editor: implement autocompletion ???
- An initial project wide find feature ???
- Implement support for integrated debugging ???
- CVS/SVN integration ???
- Better integration with other tools (GORM). DevKit? ???
ProjectCenter 0.8
-----------------
- Initial user documentation ???
- Implement code folding in Editor ???
- Direct code documentation (using autogsdoc) ???
- Think about adopting existing directory tree (more flexible
directory configurations) [bug #22008] ???
ProjectCenter 0.9
-----------------
- ProjectCenter localization ???
- Initial user documentation ???
- Implement Plist editor for editing project files[bug #22124] ???
- An initial class browser/documentation feature ???
ProjectCenter 1.0
-----------------
Version 1.0 is aimed at stabilising and optimising existing
Version 1.0 is aimed at stabilising and optimising existing
features. There will not be any new features since 0.9.
After 1.0
---------
- CVS/SVN integration ???

View file

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

Binary file not shown.

Binary file not shown.

View file

@ -64,7 +64,9 @@
editorColumnsField,
editorLinesField,
displayLog,
buildToolField
buildToolField,
debuggerButton,
buildToolButton
);
Super = NSObject;
};

Binary file not shown.

Binary file not shown.

View file

@ -7,7 +7,7 @@
"findNext:",
"findPrevious:",
"findShowPanel:",
"newAction:"
"performGoToLinePanelAction:"
);
Super = NSObject;
};

View file

@ -32,9 +32,9 @@
objcOptField,
cOptField,
ldOptField,
installPathField,
searchOrderScroll,
searchOrderColumn
searchOrderColumn,
installDomainPopup
);
Super = NSObject;
};

View file

@ -10,6 +10,13 @@
);
Super = NSObject;
};
PCAuxiliaryWindow = {
Actions = (
);
Outlets = (
);
Super = NSWindow;
};
PCProjectBuilderPanel = {
Actions = (
);

View file

@ -21,7 +21,8 @@
nfDescriptionTV,
nfNameField,
nfCancelButton,
nfCreateButton
nfCreateButton,
nfAddHeaderButton
);
Super = NSObject;
};

View file

@ -0,0 +1,22 @@
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"addLanguage:",
"removeLanguage:"
);
Super = NSObject;
};
PCProjectInspector = {
Actions = (
"addLanguage:",
"removeLanguage:"
);
Outlets = (
projectLanguagesView,
languagesList,
newLanguage
);
Super = NSObject;
};
}

View file

@ -0,0 +1,29 @@
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"buttonClicked:"
);
Super = NSObject;
};
PCAuxiliaryWindow = {
Actions = (
);
Outlets = (
);
Super = NSWindow;
};
SaveModifiedFilesDelegate = {
Actions = (
"buttonClicked:"
);
Outlets = (
alternateButton,
defaultButton,
panel,
otherButton,
filesList
);
Super = NSObject;
};
}

Binary file not shown.

Binary file not shown.

View file

@ -1,20 +1,19 @@
#
# GNUmakefile - Generated by ProjectCenter
#
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
PACKAGE_NAME = ProjectCenter
include $(GNUSTEP_MAKEFILES)/common.make
#
# Framework
#
VERSION = 0.5.0
VERSION = 0.7.0
FRAMEWORK_NAME = ProjectCenter
ProjectCenter_CURRENT_VERSION_NAME = 0.5.0
ProjectCenter_CURRENT_VERSION_NAME = 0.7.0
ProjectCenter_DEPLOY_WITH_CURRENT_VERSION = yes
ProjectCenter_HEADER_FILES_DIR = ../Headers/ProjectCenter
ProjectCenter_LIBRARIES_DEPEND_UPON += -lgnustep-gui
ProjectCenter_LIBRARIES_DEPEND_UPON += $(OBJC_LIBS) $(FND_LIBS) $(GUI_LIBS)
#
# Subprojects
@ -34,6 +33,7 @@ ProjectCenter_HEADER_FILES = \
PCAddFilesPanel.h \
PCFileCreator.h \
PCMakefileFactory.h \
PCSaveModified.h \
\
PCProjectManager.h \
PCProject.h \
@ -50,8 +50,12 @@ ProjectCenter_HEADER_FILES = \
PCProjectLoadedFiles.h \
PCProjectLoadedFilesPanel.h \
\
PCPrefController.h \
PCLogController.h
PCFileNameField.h \
PCFileNameIcon.h \
\
PCLogController.h \
\
PCAuxiliaryWindow.h
#
# Class files
@ -64,6 +68,7 @@ ProjectCenter_OBJC_FILES = \
PCFileManager.m \
PCAddFilesPanel.m \
PCFileCreator.m \
PCSaveModified.m \
\
PCProjectManager.m \
PCProject.m \
@ -80,13 +85,13 @@ ProjectCenter_OBJC_FILES = \
PCProjectLoadedFiles.m \
PCProjectLoadedFilesPanel.m \
\
PCSplitView.m \
PCButton.m \
PCFileNameField.m \
PCFileNameIcon.m \
\
PCPrefController.m \
PCLogController.m
PCLogController.m \
\
PCAuxiliaryWindow.m
#
# Resources
@ -99,6 +104,7 @@ ProjectCenter_RESOURCE_FILES = \
Resources/header.template \
Resources/postamble.template \
Resources/protocol.template \
Resources/ocppclass.template \
#
# Localization
@ -114,9 +120,11 @@ ProjectCenter_LOCALIZED_RESOURCE_FILES = \
BuildAttributes.gorm \
ProjectAttributes.gorm \
ProjectDescription.gorm \
ProjectLanguages.gorm \
FileAttributes.gorm \
LogPanel.gorm \
Preferences.gorm
SaveModified.gorm
ProjectCenter_LANGUAGES = \
English

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
@ -33,9 +33,10 @@
# be put into Makefile.postamble.
#
# TODO: Make sure if it's portable
GMAKE = `which gmake`
GDB = `which gdb`
# FIXME: Why are we hardcoding the full path to 'make' or 'gdb' in
# here ? Can't we discover them at runtime ?
GMAKE := $(shell which ${MAKE})
GDB := $(shell which gdb)
#
# Flags dealing with compiling and linking
@ -45,7 +46,7 @@ GDB = `which gdb`
ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS += -W -Wno-unused-parameter -DDEVELOPMENT\
ADDITIONAL_OBJCFLAGS += -DDEVELOPMENT\
-DPCDefaultBuildTool=@"\"$(GMAKE)\"" \
-DPCDefaultDebugger=@"\"$(GDB)\""

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2004 Free Software Foundation
Copyright (C) 2004-2014 Free Software Foundation
Authors: Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -19,11 +20,11 @@
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.
*/
#include <ProjectCenter/PCLogController.h>
#include <ProjectCenter/PCAddFilesPanel.h>
#import <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCAddFilesPanel.h>
static PCAddFilesPanel *addFilesPanel = nil;
@ -93,7 +94,7 @@ static PCAddFilesPanel *addFilesPanel = nil;
{
NSString *path = nil;
ASSIGN(_fileTypes, fileTypes);
[super setAllowedFileTypes: fileTypes];
path = [_browser path];
[self validateVisibleColumns];
@ -106,9 +107,9 @@ static PCAddFilesPanel *addFilesPanel = nil;
{
NSString *category = [fileTypePopup titleOfSelectedItem];
if ([_delegate respondsToSelector:@selector(categoryChangedTo:)])
if ([[self delegate] respondsToSelector:@selector(categoryChangedTo:)])
{
[_delegate categoryChangedTo:category];
[[self delegate] categoryChangedTo:category];
}
}

View file

@ -0,0 +1,33 @@
/*
PCAuxiliaryWindow.m
Author: German A. Arias <germanandre@gmx.es>
Date: September 2013
This file is part of ProjectCenter.
ProjectCenter 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 3 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 <ProjectCenter/PCAuxiliaryWindow.h>
@implementation PCAuxiliaryWindow
- (BOOL) canBecomeMainWindow
{
return NO;
}
@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.
*/
// TODO: Finish support for third party bundles.
@ -31,10 +31,10 @@
// - GNUSTEP_SYSTEM_LIBRARY/Bundles/ProjectCenter
// (NSApplicationSupportDirectory)
#include <ProjectCenter/PCBundleManager.h>
#include <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCBundleManager.h>
#import <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
@implementation PCBundleManager
@ -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];
@ -209,8 +211,8 @@
bundlePaths = [bundlesInfo allKeys];
enumerator = [bundlePaths objectEnumerator];
NSLog(@"Bundle fullpath method #1: %@",
[[self resourcePath] stringByAppendingPathComponent:bundleName]);
// NSLog(@"Bundle fullpath method #1: %@",
// [[self resourcePath] stringByAppendingPathComponent:bundleName]);
while ((bundleFullPath = [enumerator nextObject]))
{
@ -220,7 +222,7 @@
}
}
NSLog(@"Bundle fullpath method #2: %@", bundleFullPath);
// NSLog(@"Bundle fullpath method #2: %@", bundleFullPath);
return bundleFullPath;
}
@ -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-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,14 +20,11 @@
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.
*/
#include <ProjectCenter/PCButton.h>
#include <ProjectCenter/PCDefines.h>
#include <AppKit/NSBezierPath.h>
#include <GNUstepGUI/GSTrackingRect.h>
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCDefines.h>
@implementation PCButton
@ -34,355 +32,19 @@
// ==== Main
// ============================================================================
//- (id)initWithFrame:(NSRect)frameRect
- (id)initWithCoder:(NSCoder *)coder
{
// self = [super initWithFrame:frameRect];
self = [super initWithCoder:coder];
[_cell setGradientType:NSGradientConvexWeak];
[_cell setImageDimsWhenDisabled:YES];
[self setImagePosition:NSImageOnly];
[self setFont:[NSFont systemFontOfSize:10.0]];
[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
{
#ifdef DEVELOPMENT
NSLog(@"PCButton %@: dealloc", [self stringValue]);
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self];
if (_hasTooltips)
{
[self removeAllToolTips];
RELEASE(ttTitleAttrs);
RELEASE(ttBackground);
RELEASE(ttWindow);
}
[super dealloc];
}
- (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,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Copyright (C) 2002-2015 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>
@ -28,8 +29,14 @@
#import <ProjectCenter/PCProjectManager.h>
#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 =
@"PCEditorDidChangeFileNameNotification";
@ -99,12 +106,13 @@ NSString *PCEditorDidResignActiveNotification =
- (void)dealloc
{
#ifdef DEVELOPMENT
#endif
#ifdef DEBUG
NSLog (@"PCEditorManager: dealloc");
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self];
RELEASE(editorName);
RELEASE(_editorsDict);
[super dealloc];
@ -118,10 +126,24 @@ NSString *PCEditorDidResignActiveNotification =
- (void)setProjectManager:(PCProjectManager *)aProjectManager
{
_projectManager = aProjectManager;
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(loadPreferences:)
name:PCPreferencesDidChangeNotification
object:nil];
[self loadPreferences:nil];
}
- (void)loadPreferences:(NSNotification *)aNotification
{
id <PCPreferences> prefs = [_projectManager prefController];
ASSIGN(editorName, [prefs stringForKey:Editor]);
}
// ===========================================================================
// ==== Project and Editor handling
// ==== Editor handling
// ===========================================================================
- (id<CodeEditor>)editorForFile:(NSString *)filePath
@ -136,63 +158,100 @@ NSString *PCEditorDidResignActiveNotification =
NSFileManager *fm = [NSFileManager defaultManager];
BOOL isDir;
PCBundleManager *bundleManager = [_projectManager bundleManager];
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *ed = [ud objectForKey:Editor];
NSString *fileName = [filePath lastPathComponent];
id<CodeEditor> editor;
id<CodeParser> parser;
BOOL exists = [fm fileExistsAtPath:filePath isDirectory:&isDir];
NSLog(@"EditorManager: openEditorForFile: \"%@\"", filePath);
// Determine if file not exist or file is directory
if (![fm fileExistsAtPath:filePath isDirectory:&isDir] || isDir)
// Determine if file does not exist or file is directory
if (!exists)
{
NSLog(@"%@ doesn't exist!", filePath);
NSRunAlertPanel(@"Open Editor",
@"Couldn't open editor for file '%@'.\n"
@"File doesn't exist.",
@"Close", nil, nil, filePath);
return nil;
}
// Determine if file is text file
if (![[PCFileManager defaultManager] isTextFile:filePath])
if(isDir == NO)
{
NSLog(@"%@ is not plan text file!", filePath);
return nil;
if (![[PCFileManager defaultManager] isTextFile:filePath] && !isDir)
{
// TODO: Do not open alert panel for now. Internal editor
// for non text files must not be opened. Review PCProjectBrowser.
/* NSRunAlertPanel(@"Open Editor",
@"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;
}
}
if (!(editor = [_editorsDict objectForKey:filePath]))
// NSLog(@"EditorManager 1: %@", _editorsDict);
editor = [_editorsDict objectForKey: filePath];
if (editor == nil)
{
NSLog(@"Opening new editor");
// Editor
editor = [bundleManager objectForBundleWithName:ed
type:@"editor"
protocol:@protocol(CodeEditor)];
editor = [bundleManager objectForBundleWithName:editorName
type:@"editor"
protocol:@protocol(CodeEditor)];
if (editor == nil)
{
editor = [bundleManager
objectForBundleWithName:@"ProjectCenter"
type:@"editor"
protocol:@protocol(CodeEditor)];
return nil;
objectForBundleWithName:@"ProjectCenter"
type:@"editor"
protocol:@protocol(CodeEditor)];
}
// Parser
parser = [bundleManager objectForBundleType:@"parser"
protocol:@protocol(CodeParser)
fileName:fileName];
[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, we fall back to opening the
// file with the editor designated by the system.
//
[[NSWorkspace sharedWorkspace] openFile: filePath];
}
}
[editor setWindowed:windowed];
[self orderFrontEditorForFile:filePath];
NSLog(@"EditorManager: %@", _editorsDict);
if(editor != nil)
{
[editor setWindowed:windowed];
}
return editor;
}
@ -233,7 +292,7 @@ NSString *PCEditorDidResignActiveNotification =
return;
}
[_activeEditor closeFile:self save:YES];
[_activeEditor close:sender];
}
- (void)closeEditorForFile:(NSString *)file
@ -242,15 +301,108 @@ NSString *PCEditorDidResignActiveNotification =
if ([_editorsDict count] > 0 && (editor = [_editorsDict objectForKey:file]))
{
[editor closeFile:self save:YES];
[_editorsDict removeObjectForKey:file];
[editor close:self];
}
}
- (NSArray *)modifiedFiles
{
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
NSString *key = nil;
id<CodeEditor> editor;
NSMutableArray *modifiedFiles = [[NSMutableArray alloc] init];
while ((key = [enumerator nextObject]))
{
editor = [_editorsDict objectForKey:key];
if ([editor isEdited])
{
[modifiedFiles addObject:key];
}
}
return AUTORELEASE((NSArray *)modifiedFiles);
}
- (BOOL)hasModifiedFiles
{
if ([[self modifiedFiles] count])
{
return YES;
}
return NO;
}
- (BOOL)reviewUnsaved:(NSArray *)modifiedFiles
{
NSEnumerator *enumerator = [modifiedFiles objectEnumerator];
NSString *filePath;
id<CodeEditor> editor;
while ((filePath = [enumerator nextObject]))
{
editor = [_editorsDict objectForKey:filePath];
[self orderFrontEditorForFile:filePath];
if ([editor close:self] == NO)
{ // Operation should be aborted
return NO;
}
}
return YES;
}
- (BOOL)closeAllEditors
{
NSArray *modifiedFiles = [self modifiedFiles];
if ([modifiedFiles count])
{
if (!PCRunSaveModifiedFilesPanel(self,
@"Save and Close",
@"Close Anyway",
@"Cancel"))
{
return NO;
}
}
[_editorsDict removeAllObjects];
return YES;
}
// ===========================================================================
// ==== Active editor file handling
// ==== File handling
// ===========================================================================
- (BOOL)saveAllFiles
{
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
id<CodeEditor> editor;
NSString *key;
BOOL ret = YES;
while ((key = [enumerator nextObject]))
{
editor = [_editorsDict objectForKey:key];
if ([editor saveFileIfNeeded] == NO)
{
ret = NSRunAlertPanel(@"Save Files",
@"Couldn't save file '%@'.\n"
@"Operation stopped.",
@"Ok",nil,nil);
return NO;
}
}
return ret;
}
- (BOOL)saveFile
{
id<CodeEditor> editor = [self activeEditor];
@ -383,5 +535,16 @@ NSString *PCEditorDidResignActiveNotification =
[_editorsDict setObject:_editor forKey:_newFileName];
}
- (void)gotoFile: (NSString *)fileName atLine: (NSUInteger)line
{
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,10 +1,11 @@
/*
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
Riccardo Mottola
This file is part of GNUstep.
@ -20,15 +21,15 @@
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.
*/
#include <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCFileManager.h>
#include <ProjectCenter/PCFileCreator.h>
#import <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCFileManager.h>
#import <ProjectCenter/PCFileCreator.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
static PCFileCreator *_creator = nil;
static NSDictionary *dict = nil;
@ -43,53 +44,90 @@ static NSDictionary *dict = nil;
NSDictionary *headerDict;
NSDictionary *ccDict;
NSDictionary *chDict;
NSDictionary *classPpDict;
NSDictionary *protocolDict;
NSDictionary *gsmarkupDict;
NSString *descr;
NSString *template;
NSBundle *bundle;
_creator = [[[self class] alloc] init];
bundle = [NSBundle bundleForClass:[self class]];
// Setting up the dictionary needed for registration!
descr = [NSString stringWithString:@"Generic Objective-C class.\n\nThis is a plain subclass of NSObject which includes only Foundation.h."];
classDict = [NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCClasses,@"ProjectKey",
descr,@"TypeDescription",
nil];
descr = [NSString stringWithString:@"Generic Objective-C header.\n\nThis is a plain interface subclassing NSObject. The file includes Foundation.h"];
// Objective C Class
descr = @"Generic Objective-C class.\n\n"
@"This is a plain subclass of NSObject which includes"
@" only Foundation.h.";
template = [bundle pathForResource:@"class" ofType:@"template"];
classDict = [NSDictionary dictionaryWithObjectsAndKeys:
PCClasses, @"ProjectKey",
descr, @"TypeDescription",
template,@"TemplateFile",
nil];
// Objective C Header
descr = @"Generic Objective-C header.\n\n"
@"This is a plain interface subclassing NSObject."
@" The file includes Foundation.h";
template = [bundle pathForResource:@"header" ofType:@"template"];
headerDict =[NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCHeaders,@"ProjectKey",
descr,@"TypeDescription",
template,@"TemplateFile",
nil];
descr = [NSString stringWithString:@"Generic ANSI-C implementation file.\n\nThis file contains no Objective-C dependency in any form."];
// C File
descr = @"Generic ANSI-C implementation file.\n\n"
@"This file contains no Objective-C dependency in any form.";
template = [bundle pathForResource:@"cfile" ofType:@"template"];
ccDict = [NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCOtherSources,@"ProjectKey",
descr,@"TypeDescription",
template,@"TemplateFile",
nil];
descr = [NSString stringWithString:@"Generic ANSI-C header.\n\nThis file contains no Objective-C dependency in any form."];
// C Header
descr = @"Generic ANSI-C header.\n\n"
@"This file contains no Objective-C dependency in any form.";
template = [bundle pathForResource:@"cheader" ofType:@"template"];
chDict = [NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCHeaders,@"ProjectKey",
descr,@"TypeDescription",
template,@"TemplateFile",
nil];
descr = [NSString stringWithString:@"Generic Objective-C protocol.\n\nThis is common Objective-C protocol, comparable i.e. to a Java interface."];
// Objective C Protocol
descr = @"Generic Objective-C protocol.\n\n"
@"This is common Objective-C protocol, comparable"
@" i.e. to a Java interface.";
template = [bundle pathForResource:@"protocol" ofType:@"template"];
protocolDict = [NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCHeaders,@"ProjectKey",
descr,@"TypeDescription",
template,@"TemplateFile",
nil];
descr = [NSString stringWithString:@"Generic GSMarkup File.\n\nThis is the interface description of GNUstep Renaissance."];
// 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.";
template = [bundle pathForResource:@"gsmarkup" ofType:@"template"];
gsmarkupDict =[NSDictionary dictionaryWithObjectsAndKeys:
_creator,@"Creator",
PCGSMarkupFiles,@"ProjectKey",
descr,@"TypeDescription",
template, @"TemplateFile",
nil];
@ -99,6 +137,7 @@ static NSDictionary *dict = nil;
protocolDict, ProtocolFile,
headerDict, ObjCHeader,
classDict, ObjCClass,
classPpDict, ObjCppClass,
gsmarkupDict, GSMarkupFile,
nil];
}
@ -134,111 +173,117 @@ static NSDictionary *dict = nil;
[self showNewFilePanel];
}
- (NSDictionary *)createFileOfType:(NSString *)type
path:(NSString *)path
project:(PCProject *)aProject
- (void)createFileOfType:(NSString *)fileType
path:(NSString *)path
project:(PCProject *)project
{
NSDictionary *newFiles;
newFiles = [self filesToCreateForFileOfType:fileType
path:path
withComplementary:YES];
[self createFiles:newFiles inProject:project];
}
- (NSDictionary *)filesToCreateForFileOfType:(NSString *)type
path:(NSString *)path
withComplementary:(BOOL)complementary
{
PCFileManager *pcfm = [PCFileManager defaultManager];
NSString *_file = nil;
NSString *newFile = nil;
NSMutableDictionary *files = nil;
NSBundle *bundle = nil;
NSString *newFile = nil;
// A class and possibly a header
files = [NSMutableDictionary dictionaryWithCapacity:2];
PCLogStatus(self, @"create %@ at %@", type, path);
bundle = [NSBundle bundleForClass:[self class]];
newFile = [path copy];
// Remove file extension from "path"
if (![[path pathExtension] isEqualToString: @""])
{
path = [path stringByDeletingPathExtension];
}
/*
* Objective-C Class
*/
// Objective-C Class
if ([type isEqualToString:ObjCClass])
{
_file = [bundle pathForResource:@"class" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"m"];
[pcfm copyFile:_file toFile:newFile];
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[files setObject:ObjCClass forKey:newFile];
[files setObject:[dict objectForKey:ObjCClass] forKey:newFile];
}
/*
* Objective-C Header
* When creating Objective C Class file also create Objective C Header file
*/
if ([type isEqualToString:ObjCHeader] ||
[type isEqualToString:ObjCClass])
// Objective-C++ Class
else if ([type isEqualToString:ObjCppClass])
{
_file = [bundle pathForResource:@"header" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"h"];
[pcfm copyFile:_file toFile:newFile];
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[files setObject:ObjCHeader forKey:newFile];
newFile = [path stringByAppendingPathExtension:@"mm"];
[files setObject:[dict objectForKey:ObjCppClass] forKey:newFile];
}
/*
* C File
*/
if ([type isEqualToString:CFile])
// C File
else if ([type isEqualToString:CFile])
{
_file = [bundle pathForResource:@"cfile" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"c"];
[pcfm copyFile:_file toFile:newFile];
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[files setObject:CFile forKey:newFile];
[files setObject:[dict objectForKey:CFile] forKey:newFile];
}
/*
* C Header
* When creating C file also create C Header file
*/
// C Header
// When creating C file also create C Header file
if ([type isEqualToString:CHeader] ||
[type isEqualToString:CFile])
([type isEqualToString:CFile] && complementary))
{
_file = [bundle pathForResource:@"cheader" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"h"];
[pcfm copyFile:_file toFile:newFile];
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[files setObject:CHeader forKey:newFile];
[files setObject:[dict objectForKey:CHeader] forKey:newFile];
}
/*
* GSMarkup
*/
// Objective-C Header
// When creating Objective C Class file also create Objective C Header file
else if ([type isEqualToString:ObjCHeader] ||
([type isEqualToString:ObjCClass] && complementary))
{
newFile = [path stringByAppendingPathExtension:@"h"];
[files setObject:[dict objectForKey:ObjCHeader] forKey:newFile];
}
// GSMarkup
else if ([type isEqualToString:GSMarkupFile])
{
_file = [bundle pathForResource:@"gsmarkup" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"gsmarkup"];
[pcfm copyFile:_file toFile:newFile];
[files setObject:GSMarkupFile forKey:newFile];
[files setObject:[dict objectForKey:GSMarkupFile] forKey:newFile];
}
/*
* Objective-C Protocol
*/
// Objective-C Protocol
else if ([type isEqualToString:ProtocolFile])
{
_file = [bundle pathForResource:@"protocol" ofType:@"template"];
newFile = [path stringByAppendingPathExtension:@"h"];
[pcfm copyFile:_file toFile:newFile];
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[files setObject:ProtocolFile forKey:newFile];
[files setObject:[dict objectForKey:ProtocolFile] forKey:newFile];
}
/*
* Notify the browser!
*/
return files;
}
- (BOOL)createFiles:(NSDictionary *)fileList
inProject:(PCProject *)aProject
{
PCFileManager *pcfm = [PCFileManager defaultManager];
NSEnumerator *enumerator = [[fileList allKeys] objectEnumerator];
NSString *template = nil;
NSString *newFile = nil;
NSDictionary *fileType = nil;
NSString *key = nil;
while ((newFile = [enumerator nextObject]))
{
fileType = [fileList objectForKey:newFile];
key = [fileType objectForKey:@"ProjectKey"];
template = [fileType objectForKey:@"TemplateFile"];
if ([pcfm copyFile:template toFile:newFile])
{
[self replaceTagsInFileAtPath:newFile withProject:aProject];
[aProject addFiles:[NSArray arrayWithObject:newFile]
forKey:key
notify:YES];
}
}
// Notify the browser!
[[NSNotificationCenter defaultCenter]
postNotificationName:@"ProjectDictDidChangeNotification"
object:self];
return files;
return YES;
}
- (void)replaceTagsInFileAtPath:(NSString *)newFile
@ -252,7 +297,13 @@ static NSDictionary *dict = nil;
NSString *fn = [aFile stringByDeletingPathExtension];
NSRange subRange;
#ifdef WIN32
file = [[NSMutableString stringWithContentsOfFile: newFile
encoding: NSUTF8StringEncoding
error: NULL] retain];
#else
file = [[NSMutableString stringWithContentsOfFile:newFile] retain];
#endif
while ((subRange = [file rangeOfString:@"$FULLFILENAME$"]).length)
{
@ -295,8 +346,16 @@ static NSDictionary *dict = nil;
withString:[[NSNumber numberWithInt:year] stringValue]];
}
#ifdef WIN32
[file writeToFile: newFile
atomically: YES
encoding: NSUTF8StringEncoding
error: NULL];
#else
[file writeToFile:newFile atomically:YES];
[file autorelease];
#endif
[file release];
}
@end
@ -321,7 +380,6 @@ static NSDictionary *dict = nil;
{
[newFilePanel center];
}
[newFilePanel center];
[nfImage setImage:[NSApp applicationIconImage]];
[nfTypePB setRefusesFirstResponder:YES];
[nfTypePB removeAllItems];
@ -329,8 +387,9 @@ static NSDictionary *dict = nil;
[[dict allKeys]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]];
[nfTypePB selectItemAtIndex:0];
[nfCancleButton setRefusesFirstResponder:YES];
[nfCancelButton setRefusesFirstResponder:YES];
[nfCreateButton setRefusesFirstResponder:YES];
[nfAddHeaderButton setRefusesFirstResponder:YES];
[newFilePanel setDefaultButtonCell:[nfCreateButton cell]];
}
@ -339,29 +398,51 @@ static NSDictionary *dict = nil;
[newFilePanel makeKeyAndOrderFront:self];
[nfNameField setStringValue:@""];
[newFilePanel makeFirstResponder:nfNameField];
[newFilePanel setLevel:NSModalPanelWindowLevel];
[NSApp runModalForWindow:newFilePanel];
}
- (void)closeNewFilePanel:(id)sender
{
[newFilePanel orderOut:self];
[NSApp stopModal];
activeProject = nil;
}
- (void)createFile:(id)sender
{
[self createFile];
[self closeNewFilePanel:self];
activeProject = nil;
if ([self createFile])
{
[self closeNewFilePanel:self];
}
else
{
[newFilePanel makeKeyAndOrderFront:self];
}
}
- (void)newFilePopupChanged:(id)sender
{
NSString *type = [sender titleOfSelectedItem];
NSDictionary *creator = [dict objectForKey:type];
NSString *typeTitle = [sender titleOfSelectedItem];
NSDictionary *fileType = [dict objectForKey:typeTitle];
if (type)
if (!fileType)
{
[nfDescriptionTV setString:[creator objectForKey:@"TypeDescription"]];
return;
}
[nfDescriptionTV setString:[fileType objectForKey:@"TypeDescription"]];
[nfAddHeaderButton setState:NSOffState];
if ([typeTitle isEqualToString:ObjCClass] ||
[typeTitle isEqualToString:CFile])
{
[nfAddHeaderButton setEnabled:YES];
}
else
{
[nfAddHeaderButton setEnabled:NO];
}
}
@ -383,52 +464,70 @@ static NSDictionary *dict = nil;
}
}
- (void)createFile
- (BOOL)createFile
{
NSString *path = nil;
NSString *fileName = [nfNameField stringValue];
NSString *fileType = [nfTypePB titleOfSelectedItem];
NSDictionary *fileDict = [dict objectForKey:fileType];
NSString *projectKey = [fileDict objectForKey:@"ProjectKey"];
// PCLogInfo(self, @"[createFile] %@", fileName);
if ([activeProject doesAcceptFile:fileName forKey:projectKey])
{
path = [[activeProject projectPath]
stringByAppendingPathComponent:fileName];
}
// PCLogInfo(self, @"creating file at %@", path);
NSString *fileName = [nfNameField stringValue];
NSString *fileType = [nfTypePB titleOfSelectedItem];
NSString *path = nil;
NSString *key = nil;
NSDictionary *newFiles = nil;
NSEnumerator *enumerator = nil;
NSString *filePath = nil;
NSFileManager *fm = [NSFileManager defaultManager];
BOOL complementary;
path = [[activeProject projectPath] stringByAppendingPathComponent:fileName];
// Create file
if (path)
{
NSDictionary *newFiles = nil;
NSEnumerator *enumerator;
NSString *aFile;
// Get file list for creation
complementary = [nfAddHeaderButton state]==NSOnState ? YES : NO;
newFiles = [self filesToCreateForFileOfType:fileType
path:path
withComplementary:complementary];
// Do it finally...
newFiles = [self createFileOfType:fileType
path:path
project:activeProject];
// Add files to a project
// Check if project already has files with such names
enumerator = [[newFiles allKeys] objectEnumerator];
while ((aFile = [enumerator nextObject]))
while ((filePath = [enumerator nextObject]))
{
fileType = [newFiles objectForKey:aFile];
fileDict = [dict objectForKey:fileType];
projectKey = [fileDict objectForKey:@"ProjectKey"];
if ([activeProject doesAcceptFile:aFile forKey:projectKey])
key = [[newFiles objectForKey:filePath] objectForKey:@"ProjectKey"];
fileName = [filePath lastPathComponent];
if (![activeProject doesAcceptFile:fileName forKey:key])
{
[activeProject addFiles:[NSArray arrayWithObject:aFile]
forKey:projectKey
notify:YES];
NSRunAlertPanel(@"New File in Project",
@"Project %@ already has file %@ in %@",
@"OK", nil, nil,
[activeProject projectName], fileName, key);
return NO;
}
if ([fm fileExistsAtPath:filePath])
{
int ret;
ret = NSRunAlertPanel
(@"New File in Project",
@"Project directory %@ already has file %@.\n"
@"Do you want to overwrite it?",
@"Stop", @"Overwrite", nil,
[filePath stringByDeletingLastPathComponent],
fileName);
if (ret == NSAlertDefaultReturn) // Stop
{
return NO;
}
else // Overwrite. Remove destination of copy operation
{
[fm removeFileAtPath:filePath handler:nil];
}
}
}
// Create files
return [self createFiles:newFiles inProject:activeProject];
}
return NO;
}
@end

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 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,18 +21,19 @@
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.
*/
#include <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCFileManager.h>
#include <ProjectCenter/PCFileCreator.h>
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectBrowser.h>
#include <ProjectCenter/PCAddFilesPanel.h>
#import <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCFileManager.h>
#import <ProjectCenter/PCFileCreator.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectBrowser.h>
#import <ProjectCenter/PCAddFilesPanel.h>
#include <ProjectCenter/PCLogController.h>
#import <Protocols/Preferences.h>
#import <ProjectCenter/PCLogController.h>
@implementation PCFileManager
@ -105,6 +107,7 @@ static PCFileManager *_mgr = nil;
* component any more. Else, you may end up in an infinite loop if
* _path = @"".
*/
isDir = NO;
while (_path != nil
&& ![_path isEqualToString: _oldPath]
&& ![fm fileExistsAtPath:_path isDirectory:&isDir])
@ -150,13 +153,17 @@ static PCFileManager *_mgr = nil;
directoryPath = [toFile stringByDeletingLastPathComponent];
if ([self createDirectoriesIfNeededAtPath:directoryPath] == NO)
{
NSLog(@"PCFileManager: createDirectoriesIfNeededAtPath: == NO");
NSRunAlertPanel(@"Copy File",
@"Couldn't create directories at path %@",
@"Ok",nil,nil, directoryPath);
return NO;
}
if ([fm copyPath:file toPath:toFile handler:self] == NO)
{
NSLog(@"PCFileManager: copyPath:toPath: == NO");
NSRunAlertPanel(@"Copy File",
@"Couldn't copy file %@ to %@",
@"Ok",nil,nil, file, toFile);
return NO;
}
}
@ -176,7 +183,7 @@ static PCFileManager *_mgr = nil;
path = [directory stringByAppendingPathComponent:[file lastPathComponent]];
if (![self copyFile:file toFile:path])
{
{ // No need to open aler panel here
return NO;
}
@ -234,6 +241,9 @@ static PCFileManager *_mgr = nil;
{
if ([fm removeFileAtPath:path handler:nil] == NO)
{
NSRunAlertPanel(@"Remove Directory",
@"Couldn't remove empty directory at path %@",
@"Ok",nil,nil, path);
return NO;
}
path = [path stringByDeletingLastPathComponent];
@ -257,7 +267,9 @@ static PCFileManager *_mgr = nil;
path = [directory stringByAppendingPathComponent:file];
if (![fm removeFileAtPath:path handler:nil])
{
NSLog(@"PCFileManager: removeFileAtPath: == NO");
NSRunAlertPanel(@"Remove File",
@"Couldn't remove file at path %@",
@"Ok",nil,nil, path);
return NO;
}
@ -310,12 +322,48 @@ static PCFileManager *_mgr = nil;
}
else
{
NSRunAlertPanel(@"Move File",
@"Couldn't move file %@ to %@",
@"Ok",nil,nil, file, directory);
return NO;
}
return YES;
}
// ===========================================================================
// ==== Find Executable
// Tries to find the first matching executable tool fromt he given, nil-terminated
// list. Returns the full path for it.
// ===========================================================================
- (NSString*) findExecutableToolFrom: (NSArray*)candidates
{
NSFileManager *manager;
NSEnumerator *pathEnumerator;
NSString *directory;
manager = [NSFileManager defaultManager];
pathEnumerator = [NSSearchPathForDirectoriesInDomains(NSDeveloperDirectory, NSAllDomainsMask, YES) objectEnumerator];
while (nil != (directory = [pathEnumerator nextObject]))
{
NSEnumerator *candidateEnumerator = [candidates objectEnumerator];
NSString *candidate;
while (nil != (candidate = [candidateEnumerator nextObject]))
{
NSString *path = [directory stringByAppendingPathComponent: candidate];
if ([manager isExecutableFileAtPath: path])
{
return path;
}
}
}
return nil;
}
@end
@implementation PCFileManager (UInterface)
@ -328,9 +376,9 @@ static PCFileManager *_mgr = nil;
title:(NSString *)title
accView:(NSView *)accessoryView
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *lastOpenDir;
id panel;
id <PCPreferences> prefs = [projectManager prefController];
NSString *lastOpenDir;
id panel;
operation = op;
@ -340,26 +388,39 @@ static PCFileManager *_mgr = nil;
panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:YES];
[panel setCanChooseDirectories:NO];
lastOpenDir = [ud objectForKey:@"FileOpenLastDirectory"];
lastOpenDir = [prefs stringForKey:@"FileOpenLastDirectory"];
break;
case PCSaveFileOperation:
panel = [NSSavePanel savePanel];
lastOpenDir = [ud objectForKey:@"FileSaveLastDirectory"];
lastOpenDir = [prefs stringForKey:@"FileSaveLastDirectory"];
break;
case PCOpenProjectOperation:
panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:NO];
[panel setCanChooseFiles:YES];
[panel setCanChooseDirectories:YES];
lastOpenDir = [ud objectForKey:@"ProjectOpenLastDirectory"];
lastOpenDir = [prefs stringForKey:@"ProjectOpenLastDirectory"];
break;
case PCOpenDirectoryOperation:
panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:NO];
[panel setCanChooseDirectories:YES];
lastOpenDir = [prefs stringForKey:@"FileOpenLastDirectory"];
break;
case PCAddFileOperation:
if (addFilesPanel == nil)
{
addFilesPanel = [PCAddFilesPanel addFilesPanel];
[addFilesPanel setTreatsFilePackagesAsDirectories: YES];
}
panel = addFilesPanel;
lastOpenDir = [ud objectForKey:@"FileAddLastDirectory"];
lastOpenDir = [prefs stringForKey:@"FileAddLastDirectory"];
if (lastOpenDir == nil)
{
PCProject *pr = [projectManager activeProject];
NSString *prPathRoot = [pr projectPath];
lastOpenDir = prPathRoot;
}
break;
default:
return nil;
@ -388,8 +449,8 @@ static PCFileManager *_mgr = nil;
- (void)_saveLastDirectoryForPanel:(id)panel
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *key = nil;
id <PCPreferences> prefs = [projectManager prefController];
NSString *key = nil;
switch (operation)
{
@ -411,7 +472,7 @@ static PCFileManager *_mgr = nil;
if (key != nil)
{
[ud setObject:[panel directory] forKey:key];
[prefs setString:[panel directory] forKey:key notify:NO];
}
}
@ -423,28 +484,21 @@ static PCFileManager *_mgr = nil;
{
id panel;
NSMutableArray *fileList = [[NSMutableArray alloc] init];
NSString *file;
NSFileManager *fm = [NSFileManager defaultManager];
BOOL isDir;
int result;
int result = -10;
panel = [self _panelForOperation:op title:title accView:accessoryView];
if ((op == PCOpenFileOperation) || (op == PCOpenProjectOperation))
if (types != nil)
{
[panel setAllowsMultipleSelection:yn];
[panel setAllowedFileTypes:types];
}
if ((op == PCOpenFileOperation) ||
(op == PCOpenProjectOperation) ||
(op == PCOpenDirectoryOperation))
{
if ((result = [panel runModalForTypes:types]) == NSOKButton)
{
[fileList addObjectsFromArray:[panel filenames]];
file = [fileList objectAtIndex:0];
if (op == PCOpenProjectOperation &&
[fm fileExistsAtPath:file isDirectory:&isDir] && isDir)
{
file = [file stringByAppendingPathComponent:@"PC.project"];
[fileList insertObject:file atIndex:0];
}
}
}
else if (op == PCSaveFileOperation)
@ -549,17 +603,26 @@ static PCFileManager *_mgr = nil;
{
NSFileManager *fm = [NSFileManager defaultManager];
BOOL isDir;
NSString *file;
NSEnumerator *e = nil;
NSArray *tempList = nil;
NSString *tempExtension = nil;
if (operation == PCOpenProjectOperation)
{
if ([fm fileExistsAtPath:filename isDirectory:&isDir] && isDir)
{
file = [filename stringByAppendingPathComponent:@"PC.project"];
if ([fm fileExistsAtPath:file])
e = [[sender allowedFileTypes] objectEnumerator];
while ((tempExtension = [e nextObject]) != nil)
{
return YES;
tempList = [self filesWithExtension:tempExtension
atPath:filename
includeDirs:YES];
if ([tempList count] > 0)
{
return YES;
}
}
return NO;
}
}
@ -569,7 +632,7 @@ static PCFileManager *_mgr = nil;
@end
@implementation PCFileManager (FileType)
@implementation PCFileManager (Misc)
/**
* Returns YES if the file identified by `filename' is a text file,
@ -585,9 +648,11 @@ static PCFileManager *_mgr = nil;
{
NSFileHandle *fh;
NSData *data;
unsigned int i, n;
const char *buf;
unsigned int printable;
NSUInteger i, printable = 0;
NSString *content;
NSCharacterSet *alpha = [NSCharacterSet alphanumericCharacterSet];
NSCharacterSet *spaces = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSCharacterSet *marks = [NSCharacterSet punctuationCharacterSet];
fh = [NSFileHandle fileHandleForReadingAtPath:filename];
if (fh == nil)
@ -601,16 +666,45 @@ static PCFileManager *_mgr = nil;
return YES;
}
buf = [data bytes];
for (i = printable = 0, n = [data length]; i < n; i++)
content = [NSString stringWithContentsOfFile: filename];
for (i = 0; i < [content length]; i++)
{
if (isprint(buf[i]) || isspace(buf[i]))
if ([alpha characterIsMember: [content characterAtIndex: i]] ||
[spaces characterIsMember: [content characterAtIndex: i]] ||
[marks characterIsMember: [content characterAtIndex: i]])
{
printable++;
}
}
return (((double) printable / n) > 0.9);
return (((double) printable / i) > 0.9);
}
- (NSArray *)filesWithExtension:(NSString *)extension
atPath:(NSString *)dirPath
includeDirs:(BOOL)incDirs
{
NSFileManager *fm = [NSFileManager defaultManager];
NSMutableArray *filesList = [[NSMutableArray alloc] init];
NSEnumerator *e = nil;
NSString *temp = nil;
BOOL isDir;
e = [[fm directoryContentsAtPath:dirPath] objectEnumerator];
while ((temp = [e nextObject]) != nil)
{
if ([fm fileExistsAtPath:temp isDirectory:&isDir] && isDir && !incDirs)
{
continue;
}
if ([[temp pathExtension] isEqual:extension])
{
[filesList addObject:[dirPath stringByAppendingPathComponent:temp]];
}
}
return [filesList autorelease];
}
@end

View file

@ -19,12 +19,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.
*/
#include <AppKit/AppKit.h>
#import <AppKit/AppKit.h>
#include <ProjectCenter/PCFileNameField.h>
#import <ProjectCenter/PCFileNameField.h>
NSString *PCFileNameFieldNoFiles = @"No files selected";

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>
@ -33,7 +33,9 @@
- (void)awakeFromNib
{
filePath = nil;
[self setImage:[NSImage imageNamed:@"ProjectCenter"]];
[self setRefusesFirstResponder:YES];
// [self setEditable:NO]; // prevents dragging
// [self setImage:[NSImage imageNamed:@"ProjectCenter"]];
[self
registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
}
@ -44,15 +46,15 @@
filePath = nil;
[self setRefusesFirstResponder:YES];
[self setEditable:NO];
[self setImage:[NSImage imageNamed:@"ProjectCenter"]];
// [self setEditable:NO]; // prevents dragging
// [self setImage:[NSImage imageNamed:@"ProjectCenter"]];
return self;
}
- (void)dealloc
{
#ifdef DEVELOPMENT
#ifdef DEBUG
NSLog (@"PCFileNameIcon: dealloc");
#endif
@ -60,6 +62,7 @@
RELEASE(fileNameField);
RELEASE(delegate);
RELEASE(filePath);
[super dealloc];
}
@ -71,7 +74,7 @@
- (void)setDelegate:(id)object
{
delegate = object;
ASSIGN(delegate, object);
}
- (void)updateIcon
@ -82,24 +85,54 @@
{
[self setImage:[delegate fileNameIconImage]];
}
if ([delegate respondsToSelector:@selector(fileNameIconTitle)])
if ((fileNameField != nil) &&
[delegate respondsToSelector:@selector(fileNameIconTitle)])
{
[fileNameField setStringValue:[delegate fileNameIconTitle]];
}
if ([delegate respondsToSelector:@selector(fileNameIconPath)])
{
ASSIGN(filePath, [delegate fileNameIconPath]);
}
}
}
// --- Drag and drop
- (void)mouseDown:(NSEvent *)theEvent
{
NSArray *fileList = [NSArray arrayWithObjects:filePath, nil];
NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard];
NSPoint dragPosition;
[pboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType]
owner:nil];
[pboard setPropertyList:fileList forType:NSFilenamesPboardType];
// Start the drag operation
dragPosition = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
dragPosition.x -= 16;
dragPosition.y -= 16;
[self dragImage:[self image]
at:dragPosition
offset:NSZeroSize
event:theEvent
pasteboard:pboard
source:self
slideBack:YES];
}
// --- NSDraggingDestination protocol methods
// -- Before the image is released
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
NSPasteboard *pb = [sender draggingPasteboard];
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
unsigned int draggingOp = NSDragOperationNone;
NSDragOperation draggingOp = NSDragOperationNone;
NSLog(@"Dragging entered");
// NSLog(@"Dragging entered: %@", paths);
if (![paths isKindOfClass:[NSArray class]] || [paths count] == 0)
{
@ -122,12 +155,22 @@
- (void)draggingExited:(id <NSDraggingInfo>)sender
{
NSLog(@"Dragging exited");
}
// -- After the image is released
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *pb = [sender draggingPasteboard];
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
NSLog(@"Prepare for drag operation");
if (delegate &&
[delegate respondsToSelector:@selector(prepareForDraggingOf:)])
{
return [delegate prepareForDraggingOf:paths];
}
return YES;
}
@ -138,11 +181,34 @@
NSLog(@"performDragOperation: %@", paths);
return NO;
if (delegate &&
[delegate respondsToSelector:@selector(performDraggingOf:)])
{
return [delegate performDraggingOf:paths];
}
return YES;
}
- (void)concludeDragOperation:(id <NSDraggingInfo>)sendera
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *pb = [sender draggingPasteboard];
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
NSLog(@"Conclude drag operation");
if (delegate &&
[delegate respondsToSelector:@selector(concludeDraggingOf:)])
{
[delegate concludeDraggingOf:paths];
}
}
// --- NSDraggingSource protocol methods
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
{
return NSDragOperationCopy;
}
@end

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>
@ -114,7 +114,7 @@ static PCLogController *_logCtrllr = nil;
[panel center];
}
font = [NSFont userFixedPitchFontOfSize: 10.0];
font = [NSFont userFixedPitchFontOfSize:[NSFont systemFontSize]];
textAttributes =
[NSMutableDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
[textAttributes retain];
@ -134,7 +134,7 @@ static PCLogController *_logCtrllr = nil;
- (void)showPanel
{
[panel orderFront:self];
[panel makeKeyAndOrderFront:self];
}
- (void)logMessage:(NSString *)text withTag:(int)tag sender:(id)sender;

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 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,16 +21,21 @@
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.
*/
#include <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCMakefileFactory.h>
#import <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCMakefileFactory.h>
#import <Protocols/Preferences.h>
#import "../Modules/Preferences/Build/PCBuildPrefs.h"
#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"
@ -47,7 +53,7 @@ static PCMakefileFactory *_factory = nil;
{
static BOOL isInitialised = NO;
if( isInitialised == NO )
if (isInitialised == NO)
{
_factory = [[PCMakefileFactory alloc] init];
@ -57,13 +63,13 @@ static PCMakefileFactory *_factory = nil;
return _factory;
}
- (void)createMakefileForProject:(PCProject *)project
- (void) createMakefileForProject: (PCProject *)project
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *buildDir = [ud objectForKey:RootBuildDirectory];
id <PCPreferences> prefs = [[project projectManager] prefController];
NSString *buildDir = [prefs stringForKey:RootBuildDirectory];
NSString *prName = [project projectName];
NSString *buildName = [prName stringByAppendingPathExtension:@"build"];
NSString *instDir = [[project projectDict] objectForKey:PCInstallDir];
NSString *buildName = [prName stringByAppendingPathExtension: @"build"];
NSString *instDomain = [[project projectDict] objectForKey:PCInstallDomain];
NSAssert(prName, @"No project name given!");
@ -73,32 +79,52 @@ static PCMakefileFactory *_factory = nil;
AUTORELEASE(pnme);
pnme = [prName copy];
[mfile appendString:@"#\n"];
[mfile appendString:@"# GNUmakefile - Generated by ProjectCenter\n"];
[mfile appendString:@"#\n"];
[mfile appendString: @"#\n"];
[mfile appendString: @"# GNUmakefile - Generated by ProjectCenter\n"];
[mfile appendString: @"#\n"];
if ([instDir isEqualToString:@"LOCAL"] ||
[instDir isEqualToString:@"SYSTEM"] ||
[instDir isEqualToString:@"USER"] ||
[instDir isEqualToString:@"NETWORK"])
[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"];
[mfile appendString: @" before compiling!)\n"];
[mfile appendString: @"endif\n"];
if ([instDomain isEqualToString: @"LOCAL"]
|| [instDomain isEqualToString: @"SYSTEM"]
|| [instDomain isEqualToString: @"USER"]
|| [instDomain isEqualToString: @"NETWORK"])
{
[mfile appendString:
[NSString stringWithFormat:@"\nGNUSTEP_INSTALLATION_DOMAIN = %@\n",
instDir]];
}
else if ([instDir isEqualToString:@""])
{
[mfile appendString:
[NSString stringWithFormat:@"\nGNUSTEP_INSTALLATION_DOMAIN = LOCAL\n",
instDir]];
[NSString stringWithFormat: @"\nGNUSTEP_INSTALLATION_DOMAIN = %@\n",
instDomain]];
}
[mfile appendString:@"\ninclude $(GNUSTEP_MAKEFILES)/common.make\n"];
/* If GNUSTEP_INSTALLATION_DOMAIN was not set explicitly by the
* user, it should not be specified; gnustep-make will use the
* default - normally, but not necessarily, LOCAL.
*/
if (![buildDir isEqualToString:@""])
[mfile appendString: @"\ninclude $(GNUSTEP_MAKEFILES)/common.make\n"];
if (![buildDir isEqualToString: @""] && buildDir != nil)
{
[mfile appendString:
[NSString stringWithFormat:@"\nGNUSTEP_BUILD_DIR = %@\n",
[NSString stringWithFormat: @"\nGNUSTEP_BUILD_DIR = %@\n",
[buildDir stringByAppendingPathComponent:buildName]]];
}
}
@ -113,39 +139,39 @@ static PCMakefileFactory *_factory = nil;
NSString *projectType = [project projectTypeName];
// Create the new file
[mfp appendString:@"#\n"];
[mfp appendString:@"# GNUmakefile.preamble - Generated by ProjectCenter\n"];
[mfp appendString:@"#\n\n"];
[mfp appendString: @"#\n"];
[mfp appendString: @"# GNUmakefile.preamble - Generated by ProjectCenter\n"];
[mfp appendString: @"#\n\n"];
// Preprocessor flags
[mfp appendString:@"# Additional flags to pass to the preprocessor\n"];
[mfp appendString: @"# Additional flags to pass to the preprocessor\n"];
[mfp appendString:
[NSString stringWithFormat:@"ADDITIONAL_CPPFLAGS += %@\n\n",
[NSString stringWithFormat: @"ADDITIONAL_CPPFLAGS += %@\n\n",
[projectDict objectForKey:PCPreprocessorOptions]]];
// Objective C compiler flags
[mfp appendString:@"# Additional flags to pass to Objective C compiler\n"];
[mfp appendString: @"# Additional flags to pass to Objective C compiler\n"];
[mfp appendString:
[NSString stringWithFormat:@"ADDITIONAL_OBJCFLAGS += %@\n\n",
[NSString stringWithFormat: @"ADDITIONAL_OBJCFLAGS += %@\n\n",
[projectDict objectForKey:PCObjCCompilerOptions]]];
// C compiler flags
[mfp appendString:@"# Additional flags to pass to C compiler\n"];
[mfp appendString: @"# Additional flags to pass to C compiler\n"];
[mfp appendString:
[NSString stringWithFormat:@"ADDITIONAL_CFLAGS += %@\n\n",
[NSString stringWithFormat: @"ADDITIONAL_CFLAGS += %@\n\n",
[projectDict objectForKey:PCCompilerOptions]]];
// Linker flags
[mfp appendString:@"# Additional flags to pass to the linker\n"];
[mfp appendString: @"# Additional flags to pass to the linker\n"];
[mfp appendString:
[NSString stringWithFormat:@"ADDITIONAL_LDFLAGS += %@ ",
[NSString stringWithFormat: @"ADDITIONAL_LDFLAGS += %@ ",
[projectDict objectForKey:PCLinkerOptions]]];
[mfp appendString:@"\n\n"];
[mfp appendString: @"\n\n"];
// Directories where to search headers
[mfp appendString:
@"# Additional include directories the compiler should search\n"];
[mfp appendString:@"ADDITIONAL_INCLUDE_DIRS += "];
[mfp appendString: @"ADDITIONAL_INCLUDE_DIRS += "];
array = [projectDict objectForKey:PCSearchHeaders];
if (array && [array count])
{
@ -154,15 +180,15 @@ static PCMakefileFactory *_factory = nil;
while ((tmp = [enumerator nextObject]))
{
[mfp appendString:[NSString stringWithFormat:@"-I%@ ",tmp]];
[mfp appendString: [NSString stringWithFormat: @"-I%@ ",tmp]];
}
}
[mfp appendString:@"\n\n"];
[mfp appendString: @"\n\n"];
// Directories where to search libraries
[mfp appendString:
@"# Additional library directories the linker should search\n"];
[mfp appendString:@"ADDITIONAL_LIB_DIRS += "];
[mfp appendString: @"ADDITIONAL_LIB_DIRS += "];
array = [projectDict objectForKey:PCSearchLibs];
if (array && [array count])
{
@ -171,17 +197,17 @@ static PCMakefileFactory *_factory = nil;
while ((tmp = [enumerator nextObject]))
{
[mfp appendString:[NSString stringWithFormat:@"-L%@ ",tmp]];
[mfp appendString: [NSString stringWithFormat: @"-L%@ ",tmp]];
}
}
[mfp appendString:@"\n\n"];
[mfp appendString: @"\n\n"];
// [mfp appendString:[projectDict objectForKey:PCLibraries]];
// [mfp appendString: [projectDict objectForKey:PCLibraries]];
if([projectType isEqualToString: @"Tool"])
if ([projectType isEqualToString: @"Tool"])
{
// Additional TOOL libraries
[mfp appendString:@"# Additional TOOL libraries to link\n"];
[mfp appendString: @"# Additional TOOL libraries to link\n"];
[mfp appendString: @"ADDITIONAL_TOOL_LIBS += "];
array = [projectDict objectForKey:PCLibraries];
if (array && [array count])
@ -191,9 +217,9 @@ static PCMakefileFactory *_factory = nil;
while ((tmp = [enumerator nextObject]))
{
if (![tmp isEqualToString:@"gnustep-base"])
if (![tmp isEqualToString: @"gnustep-base"])
{
[mfp appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
[mfp appendString: [NSString stringWithFormat: @"-l%@ ",tmp]];
}
}
}
@ -203,7 +229,7 @@ static PCMakefileFactory *_factory = nil;
// Additional GUI libraries
// TODO: Let the user select objc, base, gui libraries/frameworks
// on the gui - the following works well for GUI stuff only.
[mfp appendString:@"# Additional GUI libraries to link\n"];
[mfp appendString: @"# Additional GUI libraries to link\n"];
[mfp appendString: @"ADDITIONAL_GUI_LIBS += "];
array = [projectDict objectForKey:PCLibraries];
if (array && [array count])
@ -213,25 +239,28 @@ static PCMakefileFactory *_factory = nil;
while ((tmp = [enumerator nextObject]))
{
if (![tmp isEqualToString:@"gnustep-base"] &&
![tmp isEqualToString:@"gnustep-gui"])
if (![tmp isEqualToString: @"gnustep-base"] &&
![tmp isEqualToString: @"gnustep-gui"])
{
[mfp appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
[mfp appendString: [NSString stringWithFormat: @"-l%@ ",tmp]];
}
}
}
}
[mfp appendString:@"\n\n"];
[mfp appendString: @"\n\n"];
// Write the new file to disc!
mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile.preamble"];
if ([mfp writeToFile:mfl atomically:YES])
mfl = [projectPath stringByAppendingPathComponent: @"GNUmakefile.preamble"];
if (![mfp writeToFile:mfl atomically:YES])
{
return YES;
NSRunAlertPanel(@"Create Makefile",
@"Couldn't create %@",
@"Ok",nil,nil, mfl);
return NO;
}
return NO;
return YES;
}
- (BOOL)createPostambleForProject:(PCProject *)project
@ -241,12 +270,20 @@ static PCMakefileFactory *_factory = nil;
NSString *postamble = nil;
NSFileManager *fm = [NSFileManager defaultManager];
bundle = [NSBundle bundleForClass:[self class]];
template = [bundle pathForResource:@"postamble" ofType:@"template"];
bundle = [NSBundle bundleForClass: [self class]];
template = [bundle pathForResource: @"postamble" ofType: @"template"];
postamble = [[project projectPath]
stringByAppendingPathComponent:@"GNUmakefile.postamble"];
stringByAppendingPathComponent: @"GNUmakefile.postamble"];
return [fm copyPath:template toPath:postamble handler:nil];
if (![fm copyPath:template toPath:postamble handler:nil])
{
NSRunAlertPanel(@"Create Makefile",
@"Couldn't create %@",
@"Ok",nil,nil, postamble);
return NO;
}
return YES;
}
- (void)appendString:(NSString *)aString
@ -263,22 +300,22 @@ static PCMakefileFactory *_factory = nil;
NSString *lib = nil;
NSEnumerator *enumerator = nil;
[libs removeObject:@"gnustep-base"];
[libs removeObject:@"gnustep-gui"];
[libs removeObject: @"gnustep-base"];
[libs removeObject: @"gnustep-gui"];
if (libs == nil || [libs count] == 0)
{
return;
}
[self appendString:@"\n\n#\n# Libraries\n#\n"];
[self appendString: @"\n\n#\n# Libraries\n#\n"];
[self appendString:
[NSString stringWithFormat:@"%@_LIBRARIES_DEPEND_UPON += ",pnme]];
[NSString stringWithFormat: @"%@_LIBRARIES_DEPEND_UPON += ",pnme]];
enumerator = [libs objectEnumerator];
while ((lib = [enumerator nextObject]))
{
[self appendString:[NSString stringWithFormat:@"-l%@ ",lib]];
[self appendString: [NSString stringWithFormat: @"-l%@ ",lib]];
}
}
@ -297,9 +334,9 @@ static PCMakefileFactory *_factory = nil;
[self appendString:COMMENT_HEADERS];
[self appendString:
[NSString stringWithFormat:@"%@_HEADER_FILES = \\\n", target]];
[NSString stringWithFormat: @"%@_HEADER_FILES = \\\n", target]];
[self appendString:[array componentsJoinedByString:@" \\\n"]];
[self appendString: [array componentsJoinedByString: @" \\\n"]];
}
- (void)appendClasses:(NSArray *)array
@ -314,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
@ -339,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;
@ -360,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)
@ -377,11 +457,11 @@ static PCMakefileFactory *_factory = nil;
{
oenum = [oarray objectEnumerator];
[self appendString:[NSString stringWithFormat:@"%@_C_FILES = ", target]];
[self appendString: [NSString stringWithFormat: @"%@_C_FILES = ", target]];
while ((file = [oenum nextObject]))
{
[self appendString:[NSString stringWithFormat:@"\\\n%@ ",file]];
[self appendString: [NSString stringWithFormat: @"\\\n%@ ",file]];
}
[self appendString: @"\n\n"];
}
@ -391,11 +471,24 @@ static PCMakefileFactory *_factory = nil;
{
oenum = [marray objectEnumerator];
[self appendString:[NSString stringWithFormat:@"%@_OBJC_FILES += ",pnme]];
[self appendString: [NSString stringWithFormat: @"%@_OBJC_FILES += ",pnme]];
while ((file = [oenum nextObject]))
{
[self appendString:[NSString stringWithFormat:@"\\\n%@ ", file]];
[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]];
}
}
}
@ -406,7 +499,7 @@ static PCMakefileFactory *_factory = nil;
int count = [array count];
NSString *string = nil;
NSString *item = nil;
NSString *eol = [NSString stringWithString:@"\\\n"];
NSString *eol = @"\\\n";
if (array == nil || count <= 0)
{
@ -416,17 +509,17 @@ static PCMakefileFactory *_factory = nil;
// Header
[self appendString:COMMENT_RESOURCES];
[self appendString:
[NSString stringWithFormat:@"%@_RESOURCE_FILES = \\\n",pnme]];
[NSString stringWithFormat: @"%@_RESOURCE_FILES = \\\n",pnme]];
// Items
for (i = 0; i < count; i++)
{
item = [array objectAtIndex:i];
string = [NSString stringWithFormat:@"%@/%@ %@", dir, item, eol];
string = [NSString stringWithFormat: @"%@/%@ %@", dir, item, eol];
[self appendString:string];
if (i == (count-2))
{
eol = [NSString stringWithString:@"\n"];
eol = @"\n";
}
}
}
@ -438,17 +531,17 @@ static PCMakefileFactory *_factory = nil;
return;
}
[self appendString:@"\\\n"];
[self appendString:[array componentsJoinedByString:@" \\\n"]];
[self appendString: @"\\\n"];
[self appendString: [array componentsJoinedByString: @" \\\n"]];
}
- (void)appendLocalizedResources:(NSArray *)resources
forLanguages:(NSArray *)languages
{
NSString *langs = [languages componentsJoinedByString:@" "];
NSString *langs = [languages componentsJoinedByString: @" "];
NSString *string = nil;
NSString *item = nil;
NSString *eol = [NSString stringWithString:@"\\\n"];
NSString *eol = @"\\\n";
int i = 0;
int count = [resources count];
@ -461,20 +554,20 @@ static PCMakefileFactory *_factory = nil;
[self appendString:COMMENT_LOCALIZATION];
// Languages
string = [NSString stringWithFormat:@"%@_LANGUAGES = %@\n", pnme, langs];
string = [NSString stringWithFormat: @"%@_LANGUAGES = %@\n", pnme, langs];
[self appendString:string];
// Items
[self appendString:
[NSString stringWithFormat:@"%@_LOCALIZED_RESOURCE_FILES = \\\n",pnme]];
[NSString stringWithFormat: @"%@_LOCALIZED_RESOURCE_FILES = \\\n",pnme]];
for (i = 0; i < count; i++)
{
if (i == (count-1))
{
eol = [NSString stringWithString:@"\n"];
eol = @"\n";
}
item = [resources objectAtIndex:i];
string = [NSString stringWithFormat:@"%@ %@", item, eol];
string = [NSString stringWithFormat: @"%@ %@", item, eol];
[self appendString:string];
}
}
@ -490,21 +583,21 @@ static PCMakefileFactory *_factory = nil;
}
[self appendString:COMMENT_SUBPROJECTS];
[self appendString:@"SUBPROJECTS = "];
[self appendString: @"SUBPROJECTS = "];
enumerator = [array objectEnumerator];
while ((tmp = [enumerator nextObject]))
{
tmp = [tmp stringByAppendingPathExtension:@"subproj"];
[self appendString:[NSString stringWithFormat:@"\\\n%@ ",tmp]];
tmp = [tmp stringByAppendingPathExtension: @"subproj"];
[self appendString: [NSString stringWithFormat: @"\\\n%@ ",tmp]];
}
}
- (NSData *)encodedMakefile
{
NSAssert( mfile, @"No valid makefile available!");
NSAssert(mfile, @"No valid makefile available!");
return [mfile dataUsingEncoding:[NSString defaultCStringEncoding]];
return [mfile dataUsingEncoding: [NSString defaultCStringEncoding]];
}
@end

View file

@ -1,892 +0,0 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
This file is part of GNUstep.
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., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#import <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCPrefController.h>
// TODO: rewrite it as PCPreferences, use +sharedPreferences instead of
// [NSUserDefaults standardUserDefaults] in every part of ProjectCenter
@implementation PCPrefController
// ===========================================================================
// ==== Class methods
// ===========================================================================
static PCPrefController *_prefCtrllr = nil;
+ (PCPrefController *)sharedPCPreferences
{
if (!_prefCtrllr)
{
_prefCtrllr = [[PCPrefController alloc] init];
}
return _prefCtrllr;
}
//
- (id)init
{
NSDictionary *prefs = nil;
if (!(self = [super init]))
{
return nil;
}
// The prefs from the defaults
prefs = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
preferencesDict = [[NSMutableDictionary alloc] initWithDictionary:prefs];
if ([preferencesDict objectForKey:@"Version"] == nil)
{
[self setDefaultValues];
}
return self;
}
- (void)dealloc
{
#ifdef DEVELOPMENT
NSLog(@"PCPrefController: dealloc");
#endif
RELEASE(preferencesDict);
RELEASE(panel);
RELEASE(buildingView);
RELEASE(savingView);
RELEASE(keyBindingsView);
RELEASE(miscView);
[[NSUserDefaults standardUserDefaults] synchronize];
[super dealloc];
}
- (void)setDefaultValues
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
PCLogInfo(self, @"setDefaultValues");
// Clean preferences
[preferencesDict removeAllObjects];
[preferencesDict setObject:@"0.4" forKey:@"Version"];
// Building
[preferencesDict setObject:@"" forKey:SuccessSound];
[preferencesDict setObject:@"" forKey:FailureSound];
[preferencesDict setObject:@"YES" forKey:PromptOnClean];
[preferencesDict setObject:@"" forKey:RootBuildDirectory];
// Saving
[preferencesDict setObject:@"YES" forKey:SaveOnQuit];
[preferencesDict setObject:@"YES" forKey:KeepBackup];
[preferencesDict setObject:@"120" forKey:AutoSavePeriod];
// Key Bindings
[preferencesDict setObject:@"Tab" forKey:TabBehaviour];
// Miscellaneous
[preferencesDict setObject:@"YES" forKey:PromptOnQuit];
[preferencesDict setObject:@"YES" forKey:DeleteCacheWhenQuitting];
[preferencesDict setObject:@"YES" forKey:FullPathInFilePanels];
[preferencesDict setObject:@"/usr/bin/make" forKey:BuildTool];
[preferencesDict setObject:@"/usr/bin/gdb" forKey:Debugger];
[preferencesDict setObject:@"ProjectCenter" forKey:Editor];
// Interface
[preferencesDict setObject:@"YES" forKey:SeparateBuilder];
[preferencesDict setObject:@"YES" forKey:SeparateLauncher];
[preferencesDict setObject:@"NO" forKey:SeparateEditor];
[preferencesDict setObject:@"YES" forKey:SeparateLoadedFiles];
[preferencesDict setObject:@"30" forKey:EditorLines];
[preferencesDict setObject:@"80" forKey:EditorColumns];
[preferencesDict setObject:@"YES" forKey:RememberWindows];
[preferencesDict setObject:@"NO" forKey:DisplayLog];
[ud setPersistentDomain:preferencesDict forName:@"ProjectCenter"];
[ud synchronize];
}
- (void)loadPreferences
{
NSDictionary *prefs;
NSString *val;
NSString *defValue = @"";
prefs = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
[preferencesDict addEntriesFromDictionary: prefs];
// Fill in the defaults
// Building
[successField setStringValue:
(val = [preferencesDict objectForKey:SuccessSound]) ? val : defValue];
[failureField setStringValue:
(val = [preferencesDict objectForKey:FailureSound]) ? val : defValue];
[promptOnClean setState:
([[preferencesDict objectForKey:PromptOnClean]
isEqualToString: @"YES"]) ? NSOnState : NSOffState];
[rootBuildDirField setStringValue:
(val = [preferencesDict objectForKey:RootBuildDirectory]) ? val : defValue];
// Saving
[saveOnQuit setState:
([[preferencesDict objectForKey: SaveOnQuit]
isEqualToString: @"YES"]) ? NSOnState : NSOffState];
[keepBackup setState:
([[preferencesDict objectForKey: KeepBackup]
isEqualToString: @"YES"]) ? NSOnState : NSOffState];
defValue = @"120";
[autosaveField setStringValue:
(val = [preferencesDict objectForKey: AutoSavePeriod]) ? val : defValue];
[autosaveSlider setFloatValue:[[autosaveField stringValue] floatValue]];
// Key Bindings
val = [preferencesDict objectForKey:TabBehaviour];
[tabMatrix deselectAllCells];
if ([val isEqualToString:@"Tab"])
{
[tabMatrix selectCellAtRow:0 column:0];
}
else if ([val isEqualToString:@"IndentAlways"])
{
[tabMatrix selectCellAtRow:1 column:0];
}
else if ([val isEqualToString:@"IndentAtBeginning"])
{
[tabMatrix selectCellAtRow:2 column:0];
}
else if ([val isEqualToString:@"Spaces"])
{
[tabMatrix selectCellAtRow:3 column:0];
}
// Miscellaneous
[promptWhenQuit setState:
([[preferencesDict objectForKey: PromptOnQuit]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[deleteCache setState:
([[preferencesDict objectForKey: DeleteCacheWhenQuitting]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[fullPathInFilePanels setState:
([[preferencesDict objectForKey: FullPathInFilePanels]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[buildToolField setStringValue:
(val = [preferencesDict objectForKey:BuildTool]) ? val : PCDefaultBuildTool];
[debuggerField setStringValue:
(val = [preferencesDict objectForKey: Debugger]) ? val : PCDefaultDebugger];
[editorField setStringValue:
(val = [preferencesDict objectForKey: Editor]) ? val : @"ProjectCenter"];
// Interface
[separateBuilder setState:
([[preferencesDict objectForKey: SeparateBuilder]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[separateLauncher setState:
([[preferencesDict objectForKey: SeparateLauncher]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[separateEditor setState:
([[preferencesDict objectForKey: SeparateEditor]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[separateLoadedFiles setState:
([[preferencesDict objectForKey: SeparateLoadedFiles]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[editorLinesField setStringValue:
(val = [preferencesDict objectForKey: EditorLines]) ? val : @"30"];
[editorColumnsField setStringValue:
(val = [preferencesDict objectForKey: EditorColumns]) ? val : @"80"];
if ([separateEditor state] == NSOffState
|| ![[editorField stringValue] isEqualToString:@"ProjectCenter"])
{
[self setEditorSizeEnabled:NO];
}
[rememberWindows setState:
([[preferencesDict objectForKey: RememberWindows]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
[displayLog setState:
([[preferencesDict objectForKey:DisplayLog]
isEqualToString:@"YES"]) ? NSOnState : NSOffState];
}
- (void)awakeFromNib
{
NSArray *tabMatrixCells;
unsigned i;
[promptOnClean setRefusesFirstResponder:YES];
[saveOnQuit setRefusesFirstResponder:YES];
[keepBackup setRefusesFirstResponder:YES];
tabMatrixCells = [tabMatrix cells];
for (i = 0; i < [tabMatrixCells count]; i++)
{
[[tabMatrixCells objectAtIndex:i] setRefusesFirstResponder:YES];
}
[promptWhenQuit setRefusesFirstResponder:YES];
[deleteCache setRefusesFirstResponder:YES];
[fullPathInFilePanels setRefusesFirstResponder:YES];
[separateBuilder setRefusesFirstResponder:YES];
[separateLauncher setRefusesFirstResponder:YES];
[separateEditor setRefusesFirstResponder:YES];
[separateLoadedFiles setRefusesFirstResponder:YES];
[rememberWindows setRefusesFirstResponder:YES];
[displayLog setRefusesFirstResponder:YES];
}
// Accessory
- (NSDictionary *)preferencesDict
{
return preferencesDict;
}
- (id)objectForKey:(NSString *)key
{
return [preferencesDict objectForKey:key];
}
- (NSString *)selectFileWithTypes:(NSArray *)types
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
NSString *file = nil;
NSOpenPanel *openPanel;
int retval;
openPanel = [NSOpenPanel openPanel];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setCanChooseDirectories:YES];
[openPanel setCanChooseFiles:YES];
retval = [openPanel
runModalForDirectory:[def objectForKey:@"LastOpenDirectory"]
file:nil
types:types];
if (retval == NSOKButton)
{
[def setObject:[openPanel directory] forKey:@"LastOpenDirectory"];
file = [[openPanel filenames] objectAtIndex:0];
}
return file;
}
- (void)showPanel:(id)sender
{
if (panel == nil
&& [NSBundle loadNibNamed:@"Preferences" owner:self] == NO)
{
PCLogError(self, @"error loading NIB file!");
return;
}
[panel setFrameAutosaveName:@"Preferences"];
if (![panel setFrameUsingName: @"Preferences"])
{
[panel center];
}
RETAIN(buildingView);
RETAIN(savingView);
RETAIN(keyBindingsView);
RETAIN(miscView);
RETAIN(interfaceView);
// The popup and selected view
[popupButton removeAllItems];
[popupButton addItemWithTitle:@"Building"];
[popupButton addItemWithTitle:@"Saving"];
[popupButton addItemWithTitle:@"Key Bindings"];
[popupButton addItemWithTitle:@"Miscellaneous"];
[popupButton addItemWithTitle:@"Interface"];
[popupButton selectItemWithTitle:@"Building"];
[self popupChanged:popupButton];
// Load saved prefs
[self loadPreferences];
[panel orderFront:self];
}
//
- (void)popupChanged:(id)sender
{
NSView *view = nil;
switch ([sender indexOfSelectedItem])
{
case 0:
view = buildingView;
break;
case 1:
view = savingView;
break;
case 2:
view = keyBindingsView;
break;
case 3:
view = miscView;
break;
case 4:
view = interfaceView;
break;
}
[sectionsView setContentView:view];
[sectionsView display];
}
// Building
- (void)setSuccessSound:(id)sender
{
NSArray *types = [NSArray arrayWithObjects:@"snd",@"au",@"wav",nil];
NSString *path = [self selectFileWithTypes:types];
if (path)
{
[successField setStringValue: path];
[[NSUserDefaults standardUserDefaults] setObject:path
forKey:SuccessSound];
[preferencesDict setObject:path forKey:SuccessSound];
}
}
- (void)setFailureSound:(id)sender
{
NSArray *types = [NSArray arrayWithObjects:@"snd",@"au",@"wav",nil];
NSString *path = [self selectFileWithTypes:types];
if (path)
{
[failureField setStringValue:path];
[[NSUserDefaults standardUserDefaults] setObject:path
forKey:FailureSound];
[preferencesDict setObject:path forKey:FailureSound];
}
}
- (void)setRootBuildDir:(id)sender
{
NSString *path;
if (sender == rootBuildDirButton)
{
path = [self selectFileWithTypes:nil];
[rootBuildDirField setStringValue:path];
}
else
{
path = [rootBuildDirField stringValue];
}
if (path)
{
[[NSUserDefaults standardUserDefaults] setObject:path
forKey:RootBuildDirectory];
[preferencesDict setObject:path
forKey:RootBuildDirectory];
}
}
- (void)setPromptOnClean:(id)sender
{
NSUserDefaults *def = nil;
if (promptOnClean == nil)
{// HACK!!! need to be fixed in GNUstep
promptOnClean = sender;
return;
}
def = [NSUserDefaults standardUserDefaults];
switch ([sender state])
{
case NSOffState:
[def setObject:@"NO" forKey:PromptOnClean];
break;
case NSOnState:
[def setObject:@"YES" forKey:PromptOnClean];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:PromptOnClean]
forKey:PromptOnClean];
}
// Saving
- (void)setSaveOnQuit:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (saveOnQuit == nil)
{ // HACK!!!
saveOnQuit = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:SaveOnQuit];
break;
case 1:
[def setObject:@"YES" forKey:SaveOnQuit];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:SaveOnQuit]
forKey:SaveOnQuit];
}
- (void)setKeepBackup:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (keepBackup == nil)
{ // HACK!!!
keepBackup = sender;
return;
}
switch ([[sender selectedCell] state])
{
case 0:
[def setObject:@"NO" forKey:KeepBackup];
break;
case 1:
[def setObject:@"YES" forKey:KeepBackup];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:KeepBackup]
forKey:KeepBackup];
}
- (void)setSavePeriod:(id)sender
{
NSString *periodString = nil;
if (sender == autosaveSlider)
{
[autosaveField setIntValue:[sender intValue]];
}
else if (sender == autosaveField)
{
if ([autosaveField floatValue] < [autosaveSlider minValue])
{
[autosaveField setFloatValue:[autosaveSlider minValue]];
}
else if ([autosaveField floatValue] > [autosaveSlider maxValue])
{
[autosaveField setFloatValue:[autosaveSlider maxValue]];
}
[autosaveSlider setFloatValue:[autosaveField floatValue]];
}
periodString = [autosaveField stringValue];
[[NSUserDefaults standardUserDefaults] setObject:periodString
forKey:AutoSavePeriod];
[preferencesDict setObject:periodString forKey:AutoSavePeriod];
[[NSNotificationCenter defaultCenter]
postNotificationName:PCSavePeriodDidChangeNotification
object:periodString];
}
// Key bindings
- (void)setTabBehaviour:(id)sender
{
id cell = [sender selectedCell];
NSString *tabBehaviour = nil;
PCLogInfo(self, @"setTabBehaviour: %@", [cell title]);
if ([[cell title] isEqualToString:@"Insert Tab"])
{
tabBehaviour = [NSString stringWithString:@"Tab"];
}
else if ([[cell title] isEqualToString:@"Indent only at beginning of line"])
{
tabBehaviour = [NSString stringWithString:@"IndentAtBeginning"];
}
else if ([[cell title] isEqualToString:@"Indent always"])
{
tabBehaviour = [NSString stringWithString:@"IndentAlways"];
}
else if ([[cell title] isEqualToString:@"Insert spaces"])
{
tabBehaviour = [NSString stringWithString:@"Spaces"];
[tabSpacesField setEnabled:YES];
[tabSpacesField becomeFirstResponder];
}
[[NSUserDefaults standardUserDefaults] setObject:tabBehaviour
forKey:TabBehaviour];
[preferencesDict setObject:tabBehaviour forKey:TabBehaviour];
}
- (void)setTabSpaces:(id)sender
{
if ([[tabSpacesField stringValue] isEqualToString:@""])
{
[tabSpacesField setStringValue:@"2"];
}
[[NSUserDefaults standardUserDefaults]
setObject:[tabSpacesField stringValue]
forKey:TabSpaces];
[preferencesDict setObject:[tabSpacesField stringValue] forKey:TabSpaces];
}
// Miscellaneous
- (void)setPromptWhenQuit:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (promptWhenQuit == nil)
{
promptWhenQuit = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:PromptOnQuit];
break;
case 1:
[def setObject:@"YES" forKey:PromptOnQuit];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:PromptOnQuit]
forKey:PromptOnQuit];
}
- (void)setDeleteCache:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (deleteCache == nil)
{
deleteCache = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:DeleteCacheWhenQuitting];
break;
case 1:
[def setObject:@"YES" forKey:DeleteCacheWhenQuitting];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:DeleteCacheWhenQuitting]
forKey:DeleteCacheWhenQuitting];
}
- (void)setFullPathInFilePanels:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (fullPathInFilePanels == nil)
{
fullPathInFilePanels = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:FullPathInFilePanels];
break;
case 1:
[def setObject:@"YES" forKey:FullPathInFilePanels];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:FullPathInFilePanels]
forKey:FullPathInFilePanels];
}
- (void)setBuildTool:(id)sender
{
NSString *path = [buildToolField stringValue];
if ([path isEqualToString:@""] || !path)
{
[buildToolField setStringValue:PCDefaultBuildTool];
path = [buildToolField stringValue];
}
else if (!path || ![[NSFileManager defaultManager] fileExistsAtPath:path])
{
[buildToolField selectText:self];
NSRunAlertPanel(@"Build Tool not found!",
@"File %@ doesn't exist!",
@"OK", nil, nil, path);
}
[[NSUserDefaults standardUserDefaults] setObject:path forKey:BuildTool];
[preferencesDict setObject:path forKey:BuildTool];
}
- (void)setDebugger:(id)sender
{
NSString *path = [debuggerField stringValue];
if ([path isEqualToString:@""] || !path)
{
[debuggerField setStringValue:PCDefaultDebugger];
path = [debuggerField stringValue];
}
else if (!path || ![[NSFileManager defaultManager] fileExistsAtPath:path])
{
[debuggerField selectText:self];
NSRunAlertPanel(@"Debugger not found!",
@"File %@ doesn't exist!",
@"OK", nil, nil, path);
}
[[NSUserDefaults standardUserDefaults] setObject:path forKey:Debugger];
[preferencesDict setObject:path forKey:Debugger];
}
- (void)setEditor:(id)sender
{
NSString *path = [editorField stringValue];
NSString *editorPath = nil;
NSFileManager *fm = [NSFileManager defaultManager];
[separateEditor setEnabled:YES];
[self setEditorSizeEnabled:YES];
editorPath = [[path componentsSeparatedByString:@" "] objectAtIndex:0];
if ([path isEqualToString:@""] || !path)
{
[editorField setStringValue:@"ProjectCenter"];
path = [editorField stringValue];
}
else if (![path isEqualToString:@"ProjectCenter"])
{
if (![fm fileExistsAtPath:editorPath])
{
[editorField selectText:self];
NSRunAlertPanel(@"Editor not found!",
@"File %@ doesn't exist!",
@"Close", nil, nil, path);
}
else if (![fm isExecutableFileAtPath:editorPath])
{
[editorField selectText:self];
NSRunAlertPanel(@"Editor file error!",
@"File %@ exist but is not executable!",
@"Close", nil, nil, path);
}
[separateEditor setEnabled:NO];
[self setEditorSizeEnabled:NO];
}
[[NSUserDefaults standardUserDefaults] setObject:path forKey:Editor];
[preferencesDict setObject:path forKey:Editor];
}
// Interface
- (void)setDisplayPanels:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
NSString *key = nil;
if (sender == separateBuilder)
{
key = [NSString stringWithString: SeparateBuilder];
}
else if (sender == separateLauncher)
{
key = [NSString stringWithString: SeparateLauncher];
}
else if (sender == separateEditor)
{
key = [NSString stringWithString: SeparateEditor];
}
else if (sender == separateLoadedFiles)
{
key = [NSString stringWithString: SeparateLoadedFiles];
}
switch ([sender state])
{
case NSOffState:
[def setObject: @"NO" forKey: key];
break;
case NSOnState:
[def setObject:@"YES" forKey: key];
break;
}
[def synchronize];
if (sender == separateEditor)
{
if ([sender state] == NSOffState)
{
[self setEditorSizeEnabled:NO];
}
else
{
[self setEditorSizeEnabled:YES];
}
[sender becomeFirstResponder];
}
[preferencesDict setObject:[def objectForKey:key]
forKey:key];
[[NSNotificationCenter defaultCenter]
postNotificationName:PCPreferencesDidChangeNotification
object:self];
}
- (void)setEditorSize:(id)sender
{
NSString *val = nil;
NSString *key = nil;
if (sender == editorLinesField)
{
key = EditorLines;
val = [editorLinesField stringValue];
}
else if (sender == editorColumnsField)
{
key = EditorColumns;
val = [editorColumnsField stringValue];
}
[[NSUserDefaults standardUserDefaults] setObject:val forKey:key];
[preferencesDict setObject:val forKey:key];
}
- (void)setEditorSizeEnabled:(BOOL)yn
{
if (yn)
{
[editorLinesField setEnabled:YES];
[editorLinesField setTextColor:[NSColor blackColor]];
[editorLinesField setEditable:YES];
[editorColumnsField setEnabled:YES];
[editorColumnsField setTextColor:[NSColor blackColor]];
[editorColumnsField setEditable:YES];
}
else
{
[editorLinesField setEnabled:NO];
[editorLinesField setTextColor:[NSColor darkGrayColor]];
[editorLinesField setEditable:NO];
[editorColumnsField setEnabled:NO];
[editorColumnsField setTextColor:[NSColor darkGrayColor]];
[editorColumnsField setEditable:NO];
}
}
- (void)setRememberWindows:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (rememberWindows == nil)
{
rememberWindows = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:RememberWindows];
break;
case 1:
[def setObject:@"YES" forKey:RememberWindows];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:RememberWindows]
forKey:RememberWindows];
}
- (void)setDisplayLog:(id)sender
{
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
if (displayLog == nil)
{
displayLog = sender;
return;
}
switch ([sender state])
{
case 0:
[def setObject:@"NO" forKey:DisplayLog];
break;
case 1:
[def setObject:@"YES" forKey:DisplayLog];
break;
}
[def synchronize];
[preferencesDict setObject:[def objectForKey:DisplayLog]
forKey:DisplayLog];
}
@end

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Copyright (C) 2000-2014 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -20,38 +20,51 @@
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
// TODO: Take care of Libraries(gnustep-gui, gnustep-base)
// and Non Project Files
#include <ProjectCenter/PCFileManager.h>
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCFileManager.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCProjectWindow.h>
#include <ProjectCenter/PCProjectBrowser.h>
#include <ProjectCenter/PCProjectLoadedFiles.h>
#import <ProjectCenter/PCProjectWindow.h>
#import <ProjectCenter/PCProjectBrowser.h>
#import <ProjectCenter/PCProjectLoadedFiles.h>
#include <ProjectCenter/PCProjectInspector.h>
#include <ProjectCenter/PCProjectBuilder.h>
#include <ProjectCenter/PCProjectEditor.h>
#include <ProjectCenter/PCProjectLauncher.h>
#import <ProjectCenter/PCProjectInspector.h>
#import <ProjectCenter/PCProjectBuilder.h>
#import <ProjectCenter/PCProjectEditor.h>
#import <ProjectCenter/PCProjectLauncher.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
#include <Protocols/CodeEditor.h>
#import <Protocols/CodeEditor.h>
#import "Modules/Preferences/Saving/PCSavingPrefs.h"
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
// #import <AppKit/NSFileWrapper.h>
// #import <Foundation/NSData.h>
NSString
*PCProjectDictDidChangeNotification = @"PCProjectDictDidChangeNotification";
NSString
*PCProjectDictDidSaveNotification = @"PCProjectDictDidSaveNotification";
NSString
*PCProjectBreakpointNotification = @"PCProjectBreakpointNotification";
@implementation PCProject
- (NSString *)description
{
return [NSString stringWithFormat: @"%@: %@ (%@)", [self className], projectName, projectPath];
}
// ============================================================================
// ==== Init and free
// ============================================================================
@ -76,18 +89,54 @@ NSString
return self;
}
- (PCProject *)openWithDictionaryAt:(NSString *)path
- (PCProject *)openWithWrapperAt:(NSString *)aPath
{
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
BOOL isDir = NO;
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath: aPath
isDirectory: &isDir];
if(isDir && exists)
{
projectFileWrapper = [[NSFileWrapper alloc] initWithPath: aPath];
if(projectFileWrapper != nil)
{
NSDictionary *wrappers = [projectFileWrapper fileWrappers];
NSData *data = [[wrappers objectForKey: @"PC.project"] regularFileContents];
NSData *userData = [[wrappers objectForKey: [NSUserName() stringByAppendingPathExtension: @"project"]]
regularFileContents];
NSMutableDictionary *dict = [[[[NSString alloc] initWithData: data
encoding: NSASCIIStringEncoding]
propertyList] mutableCopy];
NSDictionary *udict = [[[NSString alloc] initWithData: userData
encoding: NSASCIIStringEncoding]
propertyList];
[self assignProjectDict:dict atPath:path];
if (udict != nil)
[dict addEntriesFromDictionary: udict];
[udict release];
[self assignProjectDict:dict atPath: aPath];
}
}
else
{
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithContentsOfFile: aPath];
projectFileWrapper = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:
[NSMutableDictionary dictionaryWithCapacity: 3]];
[projectFileWrapper addRegularFileWithContents:
[NSData dataWithBytes: [[dict description] cString]
length: [[dict description] length]]
preferredFilename: @"PC.project"];
[self assignProjectDict: dict
atPath: aPath];
}
return self;
}
- (void)dealloc
{
#ifdef DEVELOPMENT
#ifdef DEBUG
NSLog (@"PCProject %@: dealloc", projectName);
#endif
@ -105,8 +154,8 @@ NSString
RELEASE(projectBrowser);
RELEASE(projectLoadedFiles);
RELEASE(projectEditor);
if (projectBuilder) RELEASE(projectBuilder);
if (projectLauncher) RELEASE(projectLauncher);
TEST_RELEASE(projectBuilder);
TEST_RELEASE(projectLauncher);
if (isSubproject == YES)
{
@ -117,6 +166,14 @@ NSString
[super dealloc];
}
- (void)loadPreferences:(NSNotification *)aNotification
{
id <PCPreferences> prefs = [projectManager prefController];
rememberWindows = [prefs boolForKey:RememberWindows];
keepBackup = [prefs boolForKey:KeepBackup];
}
// ============================================================================
// ==== Project handling
// ============================================================================
@ -124,9 +181,11 @@ NSString
// --- Dictionary
- (BOOL)assignProjectDict:(NSDictionary *)pDict atPath:(NSString *)pPath
{
NSString *tempPath = nil;
NSAssert(pDict,@"No valid project dictionary!");
PCLogStatus(self, @"assignProjectDict");
PCLogStatus(self, @"assignProjectDict at %@", pPath);
if (projectDict)
{
@ -135,17 +194,21 @@ NSString
projectDict = [[NSMutableDictionary alloc] initWithDictionary:pDict];
// Project path
if ([[pPath lastPathComponent] isEqualToString:@"PC.project"])
if ([[pPath lastPathComponent] isEqualToString:@"PC.project"] ||
[[[pPath lastPathComponent] pathExtension] isEqualToString:@"pcproj"])
{
[self setProjectPath:[pPath stringByDeletingLastPathComponent]];
tempPath = [pPath stringByDeletingLastPathComponent];
if ([[tempPath pathExtension] isEqualToString:@"pcproj"])
{
tempPath = [tempPath stringByDeletingLastPathComponent];
}
[self setProjectPath:tempPath];
}
else
{
[self setProjectPath:pPath];
}
[projectDict setObject:[NSUserDefaults userLanguages] forKey:PCUserLanguages];
[self setProjectName:[projectDict objectForKey:PCProjectName]];
[self writeMakefile];
[self save];
@ -173,6 +236,7 @@ NSString
{
if ([aDict objectForKey:key] == nil)
{
PCLogInfo(self, @"invalid dict entry for key %@", key);
return NO;
}
}
@ -186,8 +250,10 @@ NSString
{
[self updateProjectDict];
NSRunAlertPanel(@"Project updated!",
@"The project file was converted from previous version!\nPlease make sure that every project attribute contain valid values!",
NSRunAlertPanel(@"Open Project!",
@"The project file was converted from previous version!\n"
@"Please make sure that every project attribute contain"
@" valid values!",
@"OK",nil,nil);
}
}
@ -315,26 +381,24 @@ NSString
- (BOOL)saveProjectWindowsAndPanels
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *windows = [NSMutableDictionary dictionary];
NSString *projectFile = nil;
NSMutableDictionary *projectFileDict = nil;
projectFile = [projectPath stringByAppendingPathComponent:@"PC.project"];
projectFileDict = [NSMutableDictionary
dictionaryWithContentsOfFile:projectFile];
projectFile = [NSUserName() stringByAppendingPathExtension:@"project"];
projectFileDict = [[NSMutableDictionary alloc] initWithCapacity:4];
// Project Window
[windows setObject:[projectWindow stringWithSavedFrame]
forKey:@"ProjectWindow"];
if ([projectWindow isToolbarVisible] == YES)
{
[windows setObject:[NSString stringWithString:@"YES"]
[windows setObject:@"YES"
forKey:@"ShowToolbar"];
}
else
{
[windows setObject:[NSString stringWithString:@"NO"]
[windows setObject:@"NO"
forKey:@"ShowToolbar"];
}
@ -342,15 +406,15 @@ NSString
[windows setObject:NSStringFromRect([[projectBrowser view] frame])
forKey:@"ProjectBrowser"];
// Write to file and exit if prefernces wasn't set to save panels
if (![[ud objectForKey:RememberWindows] isEqualToString:@"YES"])
// Write to file and exit if preferences wasn't set to save panels
if (!rememberWindows)
{
[projectFileDict setObject:windows forKey:@"PC_WINDOWS"];
[projectFileDict setObject:windows forKey:PCWindows];
[projectFileDict writeToFile:projectFile atomically:YES];
[projectFileDict release];
return YES;
}
// Project Build
if (projectBuilder && [[projectManager buildPanel] isVisible])
{
@ -373,17 +437,6 @@ NSString
[windows removeObjectForKey:@"ProjectLaunch"];
}
// Project Inspector
/* if ([[projectManager inspectorPanel] isVisible])
{
[windows setObject:[[projectManager inspectorPanel] stringWithSavedFrame]
forKey:@"ProjectInspector"];
}
else
{
[windows removeObjectForKey:@"ProjectInspector"];
}*/
// Loaded Files
if (projectLoadedFiles && [[projectManager loadedFilesPanel] isVisible])
{
@ -398,28 +451,52 @@ NSString
// Set to project dict for case if project changed
// Don't notify about projectDict changes
[projectDict setObject:windows forKey:@"PC_WINDOWS"];
[projectDict setObject:windows forKey:PCWindows];
// Now save it directly to PC.project file
[projectFileDict setObject:windows forKey:@"PC_WINDOWS"];
[projectFileDict writeToFile:projectFile atomically:YES];
// Now save it directly to username.project file
[projectFileDict setObject:windows forKey:PCWindows];
// PCLogInfo(self, @"Windows and geometries saved");
[projectFileDict setObject: [[NSCalendarDate date] description]
forKey: PCLastEditing];
// add the file and write the wrapper.
[projectFileWrapper addRegularFileWithContents:
[NSData dataWithBytes: [[projectFileDict description] cString]
length: [[projectFileDict description] length]]
preferredFilename: projectFile];
[projectFileWrapper writeToFile: wrapperPath
atomically: YES
updateFilenames: YES];
// release
[projectFileDict release];
return YES;
}
- (BOOL)save
{
NSString *file = [projectPath stringByAppendingPathComponent:@"PC.project"];
NSString *backup = [file stringByAppendingPathExtension:@"backup"];
NSFileManager *fm = [NSFileManager defaultManager];
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSString *keepBackup = [defs objectForKey:KeepBackup];
BOOL shouldKeep = [keepBackup isEqualToString:@"YES"];
int spCount = [loadedSubprojects count];
NSUInteger spCount = [loadedSubprojects count];
int i;
NSString *wrapperFile;
NSString *file = @"PC.project";
NSString *backup;
NSMutableDictionary *dict = [projectDict mutableCopy];
NSData *dictData = nil;
// remove key..
[dict removeObjectForKey: PCWindows];
[dict removeObjectForKey: PCLastEditing];
// 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++)
{
[[loadedSubprojects objectAtIndex:i] save];
@ -428,29 +505,41 @@ NSString
// Remove backup file if exists
if ([fm fileExistsAtPath:backup] && ![fm removeFileAtPath:backup handler:nil])
{
NSRunAlertPanel(@"Save project",
@"Error removing the old project backup!",
NSRunAlertPanel(@"Save Project",
@"Couldn't remove the old project backup file",
@"OK",nil,nil);
[dict release];
return NO;
}
// Save backup
if (shouldKeep == YES && [fm isReadableFileAtPath:file])
if ((keepBackup == YES) && [fm isReadableFileAtPath: wrapperPath])
{
if ([fm copyPath:file toPath:backup handler:nil] == NO)
if ([fm copyPath: wrapperPath
toPath: backup
handler:nil] == NO)
{
NSRunAlertPanel(@"Save project",
@"Error when saving project backup file!",
NSRunAlertPanel(@"Save Project",
@"Couldn't save project backup file",
@"OK",nil,nil);
return NO;
}
}
// Save project file
[projectDict setObject:[[NSCalendarDate date] description]
forKey:PCLastEditing];
if ([projectDict writeToFile:file atomically:YES] == NO)
dictData = [NSPropertyListSerialization dataFromPropertyList: dict
format: NSPropertyListOpenStepFormat
errorDescription: NULL];
[projectFileWrapper addRegularFileWithContents: dictData
preferredFilename: file];
if ([projectFileWrapper
writeToFile:wrapperPath
atomically:YES
updateFilenames: YES] == NO)
{
NSRunAlertPanel(@"Save Project",
@"Couldn't save project file",
@"OK",nil,nil,projectName);
return NO;
}
@ -461,9 +550,9 @@ NSString
// Save GNUmakefile
if ([self writeMakefile] == NO)
{
NSRunAlertPanel(@"Save project",
@"Error when writing makefile for project %@",
@"OK",nil,nil,projectName);
NSRunAlertPanel(@"Save Project",
@"Couldn't write GNUmakefile",
@"OK",nil,nil);
return NO;
}
@ -487,9 +576,9 @@ NSString
{
int ret;
ret = NSRunAlertPanel(@"Alert",
ret = NSRunAlertPanel(@"Close Project",
@"Project or subprojects are modified",
@"Save and Close",@"Don't save",@"Cancel");
@"Save and Close",@"Don't save",@"Stop");
switch (ret)
{
case NSAlertDefaultReturn:
@ -519,6 +608,7 @@ NSString
if (isSubproject == YES)
{
[projectManager closeProject:self];
return YES;
}
@ -529,12 +619,6 @@ NSString
return NO;
}
// Project Builder
/* if (projectBuilder)
{
[projectBuilder release];
}*/
// Project window
if (sender != projectWindow)
{
@ -586,6 +670,13 @@ NSString
{
projectWindow = [[PCProjectWindow alloc] initWithProject:self];
}
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(loadPreferences:)
name:PCPreferencesDidChangeNotification
object:nil];
[self loadPreferences:nil];
}
- (PCProjectWindow *)projectWindow
@ -680,14 +771,21 @@ NSString
return NO;
}
- (NSString *)execToolName
{
return [[self projectBundleInfoTable] objectForKey:@"ExecToolName"];
}
- (NSArray *)buildTargets
{
return [[self projectBundleInfoTable] objectForKey:@"BuildTargets"];
NSArray *buildTargets = [projectDict objectForKey:PCBuilderTargets];
if (!buildTargets)
{
buildTargets =
[[self projectBundleInfoTable] objectForKey:@"BuildTargets"];
[self setProjectDictObject:buildTargets
forKey:PCBuilderTargets
notify:NO];
}
return buildTargets;
}
- (NSArray *)sourceFileKeys
@ -882,7 +980,7 @@ NSString
{
if ([key isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
return [NSArray arrayWithObjects:@"m",@"mm",nil];
}
else if ([key isEqualToString:PCHeaders])
{
@ -894,7 +992,7 @@ NSString
}
else if ([key isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm", @"gsmarkup", nil];
return [NSArray arrayWithObjects:@"gmodel",@"gorm", @"gsmarkup", @"nib", nil];
}
else if ([key isEqualToString:PCImages])
{
@ -906,7 +1004,7 @@ NSString
}
else if ([key isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
return [NSArray arrayWithObjects:@"so",@"a",@"lib",@"dylib",nil];
}
return nil;
@ -956,11 +1054,11 @@ NSString
{
if ([type isEqualToString:@"m"] || [type isEqualToString:@"c"])
{
return [NSString stringWithString:@"h"];
return @"h";
}
else if ([type isEqualToString:@"h"])
{
return [NSString stringWithString:@"m"];
return @"m";
}
return nil;
@ -1143,9 +1241,9 @@ NSString
{
if (![fileManager copyFiles:fileList intoDirectory:directory])
{
NSRunAlertPanel(@"Alert",
@"Error adding files to project %@!",
@"OK", nil, nil, projectName);
NSRunAlertPanel(@"Add File(s)",
@"Error adding files %@ to project %@!",
@"OK", nil, nil, fileList, projectName);
return NO;
}
@ -1154,9 +1252,9 @@ NSString
if (![fileManager copyFiles:complementaryFiles
intoDirectory:complementaryDir])
{
NSRunAlertPanel(@"Alert",
@"Error adding complementary files to project %@!",
@"OK", nil, nil, projectName);
NSRunAlertPanel(@"Add File(s)",
@"Error adding files %@ to project %@!",
@"OK", nil, nil, complementaryFiles, projectName);
return NO;
}
}
@ -1370,10 +1468,13 @@ NSString
_editorCategory = [[_editor categoryPath] mutableCopy];
range = [_editorCategory rangeOfString:fromFile];
[_editorCategory replaceCharactersInRange:range withString:toFile];
if (range.location != NSNotFound)
{
[_editorCategory replaceCharactersInRange:range withString:toFile];
[_editor setCategoryPath:_editorCategory];
[projectBrowser setPath:_editorCategory];
[_editor setCategoryPath:_editorCategory];
[projectBrowser setPath:_editorCategory];
}
RELEASE(_editorCategory);
}
else
@ -1437,7 +1538,7 @@ NSString
int i;
PCProject *sp = nil;
NSString *spName = nil;
NSString *spFile = nil;
NSString *spPath = nil;
// Subproject in project but not loaded
if ([[projectDict objectForKey:PCSubprojects] containsObject:name])
@ -1459,12 +1560,10 @@ NSString
// Subproject not found in array, load it
if (sp == nil)
{
spFile = [projectPath stringByAppendingPathComponent:name];
spFile = [spFile stringByAppendingPathExtension:@"subproj"];
spFile = [spFile stringByAppendingPathComponent:@"PC.project"];
/* PCLogInfo(self, @"Not found! Load subproject: %@ at path: %@",
name, spFile);*/
sp = [projectManager loadProjectAt:spFile];
spPath = [projectPath stringByAppendingPathComponent:name];
spPath = [spPath stringByAppendingPathExtension:@"subproj"];
sp = [projectManager openProjectAt:spPath makeActive:NO];
if (sp)
{
[sp setIsSubproject:YES];

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>
@ -33,6 +33,8 @@
#import <ProjectCenter/PCLogController.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
@implementation PCProjectBrowser
@ -105,8 +107,9 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
// NSLog(@"---> Selected: %@: category: %@", name, category);
if ([[browser selectedCells] count] != 1
|| [name isEqualToString:category])
if ([[browser selectedCells] count] != 1 ||
!category ||
[name isEqualToString:category])
{
return nil;
}
@ -140,7 +143,12 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
return path;
}
// Returns nil of multiple categories selected
// Returns 'nil' if selected:
// - root project (browser path is @"/")
// - multiple categories
// - name of subproject
// Should not call any of the nameOf... or pathTo... methods to prevent
// cyclic recursion.
- (NSString *)nameOfSelectedCategory
{
NSArray *pathArray = [[browser path] componentsSeparatedByString:@"/"];
@ -150,11 +158,19 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
NSString *name = nil;
int i;
if ([lastPathElement isEqualToString:[activeProject projectName]])
// Name of subproject selected: Change active project to superproject
// to check category against superproject's catgory list.
// But: path '/Subproject/Foo' and '/Subprojects/Foo/Subprojects' will
// return the same category 'Subprojects' and active project will be 'Foo'
// in both cases
// ![[self nameOfSelectedFile] isEqualToString:lastPathElement])
/* if ([lastPathElement isEqualToString:[activeProject projectName]])
{
return [activeProject projectName];
}
activeProject = [activeProject superProject];
rootCategories = [activeProject rootCategories];
}*/
// Multiple categories selected
if (([rootCategories containsObject:lastPathElement]
&& [[browser selectedCells] count] > 1))
{
@ -170,6 +186,13 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
}
}
// Subproject's name selected
if ([name isEqualToString:@"Subprojects"] &&
[lastPathElement isEqualToString:[activeProject projectName]])
{
return nil;
}
return name;
}
@ -285,11 +308,11 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)reloadLastColumnAndNotify:(BOOL)yn
{
int column = [browser lastColumn];
NSInteger column = [browser lastColumn];
NSString *category = [self nameOfSelectedCategory];
int selectedColumn = [browser selectedColumn];
NSInteger selectedColumn = [browser selectedColumn];
NSMatrix *colMatrix = [browser matrixInColumn:selectedColumn];
int rowCount = 0, colCount = 0, spCount = 0;
NSInteger rowCount = 0, colCount = 0, spCount = 0;
PCProject *activeProject = [[project projectManager] activeProject];
NSString *selCellTitle = [[browser selectedCell] stringValue];
@ -357,32 +380,34 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)click:(id)sender
{
NSUserDefaults *ud;
NSString *category;
PCProject *activeProject;
NSString *browserPath;
NSString *filePath;
NSString *category;
PCProject *activeProject;
NSString *browserPath;
NSString *filePath;
NSString *fileName;
if (sender != browser)
{
return;
}
ud = [NSUserDefaults standardUserDefaults];
category = [self nameOfSelectedCategory];
activeProject = [[project projectManager] activeProject];
browserPath = [self path];
filePath = [self pathToSelectedFile];
fileName = [self nameOfSelectedFile];
// NSLog(@"browserPath: %@ forProject: %@",
// browserPath, [activeProject projectName]);
NSLog(@"[click] category: %@ forProject: %@ fileName: %@",
category, [activeProject projectName], fileName);
// if ([[self selectedFiles] count] == 1
// ![fileName isEqualToString:[activeProject projectName]] &&
if (filePath &&
[filePath isEqualToString:browserPath] &&
![[ud objectForKey:SeparateEditor] isEqualToString:@"YES"])
category &&
![category isEqualToString:@"Libraries"]
)
{
// NSLog(@"[click] category: %@ filePath: %@", category, filePath);
NSLog(@"[click] category: %@ filePath: %@", category, filePath);
[[activeProject projectEditor] openEditorForCategoryPath:browserPath
windowed:NO];
}
@ -394,23 +419,22 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)doubleClick:(id)sender
{
NSString *category = [self nameOfSelectedCategory];
id selectedCell;
NSString *category;
NSString *fileName;
PCProject *activeProject;
NSString *key;
NSString *filePath;
id <PCPreferences> prefs = [[project projectManager] prefController];
NSWorkspace *workspace;
NSString *appName, *type;
if ((sender != browser) ||
[[self nameOfSelectedCategory] isEqualToString:@"Libraries"])
if ((sender != browser) || [category isEqualToString:@"Libraries"])
{
return;
}
selectedCell = [sender selectedCell];
category = [self nameOfSelectedCategory];
fileName = [[sender selectedCell] stringValue];
activeProject = [[project projectManager] activeProject];
key = [activeProject keyForCategory:category];
@ -418,21 +442,36 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
if ([self nameOfSelectedFile] != nil)
{
/* PCLogInfo(self, @"{doubleClick} filePath: %@", filePath);*/
BOOL foundFile = NO;
BOOL foundApp = NO;
// PCLogInfo(self, @"{doubleClick} filePath: %@", filePath);*/
workspace = [NSWorkspace sharedWorkspace];
[workspace getInfoForFile:filePath application:&appName type:&type];
// NSLog (@"Open file: %@ with app: %@", filePath, appName);
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
// name will be returned according that setting. Otherwise
// 'ProjectCenter.app' will be returned accoring to NSTypes
// from Info-gnustep.plist file of PC.
if (appName == nil ||
[appName isEqualToString:@"ProjectCenter.app"])
if(foundApp == NO || [appName isEqualToString:@"ProjectCenter.app"])
{
[[project projectEditor] openEditorForCategoryPath:[browser path]
windowed:YES];
appName = [prefs stringForKey:Editor];
if (![appName isEqualToString:@"ProjectCenter"])
{
[workspace openFile:filePath
withApplication:appName];
}
else
{
[[activeProject projectEditor]
openEditorForCategoryPath:[self path]
windowed:YES];
}
}
else
{
@ -490,13 +529,13 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
@implementation PCProjectBrowser (ProjectBrowserDelegate)
- (void) browser:(NSBrowser *)sender
createRowsForColumn:(int)column
createRowsForColumn:(NSInteger)column
inMatrix:(NSMatrix *)matrix
{
NSString *pathToCol;
NSArray *files;
int i = 0;
int count = 0;
NSString *pathToCol;
NSArray *files;
NSUInteger i = 0;
NSUInteger count = 0;
if (sender != browser || !matrix || ![matrix isKindOfClass:[NSMatrix class]])
{
@ -560,11 +599,11 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (NSImage *)fileNameIconImage
{
NSString *categoryName = nil;
NSString *fileName = nil;
NSString *fileExtension = nil;
NSString *iconName = nil;
NSImage *icon = nil;
NSString *categoryName = nil;
NSString *fileName = nil;
NSString *iconName = nil;
NSImage *icon = nil;
PCProject *activeProject = [[project projectManager] activeProject];
fileName = [self nameOfSelectedFile];
if (fileName)
@ -573,7 +612,6 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
{
return icon;
}
fileExtension = [fileName pathExtension];
}
else
{
@ -587,7 +625,9 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
{
iconName = [[NSString alloc] initWithString:@"MultiFiles"];
}
else if (!categoryName && !fileName) // Nothing selected
// Nothing or subproject name selected
else if ((!categoryName && !fileName) ||
[fileName isEqualToString:[activeProject projectName]])
{
iconName = [[NSString alloc] initWithString:@"FileProject"];
}
@ -671,6 +711,15 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
return PCFileNameFieldNoFiles;
}
- (NSString *)fileNameIconPath
{
NSString *fileName = [self nameOfSelectedFile];
NSString *category = [self nameOfSelectedCategory];
return [project pathForFile:fileName
forKey:[project keyForCategory:category]];
}
- (BOOL)canPerformDraggingOf:(NSArray *)paths
{
NSString *category = [self nameOfSelectedCategory];
@ -681,7 +730,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
NSLog(@"PCBrowser: canPerformDraggingOf -> %@", category);
if (!category)
if (!category || ([self nameOfSelectedFile] != nil))
{
return NO;
}
@ -691,6 +740,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
return NO;
}
// Check if we can accept files of such types
while ((s = [e nextObject]))
{
if (![fileTypes containsObject:[s pathExtension]])
@ -702,4 +752,27 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
return YES;
}
- (BOOL)prepareForDraggingOf:(NSArray *)paths
{
return YES;
}
- (BOOL)performDraggingOf:(NSArray *)paths
{
NSString *category = [self nameOfSelectedCategory];
NSString *categoryKey = [project keyForCategory:category];
NSEnumerator *pathsEnum = [paths objectEnumerator];
NSString *file = nil;
while ((file = [[pathsEnum nextObject] lastPathComponent]))
{
if (![project doesAcceptFile:file forKey:categoryKey])
{
return NO;
}
}
return [project addAndCopyFiles:paths forKey:categoryKey];
}
@end

File diff suppressed because it is too large Load diff

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>
@ -58,43 +58,36 @@
{
project = aProject;
delegate = aDelegate;
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(loadProjectProperties:)
name:PCProjectDictDidChangeNotification
object:nil];
}
return self;
}
- (void)dealloc
{
#ifdef DEBUG
NSLog (@"PCProjectBuilderOptions: dealloc");
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)awakeFromNib
{
NSArray *args;
// Setup target popup
[targetPopup removeAllItems];
[targetPopup addItemsWithTitles:[project buildTargets]];
[targetPopup selectItemAtIndex:0];
// Setup build arguments field
args = [[project projectDict] objectForKey:PCBuilderArguments];
[buildArgsField setStringValue:[args componentsJoinedByString:@" "]];
[optionsPanel makeFirstResponder:buildArgsField];
// Setup option buttons
[verboseButton setRefusesFirstResponder:YES];
[debugButton setRefusesFirstResponder:YES];
[stripButton setRefusesFirstResponder:YES];
[sharedLibsButton setRefusesFirstResponder:YES];
[self _setStateForButton:verboseButton
key:PCBuilderVerbose
defaultState:NSOffState];
[self _setStateForButton:debugButton
key:PCBuilderDebug
defaultState:NSOnState];
[self _setStateForButton:stripButton
key:PCBuilderStrip
defaultState:NSOffState];
[self _setStateForButton:sharedLibsButton
key:PCBuilderSharedLibs
defaultState:NSOnState];
[self loadProjectProperties:nil];
}
- (void)show:(NSRect)builderRect
@ -119,6 +112,7 @@
[optionsPanel setFrame:opRect display:NO];
[optionsPanel makeKeyAndOrderFront:nil];
[optionsPanel makeFirstResponder:buildArgsField];
}
- (NSString *)buildTarget
@ -149,7 +143,7 @@
[args removeObject:@""];
[args removeObject:@" "];
[project setProjectDictObject:args forKey:PCBuilderArguments notify:YES];
[project setProjectDictObject:args forKey:PCBuilderArguments notify:NO];
[delegate targetDidSet:[targetPopup titleOfSelectedItem]];
}
@ -168,7 +162,35 @@
if (sender == sharedLibsButton)
key = PCBuilderSharedLibs;
[project setProjectDictObject:value forKey:key notify:YES];
[project setProjectDictObject:value forKey:key notify:NO];
}
- (void)loadProjectProperties:(NSNotification *)aNotif
{
NSArray *args;
// Setup target popup
[targetPopup removeAllItems];
[targetPopup addItemsWithTitles:[project buildTargets]];
[targetPopup selectItemAtIndex:0];
// Setup build arguments field
args = [[project projectDict] objectForKey:PCBuilderArguments];
[buildArgsField setStringValue:[args componentsJoinedByString:@" "]];
// Setup option buttons
[self _setStateForButton:verboseButton
key:PCBuilderVerbose
defaultState:NSOffState];
[self _setStateForButton:debugButton
key:PCBuilderDebug
defaultState:NSOnState];
[self _setStateForButton:stripButton
key:PCBuilderStrip
defaultState:NSOffState];
[self _setStateForButton:sharedLibsButton
key:PCBuilderSharedLibs
defaultState:NSOnState];
}
@end

View file

@ -19,15 +19,17 @@
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.
*/
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectBuilder.h>
#include <ProjectCenter/PCProjectBuilderPanel.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectBuilder.h>
#import <ProjectCenter/PCProjectBuilderPanel.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
@implementation PCProjectBuilderPanel
@ -92,11 +94,10 @@
if (!([contentBox contentView] == builderView))
{
[contentBox setContentView:builderView];
[contentBox display];
}
/* PCLogInfo(self, @"orderFront: %@ -> %@",
builderView, [builderView superview]);*/
/* NSLog(self, @"orderFront: %@ -> %@",
builderView, [builderView superview]);*/
[panel orderFront:self];
}
@ -114,8 +115,15 @@
- (void)activeProjectDidChange:(NSNotification *)aNotif
{
PCProject *rootProject = [projectManager rootActiveProject];
PCProject *rootProject;
id <PCPreferences> prefs = [projectManager prefController];
if (![prefs boolForKey:UseTearOffWindows])
{
return;
}
rootProject = [projectManager rootActiveProject];
if (rootProject == currentProject)
{
return;
@ -123,9 +131,8 @@
currentProject = rootProject;
/* PCLogInfo(self, @"activeProjectDidChange to: %@",
[rootProject projectName]);*/
NSLog(@"activeProjectDidChange to: %@", [rootProject projectName]);
// NSLog(@"Buider Panel: activeProjectDidChange to: %@",
// [rootProject projectName]);
if (!rootProject)
{
@ -144,5 +151,12 @@
return [panel isVisible];
}
// --- Panel delgate
- (BOOL)windowShouldClose:(id)sender
{
[contentBox setContentView:emptyBox];
return YES;
}
@end

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Copyright (C) 2002-2015 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>
@ -176,13 +177,61 @@
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"
// 2. "/Subprojects/Project/Classes/Class.m/- init"
// 3. "/Library/gnustep-gui"
- (id<CodeEditor>)openEditorForCategoryPath:(NSString *)categoryPath
windowed:(BOOL)windowed
windowed:(BOOL)windowed
{
NSArray *pathArray = [categoryPath pathComponents];
NSString *pathLastObject = [pathArray lastObject];
@ -193,7 +242,6 @@
NSString *filePath = nil;
BOOL editable = YES;
id<CodeEditor> editor;
NSString *firstSymbol = nil;
fileName = [[[[_project projectBrowser] pathFromSelectedCategory]
pathComponents] objectAtIndex:2];
@ -212,25 +260,14 @@
// Set the 'editor' var either by requesting already opened
// editor or by creating the new one.
editor = [self editorForFile:filePath];
if (editor)
editor = [self openEditorForFile:filePath
editable:editable
windowed:windowed];
if (!editor)
{
// It seems double click occured in browser
if (windowed)
{
[editor setWindowed:windowed];
}
}
else
{
editor = [self openEditorForFile:filePath
editable:editable
windowed:windowed];
if (!editor)
{
NSLog(@"We don't have editor for file: %@", fileName);
return nil;
}
NSLog(@"We don't have editor for file: %@", fileName);
[self setActiveEditor: nil];
return nil;
}
// Category path was changed by user's clicking inside browser.
@ -238,13 +275,12 @@
[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)]);*/
firstSymbol = [pathLastObject substringToIndex:1];
if ([pathLastObject isEqualToString:@"/"])
{
pathLastObject = [pathArray objectAtIndex:[pathArray count]-2];
@ -291,112 +327,20 @@
}
}
// Called by PCProject. After that retainCount goes down and [self dealloc]
// called by autorelease mechanism
- (BOOL)closeAllEditors
{
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
id<CodeEditor> editor;
NSString *key = nil;
NSMutableArray *editedFiles = [[NSMutableArray alloc] init];
while ((key = [enumerator nextObject]))
{
editor = [_editorsDict objectForKey:key];
if ([editor isEdited])
{
[editedFiles addObject:[key lastPathComponent]];
}
else
{
[editor closeFile:self save:YES];
}
}
// TODO: Order panel with list of changed files
if ([editedFiles count])
{
if ([self saveEditedFiles:(NSArray *)editedFiles] == NO)
{
return NO;
}
}
[_editorsDict removeAllObjects];
return YES;
}
// ===========================================================================
// ==== File handling
// ===========================================================================
- (BOOL)saveEditedFiles:(NSArray *)files
{
int ret;
ret = NSRunAlertPanel(@"Alert",
@"Project has modified files\n%@",
@"Save and Close",@"Close",@"Don't close",
files);
switch (ret)
{
case NSAlertDefaultReturn:
if ([self saveAllFiles] == NO)
{
return NO;
}
break;
case NSAlertAlternateReturn:
// Close files without saving
break;
case NSAlertOtherReturn:
return NO;
break;
}
return YES;
}
// TODO: move to PCEditorManager
- (BOOL)saveAllFiles
{
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
id<CodeEditor> editor;
NSString *key;
BOOL ret = YES;
while ((key = [enumerator nextObject]))
{
editor = [_editorsDict objectForKey:key];
if ([editor saveFileIfNeeded] == NO)
{
ret = NO;
}
}
return ret;
}
- (BOOL)saveFileAs:(NSString *)file
{
id<CodeEditor> editor = [self activeEditor];
NSString *categoryPath = nil;
BOOL res;
if (editor != nil)
{
BOOL res;
BOOL iw = [editor isWindowed];
NSString *categoryPath = [editor categoryPath];
res = [editor saveFileTo:file];
[editor closeFile:self save:NO];
editor = [self openEditorForFile:file
editable:YES // fixme
windowed:iw];
categoryPath = [editor categoryPath];
res = [super saveFileAs:file];
[editor setCategoryPath:categoryPath];
return res;
@ -440,7 +384,6 @@
NSString *lastEditorKey = [[_editorsDict allKeys] lastObject];
id<CodeEditor> lastEditor = [_editorsDict objectForKey:lastEditorKey];
lastEditorKey = [[_editorsDict allKeys] lastObject];
[_componentView setContentView:[lastEditor componentView]];
[[_project projectWindow] makeFirstResponder:[lastEditor editorView]];
}

View file

@ -1,10 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Copyright (C) 2000-2023 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
German Arias
This file is part of GNUstep.
@ -20,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>
@ -29,7 +31,7 @@
#import <ProjectCenter/PCProjectBrowser.h>
#import <ProjectCenter/PCProjectWindow.h>
#import <ProjectCenter/PCProjectInspector.h>
#import <ProjectCenter/PCFileManager.h>
#import <ProjectCenter/PCLogController.h>
@implementation PCProjectInspector
@ -86,6 +88,7 @@
RELEASE(projectAttributesSubview);
RELEASE(projectAttributesView);
RELEASE(projectDescriptionView);
RELEASE(projectLanguagesView);
RELEASE(fileAttributesView);
RELEASE(inspectorPanel);
@ -109,6 +112,8 @@
// Panel
[inspectorPanel setFrameAutosaveName:@"ProjectInspector"];
[inspectorPanel setFrameUsingName:@"ProjectInspector"];
project = [projectManager activeProject];
projectDict = [project projectDict];
// PopUp
[inspectorPopup selectItemAtIndex:0];
@ -122,6 +127,9 @@
// Project Description
[self createProjectDescription];
// Project Languages
[self createProjectLanguages];
// File Attributes
[self createFileAttributes];
@ -159,16 +167,19 @@
switch([sender indexOfSelectedItem])
{
case 0:
[inspectorView setContentView: buildAttributesView];
[inspectorView setContentView:buildAttributesView];
break;
case 1:
[inspectorView setContentView: projectAttributesView];
[inspectorView setContentView:projectAttributesView];
break;
case 2:
[inspectorView setContentView: projectDescriptionView];
[inspectorView setContentView:projectDescriptionView];
break;
case 3:
[inspectorView setContentView: fileAttributesView];
[inspectorView setContentView:projectLanguagesView];
break;
case 4:
[inspectorView setContentView:fileAttributesView];
break;
}
@ -180,33 +191,35 @@
NSString *newEntry = [sender stringValue];
// Build Atributes
if (sender == installPathField)
if (sender == installDomainPopup)
{
[project setProjectDictObject:newEntry forKey:PCInstallDir notify:YES];
[project setProjectDictObject:newEntry
forKey:PCInstallDomain
notify:YES];
}
else if (sender == cppOptField)
{
[project setProjectDictObject:newEntry
forKey:PCPreprocessorOptions
notify:YES];
forKey:PCPreprocessorOptions
notify:YES];
}
else if (sender == objcOptField)
{
[project setProjectDictObject:newEntry
forKey:PCObjCCompilerOptions
notify:YES];
notify:YES];
}
else if (sender == cOptField)
{
[project setProjectDictObject:newEntry
forKey:PCCompilerOptions
notify:YES];
notify:YES];
}
else if (sender == ldOptField)
{
[project setProjectDictObject:newEntry
forKey:PCLinkerOptions
notify:YES];
notify:YES];
}
// Project Description
else if (sender == descriptionField)
@ -224,8 +237,8 @@
else if (sender == licDescriptionField)
{
[project setProjectDictObject:newEntry
forKey:PCCopyrightDescription
notify:YES];
forKey:PCCopyrightDescription
notify:YES];
}
else if (sender == urlField)
{
@ -241,8 +254,9 @@
// When user ends editing of text field with Tab or changing focus, entered
// changes should be accepted. The exception is PCFileName fields. I'm not sure
// if this is correct implementation (action is performed twice if user ends
// editing with Enter key)
// if this is correct implementation. Action is performed twice if user ends
// editing with Enter key.
- (void)controlTextDidEndEditing:(NSNotification *)aNotif
{
NSControl *anObject = [aNotif object];
@ -272,14 +286,14 @@
if (rootProject != project)
{
[inspectorPanel setTitle: [NSString stringWithFormat:
@"%@ - Project Inspector", [rootProject projectName]]];
@"%@ - Project Inspector", [rootProject projectName]]];
}
project = [projectManager activeProject];
projectDict = [project projectDict];
PCLogStatus(self, @"Active projectChanged to %@",
[[project projectDict] objectForKey:PCProjectName]);
[[project projectDict] objectForKey:PCProjectName]);
// 1. Get custom project attributes view
newProjAttrSubview = [project projectAttributesView];
@ -290,7 +304,7 @@
else
{
[projectAttributesView replaceSubview:projectAttributesSubview
with:newProjAttrSubview];
with:newProjAttrSubview];
}
projectAttributesSubview = newProjAttrSubview;
@ -318,13 +332,17 @@
[projectDict objectForKey:PCCompilerOptions]];
[ldOptField setStringValue:
[projectDict objectForKey:PCLinkerOptions]];
[installPathField setStringValue:
[projectDict objectForKey:PCInstallDir]];
[installDomainPopup selectItemWithTitle:
[projectDict objectForKey:PCInstallDomain]];
// Project Attributes
[projectTypeField setStringValue:[projectDict objectForKey:PCProjectType]];
[projectNameField setStringValue:[projectDict objectForKey:PCProjectName]];
[projectLanguagePB selectItemWithTitle:[projectDict objectForKey:PCLanguage]];
[projectLanguagePB removeAllItems];
[projectLanguagePB addItemsWithTitles:
[projectDict objectForKey:PCUserLanguages]];
[projectLanguagePB selectItemWithTitle:
[projectDict objectForKey:PCLanguage]];
// Project Description view
[descriptionField setStringValue:
@ -341,6 +359,10 @@
authorsItems = [projectDict objectForKey:PCAuthors];
[authorsList reloadData];
//Project Languages
languagesItems = [projectDict objectForKey:PCUserLanguages];
[languagesList reloadData];
// File Attributes
[fileIconView setDelegate:[project projectBrowser]];
[fileIconView updateIcon];
@ -377,6 +399,9 @@
// Table
[searchOrderList setCornerView:nil];
[searchOrderList setHeaderView:nil];
[searchOrderList setTarget:self];
[searchOrderList setAction:@selector(searchOrderClick:)];
// [searchOrderColumn setEditable:NO];
// Buttons
[self setSearchOrderButtonsState];
@ -390,23 +415,29 @@
{
NSString *selectedTitle = [sender titleOfSelectedItem];
if ([selectedTitle isEqualToString: @"Header Directories Search Order"])
if ([selectedTitle isEqualToString:@"Header Directories Search Order"])
{
ASSIGN(searchItems, searchHeaders);
ASSIGN(searchItems, [NSMutableArray arrayWithArray:searchHeaders]);
}
else if ([selectedTitle isEqualToString: @"Library Directories Search Order"])
else if ([selectedTitle isEqualToString:@"Library Directories Search Order"])
{
ASSIGN(searchItems, searchLibs);
ASSIGN(searchItems, [NSMutableArray arrayWithArray:searchLibs]);
}
else if ([selectedTitle isEqualToString:@"Build Targets"])
{
ASSIGN(searchItems,[NSMutableArray arrayWithArray:[project buildTargets]]);
}
else
{
ASSIGN(searchItems,nil);
DESTROY(searchItems);
}
[searchOrderList reloadData];
[searchOrderList deselectAll:self];
[searchOrderTF setStringValue:@""];
// Enable/disable buttons according to selected/not selected item
[self setSearchOrderButtonsState];
[searchOrderList reloadData];
}
- (void)searchOrderDoubleClick:(id)sender
@ -415,17 +446,27 @@
- (void)searchOrderClick:(id)sender
{
// Warning! NSTableView doesn't call action method
// TODO: Fix NSTableView (NSCell/NSActionCell?)
int row = [searchOrderList selectedRow];
[searchOrderTF setStringValue:[searchItems objectAtIndex:row]];
[searchOrderTF selectText:self];
[self setSearchOrderButtonsState];
}
- (void)setSearchOrderButtonsState
{
// Disable until implemented
// "Set..." button is always off until functionality will be implemented
[searchOrderSet setEnabled:NO];
return; // See searchOrderClick
// After loadable inspectors implementation make it work by
// detection of text field becoming first responder.
/* if ([inspectorPanel firstResponder] == searchOrderTF)
{
[searchOrderAdd setEnabled:YES];
}
else
{
[searchOrderAdd setEnabled:NO];
}*/
if ([searchOrderList selectedRow] == -1)
{
@ -458,6 +499,11 @@
{
NSString *value = [searchOrderTF stringValue];
if ([value isEqualToString:@""])
{
return;
}
[searchItems addObject:value];
[searchOrderTF setStringValue:@""];
[self syncSearchOrder];
@ -472,17 +518,20 @@
pIndex = [searchOrderPopup indexOfSelectedItem];
switch (pIndex)
{
case 0:
case 0: // Headers
[project setProjectDictObject:searchItems
forKey:PCSearchHeaders
notify:YES];
notify:YES];
break;
case 1:
case 1: // Libraries
[project setProjectDictObject:searchItems
forKey:PCSearchLibs
notify:YES];
notify:YES];
break;
case 2:
case 2: // Targets
[project setProjectDictObject:searchItems
forKey:PCBuilderTargets
notify:YES];
return;
}
}
@ -506,7 +555,8 @@
// Languages
[projectLanguagePB removeAllItems];
[projectLanguagePB addItemsWithTitles:[NSUserDefaults userLanguages]];
[projectLanguagePB addItemsWithTitles:
[projectDict objectForKey:PCUserLanguages]];
// Retain view
[projectAttributesView retain];
@ -517,7 +567,7 @@
NSLog(@"set current language to %@", [sender titleOfSelectedItem]);
[project setProjectDictObject:[sender titleOfSelectedItem]
forKey:PCLanguage
notify:NO];
notify:NO];
[[project projectWindow] setTitle];
}
@ -555,6 +605,7 @@
[authorsList setHeaderView:nil];
[authorsList addTableColumn:authorsColumn];
[authorsList setDataSource:self];
[authorsList setDelegate:self];
//
[authorsScroll setDocumentView:authorsList];
@ -602,15 +653,16 @@
int selectedRow = [authorsList selectedRow];
if (selectedRow >= 0)
{
[authorsItems removeObjectAtIndex:selectedRow];
[authorsList reloadData];
}
{
[authorsList selectRow:selectedRow byExtendingSelection:NO];
[authorsItems removeObjectAtIndex:selectedRow];
[authorsList reloadData];
}
if ([authorsList selectedRow] < 0 && [authorsItems count] > 0)
{
[authorsList selectRow:[authorsItems count]-1 byExtendingSelection:NO];
}
{
[authorsList selectRow:[authorsItems count]-1 byExtendingSelection:NO];
}
[project setProjectDictObject:authorsItems forKey:PCAuthors notify:YES];
}
@ -657,6 +709,114 @@
}
}
// ============================================================================
// ==== Project Languages
// ============================================================================
- (void)createProjectLanguages
{
if (projectLanguagesView)
{
return;
}
if ([NSBundle loadNibNamed:@"ProjectLanguages" owner:self] == NO)
{
PCLogError(self, @"error loading ProjectLanguages NIB file!");
return;
}
[projectLanguagesView retain];
[languagesList setDataSource:self];
}
- (void)addLanguage:(id)sender
{
NSString *language = [newLanguage stringValue];
[newLanguage setStringValue: @""];
//If there is a language and is new, add this
if (([language length] > 0) && (![languagesItems containsObject: language]))
{
//Add the language to the projectDict
[languagesItems addObject: language];
[project setProjectDictObject:languagesItems
forKey:PCUserLanguages
notify:YES];
/* If there are localizable resources, copy these into the new language
directory */
if ([[projectDict objectForKey:PCLocalizedResources] count] > 0)
{
NSString *file, *englishPath, *languagePath;
NSEnumerator *resources =
[[projectDict objectForKey:PCLocalizedResources] objectEnumerator];
englishPath = [project resourceDirForLanguage:@"English"];
languagePath = [project resourceDirForLanguage:language];
while ((file = [resources nextObject]))
{
if ([[projectManager fileManager] copyFile:file
fromDirectory:englishPath
intoDirectory:languagePath])
{
NSLog(@"file copied: %@", file);
}
}
}
}
}
- (void)removeLanguage:(id)sender
{
/* We don't remove the English language sice is needed if the app
isn't available at the end user language */
if (![[languagesItems objectAtIndex:
[languagesList selectedRow]] isEqualToString:@"English"])
{
NSString *language =
[languagesItems objectAtIndex:[languagesList selectedRow]];
NSString *languagePath = [project resourceDirForLanguage:language];
NSArray *resources = [projectDict objectForKey:PCLocalizedResources];
/* If there are localizable resources, remove these at the language
directory and the directory itsel */
if ([resources count] > 0)
{
if ([[projectManager fileManager] removeFiles:resources
fromDirectory:languagePath
removeDirsIfEmpty:YES])
{
NSLog(@"removed resources for language %@",language);
}
}
//Update the languages list
[languagesItems removeObject:language];
//If the removed language is the actual PCLanguage, set English
if ([[projectDict objectForKey: PCLanguage] isEqualToString:language])
{
NSLog(@"set current language to English");
[project setProjectDictObject:@"English"
forKey:PCLanguage
notify:NO];
}
//Update the projectDict
[project setProjectDictObject:languagesItems
forKey:PCUserLanguages
notify:YES];
}
else
{
NSRunAlertPanel(@"Remove Language",
@"You shouldn't remove language English",
@"Ok",nil,nil);
}
}
// ============================================================================
// ==== File Attributes
// ============================================================================
@ -729,18 +889,18 @@
enumerator = [files objectEnumerator];
while ((file = [enumerator nextObject]))
{
if (![[file pathExtension] isEqualToString:@"h"] &&
![[file pathExtension] isEqualToString:@"H"])
{
enable = NO;
}
}
{
if (![[file pathExtension] isEqualToString:@"h"] &&
![[file pathExtension] isEqualToString:@"H"])
{
enable = NO;
}
}
if (enable)
{
[publicHeaderButton setEnabled:YES];
}
{
[publicHeaderButton setEnabled:YES];
}
}
// --- Set state of buttons
@ -756,16 +916,16 @@
enumerator = [files objectEnumerator];
present_count = 0;
while ((file = [enumerator nextObject]))
{
if ([publicHeaders containsObject:file])
{
present_count++;
}
}
{
if ([publicHeaders containsObject:file])
{
present_count++;
}
}
if (array_count == present_count)
{
[publicHeaderButton setState:NSOnState];
}
{
[publicHeaderButton setState:NSOnState];
}
}
// Set state of Localized Resource button
@ -775,16 +935,16 @@
enumerator = [files objectEnumerator];
present_count = 0;
while ((file = [enumerator nextObject]))
{
if ([localizedResources containsObject:file])
{
present_count++;
}
}
{
if ([localizedResources containsObject:file])
{
present_count++;
}
}
if (array_count == present_count)
{
[localizableButton setState:NSOnState];
}
{
[localizableButton setState:NSOnState];
}
}
}
@ -817,13 +977,23 @@
- (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;
}
/* PCLogInfo(self, @"{%@} file name changed from: %@ to: %@",
[project projectName], fileName, [fileNameField stringValue]);*/
[project projectName], fileName, [fileNameField stringValue]);*/
if ([project renameFile:fileName toFile:[fileNameField stringValue]] == NO)
{
@ -841,13 +1011,13 @@
while ((file = [enumerator nextObject]))
{
if ([sender state] == NSOffState)
{
[project setHeaderFile:fileName public:NO];
}
{
[project setHeaderFile:fileName public:NO];
}
else
{
[project setHeaderFile:fileName public:YES];
}
{
[project setHeaderFile:fileName public:YES];
}
}
}
@ -861,13 +1031,13 @@
while ((file = [enumerator nextObject]))
{
if ([sender state] == NSOffState)
{
[project setResourceFile:file localizable:NO];
}
{
[project setResourceFile:file localizable:NO];
}
else
{
[project setResourceFile:file localizable:YES];
}
{
[project setResourceFile:file localizable:YES];
}
}
}
@ -884,7 +1054,7 @@
// ==== NSTableViews
// ============================================================================
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (searchOrderList != nil && aTableView == searchOrderList)
{
@ -894,13 +1064,17 @@
{
return [authorsItems count];
}
else if (languagesList != nil && aTableView == languagesList)
{
return [languagesItems count];
}
return 0;
}
- (id) tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
row:(NSInteger)rowIndex
{
if (searchOrderList != nil && aTableView == searchOrderList)
{
@ -910,6 +1084,10 @@
{
return [authorsItems objectAtIndex:rowIndex];
}
else if (languagesList != nil && aTableView == languagesList)
{
return [languagesItems objectAtIndex:rowIndex];
}
return nil;
}
@ -917,14 +1095,14 @@
- (void) tableView:(NSTableView *)aTableView
setObjectValue:anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
row:(NSInteger)rowIndex
{
if (authorsList != nil && aTableView == authorsList)
{
if([authorsItems count] <= 0)
{
return;
}
if([authorsItems count] == 0)
{
return;
}
[authorsItems removeObjectAtIndex:rowIndex];
[authorsItems insertObject:anObject atIndex:rowIndex];
@ -933,4 +1111,12 @@
}
}
- (void) tableView: (NSTableView*)aTableView
willDisplayCell: (id)aCell
forTableColumn: (NSTableColumn*)aTableColumn
row: (NSInteger)rowIndex
{
[(NSTextFieldCell *)aCell setScrollable:YES];
}
@end

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 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,26 +21,31 @@
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.
*/
#include <AppKit/AppKit.h>
#import <AppKit/AppKit.h>
#include <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProjectLauncher.h>
#import <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProjectLauncher.h>
#import <ProjectCenter/PCBundleManager.h>
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCLogController.h>
#import <Protocols/Preferences.h>
#include <ProjectCenter/PCButton.h>
#include <ProjectCenter/PCLogController.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 {
@ -120,7 +126,7 @@ enum {
NSMakeSize([stdOut frame].size.width, 1e7)];
// Font
string = [NSString stringWithString:@"=== Launcher ready ==="];
string = @"=== Launcher ready ===";
attributedString =
[[NSAttributedString alloc] initWithString:string
attributes:textAttributes];
@ -143,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];
@ -162,6 +178,7 @@ enum {
#endif
RELEASE (componentView);
RELEASE (textAttributes);
RELEASE (debugger);
[super dealloc];
}
@ -204,16 +221,33 @@ enum {
- (void)debug:(id)sender
{
NSString *projectName = [project projectName];
NSString *fp = nil;
NSString *pn = nil;
NSString *gdbPath = nil;
NSArray *args = nil;
NSDistantObject <Terminal> *terminal;
NSFileManager *fm = [NSFileManager defaultManager];
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,107 +256,95 @@ enum {
return;
}
/*
* FIXME: Is it possible to somehow support users that don't have
* Terminal installed ? Maybe with reduced functionality.
*/
#ifdef __MINGW__
/* On windows we need to check the .exe file */
if ([[executablePath pathExtension] length] == 0)
{
executablePath = [executablePath stringByAppendingPathExtension: @"exe"];
}
#endif
// Get the Terminal application
terminal = (NSDistantObject<Terminal> *)[NSConnection
rootProxyForConnectionWithRegisteredName:@"Terminal" host:nil];
if (terminal == nil)
NSLog(@"debug executable launch path: %@", executablePath);
if ([fm isExecutableFileAtPath:executablePath] == NO)
{
NSRunAlertPanel(@"Debug",
@"Run Terminal application first",
@"No executable! Please build the project first.",
@"Close",nil,nil);
[debugButton setState:NSOffState];
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])
{
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];
}
}
// PCLogInfo(self, @"debug: %@", fp);
if ([fm isExecutableFileAtPath:fp] == NO)
{
NSRunAlertPanel(@"Debug",
@"Can't execute %@!",
@"Abort",nil,nil,pn);
[debugButton setState:NSOffState];
return;
}
// Debugger
gdbPath = [[NSUserDefaults standardUserDefaults] objectForKey:Debugger];
gdbPath = [[[project projectManager] prefController] stringForKey:Debugger];
if (gdbPath == nil)
{
gdbPath = [NSString stringWithString:@"/usr/bin/gdb"];
gdbPath = @"/usr/bin/gdb";
}
if ([fm isExecutableFileAtPath:gdbPath] == NO)
{
NSRunAlertPanel(@"Attention!",
@"Invalid debugger specified: %@!",
@"Abort",nil,nil,gdbPath);
NSRunAlertPanel(@"Debug",
@"Specified debugger `%@` cannot be executed!",
@"Close",nil,nil,gdbPath);
[debugButton setState:NSOffState];
return;
}
// Task
args = [[NSArray alloc] initWithObjects:gdbPath, @"--args", fp, nil];
[terminal terminalRunProgram:AUTORELEASE(gdbPath)
withArguments:args
inDirectory:nil
properties:nil];
// Debugger
if (nil == debugger)
{
debugger = [bundleManager objectForBundleType: @"debugger"
protocol: @protocol(CodeDebugger)
fileName: [executablePath stringByDeletingLastPathComponent]];
[debugger debugExecutableAtPath: executablePath
withDebugger: gdbPath];
}
else
{
[debugger show];
}
[debugButton setState:NSOffState];
if (nil == debugger)
NSLog(@"No debugger module found");
AUTORELEASE(args);
// turn debug button off...
// [debugButton setState:NSOffState];
}
- (void)run:(id)sender
{
NSMutableArray *args = [[NSMutableArray alloc] init];
NSPipe *logPipe;
NSPipe *errorPipe;
NSString *openPath;
NSMutableArray *args = [[NSMutableArray alloc] init];
NSPipe *logPipe;
NSPipe *errorPipe;
NSString *executablePath;
NSFileManager *fm;
executablePath = [project projectPath];
// Check if project type is executable
if ([project isExecutable])
{
openPath = [project execToolName];
if ([openPath isEqualToString: @"openapp"])
NSString *prjType;
prjType = [project projectTypeName];
if ([prjType isEqualToString: @"Application"])
{
/* openapp ./MyApplication.app */
[args addObject: [NSString stringWithFormat: @"./%@", [project projectName]]];
/* 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
{
/* opentool MyTool */
[args addObject: [project projectName]];
NSLog(@"Unknown project type to execute: %@", prjType);
}
}
else
@ -334,6 +356,28 @@ enum {
return;
}
#ifdef __MINGW__
/* On windows we need to check the .exe file */
if ([[executablePath pathExtension] length] == 0)
{
executablePath = [executablePath stringByAppendingPathExtension: @"exe"];
}
#endif
NSLog(@"executable launch path: %@", executablePath);
/* now check if the executable does exist. Perhaps make failed */
fm = [NSFileManager defaultManager];
if (![fm isExecutableFileAtPath:executablePath])
{
NSRunAlertPanel(@"Run",
@"The project does not have an executable",
@"Close", nil, nil, nil);
[runButton setState:NSOffState];
return;
}
// [makeTask isRunning] doesn't work here.
// "waitpid 7045, result -1, error No child processes" is printed.
if (launchTask)
@ -376,7 +420,7 @@ enum {
object:launchTask];
[launchTask setArguments:args];
[launchTask setCurrentDirectoryPath:[project projectPath]];
[launchTask setLaunchPath:openPath];
[launchTask setLaunchPath:executablePath];
[launchTask setStandardOutput:logPipe];
[launchTask setStandardError:errorPipe];
[launchTask launch];
@ -384,6 +428,7 @@ enum {
[debugButton setEnabled:NO];
_isRunning = YES;
_isErrorRunning = YES;
RELEASE(args);
}
@ -394,7 +439,16 @@ enum {
return;
}
[NOTIFICATION_CENTER removeObserver:self];
[NOTIFICATION_CENTER removeObserver: self
name: NSTaskDidTerminateNotification
object: launchTask];
// Wait if there are data available.
if (_isRunning || _isErrorRunning)
{
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
beforeDate: [NSDate distantFuture]];
}
[runButton setState:NSOffState];
[debugButton setState:NSOffState];
@ -404,7 +458,6 @@ enum {
RELEASE(launchTask);
launchTask = nil;
_isRunning = NO;
_isDebugging = NO;
}
@ -413,24 +466,38 @@ enum {
{
NSData *data;
if ((data = [readHandle availableData]))
if ((data = [readHandle availableData]) && [data length] > 0)
{
[self logData:data error:NO];
[readHandle waitForDataInBackgroundAndNotifyForModes:nil];
}
else
{
[NOTIFICATION_CENTER removeObserver: self
name: NSFileHandleDataAvailableNotification
object: readHandle];
[readHandle waitForDataInBackgroundAndNotifyForModes:nil];
_isRunning = NO;
}
}
- (void)logErrOut:(NSNotification *)aNotif
{
NSData *data;
if ((data = [errorReadHandle availableData]))
if ((data = [errorReadHandle availableData]) && [data length] > 0)
{
[self logData:data error:YES];
[errorReadHandle waitForDataInBackgroundAndNotifyForModes:nil];
}
else
{
[NOTIFICATION_CENTER removeObserver: self
name: NSFileHandleDataAvailableNotification
object: errorReadHandle];
[errorReadHandle waitForDataInBackgroundAndNotifyForModes:nil];
_isErrorRunning = NO;
}
}
@end

View file

@ -19,28 +19,26 @@
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.
*/
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectLauncher.h>
#include <ProjectCenter/PCProjectLauncherPanel.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectLauncher.h>
#import <ProjectCenter/PCProjectLauncherPanel.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
@implementation PCProjectLauncherPanel
- (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
@ -123,8 +121,15 @@
- (void)activeProjectDidChange:(NSNotification *)aNotif
{
PCProject *rootProject = [projectManager rootActiveProject];
PCProject *rootProject;
id <PCPreferences> prefs = [projectManager prefController];
if (![prefs boolForKey:UseTearOffWindows])
{
return;
}
rootProject = [projectManager rootActiveProject];
if (rootProject == currentProject)
{
return;

View file

@ -20,25 +20,31 @@
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>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectEditor.h>
#import <ProjectCenter/PCPrefController.h>
#import <ProjectCenter/PCLogController.h>
#import <Protocols/CodeEditor.h>
#import <ProjectCenter/PCProjectLoadedFiles.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
@implementation PCProjectLoadedFiles
- (id)initWithProject:(PCProject *)aProj
{
id <PCPreferences> prefs;
NSAssert(aProj, @"Project is mandatory!");
prefs = [[aProj projectManager] prefController];
PCLogStatus(self, @"init");
if ((self = [super init]))
@ -74,8 +80,7 @@
[filesScroll setDocumentView:filesList];
[filesScroll setHasHorizontalScroller:NO];
[filesScroll setHasVerticalScroller:YES];
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
objectForKey:SeparateLoadedFiles] isEqualToString:@"NO"])
if (![prefs boolForKey:UseTearOffWindows])
{
[filesScroll setBorderType:NSBezelBorder];
}
@ -336,7 +341,7 @@
@implementation PCProjectLoadedFiles (LoadedFilesTableDelegate)
- (int)numberOfRowsInTableView: (NSTableView *)aTableView
- (NSInteger)numberOfRowsInTableView: (NSTableView *)aTableView
{
if (aTableView != filesList)
{
@ -348,7 +353,7 @@
- (id) tableView: (NSTableView *)aTableView
objectValueForTableColumn: (NSTableColumn *)aTableColumn
row: (int)rowIndex
row: (NSInteger)rowIndex
{
if (aTableView != filesList)
{
@ -371,7 +376,7 @@
- (void) tableView:(NSTableView *)aTableView
setObjectValue:anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
row:(NSInteger)rowIndex
{
/* NSString *path = nil;
NSParameterAssert (rowIndex >= 0 && rowIndex < [editedFiles count]);

View file

@ -19,27 +19,27 @@
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.
*/
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectLoadedFiles.h>
#include <ProjectCenter/PCProjectLoadedFilesPanel.h>
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCProjectLoadedFiles.h>
#import <ProjectCenter/PCProjectLoadedFilesPanel.h>
#include <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCLogController.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
@implementation PCProjectLoadedFilesPanel
- (id)initWithProjectManager:(PCProjectManager *)aManager
{
PCProjectLoadedFiles *projectLoadedFiles = nil;
PCProject *activeProject = nil;
projectManager = aManager;
activeProject = [projectManager rootActiveProject];
currentProject = activeProject;
projectLoadedFiles = [activeProject projectLoadedFiles];
PCLogStatus(self, @"[init]");
@ -123,8 +123,15 @@
- (void)activeProjectDidChange:(NSNotification *)aNotif
{
PCProject *rootProject = [projectManager rootActiveProject];
PCProject *rootProject;
id <PCPreferences> prefs = [projectManager prefController];
if (![prefs boolForKey:UseTearOffWindows])
{
return;
}
rootProject = [projectManager rootActiveProject];
if (rootProject == currentProject)
{
return;

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 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,11 +21,10 @@
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>
#import <ProjectCenter/PCSplitView.h>
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCProjectManager.h>
@ -38,9 +38,15 @@
#import <ProjectCenter/PCProjectLoadedFiles.h>
#import <ProjectCenter/PCProjectInspector.h>
#import <ProjectCenter/PCPrefController.h>
#import <Protocols/Preferences.h>
#import <Protocols/CodeEditorView.h>
#import <ProjectCenter/PCLogController.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
#import <math.h>
@implementation PCProjectWindow
// ============================================================================
@ -65,6 +71,7 @@
- (void)awakeFromNib
{
id <PCPreferences> prefs = [[project projectManager] prefController];
NSRect rect;
[buildButton setToolTip:@"Project Builder"];
@ -79,7 +86,7 @@
[loadedFilesButton setToolTip:@"Loaded Files"];
[loadedFilesButton setImage:IMAGE(@"Files")];
if ([self hasLoadedFilesView])
if (![prefs boolForKey:UseTearOffWindows])
{
[loadedFilesButton setEnabled:NO];
}
@ -97,7 +104,7 @@
[statusLine setStringValue:@""];
/*
* Hosrizontal split view
* Horizontal split view
*/
rect = [[projectWindow contentView] frame];
rect.size.height -= 62;
@ -114,7 +121,7 @@
{
rect.size.height = 185;
}
v_split = [[PCSplitView alloc] initWithFrame:rect];
v_split = [[NSSplitView alloc] initWithFrame:rect];
[v_split setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
[v_split setVertical:YES];
[v_split setDelegate:self];
@ -128,7 +135,7 @@
/*
* LoadedFiles
*/
if ([self hasLoadedFilesView])
if (![prefs boolForKey:UseTearOffWindows])
{
[self showProjectLoadedFiles:self];
}
@ -140,10 +147,7 @@
* Custom view
* View where non-separated Builder, Launcher, Editor goes.
*/
if ([self hasCustomView])
{
[self _createCustomView];
}
[self _createCustomView];
}
- (id)initWithProject:(PCProject *)owner
@ -170,7 +174,7 @@
// Window
[projectWindow setFrameAutosaveName:@"ProjectWindow"];
pcWindows = [[project projectDict] objectForKey:@"PC_WINDOWS"];
pcWindows = [[project projectDict] objectForKey:PCWindows];
windowFrame = [pcWindows objectForKey:@"ProjectWindow"];
// PCLogInfo(self, @"window frame %@", windowFrame);
if (windowFrame != nil)
@ -256,11 +260,10 @@
- (void)dealloc
{
#ifdef DEVELOPMENT
NSLog (@"PCProjectWindow: dealloc");
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self];
[h_split setDelegate:nil];
[v_split setDelegate:nil];
[projectWindow close];
[super dealloc];
}
@ -269,45 +272,11 @@
// ==== Accessory methods
// ============================================================================
- (BOOL)hasCustomView
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
_hasCustomView = NO;
if (![[ud objectForKey:SeparateEditor] isEqualToString:@"YES"]
&& [[ud objectForKey:Editor] isEqualToString:@"ProjectCenter"])
{
_hasCustomView = YES;
}
if (![[ud objectForKey:SeparateBuilder] isEqualToString:@"YES"])
{
_hasCustomView = YES;
}
if (![[ud objectForKey:SeparateLauncher] isEqualToString:@"YES"])
{
_hasCustomView = YES;
}
return _hasCustomView;
}
- (BOOL)hasLoadedFilesView
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
if (![[ud objectForKey:SeparateLoadedFiles] isEqualToString:@"YES"])
{
_hasLoadedFilesView = YES;
}
else
{
_hasLoadedFilesView = NO;
}
return _hasLoadedFilesView;
}
// TODO: Should be removed when two modes will be implemented:
// Build, Launch and Loaded Files are tear-off and tear-on.
// Custom view is always shown because editor always opened on
// one click in Browser. External editor will be opened only on
// double click.
- (NSView *)customContentView
{
return [customView contentView];
@ -335,21 +304,30 @@
- (void)showProjectBuild:(id)sender
{
NSView *view = [[project projectBuilder] componentView];
NSPanel *buildPanel = [[project projectManager] buildPanel];
id <PCPreferences> prefs = [[project projectManager] prefController];
NSView *view = [[project projectBuilder] componentView];
NSPanel *buildPanel = [[project projectManager] buildPanel];
PCProject *rootActiveProject;
if ([[[PCPrefController sharedPCPreferences] objectForKey:SeparateBuilder]
isEqualToString: @"YES"])
rootActiveProject = [[project projectManager] rootActiveProject];
// NSLog(@"ProjectWindow showProjectBuild: componentView RC:%i",
// [view retainCount]);
if ([prefs boolForKey:UseTearOffWindows])
{
if ([customView contentView] == view)
{
[self showProjectEditor:self];
}
[buildPanel orderFront:nil];
if (rootActiveProject == project)
{
[buildPanel orderFront:nil];
}
}
else
{
if ([buildPanel isVisible])
if ((rootActiveProject == project) && [buildPanel isVisible])
{
[buildPanel close];
}
@ -359,20 +337,20 @@
- (void)showProjectLaunch:(id)sender
{
NSView *view = nil;
NSPanel *launchPanel = nil;
id <PCPreferences> prefs = [[project projectManager] prefController];
NSView *view = nil;
NSPanel *launchPanel = nil;
view = [[project projectLauncher] componentView];
launchPanel = [[project projectManager] launchPanel];
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
objectForKey: SeparateLauncher] isEqualToString: @"YES"])
if ([prefs boolForKey:UseTearOffWindows])
{
if ([customView contentView] == view)
{
[self showProjectEditor:self];
}
[launchPanel orderFront: nil];
[launchPanel orderFront:nil];
}
else
{
@ -386,29 +364,37 @@
- (void)showProjectLoadedFiles:(id)sender
{
NSPanel *panel = [[project projectManager] loadedFilesPanel];
NSScrollView *componentView;
id <PCPreferences> prefs = [[project projectManager] prefController];
NSPanel *panel = [[project projectManager] loadedFilesPanel];
PCProject *rootActiveProject;
NSScrollView *componentView;
rootActiveProject = [[project projectManager] rootActiveProject];
componentView = (NSScrollView *)[[project projectLoadedFiles] componentView];
// PCLogInfo(self, @"showProjectLoadedFiles");
if ([self hasLoadedFilesView])
if ([prefs boolForKey:UseTearOffWindows])
{
if (panel && [panel isVisible])
[componentView setBorderType:NSNoBorder];
[componentView removeFromSuperview];
if (rootActiveProject == project)
{
[panel orderFront:nil];
}
[v_split adjustSubviews];
}
else
{
if ((rootActiveProject == project) && panel && [panel isVisible])
{
[panel close];
}
[componentView setBorderType:NSBezelBorder];
[componentView setFrame:NSMakeRect(0,0,128,130)];
[v_split addSubview:[[project projectLoadedFiles] componentView]];
[v_split adjustSubviews];
}
else
{
[componentView setBorderType:NSNoBorder];
[panel orderFront:nil];
// Preserve width of view in panel
// [componentView setFrame:NSMakeRect(0,0,128,130)];
[v_split addSubview:componentView];
[v_split adjustSubviews];
}
}
@ -447,6 +433,7 @@
// from/to superview
RETAIN(h_split);
[h_split removeFromSuperview];
rect = [cView centerScanRect: rect];
[h_split setFrame:rect];
[cView addSubview:h_split];
RELEASE(h_split);
@ -460,6 +447,7 @@
RETAIN(v_split);
[v_split removeFromSuperview];
[v_split setFrame:rect];
rect = [cView centerScanRect: rect];
[cView addSubview:v_split];
RELEASE(v_split);
}
@ -484,6 +472,7 @@
// Hack. See above
RETAIN(h_split);
[h_split removeFromSuperview];
rect = [cView centerScanRect: rect];
[h_split setFrame:rect];
[cView addSubview:h_split];
RELEASE(h_split);
@ -555,80 +544,62 @@
[self makeKeyWindow];*/
}
// TODO: Review determining of tear-off panels. Current implementation
// loads Build, Launch and Loaded Files to check visibility status.
// It is incorrect behaviour; Build. Launch and LoadedFiles initialized
// even if not in use.
- (void)preferencesDidChange:(NSNotification *)aNotif
{
NSDictionary *prefsDict = [[aNotif object] preferencesDict];
id <PCPreferences> prefs = [aNotif object];
PCLogStatus(self, @"Preferences did change");
NSLog(@"ProjectWindow: Preferences did change");
//--- Add Custom view
if ([self hasCustomView] && customView == nil)
/* if ([[project projectManager] rootActiveProject] != project)
{
[self _createCustomView];
}
//--- Remove Custom view
if (![self hasCustomView] && customView != nil)
{
[customView removeFromSuperview];
[h_split adjustSubviews];
customView = nil;
}
return;
}*/
// Project Builder
if ([[prefsDict objectForKey:@"SeparateBuilder"] isEqualToString:@"YES"])
if ([prefs boolForKey:UseTearOffWindows])
{
// Project Build is sepearate and visible in project window
// Project Build
if ([[[project projectBuilder] componentView] window] == projectWindow)
{
[self showProjectBuild:self];
}
}
else
{
NSPanel *buildPanel = [[project projectManager] buildPanel];
if ([buildPanel isVisible] == YES)
{
[self showProjectBuild:self];
}
}
// Project Launcher
if ([[prefsDict objectForKey:@"SeparateLauncher"] isEqualToString:@"YES"])
{
// Project Launch
if ([[[project projectLauncher] componentView] window] == projectWindow)
{
[self showProjectLaunch:self];
}
}
else
{
NSPanel *launchPanel = [[project projectManager] launchPanel];
if ([launchPanel isVisible] == YES)
{
[self showProjectLaunch:self];
}
}
// Loaded Files view
if ([self hasLoadedFilesView])
{
if ([[v_split subviews] count] == 1)
{
[self showProjectLoadedFiles:self];
}
[loadedFilesButton setEnabled:NO];
}
else
{
// Loaded Files
if ([[v_split subviews] count] == 2)
{
[self showProjectLoadedFiles:self];
}
[loadedFilesButton setEnabled:YES];
}
else
{
NSPanel *buildPanel = [[project projectManager] buildPanel];
NSPanel *launchPanel = [[project projectManager] launchPanel];
// Project Build
if ([buildPanel isVisible] == YES)
{
[self showProjectBuild:self];
}
// Project Launch
if ([launchPanel isVisible] == YES)
{
[self showProjectLaunch:self];
}
// Loaded Files
if ([[v_split subviews] count] == 1)
{
[self showProjectLoadedFiles:self];
}
[loadedFilesButton setEnabled:NO];
}
}
- (void)browserDidSetPath:(NSNotification *)aNotif
@ -690,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
@ -748,8 +720,6 @@
/* PCLogInfo(self, @"windowDidBecomeKey: activeSubproject %@",
[[project activeSubproject] projectName]);*/
NSLog(@"windowDidBecomeKey: project %@",
[project projectName]);
if ([[project projectManager] rootActiveProject] != project)
{
@ -790,6 +760,18 @@
{
}
- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window
{
id responder;
responder = [window firstResponder];
if ([responder conformsToProtocol: @protocol(CodeEditorView)])
{
return [[responder editor] windowWillReturnUndoManager: window];
}
return nil;
}
// ============================================================================
// ==== SplitView delegate
// ============================================================================
@ -801,9 +783,14 @@
NSDictionary *projectDict = nil;
NSDictionary *windowsDict = nil;
NSString *browserString = nil;
NSRect browserRect;
NSRect browserRect = NSMakeRect(0,0,0,0);
NSRect boxRect;
// NSLog(@"resizeVerticalSubiewsWithOldSize entered split view width: %f, height %f", splitSize.width, splitSize.height);
boxRect = [v_split frame];
[v_split setFrame:boxRect];
if (splitSize.width == oldSize.width && splitSize.height == oldSize.height)
{
return;
@ -815,7 +802,7 @@
if (!_splitViewsRestored)
{
projectDict = [project projectDict];
windowsDict = [projectDict objectForKey:@"PC_WINDOWS"];
windowsDict = [projectDict objectForKey:PCWindows];
if (windowsDict != nil)
{
browserString = [windowsDict objectForKey:@"ProjectBrowser"];
@ -824,38 +811,51 @@
browserRect = NSRectFromString(browserString);
}
}
else
// Unable to restore browser frame
if (browserRect.size.width == 0 && browserRect.size.height == 0)
{
browserRect = NSMakeRect(0, 0, splitSize.width, splitSize.height);
}
[browserView setFrame:browserRect];
}
// Use saved frame of ProjectBrowser only first time. Every time window is
// resized use new size of subviews.
if (_splitViewsRestored)
/* if (_splitViewsRestored)
{
browserRect = [[[project projectBrowser] view] frame];
browserRect.size.height = splitSize.height;
if (![self hasLoadedFilesView])
if ([[prefs objectForKey:UseTearOffWindows] isEqualToString:@"YES"])
{
browserRect.size.width = splitSize.width;
}
}
// Browser
// NSLog(@"browser %@", NSStringFromRect(browserRect));
[browserView setFrame:browserRect];
NSLog(@"%@ browser %@",
[project projectName], NSStringFromRect(browserRect));
[browserView setFrame:browserRect];*/
// Loaded Files
if ([self hasLoadedFilesView])
/* if ([[prefs objectForKey:UseTearOffWindows] isEqualToString:@"NO"])
{
boxRect.origin.x = browserRect.size.width + [v_split dividerThickness];
boxRect.origin.y = 0;
boxRect.size.width = [v_split frame].size.width - boxRect.origin.x;
boxRect.size.height = [v_split frame].size.height;
// NSLog(@"loadedFiles %@", NSStringFromRect(boxRect));
if (boxRect.size.width < 60)
{
boxRect.size.width = 60;
boxRect.origin.x = [v_split frame].size.width - boxRect.size.width;
}
NSLog(@"%@ loadedFiles %@",
[project projectName], NSStringFromRect(boxRect));
[[[project projectLoadedFiles] componentView] setFrame:boxRect];
}
}*/
[v_split adjustSubviews];
_splitViewsRestored = YES;
}
@ -868,6 +868,8 @@
NSRect vSplitRect;
NSRect boxRect;
// NSLog(@"resizeHorizontalSubiewsWithOldSize entered split view width: %f, height %f", splitSize.width, splitSize.height);
if (splitSize.width == oldSize.width && splitSize.height == oldSize.height)
{
return;
@ -881,25 +883,27 @@
vSplitRect = [browserView frame];
vSplitRect.origin.x = 0;
vSplitRect.origin.y = 0;
if (![self hasCustomView])
/* if (![self hasCustomView])
{
vSplitRect.size = hSplitSize;
}
else
{
{*/
vSplitRect.size.width = hSplitSize.width;
}
/* }*/
vSplitRect = [browserView centerScanRect: vSplitRect];
[v_split setFrame:vSplitRect];
// Custom view (Editor|Builder|Launcher)
if ([self hasCustomView])
{
/* if ([self hasCustomView])
{*/
boxRect.origin.x = 0;
boxRect.origin.y = vSplitRect.size.height + [h_split dividerThickness];
boxRect.size.width = hSplitSize.width;
boxRect.size.height = hSplitSize.height - boxRect.origin.y;
boxRect = [customView centerScanRect: boxRect];
[customView setFrame:boxRect];
}
// }
}
- (void) splitView:(NSSplitView *)sender

163
Framework/PCSaveModified.m Normal file
View file

@ -0,0 +1,163 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
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 <ProjectCenter/PCEditorManager.h>
#import <ProjectCenter/PCSaveModified.h>
BOOL PCRunSaveModifiedFilesPanel(PCEditorManager *manager,
NSString *defaultText,
NSString *alternateText,
NSString *otherText)
{
PCSaveModified *saveModifiedPanel;
BOOL result;
if (!(saveModifiedPanel = [[PCSaveModified alloc] init]))
{
return NO;
}
result = [saveModifiedPanel saveFilesWithEditorManager:manager
defaultButtonText:defaultText
alternateButtonText:alternateText
otherButtonText:otherText];
RELEASE(saveModifiedPanel);
return result;
}
@implementation PCSaveModified
- (BOOL)saveFilesWithEditorManager:(PCEditorManager *)manager
defaultButtonText:(NSString *)defaultText
alternateButtonText:(NSString *)alternateText
otherButtonText:(NSString *)otherText
{
if ([NSBundle loadNibNamed:@"SaveModified" owner:self] == NO)
{
NSLog(@"Error loading SaveModified NIB file!");
return NO;
}
editorManager = manager;
// Table
[filesList setCornerView:nil];
[filesList setHeaderView:nil];
[filesList setDataSource:self];
[filesList setTarget:self];
[filesList selectAll:self];
[filesList reloadData];
// Buttons
[defaultButton setTitle:defaultText];
[alternateButton setTitle:alternateText];
[otherButton setTitle:otherText];
[panel makeKeyAndOrderFront:self];
[NSApp runModalForWindow:panel];
if (clickedButton == defaultButton)
{
[self saveSelectedFiles];
return YES;
}
else if (clickedButton == alternateButton)
{
return YES;
}
else if (clickedButton == otherButton)
{
return NO;
}
return YES;
}
- (void)dealloc
{
#ifdef DEBUG
NSLog(@"PCSaveModified: dealloc");
#endif
RELEASE(panel);
[super dealloc];
}
- (BOOL)saveSelectedFiles
{
NSArray *modifiedFiles = [editorManager modifiedFiles];
NSIndexSet *selectedRows = [filesList selectedRowIndexes];
NSArray *filesToSave = [modifiedFiles objectsAtIndexes:selectedRows];
NSEnumerator *enumerator = [filesToSave objectEnumerator];
NSString *filePath = nil;
NSLog(@"SaveModified|filesToSave: %@", filesToSave);
while ((filePath = [enumerator nextObject]))
{
[[editorManager editorForFile:filePath] saveFileIfNeeded];
}
return YES;
}
- (void)buttonClicked:(id)sender
{
clickedButton = sender;
[NSApp stopModal];
[panel close];
}
// ============================================================================
// ==== TableView delegate
// ============================================================================
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (aTableView != filesList)
{
return 0;
}
return [[editorManager modifiedFiles] count];
}
- (id) tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex
{
if (aTableView != filesList)
{
return nil;
}
return [[[editorManager modifiedFiles] objectAtIndex:rowIndex] lastPathComponent];
}
@end

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.
*/
#include "$FILENAME$.h"
#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,10 +19,10 @@
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.
*/
#include "$FILENAME$.h"
#import "$FILENAME$.h"
@implementation $FILENAME$

View file

@ -19,13 +19,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 _$UCFILENAME$_H_
#define _$UCFILENAME$_H_
#include <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
@interface $FILENAME$ : NSObject
{

View file

@ -1,12 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Project: $PROJECTNAME$
Copyright (C) 2002-2004 Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Author: $FULLUSERNAME$
This file is part of GNUstep.
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
@ -20,24 +19,17 @@
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 _PCSplitView_h_
#define _PCSplitView_h_
#import "$FILENAME$.h"
#include <AppKit/NSSplitView.h>
// This is an Obj-C++ file... add what you need to mighty Objective-C
@interface PCSplitView : NSSplitView
{
// if you need, add your C++ classes
}
- (float)dividerThickness;
- (void)drawDividerInRect:(NSRect)aRect;
@implementation $FILENAME$
@end
#endif // _PCSplitView_h_
// 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

@ -9,14 +9,14 @@ ifeq ($(GNUSTEP_MAKEFILES),)
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
endif
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
PACKAGE_NAME = ProjectCenter
export PACKAGE_NAME
include $(GNUSTEP_MAKEFILES)/common.make
#
# Main application
#
VERSION = 0.5.0
PACKAGE_NAME = ProjectCenter
VERSION = 0.7.0
APP_NAME = ProjectCenter
ProjectCenter_APPLICATION_ICON = Images/ProjectCenter.tiff
@ -89,7 +89,12 @@ Modules/Projects/Library/Library.project \
Modules/Projects/ResourceSet/ResourceSet.project \
Modules/Projects/Tool/Tool.project \
Modules/Editors/ProjectCenter/ProjectCenter.editor \
Modules/Parsers/ProjectCenter/ProjectCenter.parser
Modules/Parsers/ProjectCenter/ProjectCenter.parser \
Modules/Debuggers/ProjectCenter/ProjectCenter.debugger \
Modules/Preferences/Build/Build.preferences \
Modules/Preferences/Saving/Saving.preferences \
Modules/Preferences/Misc/Misc.preferences \
Modules/Preferences/EditorFSC/EditorFSC.preferences
#
# Localization
@ -97,7 +102,7 @@ Modules/Parsers/ProjectCenter/ProjectCenter.parser
ProjectCenter_LOCALIZED_RESOURCE_FILES = \
ProjectCenter.gorm \
Info.gorm \
FindPanel.gorm
Preferences.gorm
ProjectCenter_LANGUAGES = \
English
@ -109,7 +114,8 @@ English
ProjectCenter_HEADERS = \
Headers/PCAppController.h \
Headers/PCInfoController.h \
Headers/PCMenuController.h
Headers/PCMenuController.h \
Headers/PCPrefController.h
#
# Class files
@ -118,10 +124,11 @@ ProjectCenter_OBJC_FILES = \
PCAppController.m \
PCInfoController.m \
PCMenuController.m \
TextFinder.m \
PCPrefController.m \
ProjectCenter_main.m
-include GNUmakefile.preamble
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
@ -30,7 +30,7 @@
ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS +=
ADDITIONAL_OBJCFLAGS += -DDEVELOPMENT
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS +=

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2012 Free Software Foundation
This file is part of GNUstep.
@ -17,13 +17,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 _PCAPPCONTROLLER_H
#define _PCAPPCONTROLLER_H
#include <AppKit/AppKit.h>
#import <AppKit/AppKit.h>
@class PCProjectManager;
@class PCFileManager;
@ -72,7 +72,7 @@
- (void)applicationWillFinishLaunching:(NSNotification *)notification;
- (void)applicationDidFinishLaunching:(NSNotification *)notification;
- (BOOL)applicationShouldTerminate:(id)sender;
- (NSApplicationTerminateReply)applicationShouldTerminate:(id)sender;
- (void)applicationWillTerminate:(NSNotification *)notification;
@end

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,18 +17,20 @@
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
#define _PCINFOCONTROLLER_H
#include <AppKit/AppKit.h>
#import <AppKit/AppKit.h>
@interface PCInfoController : NSObject
{
id infoWindow;
NSDictionary *infoDict;
id infoWindow;
IBOutlet NSTextField* versionField;
IBOutlet NSTextField* copyrightField;
NSDictionary *infoDict;
}
- (id)init;

View file

@ -17,13 +17,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 _PCMENUCONTROLLER_H
#define _PCMENUCONTROLLER_H
#include <AppKit/AppKit.h>
#import <AppKit/AppKit.h>
@class PCProjectManager;
@class PCFileManager;
@ -81,11 +81,6 @@
- (void)fileRename:(id)sender;
- (void)fileNewUntitled:(id)sender;
// Edit
/*- (void)findShowPanel:(id)sender;
- (void)findNext:(id)sender;
- (void)findPrevious:(id)sender;*/
// Tools
- (void)showInspector:(id)sender;
- (void)showEditorPanel:(id)sender;

View file

@ -0,0 +1,55 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2008 Free Software Foundation
This file is part of GNUstep.
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.
*/
#ifndef _PCPREFCONTROLLER_H
#define _PCPREFCONTROLLER_H
#import <AppKit/AppKit.h>
#import <Protocols/Preferences.h>
@interface PCPrefController : NSObject <PCPreferences>
{
NSMutableDictionary *sectionsDict;
IBOutlet NSPanel *panel;
IBOutlet NSPopUpButton *popupButton;
IBOutlet NSBox *sectionsView;
IBOutlet NSBox *bundlesView;
IBOutlet NSTextField *bundlePathField;
}
+ (PCPrefController *)sharedPCPreferences;
- (id)init;
- (void)dealloc;
- (void)loadPrefsSections;
- (void)showPanel:(id)sender;
- (void)popupChanged:(id)sender;
@end
#endif

View file

@ -19,14 +19,14 @@
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_
#define _PCAddFilesPanel_h_
//#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
//#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@interface PCAddFilesPanel : NSOpenPanel
{

View file

@ -0,0 +1,29 @@
/*
PCAuxiliaryWindow.h
Author: German A. Arias <germanandre@gmx.es>
Date: September 2013
This file is part of ProjectCenter.
ProjectCenter 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 3 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 <AppKit/AppKit.h>
@interface PCAuxiliaryWindow : NSWindow
{
}
@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 _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_
#include <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

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