Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] patch8=fix_npe_when_switching_to_src_tab_from_other_file

Hi Vitaly.

reviewed and released ;-)

Cheers
Simon

Simon Moser, M.Eng.


                                                                          
 Websphere Integration       Mail:           IBM Deutschland Entwicklung  
 Developer Development       smoser@xxxxxx.  GmbH                         
 Team Lead BPEL Editor       com             Vorsitzender des             
 Dept. 4722, Bldg.           Phone:          Aufsichtsrats: Martin Jetter 
 71032-01, Room 086          +49-7031-16-43  Geschäftsführung: Herbert    
 Websphere Solutions and     04              Kircher                      
 Services                    Fax:            Sitz der Gesellschaft:       
 IBM Deutschland             +49-7031-16-48  Böblingen                    
 Entwicklung GmbH            90              Registergericht: Amtsgericht 
 Schönaicherstr. 220, D –                    Stuttgart, HRB 243294        
 71032 Boeblingen                                                         
                                                                          








                                                                           
             "Tishkov, Vitaly                                              
             V"                                                            
             <vitaly.v.tishkov                                          To 
             @intel.com>               "BPEL Designer project developer    
             Sent by:                  discussions."                       
             bpel-dev-bounces@         <bpel-dev@xxxxxxxxxxx>              
             eclipse.org                                                cc 
                                                                           
                                                                   Subject 
             07/30/2007 06:25          [bpel-dev]                          
             PM                        patch8=fix_npe_when_switching_to_sr 
                                       c_tab_from_other_file               
                                                                           
             Please respond to                                             
              "BPEL Designer                                               
             project developer                                             
               discussions."                                               
             <bpel-dev@eclipse                                             
                   .org>                                                   
                                                                           
                                                                           




Hi Simon,

The attached patch fixes a very annoying NPE:
         -          Open source tab of the BPEL editor;
         -          Open another file in the Eclipse;
         -          Switch to the BPEL editor.
      NPE is thrown
(this is #6 in the https://bugs.eclipse.org/bugs/show_bug.cgi?id=197468)

Thanks,
            Vitaly.(See attached file:
patch8=fix_npe_when_switching_to_src_tab_from_other_file.txt)
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
### Eclipse Workspace Patch 1.0
#P org.eclipse.bpel.ui
Index: src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Attic/BPELMultipageEditorPart.java,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 BPELMultipageEditorPart.java
--- src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java	30 Jul 2007 08:22:06 -0000	1.1.2.6
+++ src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java	30 Jul 2007 16:12:44 -0000
@@ -324,6 +324,8 @@
 	private OutlinePage outlinePage;
 	protected BPELTabbedPropertySheetPage currentPropertySheetPage;
 	
+	protected ActionRegistry actionRegistry;
+	 
 	private static int DESIGN_PAGE_INDEX = 0;
 	private static int SOURCE_PAGE_INDEX = 1;
 
@@ -529,6 +531,13 @@
 	}
 
 	
+	protected ActionRegistry getActionRegistry() {
+		if (actionRegistry == null)
+			actionRegistry = new ActionRegistry();
+		return actionRegistry;
+	}
+
+	
 	public Object getAdapter(Class type) {
 		if (type == Process.class) {
 			return process;
@@ -572,7 +581,11 @@
 			return currentPropertySheetPage;
 		}
 
-	    return super.getAdapter(type);
+		if (type == ActionRegistry.class) {
+			return getActionRegistry();
+		}
+		
+		return super.getAdapter(type);
 	  }
 
 	public CommandStack getCommandStack() {

Back to the top