{"action":"created","issue":{"url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/274","repository_url":"https://api.github.com/repos/prominic/Moonshine-IDE","labels_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/274/comments","events_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/274/events","html_url":"https://github.com/prominic/Moonshine-IDE/issues/274","id":325150280,"node_id":"MDU6SXNzdWUzMjUxNTAyODA=","number":274,"title":"Native menu enable/disable management based on project selection","user":{"login":"rat-moonshine","id":24370870,"node_id":"MDQ6VXNlcjI0MzcwODcw","avatar_url":"https://avatars0.githubusercontent.com/u/24370870?v=4","gravatar_id":"","url":"https://api.github.com/users/rat-moonshine","html_url":"https://github.com/rat-moonshine","followers_url":"https://api.github.com/users/rat-moonshine/followers","following_url":"https://api.github.com/users/rat-moonshine/following{/other_user}","gists_url":"https://api.github.com/users/rat-moonshine/gists{/gist_id}","starred_url":"https://api.github.com/users/rat-moonshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rat-moonshine/subscriptions","organizations_url":"https://api.github.com/users/rat-moonshine/orgs","repos_url":"https://api.github.com/users/rat-moonshine/repos","events_url":"https://api.github.com/users/rat-moonshine/events{/privacy}","received_events_url":"https://api.github.com/users/rat-moonshine/received_events","type":"User","site_admin":false},"labels":[{"id":663364473,"node_id":"MDU6TGFiZWw2NjMzNjQ0NzM=","url":"https://api.github.com/repos/prominic/Moonshine-IDE/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"rat-moonshine","id":24370870,"node_id":"MDQ6VXNlcjI0MzcwODcw","avatar_url":"https://avatars0.githubusercontent.com/u/24370870?v=4","gravatar_id":"","url":"https://api.github.com/users/rat-moonshine","html_url":"https://github.com/rat-moonshine","followers_url":"https://api.github.com/users/rat-moonshine/followers","following_url":"https://api.github.com/users/rat-moonshine/following{/other_user}","gists_url":"https://api.github.com/users/rat-moonshine/gists{/gist_id}","starred_url":"https://api.github.com/users/rat-moonshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rat-moonshine/subscriptions","organizations_url":"https://api.github.com/users/rat-moonshine/orgs","repos_url":"https://api.github.com/users/rat-moonshine/repos","events_url":"https://api.github.com/users/rat-moonshine/events{/privacy}","received_events_url":"https://api.github.com/users/rat-moonshine/received_events","type":"User","site_admin":false},"assignees":[{"login":"rat-moonshine","id":24370870,"node_id":"MDQ6VXNlcjI0MzcwODcw","avatar_url":"https://avatars0.githubusercontent.com/u/24370870?v=4","gravatar_id":"","url":"https://api.github.com/users/rat-moonshine","html_url":"https://github.com/rat-moonshine","followers_url":"https://api.github.com/users/rat-moonshine/followers","following_url":"https://api.github.com/users/rat-moonshine/following{/other_user}","gists_url":"https://api.github.com/users/rat-moonshine/gists{/gist_id}","starred_url":"https://api.github.com/users/rat-moonshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rat-moonshine/subscriptions","organizations_url":"https://api.github.com/users/rat-moonshine/orgs","repos_url":"https://api.github.com/users/rat-moonshine/repos","events_url":"https://api.github.com/users/rat-moonshine/events{/privacy}","received_events_url":"https://api.github.com/users/rat-moonshine/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-05-22T05:56:24Z","updated_at":"2018-06-01T08:17:33Z","closed_at":null,"author_association":"COLLABORATOR","body":"Menu enable/disable problem come up again when #265 tests; As reported scenario by @JoelProminic , \r\n\r\n> Open Visual Editor Project\r\n> File > Recent Project >\r\n> Close the additional project. The VisualEditor project is now selected\r\n> File > Recent Project. BUG: menu items are disabled\r\n\r\nThis is possibly because the separate collection management maintains for visual editor menu enable/disable purpose. \r\n\r\nAt this moment to enable/disable menu between Visual Editor and non/Visual-Editor projects, it maintain manually separately managed collections like this:\r\n\r\n```\r\npublic static var menuItemsEnabledInVEProject:Array = [\r\n            resourceManager.getString('resources', 'NEW'),\r\n            resourceManager.getString('resources', 'OPEN'),\r\n\t\t\tresourceManager.getString('resources', 'OPEN_RECENT_PROJECTS'),\r\n\t\t\tresourceManager.getString('resources', 'OPEN_RECENT_FILES'),\r\n.....\r\n.....\r\n            resourceManager.getString('resources', 'RENAME'),\r\n            resourceManager.getString('resources', 'VISUALEDITOR_FLEX_FILE'),\r\n            resourceManager.getString('resources', 'VISUALEDITOR_PRIMEFACES_FILE'),\r\n            \"Copy Path\",\r\n            \"Show in Explorer\",\r\n            \"Show in Finder\"\r\n        ];\r\n\r\n        private static var menuItemsDisabledNoneVEProject:Array = [\r\n            resourceManager.getString('resources', 'EXPORT_VISUALEDITOR_PROJECT'),\r\n            resourceManager.getString('resources', 'VISUALEDITOR_FLEX_FILE'),\r\n            resourceManager.getString('resources', 'VISUALEDITOR_PRIMEFACES_FILE'),\r\n            resourceManager.getString('resources', 'EXPORT_VISUALEDITOR_PROJECT_TO_FLEX'),\r\n            resourceManager.getString('resources', 'EXPORT_VISUALEDITOR_PROJECT_TO_PRIMEFACES')\r\n        ];\r\n```\r\n\r\nI don't like this design, and I think this can be improve. The current way is unexpected-scenario-prone because of the following reasons:\r\n\r\n1. Short manually managed collection is not problem unless it grows larger\r\n2. Forget to add any newly added native menu to this list cause to be disable \r\n3. Unexpected results with dynamic populated menus like one reported by Joel on #265 \r\n\r\nWe already had a need to enable/disable menu items between different project types. I think its the time to work on this other than patch work targeted Visual Editor projects only.\r\n\r\nWe need the enable/disable management to be more robust that the API serve almost all the project types irrespective of Visual Editor project. I also don't want to manage different likewise (above) menu collections for each of the project types those supports by Moonshine, to enable/disable menus between projects. We need to make the process more generic than specific."},"comment":{"url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/comments/393804721","html_url":"https://github.com/prominic/Moonshine-IDE/issues/274#issuecomment-393804721","issue_url":"https://api.github.com/repos/prominic/Moonshine-IDE/issues/274","id":393804721,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzgwNDcyMQ==","user":{"login":"piotrzarzycki21","id":24554795,"node_id":"MDQ6VXNlcjI0NTU0Nzk1","avatar_url":"https://avatars2.githubusercontent.com/u/24554795?v=4","gravatar_id":"","url":"https://api.github.com/users/piotrzarzycki21","html_url":"https://github.com/piotrzarzycki21","followers_url":"https://api.github.com/users/piotrzarzycki21/followers","following_url":"https://api.github.com/users/piotrzarzycki21/following{/other_user}","gists_url":"https://api.github.com/users/piotrzarzycki21/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrzarzycki21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrzarzycki21/subscriptions","organizations_url":"https://api.github.com/users/piotrzarzycki21/orgs","repos_url":"https://api.github.com/users/piotrzarzycki21/repos","events_url":"https://api.github.com/users/piotrzarzycki21/events{/privacy}","received_events_url":"https://api.github.com/users/piotrzarzycki21/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T08:17:33Z","updated_at":"2018-06-01T08:17:33Z","author_association":"COLLABORATOR","body":"I would propose one change. \r\n\r\nI have to admit that I don't like that we have another property in `AS3ProjectVO `, but don't have an idea how to do that differently. However I would get rid off method `getProjectMenuType` from `CreateProject` and simply move that logic inside `AS3ProjectVO`. All the properties which are needed to specify what kind of menu we have are inside that object. \r\n\r\nWhat do you think ? \r\n\r\n"}}
{"actor":{"display_login":"piotrzarzycki21"}}