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 247293 Details for
Bug 361123
[patch] Feature editor won't allow copy and paste for license
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated Patch for Bug 361123
eclipse.pde.ui.patch (text/plain), 8.81 KB, created by
Himanshu Mishra
on 2014-09-23 07:20:59 EDT
(
hide
)
Description:
Updated Patch for Bug 361123
Filename:
MIME Type:
Creator:
Himanshu Mishra
Created:
2014-09-23 07:20:59 EDT
Size:
8.81 KB
patch
obsolete
>diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java >index 90fe03c..003061f 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java >@@ -1439,6 +1439,7 @@ > public static String EditorActions_cut; > public static String EditorActions_copy; > public static String EditorActions_paste; >+ public static String EditorActions_selectall; > public static String EditorActions_revert; > public static String Actions_open_label; > public static String Actions_delete_label; >diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditorContributor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditorContributor.java >index 395ea11..7ee6a75 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditorContributor.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormEditorContributor.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2012 IBM Corporation and others. >+ * Copyright (c) 2003, 2014 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 >@@ -10,8 +10,6 @@ > * Joern Dinkla <devnull@dinkla.com> - bug 197821 > *******************************************************************************/ > package org.eclipse.pde.internal.ui.editor; >- >-import org.eclipse.jface.action.Action; > > import java.util.Hashtable; > import org.eclipse.jface.action.*; >@@ -42,6 +40,8 @@ > private ClipboardAction fCopyAction; > > private ClipboardAction fPasteAction; >+ >+ private SelectAllAction fSelectAllAction; > > private Hashtable<String, Action> fGlobalActions = new Hashtable<String, Action>(); > >@@ -123,6 +123,15 @@ > } > } > >+ class SelectAllAction extends ClipboardAction { >+ public SelectAllAction() { >+ super(ActionFactory.SELECT_ALL.getId()); >+ setText(PDEUIMessages.EditorActions_selectall); >+ setActionDefinitionId(ActionFactory.SELECT_ALL.getCommandId()); >+ setEnabled(true); >+ } >+ } >+ > class SaveAction extends Action implements IUpdate { > public SaveAction() { > } >@@ -168,6 +177,8 @@ > mng.add(fCutAction); > mng.add(fCopyAction); > mng.add(fPasteAction); >+ mng.add(new Separator()); >+ mng.add(fSelectAllAction); > mng.add(new Separator()); > mng.add(fRevertAction); > } >@@ -221,6 +232,7 @@ > fCutAction = new CutAction(); > fCopyAction = new CopyAction(); > fPasteAction = new PasteAction(); >+ fSelectAllAction = new SelectAllAction(); > addGlobalAction(ActionFactory.CUT.getId(), fCutAction); > addGlobalAction(ActionFactory.COPY.getId(), fCopyAction); > addGlobalAction(ActionFactory.PASTE.getId(), fPasteAction); >@@ -229,7 +241,7 @@ > addGlobalAction(ActionFactory.UNDO.getId()); > addGlobalAction(ActionFactory.REDO.getId()); > // select/find >- addGlobalAction(ActionFactory.SELECT_ALL.getId()); >+ addGlobalAction(ActionFactory.SELECT_ALL.getId(), fSelectAllAction); > addGlobalAction(ActionFactory.FIND.getId()); > // bookmark > addGlobalAction(IDEActionFactory.BOOKMARK.getId()); >diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoSection.java >index 6fcf90c..dc498bd 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoSection.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoSection.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2014 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 >@@ -248,6 +248,8 @@ > } else if (actionId.equals(ActionFactory.REDO.getId())) { > fSourceViewer.doOperation(ITextOperationTarget.REDO); > return true; >+ } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.SELECT_ALL); > } > return false; > } >diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/LicenseFeatureSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/LicenseFeatureSection.java >index d319178..0be106f 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/LicenseFeatureSection.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/LicenseFeatureSection.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2010, 2012 IBM Corporation and others. >+ * Copyright (c) 2010, 2014 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 >@@ -10,14 +10,13 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.ui.editor.feature; > >-import org.eclipse.pde.internal.core.ifeature.IFeatureModel; >- > import java.util.ArrayList; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.jface.resource.JFaceResources; > import org.eclipse.jface.text.*; > import org.eclipse.jface.text.source.SourceViewer; > import org.eclipse.jface.text.source.SourceViewerConfiguration; >+import org.eclipse.jface.viewers.*; > import org.eclipse.jface.window.Window; > import org.eclipse.pde.core.IEditable; > import org.eclipse.pde.internal.core.PDECore; >@@ -29,10 +28,12 @@ > import org.eclipse.pde.internal.ui.editor.text.XMLConfiguration; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.*; >+import org.eclipse.swt.dnd.Clipboard; > import org.eclipse.swt.events.*; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.*; >+import org.eclipse.ui.actions.ActionFactory; > import org.eclipse.ui.forms.IFormColors; > import org.eclipse.ui.forms.widgets.*; > >@@ -175,6 +176,11 @@ > fSourceViewer = new SourceViewer(localLicenseComposite, null, styles); > fSourceViewer.configure(fSourceConfiguration); > fSourceViewer.setDocument(fDocument); >+ fSourceViewer.addSelectionChangedListener(new ISelectionChangedListener() { >+ public void selectionChanged(SelectionChangedEvent event) { >+ updateSelection(event.getSelection()); >+ } >+ }); > StyledText styledText = fSourceViewer.getTextWidget(); > styledText.setFont(JFaceResources.getTextFont()); > styledText.setMenu(getPage().getPDEEditor().getContextMenu()); >@@ -330,4 +336,37 @@ > } > super.commit(onSave); > } >+ >+ public boolean doGlobalAction(String actionId) { >+ if (actionId.equals(ActionFactory.CUT.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.CUT); >+ return true; >+ } else if (actionId.equals(ActionFactory.COPY.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.COPY); >+ return true; >+ } else if (actionId.equals(ActionFactory.PASTE.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.PASTE); >+ return true; >+ } else if (actionId.equals(ActionFactory.DELETE.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.DELETE); >+ return true; >+ } else if (actionId.equals(ActionFactory.UNDO.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.UNDO); >+ return true; >+ } else if (actionId.equals(ActionFactory.REDO.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.REDO); >+ return true; >+ } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) { >+ fSourceViewer.doOperation(ITextOperationTarget.SELECT_ALL); >+ } >+ return false; >+ } >+ >+ public boolean canPaste(Clipboard clipboard) { >+ return fSourceViewer.canDoOperation(ITextOperationTarget.PASTE); >+ } >+ >+ private void updateSelection(ISelection selection) { >+ getPage().getPDEEditor().setSelection(selection); >+ } > } >diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties >index 94a1189..4ef29ab 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties >@@ -1187,6 +1187,7 @@ > EditorActions_cut = Cu&t > EditorActions_copy = &Copy > EditorActions_paste = &Paste >+EditorActions_selectall = Select &All > EditorActions_revert = Re&vert > Actions_open_label = &Open > Actions_delete_label = &Delete
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 361123
:
246955
| 247293