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 154873 Details for
Bug 286219
[Edit][Actions] Can't do any team action from compare editors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v01
bug286219.txt (text/plain), 4.33 KB, created by
Tomasz Zarna
on 2009-12-21 08:39:40 EST
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2009-12-21 08:39:40 EST
Size:
4.33 KB
patch
obsolete
>diff --git a/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java >index 4b93795..05f4043 100644 >--- a/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java >+++ b/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java >@@ -39,6 +39,7 @@ import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.ListenerList; > import org.eclipse.core.runtime.OperationCanceledException; >+import org.eclipse.core.runtime.PlatformObject; > import org.eclipse.core.runtime.Status; > import org.eclipse.core.runtime.jobs.Job; > import org.eclipse.jface.action.IStatusLineManager; >@@ -143,7 +144,7 @@ import org.eclipse.ui.texteditor.ITextEditorExtension3; > * @see CompareUI > * @see CompareEditorInput > */ >-public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress, ICompareContainer { >+public abstract class CompareEditorInput extends PlatformObject implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress, ICompareContainer { > > private static final boolean DEBUG= false; > >@@ -329,7 +330,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang > } > } > >- return null; >+ return super.getAdapter(adapter); > } > > public synchronized ICompareNavigator getNavigator() { >diff --git a/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java b/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java >new file mode 100644 >index 0000000..5e23a78 >--- /dev/null >+++ b/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java >@@ -0,0 +1,33 @@ >+package org.eclipse.compare.internal; >+ >+import org.eclipse.compare.CompareEditorInput; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IAdapterFactory; >+import org.eclipse.ui.IContributorResourceAdapter; >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IFileEditorInput; >+ >+public class AdapterFactory implements IAdapterFactory { >+ >+ public Object getAdapter(final Object adaptableObject, Class adapterType) { >+ if (IContributorResourceAdapter.class.equals(adapterType) >+ && adaptableObject instanceof CompareEditorInput) { >+ return new IContributorResourceAdapter() { >+ public IResource getAdaptedResource(IAdaptable adaptable) { >+ Object ei = ((CompareEditorInput) adaptableObject) >+ .getAdapter(IEditorInput.class); >+ if (ei instanceof IFileEditorInput) { >+ return ((IFileEditorInput) ei).getFile(); >+ } >+ return null; >+ } >+ }; >+ } >+ return null; >+ } >+ >+ public Class[] getAdapterList() { >+ return new Class[] { IContributorResourceAdapter.class }; >+ } >+} >diff --git a/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java >index 2fcf55d..a3a9c9c 100644 >--- a/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java >+++ b/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java >@@ -111,7 +111,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea > public void registerContextMenu(MenuManager menu, ISelectionProvider provider) { > if (getSite() instanceof IEditorSite) { > IEditorSite es = (IEditorSite) getSite(); >- es.registerContextMenu(menu, provider, false); >+ es.registerContextMenu(menu, provider, true); > } > } > >diff --git a/plugins/org.eclipse.compare/plugin.xml b/plugins/org.eclipse.compare/plugin.xml >index fae1799..55dd505 100644 >--- a/plugins/org.eclipse.compare/plugin.xml >+++ b/plugins/org.eclipse.compare/plugin.xml >@@ -340,5 +340,15 @@ > class="org.eclipse.compare.internal.ComparePreferenceInitializer"> > </initializer> > </extension> >+ <extension >+ point="org.eclipse.core.runtime.adapters"> >+ <factory >+ adaptableType="org.eclipse.compare.CompareEditorInput" >+ class="org.eclipse.compare.internal.AdapterFactory"> >+ <adapter >+ type="org.eclipse.ui.IContributorResourceAdapter"> >+ </adapter> >+ </factory> >+ </extension> > > </plugin>
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 286219
:
154873
|
154874
|
164367