ProjectManager  0.2
Public Member Functions | Static Public Member Functions | Protected Attributes
ProjectDocument Class Reference

This class is the principal document class for project files. More...

List of all members.

Public Member Functions

(NSArray *) - projectMenuEntries
 This message is sent to the receiver by the app delegate when the receiver becomes the currently active document in the app to determine what menu entries of it to put into the main menu's 'Project' submenu.
(NSString *) - projectName
(void) - setProjectName:
 Sets a new project name.
(NSString *) - projectDirectory
(void) - setProjectName:
(NSString *) - projectTypeID
(id< ProjectType >) - projectType
(NSArray *) - projectModules
(id< ProjectModule >) - projectModuleWithName:
 Returns the project module of the specified name, or `nil' if no such module is found.
(void) - setCurrentProjectModule:
 Sets the currently displayed project module in the receiver's project window.
(id< ProjectModule >) - currentProjectModule
 Returns the currently displayed project module.
(BOOL) - openFile:inCodeEditorOnLine:
 Opens a specified file in a code editor (either the internal code editor, or an external one, if configured to do so).
(void) - logMessage:
 Appends a message to the project log.

Static Public Member Functions

(BOOL) + validateProjectName:error:
 Checks whether a given string is a valid project name.

Protected Attributes

NSStringprojectDirectory
 Returns a path to where the project's directory is located.
NSStringprojectName
 Returns the abstract project name.
NSStringprojectTypeID
 Returns the type ID of the project's project type.
id< ProjectTypeprojectType
 Returns the project type object associated currently with the project.
NSArrayprojectModules
 Returns the project modules of the receiver.
NSArraymoduleMenuEntries
 An array of menu items of project modules which are to appear in the Modules menu.
ProjectWindowControllerwc

Detailed Description

This class is the principal document class for project files.

It's responsibility is to manage it's project modules, the project type object, and it's window controller.


Member Function Documentation

- (void) logMessage: (NSString *)  aMessage

Appends a message to the project log.

This method serves as a frontend to the -[ProjectWindowController logMessage:] method, so that project modules and project types can log messages (since they don't have direct access to the window controller object).

Parameters:
aMessageThe message which to send to the log.

References ProjectWindowController::logMessage:.

Referenced by MakeBuilder::buildTarget:, MakeBuilder::cleanTarget:, GNUstepAppLauncher::launch:, GNUstepAppLauncher::stopLaunch:, and GNUstepAppLauncher::taskTerminated.

- (BOOL) openFile: (NSString *)  aPath
inCodeEditorOnLine: (int)  aLine 

Opens a specified file in a code editor (either the internal code editor, or an external one, if configured to do so).

Parameters:
aPathThe file which to open.
aLineThe line number at which to open the file. If the file is already open, it is scrolled to that line. If you pass aLine < 0, no scrolling occurs and the file is only opened.
Returns:
YES if opening the file succeeded, NO if it didn't.

Referenced by FileManager::openPath:.

This message is sent to the receiver by the app delegate when the receiver becomes the currently active document in the app to determine what menu entries of it to put into the main menu's 'Project' submenu.

Returns:
an array of NSMenuItem objects bound to submenus containing the menu items of the individual project modules.

References moduleMenuEntries, and projectModules.

- (void) setCurrentProjectModule: (id <ProjectModule>)  aModule

Sets the currently displayed project module in the receiver's project window.

Parameters:
aModuleThe project module which to display. It must one of the project's modules.

References ProjectWindowController::setCurrentModule:.

Referenced by ProjectAttributes::switchView:.

- (void) setProjectName: (NSString *)  aName

Sets a new project name.

The project's name doesn't necessarily need to be the same as the project file's or project directory's name, but can instead by anything that the user finds descriptive.

See also:
-[ProjectDocument projectName]

References projectName.

Referenced by FileManager::changeName:, and ProjectAttributes::changeProjectName:.

+ (BOOL) validateProjectName: (NSString *)  aProjectName
error: (NSError **)  error 

Checks whether a given string is a valid project name.

Parameters:
projectNameThe project name which to check.
errorA pointer which if not set to NULL will be filled with an object describing the problem with the name.
Returns:
YES if the provided name is a valid project name, NO if it isn't.

Member Data Documentation

- (NSString *) projectDirectory [protected]

Returns a path to where the project's directory is located.

The location of the project's project file can be determined by simply saying -[ProjectDocument fileName].

Referenced by MakeBuilder::buildTarget:, and MakeBuilder::cleanTarget:.

- (NSString *) projectName [protected]

Returns the abstract project name.

See also:
-[ProjectDocument - setProjectName:]

Referenced by ProjectWindowController::projectNameChanged:, and setProjectName:.


The documentation for this class was generated from the following files: