issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if (!refactoring.isEmpty()) menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring); } private void addOpenPerspectiveItem(IMenuManager menu) { ISelection s= getSelection(); if (s.isEmpty() || ! (s instanceof IStructuredSelection)) return; IStructuredSelection selection= (IStructuredSelection)s; if (selection.size() != 1) return; Object element= selection.getFirstElement(); if (!(element instanceof IType)) return; IType[] input= {(IType)element}; IWorkbenchWindow w= JavaPlugin.getActiveWorkbenchWindow(); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, new OpenHierarchyPerspectiveItem(w, input)); } protected void contextMenuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); if (OrganizeImportsAction.canActionBeAdded(getSelection())) { addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "OrganizeImports"); } addAction(menu, IContextMenuConstants.GROUP_OPEN, "OpenImportDeclaration"); addAction(menu, IContextMenuConstants.GROUP_OPEN, "OpenSuperImplementation"); addAction(menu, IContextMenuConstants.GROUP_SHOW, "ShowInPackageView");
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "DeleteElement"); addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "ReplaceWithEdition"); addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "AddEdition"); addAction(menu, IContextMenuConstants.GROUP_ADDITIONS, "AddMethodEntryBreakpoint"); addAction(menu, IContextMenuConstants.GROUP_ADDITIONS, "AddWatchpoint"); ContextMenuGroup.add(menu, fActionGroups, fOutlineViewer); addRefactoring(menu); addOpenPerspectiveItem(menu); } /** * @see Page#setFocus() */ public void setFocus() { if (fOutlineViewer != null) fOutlineViewer.getControl().setFocus(); } /** * @see Page#makeContributions(IMenuManager, IToolBarManager, IStatusLineManager) */ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { if (statusLineManager != null) { StatusBarUpdater updater= new StatusBarUpdater(statusLineManager); addSelectionChangedListener(updater); }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
Action action= new LexicalSortingAction(); toolBarManager.add(action); action= new FilterAction(new FieldFilter(), JavaEditorMessages.getString("JavaOutlinePage.HideFields.label"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.tooltip.unchecked"), "HideFields.isChecked"); JavaPluginImages.setLocalImageDescriptors(action, "fields_co.gif"); toolBarManager.add(action); action= new FilterAction(new VisibilityFilter(VisibilityFilter.NOT_STATIC), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.label"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.tooltip.unchecked"), "HideStaticMembers.isChecked"); JavaPluginImages.setLocalImageDescriptors(action, "static_co.gif"); toolBarManager.add(action); action= new FilterAction(new VisibilityFilter(VisibilityFilter.PUBLIC), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.label"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.tooltip.unchecked"), "HideNonePublicMembers.isChecked"); JavaPluginImages.setLocalImageDescriptors(action, "public_co.gif"); toolBarManager.add(action); } /** * @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener) */ public void addSelectionChangedListener(ISelectionChangedListener listener) { fSelectionChangedListeners.add(listener); } /** * @see ISelectionProvider#removeSelectionChangedListener(ISelectionChangedListener) */ public void removeSelectionChangedListener(ISelectionChangedListener listener) { fSelectionChangedListeners.remove(listener); }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * @see ISelectionProvider#getSelection() */ public ISelection getSelection() { if (fOutlineViewer == null) return StructuredSelection.EMPTY; return fOutlineViewer.getSelection(); } /** * @see ISelectionProvider#setSelection(ISelection) */ public void setSelection(ISelection selection) { if (fOutlineViewer != null) fOutlineViewer.setSelection(selection); } /** * Checkes whether a given Java element is an inner type. */ private boolean isInnerType(IJavaElement element) { if (element.getElementType() == IJavaElement.TYPE) { IJavaElement parent= element.getParent(); int type= parent.getElementType(); return (type != IJavaElement.COMPILATION_UNIT && type != IJavaElement.CLASS_FILE); } return false; }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * Handles key events in viewer. */ private void handleKeyPressed(KeyEvent event) { if (event.stateMask != 0) return; IAction action= null; if (event.character == SWT.DEL) { action= getAction("DeleteElement"); if (action instanceof DeleteAction){ DeleteAction deleteAction= (DeleteAction)action; deleteAction.update(); if (deleteAction.isEnabled()) deleteAction.run(); return; } } else if (event.keyCode == SWT.F4) { OpenTypeHierarchyUtil.open(getSelection(), fEditor.getSite().getWorkbenchWindow()); } if (action != null && action.isEnabled()) action.run(); } }
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
package org.eclipse.jdt.internal.ui.javaeditor; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.core.runtime.IStatus; import org.eclipse.debug.core.*; import org.eclipse.debug.core.model.*; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jdt.core.*; import org.eclipse.jdt.debug.core.JDIDebugModel; import org.eclipse.jdt.internal.debug.core.JDIDebugTarget; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IUpdate; /** * Action to support run to line (i.e. where the cursor is) */ public class RunToLineAction extends Action implements IUpdate {
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
protected JavaEditor fEditor; public RunToLineAction(JavaEditor editor) { super(); setText(JavaEditorMessages.getString("RunToLine.label")); setToolTipText(JavaEditorMessages.getString("RunToLine.tooltip")); setDescription(JavaEditorMessages.getString("RunToLine.description")); fEditor= editor; update(); WorkbenchHelp.setHelp(this, new Object[] { IJavaHelpContextIds.RUN_TO_LINE_ACTION }); } public void run() { try { JDIDebugTarget target= getContext(); if (target == null) { fEditor.getSite().getShell().getDisplay().beep(); return; } ISelectionProvider sp= fEditor.getSelectionProvider(); if (sp == null) { return; } ITextSelection ts= (ITextSelection) sp.getSelection();
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
int lineNumber= ts.getStartLine() + 1; IJavaElement je= (IJavaElement) fEditor.getElementAt(ts.getOffset()); IType type= null; if (je instanceof IType) { type= (IType) je; } else if (je instanceof IMember) { type= ((IMember) je).getDeclaringType(); } if (type == null) { return; } IBreakpoint breakpoint= null; try { breakpoint= JDIDebugModel.createRunToLineBreakpoint(type, lineNumber, -1, -1); } catch (DebugException de) { errorDialog(de.getStatus()); return; } target.breakpointAdded(breakpoint); IThread[] threads= target.getThreads(); for (int i= 0; i < threads.length; i++) { IThread thread= threads[i]; if (thread.canResume()) { try { thread.resume(); } catch (DebugException de) { } break;
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
} } } catch(DebugException de) { } } /** * Resolves the debug target context to set the run to line */ protected JDIDebugTarget getContext() throws DebugException{ JDIDebugTarget target= getContextFromUI(); if (target == null) { target= getContextFromModel(); } if (target == null) { return null; } IThread[] threads= target.getThreads(); boolean threadSuspended= false; for (int i= 0; i < threads.length; i++) { IThread thread= threads[i]; if (thread.canResume()) { threadSuspended=true; break; } } if (threadSuspended) { return target; } return null; }
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
/** * Resolves a debug target context from the model */ protected JDIDebugTarget getContextFromModel() throws DebugException { IDebugTarget[] dts= DebugPlugin.getDefault().getLaunchManager().getDebugTargets(); for (int i= 0; i < dts.length; i++) { JDIDebugTarget dt= (JDIDebugTarget)dts[i]; if (getContextFromDebugTarget(dt) != null) { return dt; } } return null; } /** * Resolves a debug target context from the model */ protected JDIDebugTarget getContextFromThread(IThread thread) throws DebugException { if (thread.isSuspended()) { return (JDIDebugTarget) thread.getDebugTarget(); } return null; } /** * Resolves a stack frame context from the UI */ protected JDIDebugTarget getContextFromUI() throws DebugException { IWorkbenchPage page= fEditor.getSite().getWorkbenchWindow().getActivePage(); if (page == null) return null;
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
IViewPart part= page.findView(IDebugUIConstants.ID_DEBUG_VIEW); if (part == null) return null; ISelectionProvider sp= part.getSite().getSelectionProvider(); if (sp != null) { ISelection s= sp.getSelection(); if (s instanceof IStructuredSelection) { IStructuredSelection ss= (IStructuredSelection) s; Object item= ss.getFirstElement(); if (item instanceof IStackFrame) { return (JDIDebugTarget) ((IStackFrame) item).getDebugTarget(); } if (item instanceof IThread) { return getContextFromThread((IThread) item); } if (item instanceof JDIDebugTarget) { return (JDIDebugTarget) item; } } } return null; } protected void errorDialog(IStatus status) { Shell shell= fEditor.getSite().getShell(); ErrorDialog.openError(shell, JavaEditorMessages.getString("RunToLine.error.title1"), JavaEditorMessages.getString("RunToLine.error.message1"), status); }
5,225
Bug 5225 1.0 -- Casting problem in RunToLineAction class
The Java editor fails to open a java source file when we have PICLDebugTargets in the debug view. There is java.lang.ClassCastException at org.eclipse.jdt.internal.ui.javaeditor.RunToLineAction.getContextFromModel (RunToLineAction.java:111) The getContextFromModel() method incorrectly assumes that all debug targets are of type JDIDebugTarget. I see a few other spots in RunToLineAction where a debug target is blindly cast to a JDIDebugTarget without checking it first. I am seeing this with the R1.0 (0.137 build) driver. I don't think this is a new problem.
verified fixed
e66d704
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T03:18:23Z
2001-10-24T21:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/RunToLineAction.java
/** * @see IUpdate */ public void update() { try { setEnabled(getContext() != null); } catch (DebugException de) { setEnabled(false); JavaPlugin.log(de.getStatus()); } } /** * Resolves a stack frame context from the model */ protected JDIDebugTarget getContextFromDebugTarget(JDIDebugTarget dt) throws DebugException { if (dt.isTerminated() || dt.isDisconnected()) { return null; } IThread[] threads= dt.getThreads(); for (int i= 0; i < threads.length; i++) { IThread thread= threads[i]; if (thread.isSuspended()) { return dt; } } return null; } }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import java.util.Set; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlAdapter; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IMemento; import org.eclipse.ui.IWorkbenchPart;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.actions.OpenJavaElementAction; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter; import org.eclipse.jdt.internal.ui.viewsupport.MarkerErrorTickProvider; import org.eclipse.jdt.internal.ui.viewsupport.ProblemItemMapper; /** * Method viewer shows a list of methods of a input type. * Offers filter actions. * No dependency to the type hierarchy view */ public class MethodsViewer extends TableViewer implements IProblemChangedListener { private ProblemItemMapper fProblemItemMapper; /** * Sorter that uses the unmodified labelprovider (No declaring class names) */ private static class MethodsViewerSorter extends JavaElementSorter {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
public MethodsViewerSorter() { } public int compare(Viewer viewer, Object e1, Object e2) { int cat1 = category(e1); int cat2 = category(e2); if (cat1 != cat2) return cat1 - cat2; String name1= JavaElementLabels.getElementLabel((IJavaElement) e1, JavaElementLabels.ALL_DEFAULT); String name2= JavaElementLabels.getElementLabel((IJavaElement) e2, JavaElementLabels.ALL_DEFAULT); return getCollator().compare(name1, name2); } } private static final String TAG_HIDEFIELDS= "hidefields"; private static final String TAG_HIDESTATIC= "hidestatic"; private static final String TAG_HIDENONPUBLIC= "hidenonpublic"; private static final String TAG_SHOWINHERITED= "showinherited"; private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll"; private MethodsViewerFilterAction[] fFilterActions; private MethodsViewerFilter fFilter; private OpenJavaElementAction fOpen;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
private TableColumn fTableColumn; private ShowInheritedMembersAction fShowInheritedMembersAction; private ContextMenuGroup[] fStandardGroups; public MethodsViewer(Composite parent, IWorkbenchPart part) { super(new Table(parent, SWT.MULTI)); fProblemItemMapper= new ProblemItemMapper(); fTableColumn= new TableColumn(getTable(), SWT.NULL | SWT.MULTI | SWT.FULL_SELECTION); getTable().addControlListener(new ControlAdapter() { public void controlResized(ControlEvent e) { adjustTableColumnSize(); } }); JavaElementLabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); lprovider.setErrorTickManager(new MarkerErrorTickProvider()); MethodsContentProvider contentProvider= new MethodsContentProvider(); setLabelProvider(lprovider); setContentProvider(contentProvider); fOpen= new OpenJavaElementAction(this); addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { fOpen.run(); } });
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
fFilter= new MethodsViewerFilter(); String title= TypeHierarchyMessages.getString("MethodsViewer.hide_fields.label"); String helpContext= IJavaHelpContextIds.FILTER_FIELDS_ACTION; MethodsViewerFilterAction hideFields= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_FIELDS, helpContext, false); hideFields.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.description")); hideFields.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.checked")); hideFields.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideFields, "fields_co.gif"); title= TypeHierarchyMessages.getString("MethodsViewer.hide_static.label"); helpContext= IJavaHelpContextIds.FILTER_STATIC_ACTION; MethodsViewerFilterAction hideStatic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_STATIC, helpContext, false); hideStatic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_static.description")); hideStatic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.checked")); hideStatic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideStatic, "static_co.gif"); title= TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.label"); helpContext= IJavaHelpContextIds.FILTER_PUBLIC_ACTION; MethodsViewerFilterAction hideNonPublic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_NONPUBLIC, helpContext, false); hideNonPublic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.description")); hideNonPublic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.checked")); hideNonPublic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideNonPublic, "public_co.gif");
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
fFilterActions= new MethodsViewerFilterAction[] { hideFields, hideStatic, hideNonPublic }; addFilter(fFilter); fShowInheritedMembersAction= new ShowInheritedMembersAction(this, false); showInheritedMethods(false); fStandardGroups= new ContextMenuGroup[] { new JavaSearchGroup(), new GenerateGroup() }; setSorter(new MethodsViewerSorter()); } /** * Show inherited methods */ public void showInheritedMethods(boolean on) { MethodsContentProvider cprovider= (MethodsContentProvider) getContentProvider(); try { cprovider.showInheritedMethods(on); fShowInheritedMembersAction.setChecked(on); JavaElementLabelProvider lprovider= (JavaElementLabelProvider) getLabelProvider(); if (on) { lprovider.turnOn(JavaElementLabelProvider.SHOW_POST_QUALIFIED); } else { lprovider.turnOff(JavaElementLabelProvider.SHOW_POST_QUALIFIED); } refresh();
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
adjustTableColumnSize(); } catch (JavaModelException e) { ExceptionHandler.handle(e, getControl().getShell(), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.title"), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.message")); } } private void adjustTableColumnSize() { if (fTableColumn != null && !fTableColumn.isDisposed()) { fTableColumn.pack(); } } /* * @see Viewer#inputChanged(Object, Object) */ protected void inputChanged(Object input, Object oldInput) { super.inputChanged(input, oldInput); adjustTableColumnSize(); } /** * Returns <code>true</code> if inherited methods are shown. */ public boolean isShowInheritedMethods() { return ((MethodsContentProvider) getContentProvider()).isShowInheritedMethods(); } /** * Filters the method list */
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
public void setMemberFilter(int filterProperty, boolean set) { if (set) { fFilter.addFilter(filterProperty); } else { fFilter.removeFilter(filterProperty); } for (int i= 0; i < fFilterActions.length; i++) { if (fFilterActions[i].getFilterProperty() == filterProperty) { fFilterActions[i].setChecked(set); } } refresh(); } /** * Returns <code>true</code> if the given filter is set. */ public boolean hasMemberFilter(int filterProperty) { return fFilter.hasFilter(filterProperty); } /** * Saves the state of the filter actions */ public void saveState(IMemento memento) { memento.putString(TAG_HIDEFIELDS, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_FIELDS))); memento.putString(TAG_HIDESTATIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_STATIC))); memento.putString(TAG_HIDENONPUBLIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC))); memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods())); ScrollBar bar= getTable().getVerticalBar(); int position= bar != null ? bar.getSelection() : 0;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position)); } /** * Restores the state of the filter actions */ public void restoreState(IMemento memento) { boolean set= Boolean.valueOf(memento.getString(TAG_HIDEFIELDS)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_FIELDS, set); set= Boolean.valueOf(memento.getString(TAG_HIDESTATIC)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_STATIC, set); set= Boolean.valueOf(memento.getString(TAG_HIDENONPUBLIC)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC, set); set= Boolean.valueOf(memento.getString(TAG_SHOWINHERITED)).booleanValue(); showInheritedMethods(set); ScrollBar bar= getTable().getVerticalBar(); if (bar != null) { Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL); if (vScroll != null) { bar.setSelection(vScroll.intValue()); } } } /** * Attaches a contextmenu listener to the table */ public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager();
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getTable()); getTable().setMenu(menu); viewSite.registerContextMenu(popupId, menuMgr, this); } /** * Fills up the context menu with items for the method viewer * Should be called by the creator of the context menu */ public void contributeToContextMenu(IMenuManager menu) { if (fOpen.canActionBeAdded()) { menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen); } ContextMenuGroup.add(menu, fStandardGroups, this); } /** * Fills up the tool bar with items for the method viewer * Should be called by the creator of the tool bar */ public void contributeToToolBar(ToolBarManager tbm) { tbm.add(fShowInheritedMembersAction); tbm.add(new Separator()); tbm.add(fFilterActions[0]); tbm.add(fFilterActions[1]); tbm.add(fFilterActions[2]); } /*
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
* @see IProblemChangedListener#problemsChanged */ public void problemsChanged(final Set changed) { Control control= getControl(); if (control != null && !control.isDisposed()) { control.getDisplay().asyncExec(new Runnable() { public void run() { fProblemItemMapper.problemsChanged(changed, (ILabelProvider)getLabelProvider()); } }); } } /* * @see StructuredViewer#associate(Object, Item) */ protected void associate(Object element, Item item) { if (item.getData() != element) { fProblemItemMapper.addToMap(element, item); } super.associate(element, item); } /* * @see StructuredViewer#disassociate(Item) */ protected void disassociate(Item item) { fProblemItemMapper.removeFromMap(item.getData(), item); super.disassociate(item); } }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.dialogfields; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Table; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.TableViewer; /** * A list with checkboxes and a button bat. Typical buttons are 'Check All' and 'Uncheck All'. * List model is independend of widget creation. * DialogFields controls are: Label, List and Composite containing buttons. */ public class CheckedListDialogField extends ListDialogField {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
private int fCheckAllButtonIndex; private int fUncheckAllButtonIndex; private List fCheckElements; public CheckedListDialogField(IListAdapter adapter, String[] customButtonLabels, ILabelProvider lprovider) { super(adapter, customButtonLabels, lprovider); fCheckElements= new ArrayList(); fCheckAllButtonIndex= -1; fUncheckAllButtonIndex= -1; } /** * Sets the index of the 'check' button in the button label array passed in the constructor. * The behaviour of the button marked as the check button will then be handled internally. * (enable state, button invocation behaviour) */ public void setCheckAllButtonIndex(int checkButtonIndex) { Assert.isTrue(checkButtonIndex < fButtonLabels.length); fCheckAllButtonIndex= checkButtonIndex; } /** * Sets the index of the 'uncheck' button in the button label array passed in the constructor.
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
* The behaviour of the button marked as the uncheck button will then be handled internally. * (enable state, button invocation behaviour) */ public void setUncheckAllButtonIndex(int uncheckButtonIndex) { Assert.isTrue(uncheckButtonIndex < fButtonLabels.length); fUncheckAllButtonIndex= uncheckButtonIndex; } /* * @see ListDialogField#createTableViewer */ protected TableViewer createTableViewer(Composite parent) { Table table= new Table(parent, SWT.CHECK + getListStyle()); CheckboxTableViewer tableViewer= new CheckboxTableViewer(table); tableViewer.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent e) { doCheckStateChanged(e); } }); return tableViewer; } /* * @see ListDialogField#getListControl */ public Control getListControl(Composite parent) { Control control= super.getListControl(parent); if (parent != null) { ((CheckboxTableViewer)fTable).setCheckedElements(fCheckElements.toArray());
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
} return control; } /* * @see DialogField#dialogFieldChanged * Hooks in to get element changes to update check model. */ public void dialogFieldChanged() { for (int i= fCheckElements.size() -1; i >= 0; i--) { if (!fElements.contains(fCheckElements.get(i))) { fCheckElements.remove(i); } } super.dialogFieldChanged(); } private void checkStateChanged() { super.dialogFieldChanged(); } /** * Gets the checked elements. */ public List getCheckedElements() { return new ArrayList(fCheckElements); } /** * Returns true if the element is checked.
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
*/ public boolean isChecked(Object obj) { return fCheckElements.contains(obj); } /** * Sets the checked elements. */ public void setCheckedElements(List list) { fCheckElements= new ArrayList(list); if (fTable != null) { ((CheckboxTableViewer)fTable).setCheckedElements(list.toArray()); } checkStateChanged(); } /** * Sets the checked state of an element. */ public void setChecked(Object object, boolean state) { setCheckedWithoutUpdate(object, state); checkStateChanged(); } /** * Sets the checked state of an element. no dialog changed listener informed */ public void setCheckedWithoutUpdate(Object object, boolean state) { if (!fCheckElements.contains(object)) { fCheckElements.add(object); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
if (fTable != null) { ((CheckboxTableViewer)fTable).setChecked(object, state); } } /** * Sets the check state of all elements */ public void checkAll(boolean state) { if (state) { fCheckElements= getElements(); } else { fCheckElements.clear(); } if (fTable != null) { ((CheckboxTableViewer)fTable).setAllChecked(state); } checkStateChanged(); } private void doCheckStateChanged(CheckStateChangedEvent e) { if (e.getChecked()) { fCheckElements.add(e.getElement()); } else { fCheckElements.remove(e.getElement()); } checkStateChanged(); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java
/* * @see ListDialogField#getManagedButtonState */ protected boolean getManagedButtonState(ISelection sel, int index) { if (index == fCheckAllButtonIndex) { return !fElements.isEmpty(); } else if (index == fUncheckAllButtonIndex) { return !fElements.isEmpty(); } return super.getManagedButtonState(sel, index); } /* * @see ListDialogField#extraButtonPressed */ protected boolean managedButtonPressed(int index) { if (index == fCheckAllButtonIndex) { checkAll(true); } else if (index == fUncheckAllButtonIndex) { checkAll(false); } else { return super.managedButtonPressed(index); } return true; } }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.dialogfields; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.internal.ui.wizards.swt.MGridData; import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout; /** * A list with a button bar. * Typical buttons are 'Add', 'Remove', 'Up' and 'Down'. * List model is independend of widget creation. * DialogFields controls are: Label, List and Composite containing buttons. */ public class ListDialogField extends DialogField {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
protected TableViewer fTable; protected ILabelProvider fLabelProvider; protected ListViewerAdapter fListViewerAdapter; protected List fElements; protected ViewerSorter fViewerSorter; protected String[] fButtonLabels; private Button[] fButtonControls; private boolean[] fButtonsEnabled; private int fRemoveButtonIndex; private int fUpButtonIndex; private int fDownButtonIndex; private Label fLastSeparator; private Table fTableControl; private Composite fButtonsControl; private ISelection fSelectionWhenEnabled; private TableColumn fTableColumn; private IListAdapter fListAdapter;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
private Object fParentElement; /** * Creates the <code>ListDialogField</code>. * @param adapter A listener for button invocation, selection changes. * @param buttonLabels The labels of all buttons: <code>null</code> is a valid array entry and * marks a separator. * @param lprovider The label provider to render the table entries */ public ListDialogField(IListAdapter adapter, String[] buttonLabels, ILabelProvider lprovider) { super(); fListAdapter= adapter; fLabelProvider= lprovider; fListViewerAdapter= new ListViewerAdapter(); fParentElement= this; fElements= new ArrayList(10); fButtonLabels= buttonLabels; if (fButtonLabels != null) { int nButtons= fButtonLabels.length; fButtonsEnabled= new boolean[nButtons]; for (int i= 0; i < nButtons; i++) { fButtonsEnabled[i]= true; } } fTable= null; fTableControl= null; fButtonsControl= null; fRemoveButtonIndex= -1;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
fUpButtonIndex= -1; fDownButtonIndex= -1; } /** * Sets the index of the 'remove' button in the button label array passed in the constructor. * The behaviour of the button marked as the 'remove' button will then be handled internally. * (enable state, button invocation behaviour) */ public void setRemoveButtonIndex(int removeButtonIndex) { Assert.isTrue(removeButtonIndex < fButtonLabels.length); fRemoveButtonIndex= removeButtonIndex; } /** * Sets the index of the 'up' button in the button label array passed in the constructor. * The behaviour of the button marked as the 'up' button will then be handled internally. * (enable state, button invocation behaviour) */ public void setUpButtonIndex(int upButtonIndex) { Assert.isTrue(upButtonIndex < fButtonLabels.length); fUpButtonIndex= upButtonIndex; } /** * Sets the index of the 'down' button in the button label array passed in the constructor. * The behaviour of the button marked as the 'down' button will then be handled internally. * (enable state, button invocation behaviour) */ public void setDownButtonIndex(int downButtonIndex) { Assert.isTrue(downButtonIndex < fButtonLabels.length); fDownButtonIndex= downButtonIndex;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
} /** * Sets the viewerSorter. * @param viewerSorter The viewerSorter to set */ public void setViewerSorter(ViewerSorter viewerSorter) { fViewerSorter= viewerSorter; } private void buttonPressed(int index) { if (!managedButtonPressed(index)) { fListAdapter.customButtonPressed(this, index); } } /** * Checks if the button pressed is handled internally * @return Returns true if button has been handled. */ protected boolean managedButtonPressed(int index) { if (index == fRemoveButtonIndex) { remove(); } else if (index == fUpButtonIndex) { up(); } else if (index == fDownButtonIndex) { down(); } else {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
return false; } return true; } /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { assertEnoughColumns(nColumns); Label label= getLabelControl(parent); MGridData gd= gridDataForLabel(1); gd.verticalAlignment= gd.BEGINNING; label.setLayoutData(gd); Control list= getListControl(parent); gd= new MGridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.verticalAlignment= gd.FILL; gd.grabExcessVerticalSpace= true; gd.grabColumn= 0; gd.horizontalSpan= nColumns - 2; gd.widthHint= SWTUtil.convertWidthInCharsToPixels(50, list); gd.heightHint= SWTUtil.convertHeightInCharsToPixels(6, list); list.setLayoutData(gd);
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
Composite buttons= getButtonBox(parent); gd= new MGridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= false; gd.verticalAlignment= gd.FILL; gd.grabExcessVerticalSpace= false; gd.horizontalSpan= 1; buttons.setLayoutData(gd); return new Control[] { label, list, buttons }; } /* * @see DialogField#getNumberOfControls */ public int getNumberOfControls() { return 3; } /** * Sets the minimal width of the buttons. Must be called after widget creation. */ public void setButtonsMinWidth(int minWidth) { if (fLastSeparator != null) { ((MGridData)fLastSeparator.getLayoutData()).widthHint= minWidth; } } /**
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
* Returns the list control. When called the first time, the control will be created. * @param The parent composite when called the first time, or <code>null</code> * after. */ public Control getListControl(Composite parent) { if (fTableControl == null) { assertCompositeNotNull(parent); fTable= createTableViewer(parent); fTable.setContentProvider(fListViewerAdapter); fTable.setLabelProvider(fLabelProvider); fTable.addSelectionChangedListener(fListViewerAdapter); fTableControl= (Table)fTable.getControl(); TableLayout tableLayout= new TableLayout(); tableLayout.addColumnData(new ColumnWeightData(100)); fTableColumn= new TableColumn(fTableControl, SWT.NONE); fTableColumn.setResizable(false); fTableControl.setLayout(tableLayout); fTable.setInput(fParentElement); if (fViewerSorter != null) { fTable.setSorter(fViewerSorter); } fTableControl.setEnabled(isEnabled()); if (fSelectionWhenEnabled != null) {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
postSetSelection(fSelectionWhenEnabled); } fTableColumn.getDisplay().asyncExec(new Runnable() { public void run() { if (fTableColumn != null && !fTableColumn.isDisposed()) { fTableColumn.pack(); } } }); } return fTableControl; } /** * Returns the internally used table viewer. */ public TableViewer getTableViewer() { return fTable; } /* * Subclasses may override to specify a different style. */ protected int getListStyle(){ return SWT.BORDER + SWT.MULTI + SWT.H_SCROLL + SWT.V_SCROLL; } protected TableViewer createTableViewer(Composite parent) { Table table= new Table(parent, getListStyle()); return new TableViewer(table); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
protected Button createButton(Composite parent, String label, SelectionListener listener) { Button button= new Button(parent, SWT.PUSH); button.setText(label); button.addSelectionListener(listener); MGridData gd= new MGridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.verticalAlignment= gd.BEGINNING; gd.heightHint = SWTUtil.getButtonHeigthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button); button.setLayoutData(gd); return button; } private Label createSeparator(Composite parent) { Label separator= new Label(parent, SWT.NONE); separator.setVisible(false); MGridData gd= new MGridData(); gd.horizontalAlignment= gd.FILL; gd.verticalAlignment= gd.BEGINNING; gd.heightHint= 4; separator.setLayoutData(gd); return separator; } /** * Returns the composite containing the buttons. When called the first time, the control * will be created. * @param The parent composite when called the first time, or <code>null</code>
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
* after. */ public Composite getButtonBox(Composite parent) { if (fButtonsControl == null) { assertCompositeNotNull(parent); SelectionListener listener= new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { doButtonSelected(e); } public void widgetSelected(SelectionEvent e) { doButtonSelected(e); } }; Composite contents= new Composite(parent, SWT.NULL); MGridLayout layout= new MGridLayout(); layout.marginWidth= 0; layout.marginHeight= 0; contents.setLayout(layout); if (fButtonLabels != null) { fButtonControls= new Button[fButtonLabels.length]; for (int i= 0; i < fButtonLabels.length; i++) { String currLabel= fButtonLabels[i]; if (currLabel != null) { fButtonControls[i]= createButton(contents, currLabel, listener); fButtonControls[i].setEnabled(isEnabled() && fButtonsEnabled[i]); } else { fButtonControls[i]= null;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
createSeparator(contents); } } } fLastSeparator= createSeparator(contents); updateButtonState(); fButtonsControl= contents; } return fButtonsControl; } private void doButtonSelected(SelectionEvent e) { if (fButtonControls != null) { for (int i= 0; i < fButtonControls.length; i++) { if (e.widget == fButtonControls[i]) { buttonPressed(i); return; } } } } /* * @see DialogField#dialogFieldChanged */ public void dialogFieldChanged() {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
super.dialogFieldChanged(); if (fTableColumn != null && !fTableColumn.isDisposed()) { fTableColumn.pack(); } updateButtonState(); } private Button getButton(int index) { if (fButtonControls != null && index >= 0 && index < fButtonControls.length) { return fButtonControls[index]; } return null; } /* * Updates the enable state of the all buttons */ protected void updateButtonState() { if (fButtonControls != null) { ISelection sel= fTable.getSelection(); for (int i= 0; i < fButtonControls.length; i++) { Button button= fButtonControls[i]; if (isOkToUse(button)) { boolean extraState= getManagedButtonState(sel, i); button.setEnabled(isEnabled() && extraState && fButtonsEnabled[i]); } } } } protected boolean getManagedButtonState(ISelection sel, int index) {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
if (index == fRemoveButtonIndex) { return !sel.isEmpty(); } else if (index == fUpButtonIndex) { return !sel.isEmpty() && canMoveUp(); } else if (index == fDownButtonIndex) { return !sel.isEmpty() && canMoveDown(); } return true; } /* * @see DialogField#updateEnableState */ protected void updateEnableState() { super.updateEnableState(); boolean enabled= isEnabled(); if (isOkToUse(fTableControl)) { if (!enabled) { fSelectionWhenEnabled= fTable.getSelection(); selectElements(null); } else { selectElements(fSelectionWhenEnabled); fSelectionWhenEnabled= null; } fTableControl.setEnabled(enabled); } updateButtonState(); } /** * Sets a button enabled or disabled.
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
*/ public void enableButton(int index, boolean enable) { if (fButtonsEnabled != null && index < fButtonsEnabled.length) { fButtonsEnabled[index]= enable; updateButtonState(); } } /** * Sets the elements shown in the list. */ public void setElements(List elements) { fElements= new ArrayList(elements); if (fTable != null) { fTable.refresh(); } dialogFieldChanged(); } /** * Gets the elements shown in the list. * The list returned is a copy, so it can be modified by the user. */ public List getElements() { return new ArrayList(fElements); } /** * Gets the elements shown at the given index. */ public Object getElement(int index) {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
return fElements.get(index); } /** * Replace an element. */ public void replaceElement(Object oldElement, Object newElement) throws IllegalArgumentException { int idx= fElements.indexOf(oldElement); if (idx != -1) { if (oldElement.equals(newElement) || fElements.contains(newElement)) { return; } fElements.set(idx, newElement); if (fTable != null) { List selected= getSelectedElements(); if (selected.remove(oldElement)) { selected.add(newElement); } fTable.refresh(); selectElements(new StructuredSelection(selected)); } dialogFieldChanged(); } else { throw new IllegalArgumentException(); } } /** * Adds an element at the end of the list. */ public void addElement(Object element) { if (fElements.contains(element)) {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
return; } fElements.add(element); if (fTable != null) { fTable.add(element); } dialogFieldChanged(); } /** * Adds elements at the end of the list. */ public void addElements(List elements) { int nElements= elements.size(); if (nElements > 0) { ArrayList elementsToAdd= new ArrayList(nElements); for (int i= 0; i < nElements; i++) { Object elem= elements.get(i); if (!fElements.contains(elem)) { elementsToAdd.add(elem); } } fElements.addAll(elementsToAdd); if (fTable != null) { fTable.add(elementsToAdd.toArray()); } dialogFieldChanged(); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
} /** * Adds an element at a position. */ public void insertElementAt(Object element, int index) { if (fElements.contains(element)) { return; } fElements.add(index, element); if (fTable != null) { fTable.add(element); } dialogFieldChanged(); } /** * Adds an element at a position. */ public void removeAllElements() { if (fElements.size() > 0) { fElements.clear(); if (fTable != null) { fTable.refresh(); } dialogFieldChanged(); } } /** * Removes an element from the list.
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
*/ public void removeElement(Object element) throws IllegalArgumentException { if (fElements.remove(element)) { if (fTable != null) { fTable.remove(element); } dialogFieldChanged(); } else { throw new IllegalArgumentException(); } } /** * Removes elements from the list. */ public void removeElements(List elements) { if (elements.size() > 0) { fElements.removeAll(elements); if (fTable != null) { fTable.remove(elements.toArray()); } dialogFieldChanged(); } } /** * Gets the number of elements */ public int getSize() { return fElements.size(); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
public void selectElements(ISelection selection) { fSelectionWhenEnabled= selection; if (fTable != null) { fTable.setSelection(selection, true); } } public void selectFirstElement() { Object element= null; if (fViewerSorter != null) { Object[] arr= fElements.toArray(); fViewerSorter.sort(fTable, arr); if (arr.length > 0) { element= arr[0]; } } else { if (fElements.size() > 0) { element= fElements.get(0); } } if (element != null) { selectElements(new StructuredSelection(element)); } } public void postSetSelection(final ISelection selection) { if (isOkToUse(fTableControl)) { Display d= fTableControl.getDisplay(); d.asyncExec(new Runnable() {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
public void run() { if (isOkToUse(fTableControl)) { selectElements(selection); } } }); } } /** * Refreshes the table. */ public void refresh() { fTable.refresh(); } private List moveUp(List elements, List move) { int nElements= elements.size(); List res= new ArrayList(nElements); Object floating= null; for (int i= 0; i < nElements; i++) { Object curr= elements.get(i); if (move.contains(curr)) { res.add(curr); } else { if (floating != null) { res.add(floating); }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
floating= curr; } } if (floating != null) { res.add(floating); } return res; } private void moveUp(List toMoveUp) { if (toMoveUp.size() > 0) { setElements(moveUp(fElements, toMoveUp)); fTable.reveal(toMoveUp.get(0)); } } private void moveDown(List toMoveDown) { if (toMoveDown.size() > 0) { setElements(reverse(moveUp(reverse(fElements), toMoveDown))); fTable.reveal(toMoveDown.get(toMoveDown.size() - 1)); } } private List reverse(List p) { List reverse= new ArrayList(p.size()); for (int i= p.size()-1; i >= 0; i--) { reverse.add(p.get(i)); } return reverse; }
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
private void remove() { removeElements(getSelectedElements()); } private void up() { moveUp(getSelectedElements()); } private void down() { moveDown(getSelectedElements()); } private boolean canMoveUp() { if (isOkToUse(fTableControl)) { int[] indc= fTableControl.getSelectionIndices(); for (int i= 0; i < indc.length; i++) { if (indc[i] != i) { return true; } } } return false; } private boolean canMoveDown() { if (isOkToUse(fTableControl)) { int[] indc= fTableControl.getSelectionIndices(); int k= fElements.size() - 1;
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
for (int i= indc.length - 1; i >= 0 ; i--, k--) { if (indc[i] != k) { return true; } } } return false; } /** * Returns the selected elements. */ public List getSelectedElements() { List result= new ArrayList(); if (fTable != null) { ISelection selection= fTable.getSelection(); if (selection instanceof IStructuredSelection) { Iterator iter= ((IStructuredSelection)selection).iterator(); while (iter.hasNext()) { result.add(iter.next()); } } } return result; } private class ListViewerAdapter implements IStructuredContentProvider, ISelectionChangedListener {
5,677
Bug 5677 Hierarchy outline has empty space
I opened a hierarchy view on IActionDelegate. Selected a few of the subinterfaces, changed the expansion state of the tree. Then, no matter which item I selected in the top window (the hierarchy tree), the bottom window (the outline table) always had exactly four empty rows before the first item was listed.
resolved fixed
e23f1fe
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T11:25:18Z
2001-11-08T20:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } public boolean isDeleted(Object element) { return false; } public void dispose() { } public Object[] getElements(Object obj) { return fElements.toArray(); } public void selectionChanged(SelectionChangedEvent event) { doListSelected(event); } } private void doListSelected(SelectionChangedEvent event) { updateButtonState(); if (fListAdapter != null) { fListAdapter.selectionChanged(this); } } }
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/IJavaElementSearchConstants.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui; /** * Search scope constants for Java selection dialogs. * <p> * This interface declares constants only; it is not intended to be implemented. * </p> * * @see JavaUI */ public interface IJavaElementSearchConstants {
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/IJavaElementSearchConstants.java
/** * Search scope constant (bit mask) indicating that classes should be considered. * Used when opening certain kinds of selection dialogs. */ public static final int CONSIDER_CLASSES= 1 << 1; /** * Search scope constant (bit mask) indicating that interfaces should be considered. * Used when opening certain kinds of selection dialogs. */ public static final int CONSIDER_INTERFACES= 1 << 2; /** * Search scope constant (bit mask) indicating that both classes and interfaces * should be considered. Equivalent to * <code>CONSIDER_CLASSES | CONSIDER_INTERFACES</code>. */ public static final int CONSIDER_TYPES= CONSIDER_CLASSES | CONSIDER_INTERFACES; /** * Search scope constant (bit mask) indicating that binaries should be considered. * Used when opening certain kinds of selection dialogs. */ public static final int CONSIDER_BINARIES= 1 << 3; /** * Search scope constant (bit mask) indicating that external JARs should be considered. * Used when opening certain kinds of selection dialogs. */ public static final int CONSIDER_EXTERNAL_JARS= 1 << 4; }
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.eclipse.swt.widgets.Shell; import org.eclipse.core.resources.IProject; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.util.Assert; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.dialogs.SelectionDialog; import org.eclipse.jdt.core.IJavaElement;
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.SharedImages; import org.eclipse.jdt.internal.ui.dialogs.AbstractElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.MainTypeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.MultiMainTypeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.MultiTypeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; /** * Central access point for the Java UI plug-in (id <code>"org.eclipse.jdt.ui"</code>). * This class provides static methods for: * <ul> * <li> creating various kinds of selection dialogs to present a collection * of Java elements to the user and let them make a selection.</li> * <li> opening a Java editor on a compilation unit.</li> * </ul> * <p> * This class provides static methods and fields only; it is not intended to be * instantiated or subclassed by clients. * </p> */ public final class JavaUI {
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
private static ISharedImages fgSharedImages= null; private JavaUI() { } /** * The id of the Java plugin (value <code>"org.eclipse.jdt.ui"</code>). */ public static final String ID_PLUGIN= "org.eclipse.jdt.ui"; /** * The id of the Java perspective * (value <code>"org.eclipse.jdt.ui.JavaPerspective"</code>). */ public static final String ID_PERSPECTIVE= "org.eclipse.jdt.ui.JavaPerspective";
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
/** * The id of the Java hierarchy perspective * (value <code>"org.eclipse.jdt.ui.JavaHierarchyPerspective"</code>). */ public static final String ID_HIERARCHYPERSPECTIVE= "org.eclipse.jdt.ui.JavaHierarchyPerspective"; /** * The id of the Java action set * (value <code>"org.eclipse.jdt.ui.JavaActionSet"</code>). */ public static final String ID_ACTION_SET= "org.eclipse.jdt.ui.JavaActionSet"; /** * The editor part id of the editor that presents Java compilation units * (value <code>"org.eclipse.jdt.ui.CompilationUnitEditor"</code>). */ public static final String ID_CU_EDITOR= "org.eclipse.jdt.ui.CompilationUnitEditor"; /** * The editor part id of the editor that presents Java binary class files * (value <code>"org.eclipse.jdt.ui.ClassFileEditor"</code>). */ public static final String ID_CF_EDITOR= "org.eclipse.jdt.ui.ClassFileEditor"; /** * The editor part id of the code snippet editor * (value <code>"org.eclipse.jdt.ui.SnippetEditor"</code>). */ public static final String ID_SNIPPET_EDITOR= "org.eclipse.jdt.ui.SnippetEditor"; /**
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* The view part id of the Packages view * (value <code>"org.eclipse.jdt.ui.PackageExplorer"</code>). * <p> * When this id is used to access * a view part with <code>IWorkbenchPage.findView</code> or * <code>showView</code>, the returned <code>IViewPart</code> * can be safely cast to an <code>IPackagesViewPart</code>. * </p> * * @see IPackagesViewPart * @see org.eclipse.ui.IWorkbenchPage#findView * @see org.eclipse.ui.IWorkbenchPage#showView */ public static final String ID_PACKAGES= "org.eclipse.jdt.ui.PackageExplorer"; /** * The view part id of the type hierarchy part. * (value <code>"org.eclipse.jdt.ui.TypeHierarchy"</code>). * <p> * When this id is used to access * a view part with <code>IWorkbenchPage.findView</code> or * <code>showView</code>, the returned <code>IViewPart</code> * can be safely cast to an <code>ITypeHierarchyViewPart</code>. * </p> * * @see ITypeHierarchyViewPart * @see org.eclipse.ui.IWorkbenchPage#findView * @see org.eclipse.ui.IWorkbenchPage#showView */ public static final String ID_TYPE_HIERARCHY= "org.eclipse.jdt.ui.TypeHierarchy";
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
/** * The class org.eclipse.debug.core.model.IProcess allows attaching * String properties to processes. The Java UI contributes a property * page for IProcess that will show the contents of the property * with this key. * The intent of this property is to show the command line a process * was launched with. * @deprecated */ public final static String ATTR_CMDLINE= JavaPlugin.getPluginId()+".launcher.cmdLine"; /** * Returns the shared images for the Java UI. * * @return the shared images manager */ public static ISharedImages getSharedImages() { if (fgSharedImages == null) fgSharedImages= new SharedImages(); return fgSharedImages; } /** * Creates a selection dialog that lists all packages of the given Java project. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>. * * @param parent the parent shell of the dialog to be created
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* @param project the Java project * @param style flags defining the style of the dialog; the only valid flag is * <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>, indicating that * packages from binary package fragment roots should be included in addition * to those from source package fragment roots * @param filter the filter * @return a new selection dialog * @exception JavaModelException if the selection dialog could not be opened */ public static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style, String filter) throws JavaModelException { Assert.isTrue((style | IJavaElementSearchConstants.CONSIDER_BINARIES) == IJavaElementSearchConstants.CONSIDER_BINARIES); IPackageFragmentRoot[] roots= project.getPackageFragmentRoots(); List consideredRoots= null; if ((style & IJavaElementSearchConstants.CONSIDER_BINARIES) != 0) { consideredRoots= Arrays.asList(roots); } else { consideredRoots= new ArrayList(roots.length); for (int i= 0; i < roots.length; i++) { IPackageFragmentRoot root= roots[i]; if (root.getKind() != IPackageFragmentRoot.K_BINARY) consideredRoots.add(root); } } int flags= JavaElementLabelProvider.SHOW_DEFAULT; if (consideredRoots.size() > 1) flags= flags | JavaElementLabelProvider.SHOW_ROOT; List packages= new ArrayList(); Iterator iter= consideredRoots.iterator();
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
while(iter.hasNext()) { IPackageFragmentRoot root= (IPackageFragmentRoot)iter.next(); packages.addAll(Arrays.asList(root.getChildren())); } ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent, new JavaElementLabelProvider(flags)); dialog.setIgnoreCase(false); dialog.setElements(packages.toArray()); dialog.setFilter(filter); return dialog; } /** * @see createPackageDialog(Shell,IJavaProject,int,String) */ public static SelectionDialog createPackageDialog(Shell parent, IJavaProject project, int style) throws JavaModelException { return createPackageDialog(parent, project, style, "A"); } /** * Creates a selection dialog that lists all packages under the given package * fragment root. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>. * * @param parent the parent shell of the dialog to be created * @param root the package fragment root * @param filter the filter * @return a new selection dialog * @exception JavaModelException if the selection dialog could not be opened
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
*/ public static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root, String filter) throws JavaModelException { ElementListSelectionDialog dialog= new ElementListSelectionDialog(parent, new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT)); dialog.setIgnoreCase(false); dialog.setElements(root.getChildren()); dialog.setFilter(filter); return dialog; } /** * @see createPackageDialog(Shell,IPackageFragmentRoot) */ public static SelectionDialog createPackageDialog(Shell parent, IPackageFragmentRoot root) throws JavaModelException { return createPackageDialog(parent, root, "A"); } /** * Creates a selection dialog that lists all types in the given scope. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IType</code>) via <code>SelectionDialog.getResult</code>. * * @param parent the parent shell of the dialog to be created * @param context the runnable context used to show progress when the dialog * is being populated * @param scope the scope that limits which types are included * @param style flags defining the style of the dialog; the only valid values are * <code>IJavaElementSearchConstants.CONSIDER_CLASSES</code>, * <code>CONSIDER_INTERFACES</code>, or their bitwise OR * (equivalent to <code>CONSIDER_TYPES</code>) * @param multipleSelection <code>true</code> if multiple selection is allowed * @param filter the filter
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* @return a new selection dialog * @exception JavaModelException if the selection dialog could not be opened */ public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) throws JavaModelException { Assert.isTrue((style | IJavaElementSearchConstants.CONSIDER_TYPES) == IJavaElementSearchConstants.CONSIDER_TYPES); if (multipleSelection) { MultiTypeSelectionDialog dialog= new MultiTypeSelectionDialog(parent, context, scope, style); dialog.setFilter(filter); return dialog; } else { TypeSelectionDialog dialog= new TypeSelectionDialog(parent, context, scope, style); dialog.setFilter(filter); return dialog; } } /** * @see createTypeDialog(Shell,IRunnableContext,IJavaSearchScope,int,boolean,String) */ public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection) throws JavaModelException { return createTypeDialog(parent, context, scope, style, multipleSelection, "A"); } /** * Creates a selection dialog that lists all types in the given scope containing * a standard <code>main</code> method. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IType</code>) via <code>SelectionDialog.getResult</code>. * <p> * [Issue: IJavaSearchScope is not currently part of the Java core API.]
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* </p> * <p> * [Issue: SelectionDialogs must be parented. shell must not be null.] * </p> * * @param parent the parent shell of the dialog to be created * @param context the runnable context used to show progress when the dialog * is being populated * @param scope the scope that limits which types are included * @param style flags defining the style of the dialog; the only valid values are * <code>IJavaElementSearchConstants.CONSIDER_BINARIES</code>, * <code>CONSIDER_EXTERNAL_JARS</code>, or their bitwise OR, or <code>0</code> * @param multipleSelection <code>true</code> if multiple selection is allowed * @param filter the filter * @return a new selection dialog */ public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection, String filter) { AbstractElementListSelectionDialog dialog= null; if (multipleSelection) { dialog= new MultiMainTypeSelectionDialog(parent, context, scope, style); } else { dialog= new MainTypeSelectionDialog(parent, context, scope, style); } dialog.setFilter(filter); return dialog; } /** * @see createMainTypeDialog(Shell,IRunnableContext,IJavaSearchScope,int,boolean,String) */ public static SelectionDialog createMainTypeDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style, boolean multipleSelection) {
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
return createMainTypeDialog(parent, context, scope, style, multipleSelection, "A"); } /** * Creates a selection dialog that lists all types in the given project. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IType</code>) via <code>SelectionDialog.getResult</code>. * * @param parent the parent shell of the dialog to be created * @param context the runnable context used to show progress when the dialog * is being populated * @param project the Java project * @param style flags defining the style of the dialog; the only valid values are * <code>IJavaElementSearchConstants.CONSIDER_CLASSES</code>, * <code>CONSIDER_INTERFACES</code>, or their bitwise OR * (equivalent to <code>CONSIDER_TYPES</code>) * @param multipleSelection <code>true</code> if multiple selection is allowed * @return a new selection dialog * @exception JavaModelException if the selection dialog could not be opened */ public static SelectionDialog createTypeDialog(Shell parent, IRunnableContext context, IProject project, int style, boolean multipleSelection) throws JavaModelException { IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaProject[] { JavaCore.create(project) }); return createTypeDialog(parent, context, scope, style, multipleSelection); } /** * Opens a Java editor on the given Java compilation unit of class file. * If there already is an open Java editor for the given element, it is returned. * <p>
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* [Issue: Explain semantics of opening an editor on a class file.] * </p> * <p> * [Issue: Explain under which conditions it returns null, throws JavaModelException, * or throws JavaModelException. * ] * </p> * * @param element the input element; either a compilation unit * (<code>ICompilationUnit</code>) or a class file (</code>IClassFile</code>) * @return the editor, or </code>null</code> if wrong element type or opening failed * @exception PartInitException if the editor could not be initialized * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its underlying resource */ public static IEditorPart openInEditor(IJavaElement element) throws JavaModelException, PartInitException { return EditorUtility.openInEditor(element); } /** * Reveals the source range of the given source reference element in the * given editor. No checking is done if the editor displays a compilation unit or * class file that contains the given source reference. * <p> * [Issue: Explain what is meant by that last sentence.] * </p> * <p> * [Issue: Explain what happens if the source reference is from some other * compilation unit, editor is not open, etc.] * </p> *
6,412
Bug 6412 API Request - Package selection dialog including pre-reqs
The Java debugger requires the ability to specify a "pacakge to run in" in the snippet editor. To do this, we use the API on JavaUI to create a package selection dialog for a project. However, we need to be able to choose from packages in pre-req projects/jars as well. Currently the API only specifies packages in a single project.
resolved fixed
a5cfa23
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T15:37:46Z
2001-11-29T02:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* @param part the editor displaying the compilation unit or class file * @param element the source reference element defining the source range to be revealed * * @deprecated use <code>revealInEditor(IEditorPart, IJavaElement)</code> instead */ public static void revealInEditor(IEditorPart part, ISourceReference element) { if (element instanceof IJavaElement) revealInEditor(part, (IJavaElement) element); } /** * Reveals the given java element in the given editor. No checking is done if the * editor displays a compilation unit or class file that contains the given element. * If the element is not contained, nothing happens. * @param part the editor displaying a compilation unit or class file * @param element the element to be revealed */ public static void revealInEditor(IEditorPart part, IJavaElement element) { EditorUtility.revealInEditor(part, element); } /** * Returns the working copy manager for the Java UI plug-in. * * @return the working copy manager for the Java UI plug-in */ public static IWorkingCopyManager getWorkingCopyManager() { return JavaPlugin.getDefault().getWorkingCopyManager(); } }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.compare; import java.util.ResourceBundle; import java.io.ByteArrayInputStream; import java.io.InputStream; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.graphics.Image; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.*; import org.eclipse.ui.IEditorInput; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.corext.codemanipulation.*; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.compare.*; public class JavaAddElementFromHistory extends JavaHistoryAction {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.AddFromHistoryAction"; private JavaEditor fEditor; public JavaAddElementFromHistory() { } /** * The optional argument editor is used iff the selection provider's * selection is empty. In this case the editor's CU is the container * to which to add an element from the local history. */ public JavaAddElementFromHistory(JavaEditor editor, ISelectionProvider sp) {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
super(sp); fEditor= editor; setText(CompareMessages.getString("AddFromHistory.action.label")); update(); } /** * @see Action#run */ public final void run() { String errorTitle= CompareMessages.getString("AddFromHistory.title"); String errorMessage= CompareMessages.getString("AddFromHistory.internalErrorMessage"); Shell shell= JavaPlugin.getActiveWorkbenchShell(); ICompilationUnit cu= null; IParent parent= null; IMember input= null; ISelection selection= getSelection(); if (selection.isEmpty()) { if (fEditor != null) { IEditorInput editorInput= fEditor.getEditorInput(); IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); if (manager != null) { cu= manager.getWorkingCopy(editorInput);
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
parent= cu; } } } else { input= getEditionElement(selection); if (input != null) { cu= input.getCompilationUnit(); if (input instanceof IParent) { parent= (IParent)input; input= null; } else { IJavaElement parentElement= input.getParent(); if (parentElement instanceof IParent) parent= (IParent)parentElement; } } else { if (selection instanceof IStructuredSelection) { Object o= ((IStructuredSelection)selection).getFirstElement(); if (o instanceof ICompilationUnit) { cu= (ICompilationUnit) o; parent= cu; } } } } if (parent == null || cu == null) { MessageDialog.openError(shell, errorTitle, errorMessage); return;
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
} if (cu.isWorkingCopy()) cu= (ICompilationUnit) cu.getOriginalElement(); IFile file= null; try { file= (IFile) cu.getUnderlyingResource(); } catch (JavaModelException ex) { JavaPlugin.log(ex); } if (file == null) { MessageDialog.openError(shell, errorTitle, errorMessage); return; } IFileState[] states= null; try { states= file.getHistory(null); } catch (CoreException ex) { JavaPlugin.log(ex); } if (states == null || states.length <= 0) { MessageDialog.openInformation(shell, errorTitle, CompareMessages.getString("AddFromHistory.noHistoryMessage")); return; }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
TextBuffer buffer= null; try { buffer= TextBuffer.acquire(file); ITypedElement target= new JavaTextBufferNode(buffer, cu.getElementName()); ITypedElement[] editions= new ITypedElement[states.length]; for (int i= 0; i < states.length; i++) editions[i]= new HistoryItem(target, states[i]); ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME); EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle); d.setAddMode(true); ITypedElement ti= d.selectEdition(target, editions, parent); if (!(ti instanceof IStreamContentAccessor)) return; String[] lines= null; try { lines= JavaCompareUtilities.readLines(((IStreamContentAccessor) ti).getContents()); } catch (CoreException ex) { JavaPlugin.log(ex); } if (lines == null) { MessageDialog.openError(shell, errorTitle, "couldn't get text to insert"); return; }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
TextEdit edit= null; if (input != null) edit= new MemberEdit(input, MemberEdit.INSERT_AFTER, lines, CodeFormatterPreferencePage.getTabSize()); else edit= createEdit(lines, parent); if (edit == null) { MessageDialog.openError(shell, errorTitle, "couldn't determine place to insert"); return; } TextBufferEditor editor= new TextBufferEditor(buffer); editor.addTextEdit(edit); editor.performEdits(new NullProgressMonitor()); TextBuffer.commitChanges(buffer, false, new NullProgressMonitor()); } catch(CoreException ex) { JavaPlugin.log(ex); MessageDialog.openError(shell, errorTitle, "error with TextBuffer"); } finally { if (buffer != null) TextBuffer.release(buffer); } } /** * Creates a TextEdit for inserting the given lines into the container. */
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
private TextEdit createEdit(String[] lines, IParent container) { IJavaElement[] children= null; try { children= container.getChildren(); } catch(JavaModelException ex) { } if (children != null) { IJavaElement candidate= null; for (int i= 0; i < children.length; i++) { IJavaElement chld= children[i]; switch (chld.getElementType()) { case IJavaElement.PACKAGE_DECLARATION: case IJavaElement.IMPORT_CONTAINER: candidate= chld; continue; default: return new MemberEdit(chld, MemberEdit.INSERT_BEFORE, lines, CodeFormatterPreferencePage.getTabSize()); } } if (candidate != null) return new MemberEdit(candidate, MemberEdit.INSERT_AFTER, lines, CodeFormatterPreferencePage.getTabSize()); }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
if (container instanceof IJavaElement) return new MemberEdit((IJavaElement)container, MemberEdit.ADD_AT_END, lines, CodeFormatterPreferencePage.getTabSize()); return null; } protected boolean isEnabled(ISelection selection) { if (selection.isEmpty()) { if (fEditor != null) { IEditorInput editorInput= fEditor.getEditorInput(); IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(editorInput) != null; } return false; } if (selection instanceof IStructuredSelection) { Object o= ((IStructuredSelection)selection).getFirstElement(); if (o instanceof ICompilationUnit) return true; } return getEditionElement(selection) != null; } }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.compare; import java.io.*; import java.net.*; import java.util.*; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.util.Assert; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.core.JavaElement; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.ui.text.JavaTextTools; class JavaCompareUtilities {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
/** * Returns a name for the given Java element that uses the same conventions * as the JavaNode name of a corresponding element. */ static String getJavaElementID(IJavaElement je) { if (je instanceof IMember && ((IMember)je).isBinary()) return null; StringBuffer sb= new StringBuffer(); switch (je.getElementType()) { case JavaElement.COMPILATION_UNIT:
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
sb.append(JavaElement.JEM_COMPILATIONUNIT); break; case JavaElement.TYPE: sb.append(JavaElement.JEM_TYPE); sb.append(je.getElementName()); break; case JavaElement.FIELD: sb.append(JavaElement.JEM_FIELD); sb.append(je.getElementName()); break; case JavaElement.METHOD: sb.append(JavaElement.JEM_METHOD); sb.append(JavaElementLabels.getElementLabel(je, JavaElementLabels.M_PARAMETER_TYPES)); break; case JavaElement.INITIALIZER: String id= je.getHandleIdentifier(); int pos= id.lastIndexOf(JavaElement.JEM_INITIALIZER); if (pos >= 0) sb.append(id.substring(pos)); break; case JavaElement.PACKAGE_DECLARATION: sb.append(JavaElement.JEM_PACKAGEDECLARATION); break; case JavaElement.IMPORT_CONTAINER: sb.append('<'); break; case JavaElement.IMPORT_DECLARATION: sb.append(JavaElement.JEM_IMPORTDECLARATION); sb.append(je.getElementName()); break;
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
default: return null; } return sb.toString(); } /** * Returns a name which identifies the given typed name. * The type is encoded as a single character at the beginning of the string. */ static String buildID(int type, String name) { StringBuffer sb= new StringBuffer(); switch (type) { case JavaNode.CU: sb.append(JavaElement.JEM_COMPILATIONUNIT); break; case JavaNode.CLASS: case JavaNode.INTERFACE: sb.append(JavaElement.JEM_TYPE); sb.append(name); break; case JavaNode.FIELD: sb.append(JavaElement.JEM_FIELD); sb.append(name); break; case JavaNode.CONSTRUCTOR: case JavaNode.METHOD: sb.append(JavaElement.JEM_METHOD); sb.append(name); break;
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
case JavaNode.INIT: sb.append(JavaElement.JEM_INITIALIZER); sb.append(name); break; case JavaNode.PACKAGE: sb.append(JavaElement.JEM_PACKAGEDECLARATION); break; case JavaNode.IMPORT: sb.append(JavaElement.JEM_IMPORTDECLARATION); sb.append(name); break; case JavaNode.IMPORT_CONTAINER: sb.append('<'); break; default: Assert.isTrue(false); break; } return sb.toString(); } static ImageDescriptor getImageDescriptor(String relativePath) { JavaPlugin plugin= JavaPlugin.getDefault(); URL installURL= null; if (plugin != null) installURL= plugin.getDescriptor().getInstallURL(); if (installURL != null) { try { URL url= new URL(installURL, "icons/full/" + relativePath);
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
return ImageDescriptor.createFromURL(url); } catch (MalformedURLException e) { Assert.isTrue(false); } } return null; } static JavaTextTools getJavaTextTools() { JavaPlugin plugin= JavaPlugin.getDefault(); if (plugin != null) return plugin.getJavaTextTools(); return null; } static IDocumentPartitioner createJavaPartitioner() { JavaTextTools tools= getJavaTextTools(); if (tools != null) return tools.createDocumentPartitioner(); return null; } /** * Returns null if an error occurred. */ static String readString(InputStream is) { if (is == null) return null; BufferedReader reader= null; try { StringBuffer buffer= new StringBuffer();
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
char[] part= new char[2048]; int read= 0; reader= new BufferedReader(new InputStreamReader(is)); while ((read= reader.read(part)) != -1) buffer.append(part, 0, read); return buffer.toString(); } catch (IOException ex) { } finally { if (reader != null) { try { reader.close(); } catch (IOException ex) { JavaPlugin.log(ex); } } } return null; } /** * Breaks the given string into lines and strips off the line terminator. */ static String[] readLines(InputStream is) { String[] lines= null; try { StringBuffer sb= null; List list= new ArrayList();
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareUtilities.java
while (true) { int c= is.read(); if (c == -1) break; if (c == '\n' || c == '\r') { if (sb != null) list.add(sb.toString()); sb= null; } else { if (sb == null) sb= new StringBuffer(); sb.append((char)c); } } if (sb != null) list.add(sb.toString()); return (String[]) list.toArray(new String[list.size()]); } catch (IOException ex) { return null; } finally { if (is != null) { try { is.close(); } catch (IOException ex) { } } } } }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.compare; import java.util.ResourceBundle; import org.eclipse.swt.widgets.*; import org.eclipse.jface.dialogs.*; import org.eclipse.jface.viewers.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.corext.codemanipulation.*; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.compare.*; import org.eclipse.compare.internal.Utilities; /** * Provides "Replace from local history" for Java elements. */ public class JavaCompareWithEditionAction extends JavaHistoryAction {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
static class CompareWithEditionDialog extends EditionSelectionDialog { ResourceBundle fBundle; CompareWithEditionDialog(Shell parent, ResourceBundle bundle) { super(parent, bundle); fBundle= bundle; } protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, Utilities.getString(fBundle, "closeButton.label"), false); } /**
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
* Overidden to disable dismiss on double click (see PR 1GI3KUR). */ protected void okPressed() { } } private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.CompareWithEditionAction"; public JavaCompareWithEditionAction() { } public JavaCompareWithEditionAction(ISelectionProvider sp) { super(sp); setText(CompareMessages.getString("ReplaceFromHistory.action.label")); update(); } /** * @see Action#run */ public final void run() { String errorTitle= CompareMessages.getString("ReplaceFromHistory.title"); String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage"); Shell shell= JavaPlugin.getActiveWorkbenchShell();
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
ISelection selection= getSelection(); IMember input= getEditionElement(selection); if (input == null) { MessageDialog.openInformation(shell, errorTitle, errorMessage); return; } ICompilationUnit cu= input.getCompilationUnit(); if (cu.isWorkingCopy()) cu= (ICompilationUnit) cu.getOriginalElement(); IFile file= null; try { file= (IFile) cu.getUnderlyingResource(); } catch (JavaModelException ex) { JavaPlugin.log(ex); } if (file == null) { MessageDialog.openError(shell, errorTitle, errorMessage); return; } int numberOfEditions= 1; IFileState[] states= null; try {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
states= file.getHistory(null); } catch (CoreException ex) { JavaPlugin.log(ex); } if (states != null) numberOfEditions += states.length; ITypedElement[] editions= new ITypedElement[numberOfEditions]; editions[0]= new ResourceNode(file); if (states != null) for (int i= 0; i < states.length; i++) editions[i+1]= new HistoryItem(editions[0], states[i]); TextBuffer buffer= null; try { buffer= TextBuffer.acquire(file); ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME); EditionSelectionDialog d= new CompareWithEditionDialog(shell, bundle); ITypedElement ti= d.selectEdition(new JavaTextBufferNode(buffer, cu.getElementName()), editions, input); if (ti instanceof IStreamContentAccessor) { IStreamContentAccessor sca= (IStreamContentAccessor) ti; String[] lines= null; try { lines= JavaCompareUtilities.readLines(((IStreamContentAccessor) ti).getContents());
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
} catch (CoreException ex) { JavaPlugin.log(ex); } if (lines == null) { MessageDialog.openError(shell, errorTitle, "couldn't get text to insert"); return; } TextEdit edit= new MemberEdit(input, MemberEdit.REPLACE, lines, CodeFormatterPreferencePage.getTabSize()); TextBufferEditor editor= new TextBufferEditor(buffer); editor.addTextEdit(edit); editor.performEdits(new NullProgressMonitor()); TextBuffer.commitChanges(buffer, false, new NullProgressMonitor()); } } catch(CoreException ex) { JavaPlugin.log(ex); MessageDialog.openError(shell, errorTitle, "error with TextBuffer"); } finally { if (buffer != null) TextBuffer.release(buffer); } } protected boolean isEnabled(ISelection selection) { return getEditionElement(selection) != null; } }
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.compare; import java.util.ResourceBundle; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.corext.codemanipulation.*; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.compare.*; /** * Provides "Replace from local history" for Java elements. */ public class JavaReplaceWithEditionAction extends JavaHistoryAction {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.ReplaceWithEditionAction"; public JavaReplaceWithEditionAction() { } public JavaReplaceWithEditionAction(ISelectionProvider sp) { super(sp); setText(CompareMessages.getString("ReplaceFromHistory.action.label")); update(); } /** * @see Action#run */ public final void run() { String errorTitle= CompareMessages.getString("ReplaceFromHistory.title"); String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage"); Shell shell= JavaPlugin.getActiveWorkbenchShell();
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
ISelection selection= getSelection(); IMember input= getEditionElement(selection); if (input == null) { MessageDialog.openInformation(shell, errorTitle, errorMessage); return; } ICompilationUnit cu= input.getCompilationUnit(); if (cu.isWorkingCopy()) cu= (ICompilationUnit) cu.getOriginalElement(); IFile file= null; try { file= (IFile) cu.getUnderlyingResource(); } catch (JavaModelException ex) { JavaPlugin.log(ex); } if (file == null) { MessageDialog.openError(shell, errorTitle, errorMessage); return; } int numberOfEditions= 1; IFileState[] states= null; try {
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
states= file.getHistory(null); } catch (CoreException ex) { JavaPlugin.log(ex); } if (states != null) numberOfEditions += states.length; ITypedElement[] editions= new ITypedElement[numberOfEditions]; editions[0]= new ResourceNode(file); if (states != null) for (int i= 0; i < states.length; i++) editions[i+1]= new HistoryItem(editions[0], states[i]); TextBuffer buffer= null; try { buffer= TextBuffer.acquire(file); ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME); EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle); ITypedElement ti= d.selectEdition(new JavaTextBufferNode(buffer, cu.getElementName()), editions, input); if (ti instanceof IStreamContentAccessor) { IStreamContentAccessor sca= (IStreamContentAccessor) ti; String[] lines= null; try { lines= JavaCompareUtilities.readLines(((IStreamContentAccessor) ti).getContents());
4,381
Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
resolved fixed
5439e11
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-29T19:24:21Z
2001-10-11T14:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
} catch (CoreException ex) { JavaPlugin.log(ex); } if (lines == null) { MessageDialog.openError(shell, errorTitle, "couldn't get text to insert"); return; } TextEdit edit= new MemberEdit(input, MemberEdit.REPLACE, lines, CodeFormatterPreferencePage.getTabSize()); TextBufferEditor editor= new TextBufferEditor(buffer); editor.addTextEdit(edit); editor.performEdits(new NullProgressMonitor()); TextBuffer.commitChanges(buffer, false, new NullProgressMonitor()); } } catch(CoreException ex) { JavaPlugin.log(ex); MessageDialog.openError(shell, errorTitle, "error with TextBuffer"); } finally { if (buffer != null) TextBuffer.release(buffer); } } protected boolean isEnabled(ISelection selection) { return getEditionElement(selection) != null; } }