From: SourceForge.net <no...@so...> - 2007-12-18 22:37:57
|
Patches item #1853525, was opened at 2007-12-18 17:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeff Robertson (jefftbob) Assigned to: Nobody/Anonymous (nobody) Summary: [ 1593539 ] Add a better way of accessing favorites from wit Initial Comment: Since the favorites menu was already present in the VFS browser toolbar, this was a matter of finding a way to use the code that builds the menu in both the toolbar and the context menu. I decided on an approach similar to how the plugins menu is built: with a method definied in the VFSBrowser class that takes a JComponent as a parameter. This component then has the necessary menu items added to it via the method. This works well, since the toolbar menu is a JPopupMenu and the favorites area of the context menu is a JMenu. I also felt that some of the existing code could be refactored somewhat as well. I moved the logic for "Add to Favorites" and "Edit Favorites" into browser.actions.xml, since they didn't need anything in the way of special action handling. I also created two anonymous ActionListeners: one for favorite files, and one for favorite directories. When the favorites menu is created, the correct ActionListener is assigned. This cuts out the need for all the conditionals that were in the inner ActionHandler class of the inner FavoritesMenuButton class, and in general makes things easier to repurpose because there aren't so many nested inner classes. While I was working on implementing this feature, I also felt that all the different toolbar button inner classes could be refactored into one class, but I ran into some interdependency problems. This might be something to consider down the road, however. Also, please note that I think Feature #1593530 is a dupe of this one. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 |
From: SourceForge.net <no...@so...> - 2007-12-18 22:38:35
|
Patches item #1853525, was opened at 2007-12-18 17:37 Message generated for change (Comment added) made by jefftbob You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeff Robertson (jefftbob) Assigned to: Nobody/Anonymous (nobody) Summary: [ 1593539 ] Add a better way of accessing favorites from wit Initial Comment: Since the favorites menu was already present in the VFS browser toolbar, this was a matter of finding a way to use the code that builds the menu in both the toolbar and the context menu. I decided on an approach similar to how the plugins menu is built: with a method definied in the VFSBrowser class that takes a JComponent as a parameter. This component then has the necessary menu items added to it via the method. This works well, since the toolbar menu is a JPopupMenu and the favorites area of the context menu is a JMenu. I also felt that some of the existing code could be refactored somewhat as well. I moved the logic for "Add to Favorites" and "Edit Favorites" into browser.actions.xml, since they didn't need anything in the way of special action handling. I also created two anonymous ActionListeners: one for favorite files, and one for favorite directories. When the favorites menu is created, the correct ActionListener is assigned. This cuts out the need for all the conditionals that were in the inner ActionHandler class of the inner FavoritesMenuButton class, and in general makes things easier to repurpose because there aren't so many nested inner classes. While I was working on implementing this feature, I also felt that all the different toolbar button inner classes could be refactored into one class, but I ran into some interdependency problems. This might be something to consider down the road, however. Also, please note that I think Feature #1593530 is a dupe of this one. ---------------------------------------------------------------------- >Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:38 Message: Logged In: YES user_id=1937678 Originator: YES File Added: browser.actions.xml ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 |
From: SourceForge.net <no...@so...> - 2007-12-18 22:39:06
|
Patches item #1853525, was opened at 2007-12-18 17:37 Message generated for change (Comment added) made by jefftbob You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeff Robertson (jefftbob) Assigned to: Nobody/Anonymous (nobody) Summary: [ 1593539 ] Add a better way of accessing favorites from wit Initial Comment: Since the favorites menu was already present in the VFS browser toolbar, this was a matter of finding a way to use the code that builds the menu in both the toolbar and the context menu. I decided on an approach similar to how the plugins menu is built: with a method definied in the VFSBrowser class that takes a JComponent as a parameter. This component then has the necessary menu items added to it via the method. This works well, since the toolbar menu is a JPopupMenu and the favorites area of the context menu is a JMenu. I also felt that some of the existing code could be refactored somewhat as well. I moved the logic for "Add to Favorites" and "Edit Favorites" into browser.actions.xml, since they didn't need anything in the way of special action handling. I also created two anonymous ActionListeners: one for favorite files, and one for favorite directories. When the favorites menu is created, the correct ActionListener is assigned. This cuts out the need for all the conditionals that were in the inner ActionHandler class of the inner FavoritesMenuButton class, and in general makes things easier to repurpose because there aren't so many nested inner classes. While I was working on implementing this feature, I also felt that all the different toolbar button inner classes could be refactored into one class, but I ran into some interdependency problems. This might be something to consider down the road, however. Also, please note that I think Feature #1593530 is a dupe of this one. ---------------------------------------------------------------------- >Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:39 Message: Logged In: YES user_id=1937678 Originator: YES File Added: BrowserCommandsMenu.java ---------------------------------------------------------------------- Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:38 Message: Logged In: YES user_id=1937678 Originator: YES File Added: browser.actions.xml ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 |
From: SourceForge.net <no...@so...> - 2007-12-18 22:39:28
|
Patches item #1853525, was opened at 2007-12-18 17:37 Message generated for change (Comment added) made by jefftbob You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeff Robertson (jefftbob) Assigned to: Nobody/Anonymous (nobody) Summary: [ 1593539 ] Add a better way of accessing favorites from wit Initial Comment: Since the favorites menu was already present in the VFS browser toolbar, this was a matter of finding a way to use the code that builds the menu in both the toolbar and the context menu. I decided on an approach similar to how the plugins menu is built: with a method definied in the VFSBrowser class that takes a JComponent as a parameter. This component then has the necessary menu items added to it via the method. This works well, since the toolbar menu is a JPopupMenu and the favorites area of the context menu is a JMenu. I also felt that some of the existing code could be refactored somewhat as well. I moved the logic for "Add to Favorites" and "Edit Favorites" into browser.actions.xml, since they didn't need anything in the way of special action handling. I also created two anonymous ActionListeners: one for favorite files, and one for favorite directories. When the favorites menu is created, the correct ActionListener is assigned. This cuts out the need for all the conditionals that were in the inner ActionHandler class of the inner FavoritesMenuButton class, and in general makes things easier to repurpose because there aren't so many nested inner classes. While I was working on implementing this feature, I also felt that all the different toolbar button inner classes could be refactored into one class, but I ran into some interdependency problems. This might be something to consider down the road, however. Also, please note that I think Feature #1593530 is a dupe of this one. ---------------------------------------------------------------------- >Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:39 Message: Logged In: YES user_id=1937678 Originator: YES File Added: VFSBrowser.java ---------------------------------------------------------------------- Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:39 Message: Logged In: YES user_id=1937678 Originator: YES File Added: BrowserCommandsMenu.java ---------------------------------------------------------------------- Comment By: Jeff Robertson (jefftbob) Date: 2007-12-18 17:38 Message: Logged In: YES user_id=1937678 Originator: YES File Added: browser.actions.xml ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=1853525&group_id=588 |