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 13555 Details for
Bug 58179
[misc] Problems with opening external files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch
(text/plain), 3.39 KB, created by
Matt Liotta
on 2004-07-22 20:32:41 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Matt Liotta
Created:
2004-07-22 20:32:41 EDT
Size:
3.39 KB
patch
obsolete
>Index: templates/editor/java/XMLDocumentProvider.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/templates/editor/java/XMLDocumentProvider.java,v >retrieving revision 1.6 >diff -u -r1.6 XMLDocumentProvider.java >--- templates/editor/java/XMLDocumentProvider.java 16 Jun 2003 20:29:27 -0000 1.6 >+++ templates/editor/java/XMLDocumentProvider.java 23 Jul 2004 00:20:38 -0000 >@@ -1,10 +1,15 @@ > package $packageName$; > >+import java.io.FileInputStream; >+import java.io.FileNotFoundException; >+ > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jface.text.IDocument; > import org.eclipse.jface.text.IDocumentPartitioner; > import org.eclipse.jface.text.rules.DefaultPartitioner; > import org.eclipse.ui.editors.text.FileDocumentProvider; >+import org.eclipse.ui.internal.editors.text.JavaFileEditorInput; > > public class XMLDocumentProvider extends FileDocumentProvider { > >@@ -21,5 +26,19 @@ > document.setDocumentPartitioner(partitioner); > } > return document; >+ } >+ >+ protected boolean setDocumentContent(IDocument document, IEditorInput editorInput, String encoding) throws CoreException { >+ if (editorInput instanceof JavaFileEditorInput) { >+ JavaFileEditorInput input = (JavaFileEditorInput) editorInput; >+ FileInputStream contentStream = null; >+ try { >+ contentStream = new FileInputStream(input.getPath(editorInput).toFile()); >+ } catch (FileNotFoundException e) { >+ e.printStackTrace(); >+ } >+ setDocumentContent(document, contentStream, encoding); >+ } >+ return super.setDocumentContent(document, editorInput, encoding); > } > } >Index: templates_3.0/editor/java/XMLDocumentProvider.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/templates_3.0/editor/java/XMLDocumentProvider.java,v >retrieving revision 1.1 >diff -u -r1.1 XMLDocumentProvider.java >--- templates_3.0/editor/java/XMLDocumentProvider.java 10 Nov 2003 21:13:35 -0000 1.1 >+++ templates_3.0/editor/java/XMLDocumentProvider.java 23 Jul 2004 00:20:38 -0000 >@@ -1,10 +1,15 @@ > package $packageName$; > >+import java.io.FileInputStream; >+import java.io.FileNotFoundException; >+ > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jface.text.IDocument; > import org.eclipse.jface.text.IDocumentPartitioner; > import org.eclipse.jface.text.rules.DefaultPartitioner; > import org.eclipse.ui.editors.text.FileDocumentProvider; >+import org.eclipse.ui.internal.editors.text.JavaFileEditorInput; > > public class XMLDocumentProvider extends FileDocumentProvider { > >@@ -21,5 +26,19 @@ > document.setDocumentPartitioner(partitioner); > } > return document; >+ } >+ >+ protected boolean setDocumentContent(IDocument document, IEditorInput editorInput, String encoding) throws CoreException { >+ if (editorInput instanceof JavaFileEditorInput) { >+ JavaFileEditorInput input = (JavaFileEditorInput) editorInput; >+ FileInputStream contentStream = null; >+ try { >+ contentStream = new FileInputStream(input.getPath(editorInput).toFile()); >+ } catch (FileNotFoundException e) { >+ e.printStackTrace(); >+ } >+ setDocumentContent(document, contentStream, encoding); >+ } >+ return super.setDocumentContent(document, editorInput, encoding); > } > }
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 58179
:
13555