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 129955 Details for
Bug 215328
[Change Sets] Open action from the popup menu on a change set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v01
215328_20090326.txt (text/plain), 4.08 KB, created by
Szymon Brandys
on 2009-03-26 07:58:15 EDT
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2009-03-26 07:58:15 EDT
Size:
4.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java,v >retrieving revision 1.25 >diff -u -r1.25 OpenWithActionGroup.java >--- src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java 22 May 2007 20:19:53 -0000 1.25 >+++ src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java 26 Mar 2009 11:58:20 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 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 >@@ -80,36 +80,43 @@ > return; > Object[] elements = selection.toArray(); > IResource resources[] = Utils.getResources(elements); >- if(resources.length == 0 && openInCompareAction != null) { >- // We can still show the compare editor open if the element has a compare input >- if (elements.length > 0) { >- ISynchronizeParticipant participant = getParticipant(); >- if (participant instanceof ModelSynchronizeParticipant) { >- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; >- boolean allElementsHaveCompareInput = true; >- for (int i = 0; i < elements.length; i++) { >- if (!msp.hasCompareInputFor(elements[i])) { >- allElementsHaveCompareInput = false; >- break; >+ if (resources.length == 0) { >+ if (openInCompareAction != null) { >+ // We can still show the compare editor open if the element has >+ // a compare input >+ if (elements.length > 0) { >+ ISynchronizeParticipant participant = getParticipant(); >+ if (participant instanceof ModelSynchronizeParticipant) { >+ ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; >+ boolean allElementsHaveCompareInput = true; >+ for (int i = 0; i < elements.length; i++) { >+ if (!msp.hasCompareInputFor(elements[i])) { >+ allElementsHaveCompareInput = false; >+ break; >+ } >+ } >+ if (allElementsHaveCompareInput) { >+ menu.appendToGroup(groupId, openInCompareAction); > } > } >- if (allElementsHaveCompareInput) { >- menu.appendToGroup(groupId, openInCompareAction); >- } > } >- } >- return; >+ } >+ return; >+ } >+ >+ if (elements.length != resources.length){ >+ // Only supported if all the items are resources. >+ return; > } > >- for (int i = 0; i < resources.length; i++) { >- if (resources[i].getType() != IResource.FILE) { >- // Only supported if all the items are files. >- return; >- } >- } >+ for (int i = 0; i < resources.length; i++) { >+ if (resources[i].getType() != IResource.FILE) { >+ // Only supported if all the items are files. >+ return; >+ } >+ } > >- if (resources.length > 0 && openInCompareAction != null) { >- // Support multiple files selected >+ if (openInCompareAction != null) { > menu.appendToGroup(groupId, openInCompareAction); > } > >@@ -120,10 +127,10 @@ > } > } > >- if (openFileAction != null) { >- openFileAction.selectionChanged(selection); >- menu.appendToGroup(groupId, openFileAction); >- } >+ if (openFileAction != null) { >+ openFileAction.selectionChanged(selection); >+ menu.appendToGroup(groupId, openFileAction); >+ } > > if (resources.length == 1) { > // Only support the "Open With..." submenu if exactly one file is selected.
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 215328
: 129955