Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] Rename bpel file

Hi Oleg,

well, that is maybe a more or less philosophical question ;.)
Strictly speaking, Change Name, Change Namespace and Move are traditional
refactoring actions and should be handled properly using the eclipse.LTK
refactoring framework. The code below looks like someone tried to implement
a "homegrown" solution.
I don't have a strong preference here, but if I was you, and if it is
suitable I would go for the refactoring solution - that's how we have done
in in our product (however, the code is not directly sitting on top of
Eclipse LTK, but we have another layer in the middle).

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                                                         
                                                                          











                                                                                                                            
  From:       "Danilov, Oleg V" <oleg.v.danilov@xxxxxxxxx>                                                                  
                                                                                                                            
  To:         "BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>                                         
                                                                                                                            
  Date:       16.05.2008 14:15                                                                                              
                                                                                                                            
  Subject:    [bpel-dev] Rename bpel file                                                                                   
                                                                                                                            





Hi all,

I just found an interesting code in the BPELMultipageEditorPart:

                                    public void moved(IFile source, final
IFile destination) {
//                                              IFile current =
((IFileEditorInput) getEditorInput()).getFile();
//                                              if
(!current.equals(source)) {
//                                                          return;
//                                              }
//                                              // update editors input
//                                              final IFileEditorInput
input = new FileEditorInput(destination);
//                                              Display display =
getDetailsEditor().getSite().getShell().getDisplay();
//                                              display.syncExec(new
Runnable() {
//                                                          public void
run() {
//
getBPELDetailsEditor().setInput(input);
//
setInput(input);
//                                                          }
//                                              });
//                                              // update resources
//                                              IPath path =
destination.getFullPath();
//                                              URI uri =
URI.createPlatformResourceURI(path.toString());
//
processResource.setURI(uri);
//                                              // JM: Comment out. We
don't want to re-name the process just because
//                                              // the file name has
changed
////                                            display.syncExec(new
Runnable() {
////                                                        public void
run() {
////
BPELUtil.updateNameAndNamespace(destination, process);
////                                                        }
////                                            });
//                                              path =
path.removeFileExtension().addFileExtension(IBPELUIConstants.EXTENSION_MODEL_EXTENSIONS);
//                                              URI extensionsUri =
URI.createPlatformResourceURI(path.toString());
//                                              extensionsResource =
resourceSet.createResource(extensionsUri);
//
extensionsResource.setURI(extensionsUri);
//                                              try {
//                                                          // JM: Comment
out for now. We should re-test this
////
processResource.save(Collections.EMPTY_MAP);
////
destination.refreshLocal(IResource.DEPTH_ZERO, null);
//                                              } catch (Exception e) {
//
BPELUIPlugin.log(e);
//                                              }
                                    }

Any ideas why we don't want to rename the process?

Thanks,
  Oleg




--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev






Back to the top