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 54669 Details for
Bug 152706
"Ctrl+D" key stroke should be prohibited in outline view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
Patch_152706 (text/plain), 7.22 KB, created by
Alex Boyko
on 2006-11-28 15:03:56 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Alex Boyko
Created:
2006-11-28 15:03:56 EST
Size:
7.22 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.runtime.common.ui >Index: src/org/eclipse/gmf/runtime/common/ui/action/AbstractActionHandler.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui/src/org/eclipse/gmf/runtime/common/ui/action/AbstractActionHandler.java,v >retrieving revision 1.8 >diff -u -r1.8 AbstractActionHandler.java >--- src/org/eclipse/gmf/runtime/common/ui/action/AbstractActionHandler.java 3 Oct 2006 14:51:25 -0000 1.8 >+++ src/org/eclipse/gmf/runtime/common/ui/action/AbstractActionHandler.java 28 Nov 2006 20:00:24 -0000 >@@ -40,6 +40,7 @@ > import org.eclipse.swt.widgets.Event; > import org.eclipse.ui.IPartListener; > import org.eclipse.ui.IPropertyListener; >+import org.eclipse.ui.ISelectionService; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.PlatformUI; >@@ -409,17 +410,20 @@ > * @return The current selection. > */ > protected ISelection getSelection() { >- ISelection selection = null; >- ISelectionProvider selectionProvider = getWorkbenchPart().getSite() >- .getSelectionProvider(); >+ ISelection selection = null; >+ ISelectionService selectionService = null; >+ if (getWorkbenchPart() != null && getWorkbenchPart().getSite().getWorkbenchWindow() != null) { >+ selectionService = getWorkbenchPart().getSite() >+ .getWorkbenchWindow().getSelectionService(); >+ } > >- if (selectionProvider != null) { >- selection = selectionProvider.getSelection(); >- } >+ if (selectionService != null) { >+ selection = selectionService.getSelection(); >+ } > >- return (selection != null) ? selection >- : StructuredSelection.EMPTY; >- } >+ return (selection != null) ? selection >+ : StructuredSelection.EMPTY; >+ } > > /** > * Retrieves the current structured selection. >@@ -427,20 +431,10 @@ > * @return The current structured selection. > */ > protected IStructuredSelection getStructuredSelection() { >- IStructuredSelection selection = null; >- ISelectionProvider selectionProvider = null; >- if (getWorkbenchPart() != null) { >- selectionProvider = getWorkbenchPart().getSite() >- .getSelectionProvider(); >- } >- >- if (selectionProvider != null >- && selectionProvider.getSelection() instanceof IStructuredSelection) { >- selection = (IStructuredSelection) selectionProvider.getSelection(); >- } >- return (selection != null) ? selection >- : StructuredSelection.EMPTY; >- } >+ ISelection selection = getSelection(); >+ return (selection instanceof StructuredSelection) ? (StructuredSelection) selection >+ : StructuredSelection.EMPTY; >+ } > > /** > * Retrieves a Boolean indicating whether this action handler can be run. >#P org.eclipse.gmf.runtime.diagram.ui >Index: src/org/eclipse/gmf/runtime/diagram/ui/internal/actions/DeleteFromModelAction.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/internal/actions/DeleteFromModelAction.java,v >retrieving revision 1.10 >diff -u -r1.10 DeleteFromModelAction.java >--- src/org/eclipse/gmf/runtime/diagram/ui/internal/actions/DeleteFromModelAction.java 3 Oct 2006 15:02:04 -0000 1.10 >+++ src/org/eclipse/gmf/runtime/diagram/ui/internal/actions/DeleteFromModelAction.java 28 Nov 2006 20:00:25 -0000 >@@ -22,8 +22,8 @@ > import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; > import org.eclipse.gmf.runtime.diagram.ui.actions.AbstractDeleteFromAction; > import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds; >-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; > import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy; >+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; > import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; > import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages; > import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; >@@ -82,9 +82,12 @@ > if (editPart instanceof IGraphicalEditPart) { > IGraphicalEditPart gEditPart = (IGraphicalEditPart) editPart; > View view = (View) gEditPart.getModel(); >+ // Disallow diagram deletion from model only if it is the top most diagram >+ EObject container = view.eContainer(); > EObject element = ViewUtil.resolveSemanticElement(view); > if ((element == null) || (element.eIsProxy()) >- || (element instanceof Diagram)) { >+ || (element instanceof Diagram) >+ || (view instanceof Diagram && (container == null || !(container instanceof View)))) { > return false; > } > } else { >@@ -133,9 +136,13 @@ > IGraphicalEditPart gEditPart = > (IGraphicalEditPart) editPart; > View view = (View)gEditPart.getModel(); >+ // Don't delete diagram from model only if it is the top most diagram >+ EObject container = view.eContainer(); > EObject element = ViewUtil.resolveSemanticElement(view); >- if(element instanceof Diagram) >+ if ((element instanceof Diagram) >+ || (view instanceof Diagram && (container == null || !(container instanceof View)))) { > return null; >+ } > } > Command curCommand = editPart.getCommand(request); > if (curCommand != null) { >Index: src/org/eclipse/gmf/runtime/diagram/ui/editparts/TreeEditPart.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/editparts/TreeEditPart.java,v >retrieving revision 1.2 >diff -u -r1.2 TreeEditPart.java >--- src/org/eclipse/gmf/runtime/diagram/ui/editparts/TreeEditPart.java 3 Oct 2006 15:02:03 -0000 1.2 >+++ src/org/eclipse/gmf/runtime/diagram/ui/editparts/TreeEditPart.java 28 Nov 2006 20:00:25 -0000 >@@ -18,7 +18,6 @@ > import org.eclipse.emf.edit.domain.IEditingDomainProvider; > import org.eclipse.emf.transaction.TransactionalEditingDomain; > import org.eclipse.emf.transaction.util.TransactionUtil; >-import org.eclipse.gef.EditPolicy; > import org.eclipse.gef.editparts.AbstractTreeEditPart; > import org.eclipse.gmf.runtime.common.ui.services.action.filter.ActionFilterService; > import org.eclipse.gmf.runtime.common.ui.services.icon.IconOptions; >@@ -29,7 +28,6 @@ > import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker; > import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener; > import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy; > import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; > import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; > import org.eclipse.gmf.runtime.notation.NotationPackage; >@@ -104,13 +102,6 @@ > super.deactivate(); > } > >- /** >- * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies() >- */ >- protected void createEditPolicies() { >- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy()); >- } >- > /** gets the model as a <code>View</code> > * @return View > */
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 152706
:
49951
|
53317
|
54631
| 54669