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 129431 Details for
Bug 264498
[Dialogs] Add Compare with Other Resource dialog to popup menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch removing the action from menu
clipboard.txt (text/plain), 5.85 KB, created by
Tomasz Zarna
on 2009-03-20 05:41:43 EDT
(
hide
)
Description:
Patch removing the action from menu
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2009-03-20 05:41:43 EDT
Size:
5.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/internal/CompareWithOtherResourceAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithOtherResourceAction.java,v >retrieving revision 1.3 >diff -u -r1.3 CompareWithOtherResourceAction.java >--- compare/org/eclipse/compare/internal/CompareWithOtherResourceAction.java 16 Sep 2008 14:03:31 -0000 1.3 >+++ compare/org/eclipse/compare/internal/CompareWithOtherResourceAction.java 20 Mar 2009 09:39:20 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008 Aleksandra Wozniak and others. >+ * Copyright (c) 2008, 2009 Aleksandra Wozniak 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 >@@ -7,7 +7,7 @@ > * > * Contributors: > * Aleksandra Wozniak (aleksandra.k.wozniak@gmail.com) - initial implementation >- * IBM Corporation - Bug 73923 (major refactoring and adjustments) >+ * IBM Corporation - maintenance > *******************************************************************************/ > package org.eclipse.compare.internal; > >@@ -15,7 +15,10 @@ > import org.eclipse.jface.viewers.IStructuredSelection; > > /** >- * The "Compare with other resource" action >+ * The "Compare with other resource" action. >+ * >+ * @deprecated Temporarily replaced by CompareWithOtherResourceHandler. See bug >+ * 264498. > */ > public class CompareWithOtherResourceAction extends CompareAction { > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml,v >retrieving revision 1.69 >diff -u -r1.69 plugin.xml >--- plugin.xml 27 Feb 2009 12:44:07 -0000 1.69 >+++ plugin.xml 20 Mar 2009 09:39:20 -0000 >@@ -166,6 +166,7 @@ > </command> > <command > categoryId="org.eclipse.compare.ui.category.compare" >+ defaultHandler="org.eclipse.compare.internal.CompareWithOtherResourceHandler" > description="%Command.compareWithOther.description" > id="org.eclipse.compare.compareWithOther" > name="%Command.compareWithOther.name"> >@@ -207,15 +208,6 @@ > enablesFor="2+" > id="compareWithEachOther"> > </action> >- <action >- class="org.eclipse.compare.internal.CompareWithOtherResourceAction" >- definitionId="org.eclipse.compare.compareWithOther" >- enablesFor="*" >- id="compareWithOtherResource" >- label="%CompareWithOtherResource.label" >- menubarPath="compareWithMenu/compareWithGroup" >- tooltip="%CompareWithOtherResourceAction.tooltip"> >- </action> > </objectContribution> > <objectContribution > objectClass="org.eclipse.core.resources.IFile" >Index: compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java >=================================================================== >RCS file: compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java >diff -N compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+/******************************************************************************* >+ * Copyright (c) 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.compare.internal; >+import org.eclipse.compare.CompareConfiguration; >+import org.eclipse.compare.CompareUI; >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.handlers.HandlerUtil; >+ >+/** >+ * This is a temporarily replacement for CompareWithOtherResourceAction which >+ * was available from "Compare With > Other Resource...". See bug 264498. >+ */ >+public class CompareWithOtherResourceHandler extends AbstractHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ ISelection selection = HandlerUtil.getCurrentSelection(event); >+ IWorkbenchPage workbenchPage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage(); >+ >+ // CompareAction#isEnabled(ISelection) >+ CompareConfiguration cc= new CompareConfiguration(); >+ cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false)); >+ ResourceCompareInput input= new ResourceCompareInput(cc); >+ >+ int selectionSize = 0; >+ if (selection instanceof IStructuredSelection) { >+ selectionSize = ((IStructuredSelection) selection).toArray().length; >+ } >+ if (input.isEnabled(selection) || selectionSize == 1) { >+ >+ // CompareAction#run(ISelection) >+ if (!input.setSelection(selection, workbenchPage.getWorkbenchWindow().getShell(), false)) >+ return null; >+ input.initializeCompareConfiguration(); >+ CompareUI.openCompareEditorOnPage(input, workbenchPage); >+ } >+ return null; >+ } >+ >+}
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 264498
: 129431 |
129432