[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view SystemViewRemoteFileAdapter.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view
In directory dev2:/tmp/cvs-serv16963/src/org/eclipse/rse/internal/files/ui/view

Modified Files:
	SystemViewRemoteFileAdapter.java 
Log Message:
[363490] PHP files opening in system editor (Dreamweaver)


Index: SystemViewRemoteFileAdapter.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** SystemViewRemoteFileAdapter.java	11 Apr 2011 17:27:02 -0000	1.112
--- SystemViewRemoteFileAdapter.java	15 Nov 2011 23:29:40 -0000	1.113
***************
*** 76,79 ****
--- 76,80 ----
   * David McKnight   (IBM)        - [249031] Last used editor should be set to SystemEditableRemoteFile
   * David McKnight   (IBM)        - [341244] folder selection input to unlocked Remote Systems Details view sometimes fails
+  * David McKnight   (IBM)        - [363490] PHP files opening in system editor (Dreamweaver)
   *******************************************************************************/
  
***************
*** 3426,3437 ****
  					SystemEditableRemoteFile edit = (SystemEditableRemoteFile)editable;
  					IEditorDescriptor oldDescriptor = edit.getEditorDescriptor();
! 					IEditorDescriptor curDescriptor;
! 					try {
! 						curDescriptor = IDE.getEditorDescriptor(editable.getLocalResource());
! 						if (oldDescriptor != curDescriptor){
! 							edit.setEditorDescriptor(curDescriptor);
  						}
! 					} catch (PartInitException e) {
! 					}					
  				}
  				
--- 3427,3446 ----
  					SystemEditableRemoteFile edit = (SystemEditableRemoteFile)editable;
  					IEditorDescriptor oldDescriptor = edit.getEditorDescriptor();
! 					IEditorDescriptor curDescriptor = null;
! 					IFile file = editable.getLocalResource();
! 					
! 					if (file == null || !file.exists()){
! 						curDescriptor = registry.getDefaultEditor(remoteFile.getName());						
! 					}
! 					if (curDescriptor == null){
! 						try {
! 							curDescriptor = IDE.getEditorDescriptor(file);
! 						} catch (PartInitException e) {
! 							curDescriptor = IDE.getDefaultEditor(file);
  						}
! 					}
! 					if (oldDescriptor != curDescriptor){
! 						edit.setEditorDescriptor(curDescriptor);
! 					}								
  				}