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 204202 Details for
Bug 347557
[Edit] NPE when saving a file in a compare editor (always)
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]
org.eclipse.teamui fix v02
patch_347557.txt (text/plain), 3.40 KB, created by
Malgorzata Janczarska
on 2011-09-28 12:38:05 EDT
(
hide
)
Description:
org.eclipse.teamui fix v02
Filename:
MIME Type:
Creator:
Malgorzata Janczarska
Created:
2011-09-28 12:38:05 EDT
Size:
3.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java,v >retrieving revision 1.11 >diff -u -r1.11 LocalResourceSaveableComparison.java >--- src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java 15 Apr 2011 11:51:01 -0000 1.11 >+++ src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java 28 Sep 2011 16:04:43 -0000 >@@ -41,6 +41,7 @@ > > private final ICompareInput input; > private final CompareEditorInput editorInput; >+ private boolean isEditorInputSaveNeeded; > private boolean isSaving; > private IContentChangeListener contentChangeListener; > private ITypedElement fileElement; >@@ -65,6 +66,12 @@ > this.input = input; > this.editorInput = editorInput; > this.fileElement = fileElement; >+ if(this.fileElement==null){ >+ //if there is no editor input we need to store dirty state >+ //because we don't know which editorInput does this Comparison refer to >+ //this variable stores conjunction of the dirty state of both sites of the editor >+ isEditorInputSaveNeeded = false; >+ } > initializeContentChangeListeners(); > } > >@@ -210,6 +217,9 @@ > * @see org.eclipse.team.ui.mapping.SaveableCompareModel#isDirty() > */ > public boolean isDirty() { >+ if(editorInput==null) >+ return isEditorInputSaveNeeded; >+ > // We need to get the dirty state from the compare editor input > // since it is our only connection to the merge viewer > if (editorInput instanceof SaveablesCompareEditorInput) { >@@ -227,6 +237,9 @@ > this); > return; > } >+ if(editorInput==null) >+ isEditorInputSaveNeeded = dirty; >+ else > // We need to set the dirty state on the compare editor input > // since it is our only connection to the merge viewer > editorInput.setDirty(dirty); >@@ -247,10 +260,10 @@ > */ > public String getName() { > // Return the name of the file element as held in the compare input >- if (fileElement.equals(input.getLeft())) { >+ if (input.getLeft().equals(fileElement)) { > return input.getLeft().getName(); > } >- if (fileElement.equals(input.getRight())) { >+ if (input.getRight().equals(fileElement)) { > return input.getRight().getName(); > } > // Fallback call returning name of the main non-null element of the input >@@ -288,20 +301,28 @@ > > ContentMergeViewer cmv = (ContentMergeViewer) e.getSource(); > >- if (fileElement.equals(input.getLeft())) { >+ if (input.getLeft().equals(fileElement)) { > if (changed && cmv.internalIsLeftDirty()) > setDirty(changed); > else if (!changed && !cmv.internalIsLeftDirty()) { > setDirty(changed); > } > } >- if (fileElement.equals(input.getRight())) { >+ if (input.getRight().equals(fileElement)) { > if (changed && cmv.internalIsRightDirty()) > setDirty(changed); > else if (!changed && !cmv.internalIsRightDirty()) { > setDirty(changed); > } > } >+ >+ if(fileElement==null){ >+ if(changed && (cmv.internalIsLeftDirty() || cmv.internalIsRightDirty())) >+ setDirty(changed); >+ if(!changed && !cmv.internalIsLeftDirty() && !cmv.internalIsRightDirty()) >+ setDirty(changed); >+ } >+ > } > } >
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 347557
:
201902
|
201906
|
204202
|
204452
|
204457
|
204502
|
204754
|
204957
|
205359
|
205361
|
205407
|
205708