This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87221 - Remove property from correlation set in Navigator removes it from wsdl
Summary: Remove property from correlation set in Navigator removes it from wsdl
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vitaly Bychkov
URL:
Keywords:
Depends on:
Blocks: 93405
  Show dependency tree
 
Reported: 2006-10-16 16:54 UTC by Andrey Yamkovoy
Modified: 2007-02-19 11:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Yamkovoy 2006-10-16 16:54:10 UTC
Steps to reproduce:
- Create Asynchronous sample project.
- Open diagram of AsynchronousSampleClient process.
- Goto Navigator window.
- Select 'AynchronousSampleClient > Correlation Sets > correlator > 
correlatorProp' node in tree and delete it.
- Notice that property was not deleted from correlation set but deleted from 
wsdl.
Comment 1 Vitaly Bychkov 2006-10-16 19:01:46 UTC
here is the fix:

--- BpelNode.java 
***************
*** 48,49 ****
--- 48,50 ----
  import
org.netbeans.modules.bpel.nodes.actions.DeleteBpelExtensibiltyWsdlRefAction;
+ import org.netbeans.modules.bpel.nodes.actions.DeletePropertyAction;
  import org.netbeans.modules.bpel.nodes.actions.FindMexPeerAction;
***************
--- 153,156 ----
          ACTION_TYPE_MAP.put(ActionType.DELETE_BPEL_EXT_FROM_WSDL
                  ,SystemAction.get(DeleteBpelExtensibiltyWsdlRefAction.class));
+         ACTION_TYPE_MAP.put(ActionType.DELETE_PROPERTY_ACTION
+                 ,SystemAction.get(DeletePropertyAction.class));





--- CorrelationPropertyNode.java
***************
*** 29,34 ****
--- 29,35 ----
  import org.netbeans.modules.xml.schema.model.GlobalElement;
  import org.netbeans.modules.xml.schema.model.ReferenceableSchemaComponent;
  import org.netbeans.modules.xml.xam.Reference;
+ import org.openide.nodes.Node;
  import org.openide.nodes.Sheet;
  import static org.netbeans.modules.bpel.properties.PropertyType.*;
  import org.netbeans.modules.bpel.nodes.actions.ActionType;
***************
*** 161,171 ****
          }
      }

      protected ActionType[] getActionsArray() {
          return new ActionType[] {
              ActionType.SHOW_POPERTY_EDITOR,
              ActionType.SEPARATOR,
!             ActionType.DELETE_BPEL_EXT_FROM_WSDL,
              ActionType.SEPARATOR,
              ActionType.PROPERTIES,
          };
--- 162,186 ----
          }
      }

+
+     private boolean isBpelExtNode() {
+         Node parent = getParentNode();
+         while (parent != null) {
+             if (parent instanceof ImportWsdlNode) {
+                 return true;
+             }
+         }
+         return false;
+     }
+
      protected ActionType[] getActionsArray() {
+         ActionType deleteActionType = isBpelExtNode()
+                 ? ActionType.DELETE_BPEL_EXT_FROM_WSDL
+                 : ActionType.DELETE_PROPERTY_ACTION;
          return new ActionType[] {
              ActionType.SHOW_POPERTY_EDITOR,
              ActionType.SEPARATOR,
!             deleteActionType,
              ActionType.SEPARATOR,
              ActionType.PROPERTIES,
          };
Comment 2 Vitaly Bychkov 2006-10-16 19:02:41 UTC
fix has been checked into release55_dev
Comment 3 Vitaly Bychkov 2006-10-17 07:51:39 UTC
corrected:

CorrelationPropertyNode.java
 import org.netbeans.modules.xml.schema.model.GlobalElement;
 import org.netbeans.modules.xml.schema.model.ReferenceableSchemaComponent;
 import org.netbeans.modules.xml.xam.Reference;
+import org.openide.nodes.Node;
 import org.openide.nodes.Sheet;
@@ -161,11 +162,25 @@
         }
     }
     
+
+    private boolean isBpelExtNode() {
+        Node parent = getParentNode();
+        while (parent != null) {
+            if (parent instanceof ImportWsdlNode) {
+                return true;
+            }
+            parent = parent.getParentNode();
+        }
+        return false;
+    }
+    
     protected ActionType[] getActionsArray() {
+        ActionType deleteActionType = isBpelExtNode() 
+                ? ActionType.DELETE_BPEL_EXT_FROM_WSDL 
+                : ActionType.DELETE_PROPERTY_ACTION;
         return new ActionType[] {
             ActionType.SHOW_POPERTY_EDITOR,
             ActionType.SEPARATOR,
-            ActionType.DELETE_BPEL_EXT_FROM_WSDL,
+            deleteActionType,
             ActionType.SEPARATOR,
             ActionType.PROPERTIES,
         };

BpelNode.java
-------------------
 import org.netbeans.modules.bpel.model.api.support.UniqueId;
 import org.netbeans.modules.bpel.nodes.actions.AddPropertyToWsdlAction;
 import org.netbeans.modules.bpel.nodes.actions.DeleteBpelExtensibiltyWsdlRefAction;
+import org.netbeans.modules.bpel.nodes.actions.DeletePropertyAction;
 import org.netbeans.modules.bpel.nodes.actions.FindMexPeerAction;
 import
org.netbeans.modules.bpel.nodes.actions.GoToMessageExchangeContainerSourceAction;
 import org.netbeans.modules.bpel.nodes.actions.MoveDownCopyAction;
@@ -151,6 +152,8 @@
        
ACTION_TYPE_MAP.put(ActionType.REMOVE,SystemAction.get(DeleteAction.class));
         ACTION_TYPE_MAP.put(ActionType.DELETE_BPEL_EXT_FROM_WSDL
                 ,SystemAction.get(DeleteBpelExtensibiltyWsdlRefAction.class));
+        ACTION_TYPE_MAP.put(ActionType.DELETE_PROPERTY_ACTION
+                ,SystemAction.get(DeletePropertyAction.class));
         ACTION_TYPE_MAP.put(ActionType.SHOW_POPERTY_EDITOR
                 ,SystemAction.get(ShowPropertyEditorAction.class));
         ACTION_TYPE_MAP.put(ActionType.ADD_CATCH
Comment 4 _ hong_lin 2006-10-19 22:12:17 UTC
Since this issue is being documented. Downgrade the Priority from P1 to P2 for
5.5 Release. 
Comment 5 astashkova 2006-10-20 15:21:06 UTC
Added to RNs

Use the following link to review the wording and location of the issue in the
staged Release Notes
http://nbstaging.czech/community/releases/55/entpack_relnotes.html#87221
Comment 6 Vitaly Bychkov 2006-10-31 16:00:48 UTC
fix is in release55_dev and in trunk
Comment 7 Victoria Zhukovskaya 2007-02-07 11:54:11 UTC
Can not be verified - see 93405 Issue
No context menu, no action after press Del. 
Comment 8 Victoria Zhukovskaya 2007-02-07 12:37:00 UTC
WinXP, NB5.5.1+ gavotte 070206
Comment 9 Vitaly Bychkov 2007-02-13 08:23:25 UTC
Context menus are backed.
Ready to verify.
Comment 10 Mikhail Kondratyev 2007-02-19 11:48:30 UTC
Verified