Commit 126b9738 authored by Yavor Doganov's avatar Yavor Doganov Committed by Eric Heintzmann

Import Debian patch 0.5.3~20100601-1

parents 87afc8d5 a05c8dc5
.gwdir
*.swp
*~
This diff is collapsed.
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.
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
- 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 --------------------------------------------
- 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 ---------------------------------------------
- Implement indentation stoyan
- review situations when editor is opened stoyan
- implement go to line stoyan
- Implement interaction with Builder (errors, warnings) stoyan
--- Project Builder --------------------------------------------
- Finish parsing gcc output (make errors, etc.)
- Implement interaction with Editor (errors, warnings) stoyan
- New icons. Need volonteers!!! ???
- Implement indentation stoyan
- implement undo inside editor stoyan
- 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 ???
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
PCInfoController = {
Actions = (
);
Outlets = (
infoWindow,
versionField
);
Super = NSObject;
};
}
\ No newline at end of file
......@@ -64,7 +64,9 @@
editorColumnsField,
editorLinesField,
displayLog,
buildToolField
buildToolField,
debuggerButton,
buildToolButton
);
Super = NSObject;
};
......
......@@ -21,7 +21,8 @@
nfDescriptionTV,
nfNameField,
nfCancelButton,
nfCreateButton
nfCreateButton,
nfAddHeaderButton
);
Super = NSObject;
};
......
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"buttonClicked:"
);
Super = NSObject;
};
SaveModifiedFilesDelegate = {
Actions = (
"buttonClicked:"
);
Outlets = (
alternateButton,
defaultButton,
panel,
otherButton,
filesList
);
Super = NSObject;
};
}
\ No newline at end of file
#
# GNUmakefile - Generated by ProjectCenter
#
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
PACKAGE_NAME = ProjectCenter
include $(GNUSTEP_MAKEFILES)/common.make
#
# Framework
#
VERSION = 0.5.0
VERSION = 0.6.0
FRAMEWORK_NAME = ProjectCenter
ProjectCenter_CURRENT_VERSION_NAME = 0.5.0
ProjectCenter_CURRENT_VERSION_NAME = 0.6.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,7 +50,9 @@ ProjectCenter_HEADER_FILES = \
PCProjectLoadedFiles.h \
PCProjectLoadedFilesPanel.h \
\
PCPrefController.h \
PCFileNameField.h \
PCFileNameIcon.h \
\
PCLogController.h
#
......@@ -64,6 +66,7 @@ ProjectCenter_OBJC_FILES = \
PCFileManager.m \
PCAddFilesPanel.m \
PCFileCreator.m \
PCSaveModified.m \
\
PCProjectManager.m \
PCProject.m \
......@@ -80,12 +83,10 @@ ProjectCenter_OBJC_FILES = \
PCProjectLoadedFiles.m \
PCProjectLoadedFilesPanel.m \
\
PCSplitView.m \
PCButton.m \
PCFileNameField.m \
PCFileNameIcon.m \
\
PCPrefController.m \
PCLogController.m
#
......@@ -116,7 +117,8 @@ ProjectCenter_LOCALIZED_RESOURCE_FILES = \
ProjectDescription.gorm \
FileAttributes.gorm \
LogPanel.gorm \
Preferences.gorm
SaveModified.gorm
ProjectCenter_LANGUAGES = \
English
......
......@@ -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)\""
......
......@@ -22,8 +22,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <ProjectCenter/PCLogController.h>
#include <ProjectCenter/PCAddFilesPanel.h>
#import <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCAddFilesPanel.h>
static PCAddFilesPanel *addFilesPanel = nil;
......
......@@ -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
......@@ -209,8 +209,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 +220,7 @@
}
}
NSLog(@"Bundle fullpath method #2: %@", bundleFullPath);
// NSLog(@"Bundle fullpath method #2: %@", bundleFullPath);
return bundleFullPath;
}
......
......@@ -22,11 +22,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <ProjectCenter/PCButton.h>
#include <ProjectCenter/PCDefines.h>
#import <ProjectCenter/PCButton.h>
#import <ProjectCenter/PCDefines.h>
#include <AppKit/NSBezierPath.h>
#include <GNUstepGUI/GSTrackingRect.h>
#import <AppKit/NSBezierPath.h>
#import <GNUstepGUI/GSTrackingRect.h>
@implementation PCButton
......@@ -37,12 +37,12 @@
//- (id)initWithFrame:(NSRect)frameRect
- (id)initWithCoder:(NSCoder *)coder
{
// self = [super initWithFrame:frameRect];
// NSLog(@"PCButton: initWithCoder");
self = [super initWithCoder:coder];
[_cell setGradientType:NSGradientConvexWeak];
[_cell setGradientType:NSGradientConcaveWeak];
[_cell setImageDimsWhenDisabled:YES];
[self setImagePosition:NSImageOnly];
[self setFont:[NSFont systemFontOfSize:10.0]];
[self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[self setRefusesFirstResponder:YES];
_hasTooltips = NO;
......
......@@ -28,8 +28,12 @@
#import <ProjectCenter/PCProjectManager.h>
#import <ProjectCenter/PCBundleManager.h>
#import <ProjectCenter/PCEditorManager.h>
#import <ProjectCenter/PCProject.h>
#import <ProjectCenter/PCLogController.h>
#import <ProjectCenter/PCSaveModified.h>
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
NSString *PCEditorDidChangeFileNameNotification =
@"PCEditorDidChangeFileNameNotification";
......@@ -92,6 +96,15 @@ NSString *PCEditorDidResignActiveNotification =
selector:@selector(editorDidChangeFileName:)
name:PCEditorDidChangeFileNameNotification
object:nil];
// Debugger
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(debuggerDidHitBreakpoint:)
name:PCProjectBreakpointNotification
object:nil];
// Preferences
}
return self;
......@@ -99,12 +112,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 +132,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 +164,84 @@ 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;
NSLog(@"EditorManager: openEditorForFile: \"%@\"", filePath);
BOOL exists = [fm fileExistsAtPath:filePath isDirectory:&isDir];
// Determine if file not exist or file is directory
if (![fm fileExistsAtPath:filePath isDirectory:&isDir] || isDir)
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);*/
return nil;
}
}
if (!(editor = [_editorsDict objectForKey:filePath]))
// NSLog(@"EditorManager 1: %@", _editorsDict);
editor = [_editorsDict objectForKey: filePath];
if (editor == nil)
{
NSLog(@"Opening new editor");
NSLog(@"Opening new editor. Editor: %@", editorName);
// 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)];
if (editor == nil)
{
return nil;
}
}
// 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);
protocol:@protocol(CodeParser)
fileName:fileName];
if(parser != nil)
{
[editor setParser:parser];
[editor openFileAtPath:filePath
editorManager:self
editable:editable];
[_editorsDict setObject:editor forKey:filePath];
RELEASE(editor);
}
else
{
//
// If we don't have an editor or a parser, we fall back to opening the
// file with the editor designated by the system.
//
[[NSWorkspace sharedWorkspace] openFile: filePath];
}
}
if(editor != nil)
{
[editor setWindowed:windowed];
}
[editor setWindowed:windowed];
[self orderFrontEditorForFile:filePath];
NSLog(@"EditorManager: %@", _editorsDict);