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 30371 Details for
Bug 107320
StructuredTextEitor#setInput() creates another IStructuredModel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
my trial patch
org.eclipse.wst.sse.core.107320.patch (text/plain), 3.27 KB, created by
Hirotaka Matsumoto
on 2005-11-22 07:34:57 EST
(
hide
)
Description:
my trial patch
Filename:
MIME Type:
Creator:
Hirotaka Matsumoto
Created:
2005-11-22 07:34:57 EST
Size:
3.27 KB
patch
obsolete
>Index: src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java >=================================================================== >RCS file: /home/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java,v >retrieving revision 1.30 >diff -u -r1.30 FileBufferModelManager.java >--- src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java 15 Nov 2005 22:57:07 -0000 1.30 >+++ src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java 22 Nov 2005 12:34:22 -0000 >@@ -366,7 +366,7 @@ > } > > String id = null; >- IPath path = file.getLocation(); >+ IPath path = file.getFullPath(); > if (path != null) { > /* > * The ID of models must be the same as the normalized paths >@@ -533,31 +533,36 @@ > if (Logger.DEBUG_FILEBUFFERMODELMANAGEMENT) { > Logger.log(Logger.INFO, "FileBufferModelManager connecting to IFile " + file.getLocation()); //$NON-NLS-1$ > } >- bufferManager.connect(file.getLocation(), getProgressMonitor()); >- ITextFileBuffer buffer = bufferManager.getTextFileBuffer(file.getLocation()); >- if (buffer != null) { >- DocumentInfo info = (DocumentInfo) fDocumentMap.get(buffer.getDocument()); >- if (info != null) { >+ // see TextFileDocumentProvider#createFileInfo about why we use IFile#getFullPath >+ // here, not IFile#getLocation. >+ IPath location= file.getFullPath(); >+ if (location != null) { >+ bufferManager.connect(location, getProgressMonitor()); >+ ITextFileBuffer buffer = bufferManager.getTextFileBuffer(location); >+ if (buffer != null) { >+ DocumentInfo info = (DocumentInfo) fDocumentMap.get(buffer.getDocument()); >+ if (info != null) { >+ /* >+ * Note: "info" being null at this point is a slight >+ * error. >+ * >+ * The connect call from above (or at some time earlier in >+ * the session) would have notified the FileBufferMapper >+ * of the creation of the corresponding text buffer and >+ * created the DocumentInfo object for >+ * IStructuredDocuments. >+ */ >+ info.selfConnected = true; >+ } > /* >- * Note: "info" being null at this point is a slight >- * error. >- * >- * The connect call from above (or at some time earlier in >- * the session) would have notified the FileBufferMapper >- * of the creation of the corresponding text buffer and >- * created the DocumentInfo object for >- * IStructuredDocuments. >+ * Check the document type. Although returning null for >+ * unknown documents would be fair, try to get a model if the >+ * document is at least a valid type. > */ >- info.selfConnected = true; >- } >- /* >- * Check the document type. Although returning null for >- * unknown documents would be fair, try to get a model if the >- * document is at least a valid type. >- */ >- IDocument bufferDocument = buffer.getDocument(); >- if (bufferDocument instanceof IStructuredDocument) { >- model = getModel((IStructuredDocument) bufferDocument); >+ IDocument bufferDocument = buffer.getDocument(); >+ if (bufferDocument instanceof IStructuredDocument) { >+ model = getModel((IStructuredDocument) bufferDocument); >+ } > } > } > }
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 107320
: 30371