Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 179129 Details for
Bug 325502
[api] The default editor for a file is not updated when opened in RSE explorer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
3.3 version patch with set/get API for editor descriptor
patch.txt (text/plain), 3.28 KB, created by
David McKnight
on 2010-09-17 11:52:36 EDT
(
hide
)
Description:
3.3 version patch with set/get API for editor descriptor
Filename:
MIME Type:
Creator:
David McKnight
Created:
2010-09-17 11:52:36 EDT
Size:
3.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.files.ui >Index: src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java,v >retrieving revision 1.71 >diff -u -r1.71 SystemEditableRemoteFile.java >--- src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java 8 Sep 2010 11:27:46 -0000 1.71 >+++ src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java 17 Sep 2010 15:51:34 -0000 >@@ -40,6 +40,7 @@ > * David McKnight (IBM) - [284420] nullprogressmonitor is needed > * David McKnight (IBM) - [310215] SystemEditableRemoteFile.open does not behave as expected > * David McKnight (IBM) - [324519] SystemEditableRemoteFile throws NPE when used in headless mode >+ * David McKnight (IBM) - [325502] The default editor for a file is not updated when opened in RSE explorer > *******************************************************************************/ > > package org.eclipse.rse.files.ui.resources; >@@ -2013,4 +2014,22 @@ > return remoteFile.isStale(); > } > >+ /** >+ * Get the editor descriptor to be associated with the remote file >+ * @return the editor descriptor associated with this remote file >+ * @since 3.3 >+ */ >+ public IEditorDescriptor getEditorDescriptor(){ >+ return _editorDescriptor; >+ } >+ >+ /** >+ * Set the editor descriptor to be associated with the remote file >+ * @param descriptor the new editor descriptor >+ * @since 3.3 >+ */ >+ public void setEditorDescriptor(IEditorDescriptor descriptor){ >+ _editorDescriptor = descriptor; >+ } >+ > } >Index: src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java,v >retrieving revision 1.17 >diff -u -r1.17 SystemRemoteEditManager.java >--- src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java 17 Sep 2010 14:38:38 -0000 1.17 >+++ src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java 17 Sep 2010 15:51:34 -0000 >@@ -874,23 +874,8 @@ > // fall through and let the new editable get created > } > else { >- if (descriptor != null){ >- // using reflection to change descriptor since there's >- // no API right now >- try { >- Class cls = editable.getClass(); >- Field[] fields = cls.getDeclaredFields(); >- for (int i = 0; i < fields.length; i++){ >- Field fld = fields[i]; >- String name= fld.getName(); >- if (name.equals("_editorDescriptor")){ //$NON-NLS-1$ >- fld.setAccessible(true); >- fld.set(editable, descriptor); >- } >- } >- } >- catch (Exception e){ >- } >+ if (descriptor != null){ // update the editor descriptor >+ editable.setEditorDescriptor(descriptor); > } > return editable; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 325502
:
179054
| 179129