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 122539 Details for
Bug 261025
[Viewers] Changing encoding in compare editor doesn't trigger structured differences recalculation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_v01
261025_v01.txt (text/plain), 6.03 KB, created by
Pawel Pogorzelski
on 2009-01-14 10:26:36 EST
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2009-01-14 10:26:36 EST
Size:
6.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/CompareConfiguration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java,v >retrieving revision 1.45 >diff -u -r1.45 CompareConfiguration.java >--- compare/org/eclipse/compare/CompareConfiguration.java 24 Jul 2007 13:35:01 -0000 1.45 >+++ compare/org/eclipse/compare/CompareConfiguration.java 14 Jan 2009 15:11:15 -0000 >@@ -56,7 +56,11 @@ > * @since 3.0 > */ > public static final String USE_OUTLINE_VIEW= "USE_OUTLINE_VIEW"; //$NON-NLS-1$ >- >+ >+ public static final String ANCESTOR_ENCODING = "ANCESTOR_ENCODING"; //$NON-NLS-1$ >+ public static final String LEFT_ENCODING = "LEFT_ENCODING"; //$NON-NLS-1$ >+ public static final String RIGHT_ENCODING = "RIGHT_ENCODING"; //$NON-NLS-1$ >+ > private static ImageDescriptor[] fgImages= new ImageDescriptor[16]; > private static boolean fLeftIsLocal= true; > >Index: compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java,v >retrieving revision 1.48 >diff -u -r1.48 StructureDiffViewer.java >--- compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java 3 Jun 2008 13:35:49 -0000 1.48 >+++ compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java 14 Jan 2009 15:11:16 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -631,8 +631,18 @@ > */ > protected void propertyChange(PropertyChangeEvent event) { > String key= event.getProperty(); >- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)) >+ if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)) { > diff(); >+ } else if (key.equals(CompareConfiguration.ANCESTOR_ENCODING)) { >+ fAncestorStructure.refresh(new NullProgressMonitor()); >+ diff(); >+ } else if (key.equals(CompareConfiguration.LEFT_ENCODING)) { >+ fLeftStructure.refresh(new NullProgressMonitor()); >+ diff(); >+ } else if (key.equals(CompareConfiguration.RIGHT_ENCODING)) { >+ fRightStructure.refresh(new NullProgressMonitor()); >+ diff(); >+ } > else > super.propertyChange(event); > } >Index: compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java,v >retrieving revision 1.241 >diff -u -r1.241 TextMergeViewer.java >--- compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java 12 Jan 2009 12:33:00 -0000 1.241 >+++ compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java 14 Jan 2009 15:11:16 -0000 >@@ -553,7 +553,7 @@ > } catch (CoreException e) { > CompareUIPlugin.log(e); > } finally { >- update(true); >+ encodingChanged(fLeg); > } > } > } >@@ -579,6 +579,14 @@ > } > > private String internalGetEncoding() { >+ if (fElement instanceof IEncodedStreamContentAccessor) { >+ try { >+ fEncoding = ((IEncodedStreamContentAccessor) fElement) >+ .getCharset(); >+ } catch (CoreException e) { >+ // silently ignored >+ } >+ } > if (fEncoding != null) { > return fEncoding; > } >@@ -1007,7 +1015,7 @@ > // recalculate diffs and update controls > new UIJob(CompareMessages.DocumentMerger_0) { > public IStatus runInUIThread(IProgressMonitor monitor) { >- update(true); >+ encodingChanged(fLeg); > return Status.OK_STATUS; > } > }.schedule(); >@@ -5176,4 +5184,26 @@ > } > }; > } >+ >+ public void encodingChanged(char leg) { >+ update(true); >+ ContributorInfo info = null; >+ String key = null; >+ switch (leg) { >+ case ANCESTOR_CONTRIBUTOR: >+ info = fAncestorContributor; >+ key = CompareConfiguration.ANCESTOR_ENCODING; >+ break; >+ case LEFT_CONTRIBUTOR: >+ info = fLeftContributor; >+ key = CompareConfiguration.LEFT_ENCODING; >+ break; >+ case RIGHT_CONTRIBUTOR: >+ info = fRightContributor; >+ key = CompareConfiguration.RIGHT_ENCODING; >+ break; >+ } >+ getCompareConfiguration().setProperty(key, info.getEncoding()); >+ } >+ > } >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java,v >retrieving revision 1.19 >diff -u -r1.19 ResourceEditionNode.java >--- src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java 6 Jan 2009 16:49:54 -0000 1.19 >+++ src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java 14 Jan 2009 15:11:18 -0000 >@@ -37,6 +37,7 @@ > private ICVSRemoteResource resource; > private ResourceEditionNode[] children; > private ISharedDocumentAdapter sharedDocumentAdapter; >+ private IEditorInput editorInput; > > /** > * Creates a new ResourceEditionNode on the given resource edition. >@@ -208,8 +209,11 @@ > private IEditorInput getDocumentKey(Object element) { > try { > if (element == this && getStorage() != null) { >- return new FileRevisionEditorInput(resource >- .getAdapter(IFileRevision.class), getStorage()); >+ if (editorInput == null) { >+ editorInput = new FileRevisionEditorInput(resource >+ .getAdapter(IFileRevision.class), getStorage()); >+ } >+ return editorInput; > } > } catch (TeamException e) { > TeamUIPlugin.log(e);
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 261025
:
122539
|
122678
|
122787