You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/12/24 07:13:34 UTC

[GitHub] [netbeans] Mohan-Sarilla opened a new pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Mohan-Sarilla opened a new pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812
 
 
   **Jira Link :** 
   https://issues.apache.org/jira/browse/NETBEANS-3538
   
   **Description:**
   Steps to simulate:
   
   Create Java Modular Project:
   
   Ctrl+shift+n > Dialogue box will be opened > from Categories select Java with Ant > from Projects select Java Modular Project > click Next > enter project name in Project Name box > click on Finish.
             After performing above steps Java Modular Project will be created.
   
   Create Module under Java Modular Project:
   
   Right click on created project > New > Module > Dialogue box will be opened > enter module name in Module Name field > click on Finish.
   After performing above steps Module will be created.
   
   then Try to right click on module that you created , you would see there will no Delete option.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r374309505
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -465,6 +466,100 @@ public boolean equals(@NullAllowed final Object other) {
                     new DynLkp());
         }
 
+        @Override
+        public boolean canDestroy() {
+            return true;
+        }
+
+        @Override
+        public void destroy() {
 
 Review comment:
   But is this all necessary? I can delete files outside the IDE and my experience with netbeans is, that it correctly detects this and updates the state of the projects. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Mohan-Sarilla commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
Mohan-Sarilla commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r373930802
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -465,6 +466,100 @@ public boolean equals(@NullAllowed final Object other) {
                     new DynLkp());
         }
 
+        @Override
+        public boolean canDestroy() {
+            return true;
+        }
+
+        @Override
+        public void destroy() {
 
 Review comment:
   @matthiasblaesing, I haven't deregister classes, packages like it does in package deletion in previous commit, I have done the same in current commit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r361525294
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -557,12 +561,40 @@ public String getHtmlDisplayName() {
                         null,
                         SystemAction.get(FileSystemAction.class ),
                         null,
-                        SystemAction.get(ToolsAction.class )
+                        SystemAction.get(ToolsAction.class ),
+                        //Added new action to delete module
+                        new DeleteAction("Delete") // NOI18N
 
 Review comment:
   Please use  `org.openide.actions.DeleteAction`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r361525740
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -557,12 +561,40 @@ public String getHtmlDisplayName() {
                         null,
                         SystemAction.get(FileSystemAction.class ),
                         null,
-                        SystemAction.get(ToolsAction.class )
+                        SystemAction.get(ToolsAction.class ),
+                        //Added new action to delete module
+                        new DeleteAction("Delete") // NOI18N
                     };
                 }
                 return actions;
             }
         }
+        
+        private class DeleteAction extends AbstractAction {
 
 Review comment:
   Please don't reinvent the wheel. The explorer view already handles the confirmation - override `canDestroy` and `destroy`  in the `Node` implementation and you should be done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r373834519
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -465,6 +466,100 @@ public boolean equals(@NullAllowed final Object other) {
                     new DynLkp());
         }
 
+        @Override
+        public boolean canDestroy() {
+            return true;
+        }
+
+        @Override
+        public void destroy() {
 
 Review comment:
   Why did the delete routine grow from 20 lines (original commit to nearly 100 lines)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Mohan-Sarilla commented on issue #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
Mohan-Sarilla commented on issue #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#issuecomment-580661090
 
 
   @matthiasblaesing , done with the changes requested.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r361525408
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -557,12 +561,40 @@ public String getHtmlDisplayName() {
                         null,
                         SystemAction.get(FileSystemAction.class ),
                         null,
-                        SystemAction.get(ToolsAction.class )
+                        SystemAction.get(ToolsAction.class ),
+                        //Added new action to delete module
 
 Review comment:
   From the name of the action the intention is clear, new is relative (in a few years it is not new anymore) -> please remove the comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1812: [NETBEANS-3538]:Added Delete Action for Java Modular Project
URL: https://github.com/apache/netbeans/pull/1812#discussion_r373834519
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java
 ##########
 @@ -465,6 +466,100 @@ public boolean equals(@NullAllowed final Object other) {
                     new DynLkp());
         }
 
+        @Override
+        public boolean canDestroy() {
+            return true;
+        }
+
+        @Override
+        public void destroy() {
 
 Review comment:
   Why did the delete routine grow from 20 lines (original commit) to nearly 100 lines?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists