Commit graph

14 commits

Author SHA1 Message Date
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
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
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
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
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
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
f66acd94df * Documentation/Changelog: Update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@26095 72102866-910b-0410-8b05-ffd578937521
2008-02-18 22:50:56 +00:00
Sergii Stoian
4e24cf3451 * Framework/PCEditorManager.m: Added.
* Headers/ProjectCenter/PCEditormanager.h: Added.
* PCMenuController.m: (-fileSaveAs:): move code to 
PCProjectManager.m.
* Headers/ProjectCenter/PCEditorManager.h: New file.
* Framework/PCEditorManager.m: New file. Superclass for
PCProjectEditor.
* Framework/PCProjectManager.m: Use PCEditorManager.
Implement opening files outside of projects (fixes bug #15992).
* Framework/PCProjectLoadedFiles.m: Use PCEditorManager.
* Framework/PCProject.m: (-setProjectManager:): Use new
method of initializing PCProjectEditor.
* Framework/GNUmakefile: Add PCEditorManager.[hm].
* Framework/PCProjectBrowser.m: Made use of 
PCProjectEditor's editorForFile: method.
* Framework/PCProjectEditor.m: Remove initializing of extern
variables (moved into PCEditorManager). Use '_componentView'
var instead of 'componentView'. The same with _scrollView and
_project.
(-initWithProject:): renamed into init. Removed code duplicated
with superclass' code.
(-dealloc): Removed code duplicated with superclass' code.
(-editorForFile🔑): Removed. Code moved into superclass'
editorForFile: method.
(-openEditorForCategoryPath:windowed:): Code that determines
existance of file and if file is plain text move into
[super openEditorForFile:editable:windowed:]. Changed file
opening coditions. Made use of [<CodeEditor> fileStructureItemSelected]
method. Code that determines classes and methods in category path
was removed.
(openEditorForFile:categoryPath:editable:windowed:): Removed in favour
of superclass' method.
(activeEditor): Ditto.
(allEditors): Ditto.
(closeActiveEditor:): Ditto.
(closeEditorForFile:): Ditto.
(saveFile): Ditto.
(saveFileTo:): Ditto.
(revertFileToSaved): Ditto.
(editorDidResignActive:): Ditto.
(editorDidChangeFileName:): Ditto.
(closeAllEditors:): Cleanup.
(saveFileAs:): Made use of new -openEditorForFile:editable:windowed:
method.
* Framework/PCProjectWindow.m: Made usage of editorManager method
of <CodeEditor> protocol.
* Modules/Editors/ProjectCenter/PCEditorView.m: 
(becomeFirstResponder): Use new -becomeFirstResponder: method of
PCEditor class.
* Modules/Editors/ProjectCenter/PCEditor.h: Change name of var 
projectEditor to _editorManager. Add parameter (PCEditorView *)view
to becomeFistResponder and resignFirstResponder methods. Add some
comments.
* Modules/Editors/ProjectCenter/PCEditor.m: Rename method
-openFileAtPath:categoryPath:projectEditor:editable: to
-openFileAtPath:editorManager:editable. Rename -projectEditor method
to -editorManager. Change becomeFistResponder and resignFirstResponder 
methods' definitions.
(fileStructureItemSelected:): Add initial implementation of action 
code according to the type of selected item.
* Headers/Protocols/CodeEditor.h: Change definition of
-openFileAtPath:categoryPath:projectEditor:editable: mathod to
-openFileAtPath:editorManager:editable. Remove methods
scrollToClassName: and scrollToMethodName:. Rename projectEditor
method into editorManager.
* Headers/ProjectCenter/PCProjectEditor.h: Made PCProjectEditor
as subclass of PCEditorManager. Add prefix '_' to variables.
(-initWithProject:): renamed into init.
(setProject:): Added.
Removed methods and variables duplicated with superclass.
* Headers/ProjectCenter/PCProjectManager.h: Add editorManager var.
(-saveFileAs:): renamed to saveFileAs. 



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@25991 72102866-910b-0410-8b05-ffd578937521
2008-01-21 22:26:36 +00:00
Sergii Stoian
26dc666444 * Framework/PCBundleManager.m,
* Headers/ProjectCenter/PCBundleManager.h: Make massive cleaup.
some methods changed, some deleted, some added.
* Framework/PCProjectManager.m,
* Framework/PCProjectEditor.m: Make use of changed PCBundleManager.
* TextFinder.m:
(-enterSelection:): Add sanity check for text variable.
(-jumpToSelection:): Ditto.
* Modules/Parsers/ProjectCenter/Resources/Info.table: Fix value of
"Name" key.
* Headers/Protocols/CodeEditor.h: Remove declaration of 
openExternalEditor:withPath:projectEditor: method. It will be provided
by Custom.editor bundle (will be added soon).
* Headers/ProjectCenter/PCProjectEditor.h: Cleanup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@25504 72102866-910b-0410-8b05-ffd578937521
2007-09-27 00:03:51 +00:00
Sergii Stoian
e8e18614e8 * English.lproj/FindPanel.gorm: Added Find panel.
* PCMenuController.m: Added Find panel support.
* TextFinder.[hm]: Added implementation of Find panel.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@25498 72102866-910b-0410-8b05-ffd578937521
2007-09-23 22:27:21 +00:00
Sergii Stoian
3793013f03 * Framework/PCProjectManager.m: Fix problem with closing project.
* Framework/PCProjectr.m: Ditto.
        * Framework/PCMakefileFactory.m: Support for root build directory added.
        * Framework/PCProjectBuilder.m: Code cleanup.
        * Framework/PCProjectEditor.m: Enable usage of parser. Start testing process.
        * Framework/PCProjectWindows.m: Enable tooltips for buttons.
        * Framework/PCPrefController.m: setRootBuildDir: fix.

        * PCAppController.m: applicationWillTerminate: Remove file from build dir on
        application quit. This code still needs review (also removed build dir because of
        use PCFileManager's method).

        * Modules/Editors/ProjectCenter/PCEditor.m: browserItemsForItem: Crashes if file
        is not supported by parser. Fixed.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@24353 72102866-910b-0410-8b05-ffd578937521
2007-01-15 18:40:58 +00:00
Sergii Stoian
787bb6a506 Start merging changes from unstable branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@24241 72102866-910b-0410-8b05-ffd578937521
2006-12-26 10:58:39 +00:00