View | Details | Raw Unified | Return to bug 325502 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java (-2 / +22 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2009 IBM Corporation and others.
2
 * Copyright (c) 2002, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 20-30 Link Here
20
 * David McKnight   (IBM)        - [253262] Cache Cleanup is removing .settings directory
20
 * David McKnight   (IBM)        - [253262] Cache Cleanup is removing .settings directory
21
 * David McKnight   (IBM)        - [245260] Different user's connections on a single host are mapped to the same temp files cache
21
 * David McKnight   (IBM)        - [245260] Different user's connections on a single host are mapped to the same temp files cache
22
 * David McKnight   (IBM)        - [276103] Files with names in different cases are not handled properly
22
 * David McKnight   (IBM)        - [276103] Files with names in different cases are not handled properly
23
 * David McKnight   (IBM)        - [325502] The default editor for a file is not updated when opened in RSE explorer
23
 *******************************************************************************/
24
 *******************************************************************************/
24
25
25
package org.eclipse.rse.internal.files.ui.resources;
26
package org.eclipse.rse.internal.files.ui.resources;
26
27
27
import java.io.File;
28
import java.io.File;
29
import java.lang.reflect.Field;
28
import java.util.ArrayList;
30
import java.util.ArrayList;
29
import java.util.List;
31
import java.util.List;
30
32
Lines 871-877 Link Here
871
							}
873
							}
872
							// fall through and let the new editable get created
874
							// fall through and let the new editable get created
873
						}
875
						}
874
						else {					
876
						else {		
877
							if (descriptor != null){
878
								// using reflection	to change descriptor since there's
879
								// no API right now
880
								try {
881
						            Class cls = editable.getClass();
882
						            Field[] fields = cls.getDeclaredFields();
883
						            for (int i = 0; i < fields.length; i++){
884
						            	Field fld = fields[i];
885
						            	String name= fld.getName();
886
						            	if (name.equals("_editorDescriptor")){ //$NON-NLS-1$
887
						            		fld.setAccessible(true);
888
						            		fld.set(editable, descriptor);
889
						            	}
890
						            }
891
								}
892
								catch (Exception e){									
893
								}
894
							}
875
							return editable;
895
							return editable;
876
						}
896
						}
877
					}
897
					}

Return to bug 325502