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 33083 Details for
Bug 123755
[introduce indirection] issues with binary targets
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]
unfinished patch
123755_intro_indirection_on_binary.diff (text/plain), 8.51 KB, created by
Markus Keller
on 2006-01-16 11:53:01 EST
(
hide
)
Description:
unfinished patch
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2006-01-16 11:53:01 EST
Size:
8.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java,v >retrieving revision 1.73 >diff -u -r1.73 RefactorActionGroup.java >--- ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java 16 Jan 2006 16:31:36 -0000 1.73 >+++ ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java 16 Jan 2006 16:47:32 -0000 >@@ -49,13 +49,15 @@ > import org.eclipse.jdt.core.IJavaElement; > > import org.eclipse.jdt.ui.IContextMenuConstants; >+import org.eclipse.jdt.ui.JavaUI; > >-import org.eclipse.jdt.internal.ui.JavaPlugin; > import org.eclipse.jdt.internal.ui.actions.ActionMessages; > import org.eclipse.jdt.internal.ui.actions.ActionUtil; > import org.eclipse.jdt.internal.ui.actions.JDTQuickMenuAction; > import org.eclipse.jdt.internal.ui.actions.SelectionConverter; >+import org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor; > import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; >+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; > import org.eclipse.jdt.internal.ui.javaeditor.JavaTextSelection; > import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages; > >@@ -113,7 +115,7 @@ > public static final String GROUP_CODING2= "codingGroup2"; //$NON-NLS-1$ > > private IWorkbenchSite fSite; >- private CompilationUnitEditor fEditor; >+ private JavaEditor fEditor; > private String fGroupName= IContextMenuConstants.GROUP_REORGANIZE; > > private SelectionDispatchAction fMoveAction; >@@ -146,7 +148,7 @@ > private static final String QUICK_MENU_ID= "org.eclipse.jdt.ui.edit.text.java.refactor.quickMenu"; //$NON-NLS-1$ > > private class RefactorQuickAccessAction extends JDTQuickMenuAction { >- public RefactorQuickAccessAction(CompilationUnitEditor editor) { >+ public RefactorQuickAccessAction(JavaEditor editor) { > super(editor, QUICK_MENU_ID); > } > protected void fillMenu(IMenuManager menu) { >@@ -333,6 +335,32 @@ > > stats.endRun(); > } >+ >+ >+ /** >+ * Note: This constructor is for internal use only. Clients should not call this constructor. >+ * @param editor the compilation unit editor >+ * @param groupName the group name to add the actions to >+ */ >+ public RefactorActionGroup(ClassFileEditor editor, String groupName) { >+ >+ fSite= editor.getEditorSite(); >+ fEditor= editor; >+ fGroupName= groupName; >+ ISelectionProvider provider= editor.getSelectionProvider(); >+ ISelection selection= provider.getSelection(); >+ fEditorActions= new ArrayList(); >+ >+ fIntroduceIndirectionAction= new IntroduceIndirectionAction(editor); >+ fIntroduceIndirectionAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.INTRODUCE_INDIRECTION); >+ initAction(fIntroduceIndirectionAction, provider, selection); >+ editor.setAction("IntroduceIndirection", fIntroduceIndirectionAction); //$NON-NLS-1$ >+ fEditorActions.add(fIntroduceIndirectionAction); >+ >+ fQuickAccessAction= new RefactorQuickAccessAction(editor); >+ fKeyBindingService= editor.getEditorSite().getKeyBindingService(); >+ fKeyBindingService.registerAction(fQuickAccessAction); >+ } > > private RefactorActionGroup(IWorkbenchSite site, IKeyBindingService keyBindingService) { > >@@ -595,13 +623,11 @@ > } > > private IJavaElement getEditorInput() { >- return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy( >- fEditor.getEditorInput()); >+ return JavaUI.getEditorInputJavaElement(fEditor.getEditorInput()); > } > > private IDocument getDocument() { >- return JavaPlugin.getDefault().getCompilationUnitDocumentProvider(). >- getDocument(fEditor.getEditorInput()); >+ return fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput()); > } > > private void fillQuickMenu(IMenuManager menu) { >Index: ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTextSelection.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTextSelection.java,v >retrieving revision 1.12 >diff -u -r1.12 JavaTextSelection.java >--- ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTextSelection.java 16 Jan 2006 16:17:08 -0000 1.12 >+++ ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTextSelection.java 16 Jan 2006 16:47:32 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.jface.text.IDocument; > import org.eclipse.jface.text.TextSelection; > >+import org.eclipse.jdt.core.IClassFile; > import org.eclipse.jdt.core.ICompilationUnit; > import org.eclipse.jdt.core.IJavaElement; > import org.eclipse.jdt.core.JavaModelException; >@@ -95,7 +96,7 @@ > if (fPartialASTRequested) > return fPartialAST; > fPartialASTRequested= true; >- if (! (fElement instanceof ICompilationUnit)) >+ if (!(fElement instanceof ICompilationUnit) && !(fElement instanceof IClassFile)) //TODO and has source? > return null; > // long start= System.currentTimeMillis(); > fPartialAST= JavaPlugin.getDefault().getASTProvider().getAST(fElement, ASTProvider.WAIT_YES, null); >Index: ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java,v >retrieving revision 1.78 >diff -u -r1.78 ClassFileEditor.java >--- ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java 16 Jan 2006 16:17:08 -0000 1.78 >+++ ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java 16 Jan 2006 16:47:32 -0000 >@@ -47,6 +47,7 @@ > import org.eclipse.swt.widgets.ScrollBar; > import org.eclipse.swt.widgets.Shell; > >+import org.eclipse.jface.action.IMenuManager; > import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.resource.JFaceResources; >@@ -61,6 +62,8 @@ > import org.eclipse.ui.IFileEditorInput; > import org.eclipse.ui.IMemento; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.actions.ActionContext; >+import org.eclipse.ui.actions.ActionGroup; > import org.eclipse.ui.texteditor.IDocumentProvider; > import org.eclipse.ui.texteditor.ITextEditorActionConstants; > >@@ -80,10 +83,12 @@ > import org.eclipse.jdt.internal.corext.util.JavaModelUtil; > import org.eclipse.jdt.internal.corext.util.Messages; > >+import org.eclipse.jdt.ui.actions.RefactorActionGroup; > import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess; > > import org.eclipse.jdt.internal.ui.JavaPlugin; > import org.eclipse.jdt.internal.ui.JavaUIStatus; >+import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup; > import org.eclipse.jdt.internal.ui.util.ExceptionHandler; > import org.eclipse.jdt.internal.ui.wizards.buildpaths.SourceAttachmentBlock; > >@@ -481,6 +486,7 @@ > private Control fSourceAttachmentForm; > > private InputUpdater fInputUpdater= new InputUpdater(); >+ private CompositeActionGroup fContextMenuGroup; > > /** > * Default constructor. >@@ -502,6 +508,12 @@ > > setAction(ITextEditorActionConstants.SAVE, null); > setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null); >+ >+ ActionGroup rg= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT); >+ fActionGroups.addGroup(rg); >+ >+ // We have to keep the context menu group separate to have better control over positioning >+ fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] { rg }); > > /* > * 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to classfile >@@ -514,6 +526,18 @@ > * setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true)); //$NON-NLS-1$ > */ > } >+ >+ /* >+ * @see AbstractTextEditor#editorContextMenuAboutToShow(IMenuManager) >+ */ >+ public void editorContextMenuAboutToShow(IMenuManager menu) { >+ super.editorContextMenuAboutToShow(menu); >+ >+ ActionContext context= new ActionContext(getSelectionProvider().getSelection()); >+ fContextMenuGroup.setContext(context); >+ fContextMenuGroup.fillContextMenu(menu); >+ fContextMenuGroup.setContext(null); >+ } > > /* > * @see JavaEditor#getElementAt(int) >@@ -756,6 +780,12 @@ > IDocumentProvider documentProvider= getDocumentProvider(); > if (documentProvider instanceof ClassFileDocumentProvider) > ((ClassFileDocumentProvider) documentProvider).removeInputChangeListener(this); >+ >+ if (fActionGroups != null) { >+ fActionGroups.dispose(); >+ fActionGroups= null; >+ } >+ > super.dispose(); > } >
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 123755
: 33083