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 123960 Details for
Bug 251245
[editor] Failed to execute select all
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply to org.eclipse.wst.wsdl.ui
bug251245-DesignSelectAll-patch.txt (text/plain), 6.36 KB, created by
Keith Chong
on 2009-01-27 17:32:39 EST
(
hide
)
Description:
Apply to org.eclipse.wst.wsdl.ui
Filename:
MIME Type:
Creator:
Keith Chong
Created:
2009-01-27 17:32:39 EST
Size:
6.36 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.wsdl.ui >Index: src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/WSDLActionBarContributor.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/WSDLActionBarContributor.java,v >retrieving revision 1.13 >diff -u -r1.13 WSDLActionBarContributor.java >--- src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/WSDLActionBarContributor.java 24 Nov 2008 07:21:44 -0000 1.13 >+++ src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/WSDLActionBarContributor.java 27 Jan 2009 22:31:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2001, 2008 IBM Corporation and others. >+ * Copyright (c) 2001, 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 >@@ -119,6 +119,7 @@ > actionBars.setGlobalActionHandler(GEFActionConstants.ZOOM_IN, registry.getAction(GEFActionConstants.ZOOM_IN)); > actionBars.setGlobalActionHandler(GEFActionConstants.ZOOM_OUT, registry.getAction(GEFActionConstants.ZOOM_OUT)); > actionBars.setGlobalActionHandler(ActionFactory.PRINT.getId(), registry.getAction(ActionFactory.PRINT.getId())); >+ actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), registry.getAction(ActionFactory.SELECT_ALL.getId())); > zoomInRetargetAction.setEnabled(true); > zoomOutRetargetAction.setEnabled(true); > captureScreenAction.setEnabled(true); >Index: src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java,v >retrieving revision 1.34 >diff -u -r1.34 InternalWSDLMultiPageEditor.java >--- src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java 23 Jul 2008 22:21:13 -0000 1.34 >+++ src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java 27 Jan 2009 22:31:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2001, 2008 IBM Corporation and others. >+ * Copyright (c) 2001, 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 >@@ -60,6 +60,7 @@ > import org.eclipse.wst.wsdl.ui.internal.adapters.basic.W11Type; > import org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor; > import org.eclipse.wst.wsdl.ui.internal.asd.actions.ASDAddMessageAction; >+import org.eclipse.wst.wsdl.ui.internal.asd.actions.ASDDesignSelectAll; > import org.eclipse.wst.wsdl.ui.internal.asd.actions.ASDDirectEditAction; > import org.eclipse.wst.wsdl.ui.internal.asd.actions.BaseSelectionAction; > import org.eclipse.wst.wsdl.ui.internal.asd.design.DesignViewGraphicalViewer; >@@ -457,6 +458,10 @@ > ActionRegistry registry = getActionRegistry(); > BaseSelectionAction action; > if (!isFileReadOnly()) { >+ action = new ASDDesignSelectAll(this); >+ action.setSelectionProvider(getSelectionManager()); >+ registry.registerAction(action); >+ > action = new ASDAddMessageAction(this); > action.setSelectionProvider(getSelectionManager()); > registry.registerAction(action); >Index: src-asd/org/eclipse/wst/wsdl/ui/internal/asd/actions/ASDDesignSelectAll.java >=================================================================== >RCS file: src-asd/org/eclipse/wst/wsdl/ui/internal/asd/actions/ASDDesignSelectAll.java >diff -N src-asd/org/eclipse/wst/wsdl/ui/internal/asd/actions/ASDDesignSelectAll.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-asd/org/eclipse/wst/wsdl/ui/internal/asd/actions/ASDDesignSelectAll.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,62 @@ >+/******************************************************************************* >+ * 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.wst.wsdl.ui.internal.asd.actions; >+ >+import java.util.ArrayList; >+import java.util.Iterator; >+import java.util.List; >+ >+import org.eclipse.gef.EditPart; >+import org.eclipse.gef.GraphicalEditPart; >+import org.eclipse.gef.GraphicalViewer; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.actions.ActionFactory; >+import org.eclipse.wst.xsd.ui.internal.adt.editor.CommonMultiPageEditor; >+import org.eclipse.wst.xsd.ui.internal.adt.editor.Messages; >+ >+public class ASDDesignSelectAll extends BaseSelectionAction { >+ private GraphicalViewer graphicalViewer; >+ private List selected; >+ >+ public ASDDesignSelectAll(IWorkbenchPart part) { >+ super(part); >+ setId(ActionFactory.SELECT_ALL.getId()); >+ setText(Messages._UI_ACTION_SELECT_ALL); >+ } >+ >+ public void run() { >+ super.run(); >+ >+ IWorkbenchPart part = getWorkbenchPart(); >+ selected = new ArrayList(); >+ if (part instanceof CommonMultiPageEditor) { >+ graphicalViewer = (GraphicalViewer) ((CommonMultiPageEditor) part).getAdapter(GraphicalViewer.class); >+ if (graphicalViewer != null) { >+ EditPart editPart = graphicalViewer.getContents(); >+ doSelectChildren(editPart); >+ >+ graphicalViewer.setSelection(new StructuredSelection(selected)); >+ } >+ } >+ } >+ >+ private void doSelectChildren(EditPart editPart) { >+ List list = editPart.getChildren(); >+ for (Iterator i = list.iterator(); i.hasNext();) { >+ Object o = i.next(); >+ if (o instanceof GraphicalEditPart) { >+ selected.add(o); >+ doSelectChildren((GraphicalEditPart) o); >+ } >+ } >+ } >+}
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 251245
: 123960 |
123994