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 159412 Details for
Bug 291213
[Sync View] Linking from Sync view to compare editors doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v02
clipboard.txt (text/plain), 3.83 KB, created by
Tomasz Zarna
on 2010-02-18 06:14:39 EST
(
hide
)
Description:
Fix v02
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2010-02-18 06:14:39 EST
Size:
3.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/internal/CompareEditorMatchingStrategy.java >=================================================================== >RCS file: compare/org/eclipse/compare/internal/CompareEditorMatchingStrategy.java >diff -N compare/org/eclipse/compare/internal/CompareEditorMatchingStrategy.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compare/org/eclipse/compare/internal/CompareEditorMatchingStrategy.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,55 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.compare.internal; >+ >+import org.eclipse.compare.CompareEditorInput; >+import org.eclipse.compare.ITypedElement; >+import org.eclipse.compare.ResourceNode; >+import org.eclipse.compare.structuremergeviewer.ICompareInput; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IEditorMatchingStrategy; >+import org.eclipse.ui.IEditorReference; >+import org.eclipse.ui.part.FileEditorInput; >+ >+public class CompareEditorMatchingStrategy implements IEditorMatchingStrategy { >+ >+ public boolean matches(IEditorReference editorRef, IEditorInput input) { >+ if (input instanceof FileEditorInput) { >+ IFile file = ((FileEditorInput) input).getFile(); >+ >+ CompareEditor ce = (CompareEditor) editorRef.getPart(false); >+ CompareEditorInput cei = (CompareEditorInput) ce.getEditorInput(); >+ Object compareResult = cei.getCompareResult(); >+ >+ if (compareResult instanceof IAdaptable) { >+ IResource r = (IResource) ((IAdaptable) compareResult) >+ .getAdapter(IResource.class); >+ if (r != null) >+ return file.equals(r); >+ } >+ if (compareResult instanceof ICompareInput) { >+ ICompareInput compareInput = (ICompareInput) compareResult; >+ ITypedElement left = compareInput.getLeft(); >+ if (left instanceof ResourceNode) >+ if (file.equals(((ResourceNode) left).getResource())) >+ return true; >+ ITypedElement right = compareInput.getRight(); >+ if (right instanceof ResourceNode) >+ if (file.equals(((ResourceNode) right).getResource())) >+ return true; >+ } >+ } >+ return false; >+ } >+} >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml,v >retrieving revision 1.70 >diff -u -r1.70 plugin.xml >--- plugin.xml 23 Mar 2009 14:10:49 -0000 1.70 >+++ plugin.xml 18 Feb 2010 11:12:40 -0000 >@@ -77,11 +77,12 @@ > <extension > point="org.eclipse.ui.editors"> > <editor >- name="%defaultCompareEditor.name" >- icon="$nl$/icons/full/eview16/compare_view.gif" >- contributorClass="org.eclipse.compare.internal.CompareEditorContributor" > class="org.eclipse.compare.internal.CompareEditor" >- id="org.eclipse.compare.CompareEditor"> >+ contributorClass="org.eclipse.compare.internal.CompareEditorContributor" >+ icon="$nl$/icons/full/eview16/compare_view.gif" >+ id="org.eclipse.compare.CompareEditor" >+ matchingStrategy="org.eclipse.compare.internal.CompareEditorMatchingStrategy" >+ name="%defaultCompareEditor.name"> > </editor> > </extension> >
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 291213
:
159165
|
159166
|
159412
|
159772