Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add structure (Logic, Model, Storage) for meeting component #34

Merged
merged 10 commits into from
Oct 1, 2020

Conversation

claraadora
Copy link

No description provided.

*/
public Command parseCommand(String userInput) throws ParseException {

final String commandWord = userInput.split(" ")[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible to follow Pattern BASIC_COMMAND_FORMAT check used in AddressBookParser?
Reason why ModeParser did not use Pattern is because the commands that ModeParser will parse does not follow the regular format of commands with all the Prefixes.

* API of the Storage component
*/
// TODO: build and change to MeetingBookStorage
public interface StorageMeeting extends AddressBookStorage, UserPrefsStorage {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to take out UserPrefsStorage from Person Package.
AddressBookStorage seems to specific to the Person Model, what do you think?

*/
CommandResult execute(String commandText) throws CommandException, ParseException;

boolean isMeetingCommand(String commandText);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove all isMeetingCommand methods
Implemented only for LogicMode because need to know whether to switch mode in MainWindow, whereas it is certain that LogicMeeting will be handling a user input if the current mode is Meeting

* @return feedback message of the operation result for display
* @throws CommandException If an error occurs during command execution.
*/
public abstract CommandResult execute(ModelMeeting modelMeeting) throws CommandException;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to accept Contacts Model eventually also so that index of contact can be referenced

*/
public Command parseCommand(String userInput) throws ParseException {

final String commandWord = userInput.split(" ")[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cleaner implementation, possible to use Pattern found in AddressBookParser?
split method used in ModeParser because none of the mode commands use prefixes.


private final MeetingBook meetingBook;

// TODO: May need to add userPrefs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be good to just add userPrefs (just reference to same object)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually will have a FilteredList filteredMeetings ?

* API of the Storage component
*/
// TODO: build and change to MeetingBookStorage
public interface StorageMeeting extends AddressBookStorage, UserPrefsStorage {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to take out UserPrefsStorage from person package
Will StorageMeeting be extending from AddressBookStorage?

Copy link

@MerlinLim MerlinLim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge

@MerlinLim MerlinLim merged commit 11bb4ab into AY2021S1-CS2103T-F11-2:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants