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
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} private TypeHierarchyViewer getCurrentViewer() { return fAllViewers[fCurrentViewerIndex]; } /** * called from EnableMemberFilterAction. * Must be called after creation of the viewpart. */ public void enableMemberFilter(boolean on) { if (on != fIsEnableMemberFilter) { fIsEnableMemberFilter= on; if (!on) { IType methodViewerInput= (IType) fMethodsViewer.getInput(); setMemberFilter(null); updateHierarchyViewer(); updateTitle(); if (methodViewerInput != null && getCurrentViewer().isElementShown(methodViewerInput)) { internalSelectType(methodViewerInput, true); } else if (fSelectedType != null) { internalSelectType(fSelectedType, true); updateMethodViewer(fSelectedType); } } else { methodSelectionChanged(fMethodsViewer.getSelection()); } }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fEnableMemberFilterAction.setChecked(on); } /** * Called from ITypeHierarchyLifeCycleListener. * Can be called from any thread */ private void doTypeHierarchyChanged(final TypeHierarchyLifeCycle typeHierarchy, final IType[] changedTypes) { Display display= getDisplay(); if (display != null) { display.asyncExec(new Runnable() { public void run() { doTypeHierarchyChangedOnViewers(changedTypes); } }); } } private void doTypeHierarchyChangedOnViewers(IType[] changedTypes) { if (fHierarchyLifeCycle.getHierarchy() == null || !fHierarchyLifeCycle.getHierarchy().exists()) { clearInput(); } else { if (changedTypes == null) { try { fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInputElement); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); clearInput(); return;
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} updateHierarchyViewer(); } else { if (getCurrentViewer().isMethodFiltering()) { if (changedTypes.length == 1) { getCurrentViewer().refresh(changedTypes[0]); } else { updateHierarchyViewer(); } } else { getCurrentViewer().update(changedTypes, new String[] { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE } ); } } fMethodsViewer.refresh(); } } /** * Determines the input element to be used initially . */ private IJavaElement determineInputElement() { Object input= getSite().getPage().getInput(); if (input instanceof IJavaElement) { return (IJavaElement) input; } return null; }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
/* * @see IViewPart#init */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); fMemento= memento; } /* * @see ViewPart#saveState(IMemento) */ public void saveState(IMemento memento) { if (fPagebook == null) { if (fMemento != null) { memento.putMemento(fMemento); } return; } if (fInputElement != null) { memento.putString(TAG_INPUT, fInputElement.getHandleIdentifier()); } memento.putInteger(TAG_VIEW, getViewIndex()); memento.putInteger(TAG_ORIENTATION, fCurrentOrientation); int weigths[]= fTypeMethodsSplitter.getWeights(); int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]); memento.putInteger(TAG_RATIO, ratio); ScrollBar bar= getCurrentViewer().getTree().getVerticalBar(); int position= bar != null ? bar.getSelection() : 0;
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
memento.putInteger(TAG_VERTICAL_SCROLL, position); IJavaElement selection= (IJavaElement)((IStructuredSelection) getCurrentViewer().getSelection()).getFirstElement(); if (selection != null) { memento.putString(TAG_SELECTION, selection.getHandleIdentifier()); } fMethodsViewer.saveState(memento); } /** * Restores the type hierarchy settings from a memento. */ private void restoreState(IMemento memento, IJavaElement defaultInput) { IJavaElement input= defaultInput; String elementId= memento.getString(TAG_INPUT); if (elementId != null) { input= JavaCore.create(elementId); if (!input.exists()) { input= null; } } setInputElement(input); Integer viewerIndex= memento.getInteger(TAG_VIEW); if (viewerIndex != null) { setView(viewerIndex.intValue()); } Integer orientation= memento.getInteger(TAG_ORIENTATION); if (orientation != null) { setOrientation(orientation.intValue()); }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
Integer ratio= memento.getInteger(TAG_RATIO); if (ratio != null) { fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() }); } ScrollBar bar= getCurrentViewer().getTree().getVerticalBar(); if (bar != null) { Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL); if (vScroll != null) { bar.setSelection(vScroll.intValue()); } } String selectionId= memento.getString(TAG_SELECTION); if (selectionId != null) { IJavaElement elem= JavaCore.create(selectionId); if (getCurrentViewer().isElementShown(elem) && elem instanceof IMember) { internalSelectType((IMember)elem, false); } } fMethodsViewer.restoreState(memento); } /** * Link selection to active editor. */ private void editorActivated(IEditorPart editor) { if (!JavaBasePreferencePage.linkTypeHierarchySelectionToEditor()) { return; } if (fInputElement == null) {
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
return; } IJavaElement elem= (IJavaElement)editor.getEditorInput().getAdapter(IJavaElement.class); try { TypeHierarchyViewer currentViewer= getCurrentViewer(); if (elem instanceof IClassFile) { IType type= ((IClassFile)elem).getType(); if (currentViewer.isElementShown(type)) { internalSelectType(type, true); updateMethodViewer(type); } } else if (elem instanceof ICompilationUnit) { IType[] allTypes= ((ICompilationUnit)elem).getAllTypes(); for (int i= 0; i < allTypes.length; i++) { if (currentViewer.isElementShown(allTypes[i])) { internalSelectType(allTypes[i], true); updateMethodViewer(allTypes[i]); return; } } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.util; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.core.runtime.CoreException; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IPerspectiveDescriptor; import org.eclipse.ui.IPerspectiveRegistry;
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPreferenceConstants; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.internal.WorkbenchPlugin; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.actions.OpenHierarchyAction; import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaUI; public class OpenTypeHierarchyUtil { private OpenTypeHierarchyUtil() { } public static boolean canOperateOn(ISelection s) { Object element= getElement(s);
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
return (element != null) ? (getCandidates(element) != null) : false; } public static void addToMenu(IWorkbenchWindow window, IMenuManager menu, ISelection s) { addToMenu(window, menu, getElement(s)); } public static void addToMenu(IWorkbenchWindow window, IMenuManager menu, Object element) { IJavaElement[] candidates= getCandidates(element); if (candidates != null) { menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, new OpenHierarchyAction(window, candidates)); } } public static TypeHierarchyViewPart open(ISelection selection, IWorkbenchWindow window) { Object element= getElement(selection); if (element instanceof IJavaElement) { return open((IJavaElement)element, window); } return null; } public static TypeHierarchyViewPart open(IJavaElement element, IWorkbenchWindow window) { IJavaElement[] candidates= getCandidates(element); if (candidates != null) { return open(candidates, window); }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
return null; } public static TypeHierarchyViewPart open(IJavaElement[] candidates, IWorkbenchWindow window) { return open(candidates, window, 0); } public static TypeHierarchyViewPart open(IJavaElement[] candidates, IWorkbenchWindow window, int mask) { Assert.isTrue(candidates != null && candidates.length != 0); IJavaElement input= null; if (candidates.length > 1) { input= selectCandidate(candidates, window.getShell()); } else { input= candidates[0]; } if (input == null) return null; try { if (JavaBasePreferencePage.openTypeHierarchyInPerspective()) { return openInPerspective(window, input, mask); } else { return openInViewPart(window, input); } } catch (WorkbenchException e) { JavaPlugin.log(e); MessageDialog.openError(window.getShell(), JavaUIMessages.getString("OpenTypeHierarchyUtil.error.open_perspective"),
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
e.getMessage()); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); MessageDialog.openError(window.getShell(), JavaUIMessages.getString("OpenTypeHierarchyUtil.error.open_editor"), e.getMessage()); } return null; } private static TypeHierarchyViewPart openInViewPart(IWorkbenchWindow window, IJavaElement input) { IWorkbenchPage page= window.getActivePage(); try { if (input instanceof IMember) { openEditor(input); } TypeHierarchyViewPart result= (TypeHierarchyViewPart)page.showView(JavaUI.ID_TYPE_HIERARCHY); result.setInputElement(input); if (input instanceof IMember) { result.selectMember((IMember) input); } return result; } catch (CoreException e) { JavaPlugin.log(e.getStatus()); MessageDialog.openError(window.getShell(), JavaUIMessages.getString("OpenTypeHierarchyUtil.error.open_view"), e.getMessage()); } return null; }
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
private static TypeHierarchyViewPart openInPerspective(IWorkbenchWindow window, IJavaElement input, int mask) throws WorkbenchException, JavaModelException { IPreferenceStore store= WorkbenchPlugin.getDefault().getPreferenceStore(); String mode= store.getString(IWorkbenchPreferenceConstants.OPEN_NEW_PERSPECTIVE); IWorkbenchPage page= null; if (IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_WINDOW.equals(mode)) { page= openWindow(input, mask); } else if (IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_PAGE.equals(mode)) { page= openPage(window, input, mask); } if (input instanceof IMember) { openEditor(input); } return (TypeHierarchyViewPart)page.showView(JavaUI.ID_TYPE_HIERARCHY); } private static void openEditor(Object input) throws PartInitException, JavaModelException { IEditorPart part= EditorUtility.openInEditor(input, true); if (input instanceof IJavaElement) EditorUtility.revealInEditor(part, (IJavaElement) input); } private static IWorkbenchPage openWindow(IJavaElement input, int mask) throws WorkbenchException, JavaModelException { return PlatformUI.getWorkbench().openPage(JavaUI.ID_HIERARCHYPERSPECTIVE, input, mask); } private static IWorkbenchPage openPage(IWorkbenchWindow window, IJavaElement input, int mask) throws WorkbenchException, JavaModelException { IWorkbenchPage page= null; /* * not implementable in the current form. See http://dev.eclipse.org/bugs/show_bug.cgi?id=3962 if (JavaBasePreferencePage.reusePerspectiveForTypeHierarchy()) { page= findPage(window); if (page != null) {
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
window.setActivePage(page); TypeHierarchyViewPart part= (TypeHierarchyViewPart)page.showView(JavaUI.ID_TYPE_HIERARCHY); if (input instanceof IType) part.setInputElement((IType)input); } } */ if (page == null) { page= PlatformUI.getWorkbench().openPage(JavaUI.ID_HIERARCHYPERSPECTIVE, input, mask); } return page; } private static IWorkbenchPage findPage(IWorkbenchWindow window) { IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry(); IPerspectiveDescriptor pd= registry.findPerspectiveWithId(JavaUI.ID_HIERARCHYPERSPECTIVE); IWorkbenchPage pages[]= window.getPages(); for (int i= 0; i < pages.length; i++) { IWorkbenchPage page= pages[i]; if (page.getPerspective().equals(pd)) return page; } return null; } private static IJavaElement selectCandidate(IJavaElement[] candidates, Shell shell) { int flags= (JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags)); dialog.setTitle(JavaUIMessages.getString("OpenTypeHierarchyUtil.selectionDialog.title")); dialog.setMessage(JavaUIMessages.getString("OpenTypeHierarchyUtil.selectionDialog.message"));
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
dialog.setElements(candidates); if (dialog.open() == dialog.OK) { Object[] elements= dialog.getResult(); if ((elements != null) && (elements.length == 1)) return (IJavaElement) elements[0]; } return null; } private static Object getElement(ISelection s) { if (!(s instanceof IStructuredSelection)) return null; IStructuredSelection selection= (IStructuredSelection)s; if (selection.size() != 1) return null; return selection.getFirstElement(); } /** * Converts the input to a possible input candidates */ private static IJavaElement[] getCandidates(Object input) { if (!(input instanceof IJavaElement)) { return null; } try { IJavaElement elem= (IJavaElement) input; switch (elem.getElementType()) { case IJavaElement.INITIALIZER: case IJavaElement.METHOD:
10,458
Bug 10458 Support DND to set focus in Hierarchy View
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
resolved fixed
bc9934a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T14:04:37Z
2002-02-28T04:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/OpenTypeHierarchyUtil.java
case IJavaElement.FIELD: case IJavaElement.TYPE: case IJavaElement.PACKAGE_FRAGMENT: case IJavaElement.PACKAGE_FRAGMENT_ROOT: case IJavaElement.JAVA_PROJECT: return new IJavaElement[] { elem }; case IJavaElement.CLASS_FILE: return new IJavaElement[] { ((IClassFile)input).getType() }; case IJavaElement.COMPILATION_UNIT: case IJavaElement.IMPORT_CONTAINER: case IJavaElement.IMPORT_DECLARATION: case IJavaElement.PACKAGE_DECLARATION: { ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT); if (cu != null) { IType[] types= cu.getTypes(); if (types.length > 0) { return types; } } break; } default: } } catch (JavaModelException e) { JavaPlugin.log(e); } return null; } }
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
package org.eclipse.jdt.internal.ui.text.javadoc; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.graphics.Image; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion;
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
import org.eclipse.jface.text.contentassist.CompletionProposal; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.corext.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.text.java.ResultCollector; public class CompletionEvaluator { protected final static String[] fgTagProposals= { "@author", "@deprecated", "@exception", "@link", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" };
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
protected final static String[] fgHTMLProposals= { "<code>", "</code>", "<br>", "<b>", "</b>", "<i>", "</i>", "<pre>", "</pre>" }; private ICompilationUnit fCompilationUnit; private IDocument fDocument; private int fCurrentPos; private int fCurrentLength; private JavaElementLabelProvider fLabelProvider; private List fResult; private boolean fRestrictToMatchingCase; public CompletionEvaluator(ICompilationUnit cu, IDocument doc, int pos, int length) { fCompilationUnit= cu; fDocument= doc; fCurrentPos= pos; fCurrentLength= length; fResult= new ArrayList(); fRestrictToMatchingCase= false; fLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_PARAMETERS); } /**
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
* Tells this evaluator to restrict is proposals to those * starting with matching cases. * * @param restrict <code>true</code> if proposals should be restricted */ public void restrictProposalsToMatchingCases(boolean restrict) { fRestrictToMatchingCase= restrict; } private static boolean isWordPart(char ch) { return Character.isJavaIdentifierPart(ch) || (ch == '#') || (ch == '.') || (ch == '/'); } private static int findCharBeforeWord(IDocument doc, int lineBeginPos, int pos) { int currPos= pos - 1; if (currPos > lineBeginPos) { try { while (currPos > lineBeginPos && isWordPart(doc.getChar(currPos))) { currPos--; } return currPos; } catch (BadLocationException e) { } } return pos; } private static int findLastWhitespace(IDocument doc, int lineBeginPos, int pos) { try { int currPos= pos - 1;
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
while (currPos >= lineBeginPos && Character.isWhitespace(doc.getChar(currPos))) { currPos--; } return currPos + 1; } catch (BadLocationException e) { } return pos; } private static int findClosingCharacter(IDocument doc, int pos, int end, char endChar) throws BadLocationException { int curr= pos; while (curr < end && (doc.getChar(curr) != endChar)) { curr++; } if (curr < end) { return curr + 1; } return pos; } private static int findReplaceEndPos(IDocument doc, String newText, String oldText, int pos) { if (oldText.length() == 0 || oldText.equals(newText)) { return pos; } try { IRegion lineInfo= doc.getLineInformationOfOffset(pos); int end= lineInfo.getOffset() + lineInfo.getLength(); if (newText.endsWith(">")) {
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
return findClosingCharacter(doc, pos, end, '>'); } else { char ch= 0; int pos1= pos; while (pos1 < end && Character.isJavaIdentifierPart(ch= doc.getChar(pos1))) { pos1++; } if (pos1 < end) { if ((ch == '(') && newText.endsWith(")")) { return findClosingCharacter(doc, pos1, end, ')'); } } return pos1; } } catch (BadLocationException e) { e.printStackTrace(); } return pos; } public ICompletionProposal[] computeProposals() throws JavaModelException { evalProposals(); ICompletionProposal[] res= new ICompletionProposal[fResult.size()]; fResult.toArray(res); fResult.clear(); return res; }
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
private void evalProposals() throws JavaModelException { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) { return; } char firstChar= fDocument.getChar(word1Begin); if (firstChar == '@') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgTagProposals, JavaPluginImages.IMG_OBJS_JAVADOCTAG); return; } else if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; } String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); int word2End= findLastWhitespace(fDocument, lineBeginPos, word1Begin); if (word2End != lineBeginPos) { int word2Begin= findCharBeforeWord(fDocument, lineBeginPos, word2End);
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
if (fDocument.getChar(word2Begin) == '@') { String tag= fDocument.get(word2Begin, word2End - word2Begin); if (addArgumentProposals(tag, prefix)) { return; } } } addAllTags(prefix); } catch (BadLocationException e) { } } private boolean prefixMatches(String prefix, String proposal) { if (fRestrictToMatchingCase) { return proposal.startsWith(prefix); } else if (proposal.length() >= prefix.length()) { return prefix.equalsIgnoreCase(proposal.substring(0, prefix.length())); } return false; } private void addAllTags(String prefix) { String jdocPrefix= "@" + prefix; for (int i= 0; i < fgTagProposals.length; i++) { String curr= fgTagProposals[i]; if (prefixMatches(jdocPrefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_JAVADOCTAG), null));
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} } String htmlPrefix= "<" + prefix; for (int i= 0; i < fgHTMLProposals.length; i++) { String curr= fgHTMLProposals[i]; if (prefixMatches(htmlPrefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_HTMLTAG), null)); } } } private void addProposals(String prefix, String[] choices, String imageName) { for (int i= 0; i < choices.length; i++) { String curr= choices[i]; if (prefixMatches(prefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(imageName), null)); } } } private void addProposals(String prefix, IJavaElement[] choices) { for (int i= 0; i < choices.length; i++) { IJavaElement elem= choices[i]; String curr= getReplaceString(elem); if (prefixMatches(prefix, curr)) { String info= getProposalInfo(elem); fResult.add(createCompletion(curr, prefix, fLabelProvider.getText(elem), fLabelProvider.getImage(elem), info)); } } }
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
private String getProposalInfo(IJavaElement elem) { if (elem instanceof IMember) { try { Reader reader= JavaDocAccess.getJavaDoc((IMember)elem); if (reader != null) { return (new JavaDoc2HTMLTextReader(reader)).getString(); } } catch (JavaModelException e) { JavaPlugin.getDefault().log(e); } catch (IOException e) { JavaPlugin.getDefault().log(e); } } return null; } private String getReplaceString(IJavaElement elem) { if (elem instanceof IMethod) { IMethod meth= (IMethod)elem; StringBuffer buf= new StringBuffer(); buf.append(meth.getElementName()); buf.append('('); String[] types= meth.getParameterTypes(); int last= types.length - 1; for (int i= 0; i <= last; i++) { buf.append(Signature.toString(types[i])); if (i != last) { buf.append(", ");
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} } buf.append(')'); return buf.toString(); } else { return elem.getElementName(); } } /** * Returns true if case is handeled */ private boolean addArgumentProposals(String tag, String argument) throws JavaModelException { if ("@see".equals(tag) || "@link".equals(tag)) { evalSeeTag(argument); return true; } else if ("@param".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] names= ((IMethod)elem).getParameterNames(); addProposals(argument, names, JavaPluginImages.IMG_MISC_DEFAULT); } return true; } else if ("@throws".equals(tag) || "@exception".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] exceptions= ((IMethod)elem).getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { String curr= Signature.toString(exceptions[i]); if (prefixMatches(argument, curr)) {
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
fResult.add(createCompletion(curr, argument, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CLASS), null)); } } } return true; } else if ("@serialData".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IField) { String name= ((IField)elem).getElementName(); fResult.add(createCompletion(name, argument, name, fLabelProvider.getImage(elem), null)); } return true; } return false; } private void evalSeeTag(String arg) throws JavaModelException { int wordStart= fCurrentPos - arg.length(); int pidx= arg.indexOf('#'); if (pidx == -1) { ICompletionProposal[] completions= getTypeNameCompletion(wordStart); if (completions != null) { for (int i= 0; i < completions.length; i++) { fResult.add(completions[i]); } } } else { IType parent= null; if (pidx > 0) {
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
parent= getTypeNameResolve(wordStart, wordStart + pidx); } else { IJavaElement elem= fCompilationUnit.getElementAt(wordStart); if (elem != null) { parent= (IType)JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE); } } if (parent != null) { int nidx= arg.indexOf('(', pidx); if (nidx == -1) { nidx= arg.length(); } String prefix= arg.substring(pidx + 1, nidx); addProposals(prefix, parent.getMethods()); addProposals(prefix, parent.getFields()); } } } private ICompletionProposal[] getTypeNameCompletion(int wordStart) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, fCurrentPos); if (preparedCU != null) { ResultCollector collector= new ResultCollector(); collector.reset(fCurrentPos, fCompilationUnit.getJavaProject(), fCompilationUnit); try { preparedCU.codeComplete(fCurrentPos, collector); } finally {
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
preparedCU.destroy(); } return collector.getResults(); } return null; } private IType getTypeNameResolve(int wordStart, int wordEnd) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, wordEnd); if (preparedCU != null) { try { IJavaElement[] elements= preparedCU.codeSelect(wordStart, wordEnd - wordStart); if (elements != null && elements.length == 1 && elements[0] instanceof IType) { return (IType) elements[0]; } } finally { preparedCU.getBuffer().setContents(fCompilationUnit.getBuffer().getCharacters()); preparedCU.destroy(); } } return null; } private ICompilationUnit createPreparedCU(int wordStart, int wordEnd) throws JavaModelException { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (!(elem instanceof ISourceReference)) { return null; } int startpos= ((ISourceReference)elem).getSourceRange().getOffset();
11,801
Bug 11801 No type completion in @see javadoc tag
20020319 When defining an ICompletionRequestor (org.eclipse.jdt.core) adapter, I could not get completion onto the @see tag in the leading javadoc comment (@see ICompletionRequestor). [package org.eclipse.jdt.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.core.compiler.IProblem; /** * Adapter of the requestor interface <code>ICompletionRequestor</code>. * * @see ICompletionRequestor * @since 2.0 */ public class CompletionRequestorAdapter implements ICompletionRequestor { } ]
resolved fixed
73529a3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T15:46:18Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
char[] content= (char[]) fCompilationUnit.getBuffer().getCharacters().clone(); if (wordStart < content.length) { for (int i= startpos; i < wordStart; i++) { content[i]= ' '; } } if (wordEnd + 2 < content.length) { content[wordEnd]= ' '; content[wordEnd + 1]= 'x'; } ICompilationUnit cu= fCompilationUnit; if (cu.isWorkingCopy()) { cu= (ICompilationUnit) cu.getOriginalElement(); } ICompilationUnit newCU= (ICompilationUnit) cu.getWorkingCopy(); newCU.getBuffer().setContents(content); return newCU; } private ICompletionProposal createCompletion(String newText, String oldText, String labelText, Image image, String info) { int offset= fCurrentPos - oldText.length(); int length= fCurrentLength + oldText.length(); if (fCurrentLength == 0) length= findReplaceEndPos(fDocument, newText, oldText, fCurrentPos) - offset; return new CompletionProposal(newText, offset, length, newText.length(), image, labelText, null, info); } }
12,087
Bug 12087 problem while closing the project
i am using eclipse 20020314 build. i have 5 projects on my workspace with all but one closed. when i am closing this one with some files open in editor, it is giving error messages in message box saying project 1 not open, project 2 not open .... log says Log: Thu Mar 21 11:54:00 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdt is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdtcore is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /mycxpita is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /test is not open. Log: Thu Mar 21 11:54:01 IST 2002 ne help ?? thanx in advance Nachiketa Sahoo
resolved fixed
7243c80
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:17:37Z
2002-03-22T06:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.viewsupport; import java.util.HashSet; import java.util.Set; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IMarkerDelta; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.util.ListenerList; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.internal.ui.JavaPlugin; /** * Listens to resource deltas and filters for marker changes of type IMarker.PROBLEM * Viewers showing error ticks should register as listener to * this type. */ public class ProblemMarkerManager implements IResourceChangeListener {
12,087
Bug 12087 problem while closing the project
i am using eclipse 20020314 build. i have 5 projects on my workspace with all but one closed. when i am closing this one with some files open in editor, it is giving error messages in message box saying project 1 not open, project 2 not open .... log says Log: Thu Mar 21 11:54:00 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdt is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdtcore is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /mycxpita is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /test is not open. Log: Thu Mar 21 11:54:01 IST 2002 ne help ?? thanx in advance Nachiketa Sahoo
resolved fixed
7243c80
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:17:37Z
2002-03-22T06:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
/** * Visitors used to filter the element delta changes */ private static class ProjectErrorVisitor implements IResourceDeltaVisitor { private HashSet fChangedElements; public ProjectErrorVisitor(HashSet changedElements) { fChangedElements= changedElements; } public boolean visit(IResourceDelta delta) throws CoreException { IResource res= delta.getResource(); if (res instanceof IProject && delta.getKind() == IResourceDelta.CHANGED) { try { IProject project= (IProject) res; if (!(project.hasNature(JavaCore.NATURE_ID) && project.isOpen())) { return false;
12,087
Bug 12087 problem while closing the project
i am using eclipse 20020314 build. i have 5 projects on my workspace with all but one closed. when i am closing this one with some files open in editor, it is giving error messages in message box saying project 1 not open, project 2 not open .... log says Log: Thu Mar 21 11:54:00 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdt is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdtcore is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /mycxpita is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /test is not open. Log: Thu Mar 21 11:54:01 IST 2002 ne help ?? thanx in advance Nachiketa Sahoo
resolved fixed
7243c80
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:17:37Z
2002-03-22T06:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
} } catch (CoreException e) { JavaPlugin.log(e.getStatus()); return false; } } checkInvalidate(delta, res.getFullPath()); return true; } private void checkInvalidate(IResourceDelta delta, IPath path) { int kind= delta.getKind(); if (kind == IResourceDelta.REMOVED || kind == IResourceDelta.ADDED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { while (!path.isEmpty() && !path.isRoot() && !fChangedElements.contains(path)) { fChangedElements.add(path); path= path.removeLastSegments(1); } } } private boolean isErrorDelta(IResourceDelta delta) { if ((delta.getFlags() & IResourceDelta.MARKERS) != 0) { IMarkerDelta[] markerDeltas= delta.getMarkerDeltas(); for (int i= 0; i < markerDeltas.length; i++) { if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM)) { int kind= markerDeltas[i].getKind(); if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED) return true; int severity= markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
12,087
Bug 12087 problem while closing the project
i am using eclipse 20020314 build. i have 5 projects on my workspace with all but one closed. when i am closing this one with some files open in editor, it is giving error messages in message box saying project 1 not open, project 2 not open .... log says Log: Thu Mar 21 11:54:00 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdt is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdtcore is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /mycxpita is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /test is not open. Log: Thu Mar 21 11:54:01 IST 2002 ne help ?? thanx in advance Nachiketa Sahoo
resolved fixed
7243c80
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:17:37Z
2002-03-22T06:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1); if (newSeverity != severity) return true; } } } return false; } } private ListenerList fListeners; public ProblemMarkerManager() { fListeners= new ListenerList(5); } /* * @see IResourceChangeListener#resourceChanged */ public void resourceChanged(IResourceChangeEvent event) { HashSet changedElements= new HashSet(); try { IResourceDelta delta= event.getDelta(); if (delta != null) delta.accept(new ProjectErrorVisitor(changedElements)); } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } if (changedElements.size() > 0) { fireChanges(changedElements);
12,087
Bug 12087 problem while closing the project
i am using eclipse 20020314 build. i have 5 projects on my workspace with all but one closed. when i am closing this one with some files open in editor, it is giving error messages in message box saying project 1 not open, project 2 not open .... log says Log: Thu Mar 21 11:54:00 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /cxindeploy is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdt is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /jdtcore is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /mycxpita is not open. Log: Thu Mar 21 11:54:01 IST 2002 4 org.eclipse.core.resources 372 Resource /test is not open. Log: Thu Mar 21 11:54:01 IST 2002 ne help ?? thanx in advance Nachiketa Sahoo
resolved fixed
7243c80
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:17:37Z
2002-03-22T06:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
} } /** * Adds a listener for problem marker changes. */ public void addListener(IProblemChangedListener listener) { if (fListeners.isEmpty()) { JavaPlugin.getWorkspace().addResourceChangeListener(this); } fListeners.add(listener); } /** * Removes a <code>IProblemChangedListener</code>. */ public void removeListener(IProblemChangedListener listener) { fListeners.remove(listener); if (fListeners.isEmpty()) { JavaPlugin.getWorkspace().removeResourceChangeListener(this); } } private void fireChanges(Set changes) { Object[] listeners= fListeners.getListeners(); for (int i= 0; i < listeners.length; i++) { IProblemChangedListener curr= (IProblemChangedListener) listeners[i]; curr.problemsChanged(changes); } } }
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.wizards; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.swt.widgets.Composite; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer;
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModel; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.*; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator; import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField; /** * Base class for Java wizards. Provides source folder selection UI, validation and creation. * @since 2.0 */ public abstract class NewContainerWizardPage extends NewElementWizardPage {
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
/** * container field id */ protected static final String CONTAINER= "NewContainerWizardPage.container"; /** * Status of last validation */ protected IStatus fContainerStatus; private StringButtonDialogField fContainerDialogField; /* * package fragment root corresponding to the input type (can be null) */ private IPackageFragmentRoot fCurrRoot; private IWorkspaceRoot fWorkspaceRoot; public NewContainerWizardPage(String name) { super(name); fWorkspaceRoot= ResourcesPlugin.getWorkspace().getRoot(); ContainerFieldAdapter adapter= new ContainerFieldAdapter(); fContainerDialogField= new StringButtonDialogField(adapter); fContainerDialogField.setDialogFieldListener(adapter); fContainerDialogField.setLabelText(NewWizardMessages.getString("NewContainerWizardPage.container.label")); fContainerDialogField.setButtonLabel(NewWizardMessages.getString("NewContainerWizardPage.container.button"));
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
fContainerStatus= new StatusInfo(); fCurrRoot= null; } /** * Initializes the fields provided by the container page with a given * Java element as selection. * @param elem The initial selection of this page or null if no * selection was available */ protected void initContainerPage(IJavaElement elem) { IPackageFragmentRoot initRoot= null; if (elem != null) { initRoot= JavaModelUtil.getPackageFragmentRoot(elem); if (initRoot == null || initRoot.isArchive()) { IJavaProject jproject= elem.getJavaProject(); try { initRoot= null; IPackageFragmentRoot[] roots= jproject.getPackageFragmentRoots(); for (int i= 0; i < roots.length; i++) { if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) { initRoot= roots[i]; break; } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } if (initRoot == null) { initRoot= jproject.getPackageFragmentRoot("");
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} } } setPackageFragmentRoot(initRoot, true); } /** * Utility method to inspect a selection to find a Java element as initial element. * @return Returns a Java element to use as initial selection, or <code>null</code>, * if none is found. */ protected IJavaElement getInitialJavaElement(IStructuredSelection selection) { IJavaElement jelem= null; if (selection != null && !selection.isEmpty()) { Object selectedElement= selection.getFirstElement(); if (selectedElement instanceof IAdaptable) { IAdaptable adaptable= (IAdaptable) selectedElement; jelem= (IJavaElement) adaptable.getAdapter(IJavaElement.class); if (jelem == null) { IResource resource= (IResource) adaptable.getAdapter(IResource.class); if (resource != null) { IProject proj= resource.getProject(); if (proj != null) { jelem= JavaCore.create(proj); } } } } }
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
if (jelem == null) { jelem= EditorUtility.getActiveEditorJavaInput(); } if (jelem == null) { IProject[] projects= getWorkspaceRoot().getProjects(); if (projects.length > 0) { jelem= JavaCore.create(projects[0]); } } return jelem; } /** * Returns the recommended maximum width for text fields (in pixels) * Not valid until entering createContent. * Overwrite to change value. */ protected int getMaxFieldWidth() { return convertWidthInCharsToPixels(40); } /** * Creates the controls for the container field. Expects a GridLayout with at least 3 columns. * @param parent The parent composite * @param nColumns The number of columns to span */ protected void createContainerControls(Composite parent, int nColumns) { fContainerDialogField.doFillIntoGrid(parent, nColumns); LayoutUtil.setWidthHint(fContainerDialogField.getTextControl(null), getMaxFieldWidth());
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} protected void setFocusOnContainer() { fContainerDialogField.setFocus(); } private class ContainerFieldAdapter implements IStringButtonAdapter, IDialogFieldListener { public void changeControlPressed(DialogField field) { containerChangeControlPressed(field); } public void dialogFieldChanged(DialogField field) { containerDialogFieldChanged(field); } } private void containerChangeControlPressed(DialogField field) { IPackageFragmentRoot root= getPackageFragmentRoot(); root= chooseSourceContainer(root); if (root != null) { setPackageFragmentRoot(root, true); } } private void containerDialogFieldChanged(DialogField field) { if (field == fContainerDialogField) { fContainerStatus= containerChanged();
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} handleFieldChanged(CONTAINER); } /** * Called after the container field has changed. * Updates the model and returns the status. * Model is only valid if returned status is OK */ protected IStatus containerChanged() { StatusInfo status= new StatusInfo(); fCurrRoot= null; String str= getPackageFragmentRootText(); if (str.length() == 0) { status.setError(NewWizardMessages.getString("NewContainerWizardPage.error.EnterContainerName")); return status; } IPath path= new Path(str); IResource res= fWorkspaceRoot.findMember(path); if (res != null) { int resType= res.getType(); if (resType == IResource.PROJECT || resType == IResource.FOLDER) { IProject proj= res.getProject(); if (!proj.isOpen()) { status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ProjectClosed", proj.getFullPath().toString())); return status;
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} IJavaProject jproject= JavaCore.create(proj); fCurrRoot= jproject.getPackageFragmentRoot(res); if (fCurrRoot.exists()) { try { if (!proj.hasNature(JavaCore.NATURE_ID)) { if (resType == IResource.PROJECT) { status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotAJavaProject")); } else { status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotInAJavaProject")); } return status; } } catch (CoreException e) { status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotAJavaProject")); } try { if (!JavaModelUtil.isOnBuildPath(jproject, fCurrRoot)) { status.setWarning(NewWizardMessages.getFormattedString("NewContainerWizardPage.warning.NotOnClassPath", str)); } } catch (JavaModelException e) { status.setWarning(NewWizardMessages.getFormattedString("NewContainerWizardPage.warning.NotOnClassPath", str)); } if (fCurrRoot.isArchive()) { status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ContainerIsBinary", str)); return status; } } return status; } else {
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.NotAFolder", str)); return status; } } else { status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ContainerDoesNotExist", str)); return status; } } /** * Called when a field on a page changed. Every sub type is responsible to * call this method when a field on its page has changed. * Subtypes override (extend) the method to add verification when own field has a * dependency to an other field. (for example the class name input must be verified * again, when the package field changes (check for duplicated class names)) * @param fieldName The name of the field that has changed (field id) */ protected void handleFieldChanged(String fieldName) { } /** * Returns the workspace root. */ protected IWorkspaceRoot getWorkspaceRoot() { return fWorkspaceRoot;
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} /** * Returns the PackageFragmentRoot corresponding to the current input. * @return the PackageFragmentRoot or <code>null</code> if the current * input is not a valid source folder */ public IPackageFragmentRoot getPackageFragmentRoot() { return fCurrRoot; } /** * Returns the text of the container field. */ public String getPackageFragmentRootText() { return fContainerDialogField.getText(); } /** * Sets the current PackageFragmentRoot (model and text field). * @param canBeModified Selects if the container field can be changed by the user */ public void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified) { fCurrRoot= root; String str= (root == null) ? "" : root.getPath().makeRelative().toString(); fContainerDialogField.setText(str); fContainerDialogField.setEnabled(canBeModified); }
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
private IPackageFragmentRoot chooseSourceContainer(IJavaElement initElement) { Class[] acceptedClasses= new Class[] { IPackageFragmentRoot.class, IJavaProject.class }; ISelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false) { public boolean isSelectedValid(Object element) { try { if (element instanceof IJavaProject) { IJavaProject jproject= (IJavaProject)element; IPath path= jproject.getProject().getFullPath(); return (jproject.findPackageFragmentRoot(path) != null); } else if (element instanceof IPackageFragmentRoot) { return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE); } return true; } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } return false; } }; acceptedClasses= new Class[] { IJavaModel.class, IPackageFragmentRoot.class, IJavaProject.class }; ViewerFilter filter= new TypedViewerFilter(acceptedClasses) { public boolean select(Viewer viewer, Object parent, Object element) { if (element instanceof IPackageFragmentRoot) { try { return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); return false;
3,975
Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
resolved fixed
86be48a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T16:41:45Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
} } return super.select(viewer, parent, element); } }; JavaElementContentProvider provider= new JavaElementContentProvider(); ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, provider); dialog.setValidator(validator); dialog.setSorter(new JavaElementSorter()); dialog.setTitle(NewWizardMessages.getString("NewContainerWizardPage.ChooseSourceContainerDialog.title")); dialog.setMessage(NewWizardMessages.getString("NewContainerWizardPage.ChooseSourceContainerDialog.description")); dialog.addFilter(filter); dialog.setInput(JavaCore.create(fWorkspaceRoot)); dialog.setInitialSelection(initElement); if (dialog.open() == dialog.OK) { Object element= dialog.getFirstResult(); if (element instanceof IJavaProject) { IJavaProject jproject= (IJavaProject)element; return jproject.getPackageFragmentRoot(jproject.getProject()); } else if (element instanceof IPackageFragmentRoot) { return (IPackageFragmentRoot)element; } return null; } return null; } }
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyAdornmentProvider.java
package org.eclipse.jdt.internal.ui.typehierarchy; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage; import org.eclipse.jdt.internal.ui.viewsupport.IAdornmentProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; public class HierarchyAdornmentProvider implements IAdornmentProvider {
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyAdornmentProvider.java
private TypeHierarchyLifeCycle fHierarchy; /** * Constructor for HierarchyLabelProvider. * @param flags */ public HierarchyAdornmentProvider(TypeHierarchyLifeCycle hierarchy) { super(); fHierarchy= hierarchy; } /* * @see IAdornmentProvider#computeAdornmentFlags(Object) */ public int computeAdornmentFlags(Object element) { if (element instanceof IType) { IType type= (IType) element; IJavaElement input= fHierarchy.getInputElement(); if (input != null && input.getElementType() != IJavaElement.TYPE) { IJavaElement parent= JavaModelUtil.findElementOfKind(type, input.getElementType()); if (!input.equals(parent)) { return JavaElementImageProvider.LIGHT_TYPE_ICONS; } } } else if (element instanceof IMethod && AppearancePreferencePage.showOverrideIndicators()) {
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyAdornmentProvider.java
try { IMethod method= (IMethod) element; int flags= method.getFlags(); IType type= method.getDeclaringType(); ITypeHierarchy hierarchy= fHierarchy.getHierarchy(); if (type.isClass() && !method.isConstructor() && !Flags.isPrivate(flags) && !Flags.isStatic(flags) && (hierarchy != null)) { IMethod impl= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, type, method.getElementName(), method.getParameterTypes(), false); if (impl != null) { IMethod overridden= JavaModelUtil.findMethodImplementationInHierarchy(hierarchy, type, method.getElementName(), method.getParameterTypes(), false); if (overridden != null) { return JavaElementImageProvider.OVERLAY_OVERRIDE; } else { return JavaElementImageProvider.OVERLAY_IMPLEMENTS; } } } } catch (JavaModelException e) { JavaPlugin.log(e); } } return 0; } /* * @see IAdornmentProvider#dispose */ public void dispose() { } }
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jdt.core.ElementChangedEvent; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit;
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
import org.eclipse.jdt.core.IElementChangedListener; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaElementDelta; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IRegion; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.ITypeHierarchyChangedListener; import org.eclipse.jdt.core.IWorkingCopy; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; /** * Manages a type hierarchy, to keep it refreshed, and to allow it to be shared. */ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IElementChangedListener { private boolean fHierarchyRefreshNeeded; private ITypeHierarchy fHierarchy; private IJavaElement fInputElement; private boolean fIsSuperTypesOnly; private List fChangeListeners; public TypeHierarchyLifeCycle() { this(false); }
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
public TypeHierarchyLifeCycle(boolean isSuperTypesOnly) { fHierarchy= null; fInputElement= null; fIsSuperTypesOnly= isSuperTypesOnly; fChangeListeners= new ArrayList(2); } public ITypeHierarchy getHierarchy() { return fHierarchy; } public IJavaElement getInputElement() { return fInputElement; } public void freeHierarchy() { if (fHierarchy != null) { fHierarchy.removeTypeHierarchyChangedListener(this); JavaCore.removeElementChangedListener(this); fHierarchy= null; fInputElement= null; } } public void removeChangedListener(ITypeHierarchyLifeCycleListener listener) { fChangeListeners.remove(listener); }
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
public void addChangedListener(ITypeHierarchyLifeCycleListener listener) { if (!fChangeListeners.contains(listener)) { fChangeListeners.add(listener); } } private void fireChange(IType[] changedTypes) { for (int i= fChangeListeners.size()-1; i>=0; i--) { ITypeHierarchyLifeCycleListener curr= (ITypeHierarchyLifeCycleListener) fChangeListeners.get(i); curr.typeHierarchyChanged(this, changedTypes); } } public void ensureRefreshedTypeHierarchy(final IJavaElement element) throws JavaModelException { if (element == null || !element.exists()) { freeHierarchy(); return; } boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement)); if (hierachyCreationNeeded || fHierarchyRefreshNeeded) { IRunnableWithProgress op= new IRunnableWithProgress() { public void run(IProgressMonitor pm) throws InvocationTargetException { try { doHierarchyRefresh(element, pm); } catch (JavaModelException e) { throw new InvocationTargetException(e); } } };
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
try { new BusyIndicatorRunnableContext().run(false, false, op); } catch (InvocationTargetException e) { Throwable th= e.getTargetException(); if (th instanceof JavaModelException) { throw (JavaModelException)th; } else { throw new JavaModelException(th, IStatus.ERROR); } } catch (InterruptedException e) { } fHierarchyRefreshNeeded= false; } } private void doHierarchyRefresh(IJavaElement element, IProgressMonitor pm) throws JavaModelException { boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement)); if (fHierarchy != null) { fHierarchy.removeTypeHierarchyChangedListener(this); JavaCore.removeElementChangedListener(this); } if (hierachyCreationNeeded) { fInputElement= element; if (element.getElementType() == IJavaElement.TYPE) { IType type= (IType) element;
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
if (fIsSuperTypesOnly) { fHierarchy= type.newSupertypeHierarchy(pm); } else { fHierarchy= type.newTypeHierarchy(pm); } } else { IRegion region= JavaCore.newRegion(); if (element.getElementType() == IJavaElement.JAVA_PROJECT) { IPackageFragmentRoot[] roots= ((IJavaProject) element).getPackageFragmentRoots(); for (int i= 0; i < roots.length; i++) { if (!roots[i].isExternal()) { region.add(roots[i]); } } } else { region.add(element); } IJavaProject jproject= element.getJavaProject(); fHierarchy= jproject.newTypeHierarchy(region, pm); } } else { fHierarchy.refresh(pm); } fHierarchy.addTypeHierarchyChangedListener(this); JavaCore.addElementChangedListener(this); } /* * @see ITypeHierarchyChangedListener#typeHierarchyChanged
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
*/ public void typeHierarchyChanged(ITypeHierarchy typeHierarchy) { fHierarchyRefreshNeeded= true; } /* * @see IElementChangedListener#elementChanged(ElementChangedEvent) */ public void elementChanged(ElementChangedEvent event) { if (fChangeListeners.isEmpty()) { return; } IJavaElement elem= event.getDelta().getElement(); if (elem instanceof IWorkingCopy && ((IWorkingCopy)elem).isWorkingCopy()) { return; } if (fHierarchyRefreshNeeded) { fireChange(null); } else { ArrayList changedTypes= new ArrayList(); processDelta(event.getDelta(), changedTypes); if (changedTypes.size() > 0) { fireChange((IType[]) changedTypes.toArray(new IType[changedTypes.size()])); } } } /* * Assume that the hierarchy is intact (no refresh needed) */
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
private void processDelta(IJavaElementDelta delta, ArrayList changedTypes) { IJavaElement element= delta.getElement(); switch (element.getElementType()) { case IJavaElement.TYPE: processTypeDelta((IType) element, changedTypes); processChildrenDelta(delta, changedTypes); break; case IJavaElement.JAVA_MODEL: case IJavaElement.JAVA_PROJECT: case IJavaElement.PACKAGE_FRAGMENT_ROOT: case IJavaElement.PACKAGE_FRAGMENT: processChildrenDelta(delta, changedTypes); break; case IJavaElement.COMPILATION_UNIT: if (delta.getKind() == IJavaElementDelta.CHANGED && isPossibleStructuralChange(delta.getFlags())) { try { IType[] types= ((ICompilationUnit) element).getAllTypes(); for (int i= 0; i < types.length; i++) { processTypeDelta(types[i], changedTypes); } } catch (JavaModelException e) { JavaPlugin.log(e); } } else { processChildrenDelta(delta, changedTypes); } break; case IJavaElement.CLASS_FILE: if (delta.getKind() == IJavaElementDelta.CHANGED) { try {
3,992
Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
resolved fixed
ef84cc3
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:04:15Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
IType type= ((IClassFile) element).getType(); processTypeDelta(type, changedTypes); } catch (JavaModelException e) { JavaPlugin.log(e); } } else { processChildrenDelta(delta, changedTypes); } break; } } private boolean isPossibleStructuralChange(int flags) { return (flags & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_FINE_GRAINED)) == IJavaElementDelta.F_CONTENT; } private void processTypeDelta(IType type, ArrayList changedTypes) { if (getHierarchy().contains(type)) { changedTypes.add(type); } } private void processChildrenDelta(IJavaElementDelta delta, ArrayList changedTypes) { IJavaElementDelta[] children= delta.getAffectedChildren(); for (int i= 0; i < children.length; i++) { processDelta(children[i], changedTypes); } } }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalInfo.java
package org.eclipse.jdt.internal.ui.text.java; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.io.IOException; import java.io.Reader; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.internal.corext.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.text.javadoc.JavaDoc2HTMLTextReader; public class ProposalInfo {
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalInfo.java
private static final int NUMBER_OF_JAVADOC_LINES= 12; private IJavaProject fJavaProject; private char[] fPackageName; private char[] fTypeName; private char[] fMemberName; private char[][] fParameterPackages; private char[][] fParameterTypes; private boolean fIsConstructor; public ProposalInfo(IJavaProject jproject, char[] packName, char[] typeQualifiedName, char[] methodName, char[][] paramPackages, char[][] paramTypes, boolean isConstructor) { fJavaProject= jproject; fPackageName= packName; fTypeName= typeQualifiedName; fMemberName= methodName; fParameterPackages= paramPackages; fParameterTypes= paramTypes; fIsConstructor= isConstructor; }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalInfo.java
public ProposalInfo(IJavaProject jproject, char[] packName, char[] typeQualifiedName) { this(jproject, packName, typeQualifiedName, null, null, null, false); } public ProposalInfo(IJavaProject jproject, char[] packName, char[] typeQualifiedName, char[] fieldName) { this(jproject, packName, typeQualifiedName, fieldName, null, null, false); } private String getParameterSignature(int index) { StringBuffer buf= new StringBuffer(); char[] pack= fParameterPackages[index]; if (pack != null && pack.length > 0) { buf.append(pack); buf.append('.'); } buf.append(fParameterTypes[index]); return Signature.createTypeSignature(buf.toString(), true); } /** * Gets the text for this proposal info */ public String getInfo() { try { IType type= JavaModelUtil.findType(fJavaProject, new String(fPackageName), new String(fTypeName)); if (type != null) { IMember member= null; if (fMemberName != null) { String name= new String(fMemberName); if (fParameterTypes != null) { String[] paramTypes= new String[fParameterTypes.length];
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ProposalInfo.java
for (int i= 0; i < fParameterTypes.length; i++) { paramTypes[i]= getParameterSignature(i); } member= JavaModelUtil.findMethod(name, paramTypes, fIsConstructor, type); } else { IField field= type.getField(name); if (field.exists()) { member= field; } } } else { member= type; } if (member != null) { Reader reader= JavaDocAccess.getJavaDoc(member); if (reader != null) { return new JavaDoc2HTMLTextReader(reader).getString(); } } } } catch (JavaModelException e) { JavaPlugin.log(e); } catch (IOException e) { JavaPlugin.log(e); } return null; } }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
package org.eclipse.jdt.internal.ui.text.java.hover; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.io.Reader; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextViewer; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.jdt.core.ICodeAssist; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.ui.text.java.hover.IJavaEditorTextHover; import org.eclipse.jdt.internal.corext.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput; import org.eclipse.jdt.internal.ui.text.HTMLPrinter; import org.eclipse.jdt.internal.ui.text.JavaWordFinder; import org.eclipse.jdt.internal.ui.text.javadoc.JavaDoc2HTMLTextReader; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; public class JavaTypeHover implements IJavaEditorTextHover {
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
private IEditorPart fEditor; private IJavaEditorTextHover fProblemHover; private final int LABEL_FLAGS= JavaElementLabels.ALL_FULLY_QUALIFIED | JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.M_EXCEPTIONS | JavaElementLabels.F_PRE_TYPE_SIGNATURE; public JavaTypeHover() { fProblemHover= new JavaProblemHover(); } /** * @see IJavaEditorTextHover#setEditor(IEditorPart) */ public void setEditor(IEditorPart editor) { fEditor= editor;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
fProblemHover.setEditor(editor); } private ICodeAssist getCodeAssist() { if (fEditor != null) { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFileEditorInput cfeInput= (IClassFileEditorInput) input; return cfeInput.getClassFile(); } IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input); } return null; } private String getInfoText(IMember member) { return JavaElementLabels.getElementLabel(member, LABEL_FLAGS); } /* * @see ITextHover#getHoverRegion(ITextViewer, int) */ public IRegion getHoverRegion(ITextViewer textViewer, int offset) { return JavaWordFinder.findWord(textViewer.getDocument(), offset); } /*
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
* @see ITextHover#getHoverInfo(ITextViewer, IRegion) */ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { String hoverInfo= fProblemHover.getHoverInfo(textViewer, hoverRegion); if (hoverInfo != null) return hoverInfo; ICodeAssist resolve= getCodeAssist(); if (resolve != null) { try { IJavaElement[] result= resolve.codeSelect(hoverRegion.getOffset(), hoverRegion.getLength()); if (result == null) return null; int nResults= result.length; if (nResults == 0) return null; StringBuffer buffer= new StringBuffer(); if (nResults > 1) { for (int i= 0; i < result.length; i++) { HTMLPrinter.startBulletList(buffer); IJavaElement curr= result[i]; if (curr instanceof IMember) HTMLPrinter.addBullet(buffer, getInfoText((IMember) curr));
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
HTMLPrinter.endBulletList(buffer); } } else { IJavaElement curr= result[0]; if (curr instanceof IMember) { IMember member= (IMember) curr; HTMLPrinter.addSmallHeader(buffer, getInfoText(member)); Reader reader= JavaDocAccess.getJavaDoc(member); if (reader != null) { HTMLPrinter.addParagraph(buffer, new JavaDoc2HTMLTextReader(reader)); } } } if (buffer.length() > 0) { HTMLPrinter.insertPageProlog(buffer, 0); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); } } catch (JavaModelException x) { JavaPlugin.log(x.getStatus()); } } return null; } }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
package org.eclipse.jdt.internal.ui.text.javadoc; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.io.IOException; import java.io.Reader; import java.util.ArrayList;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
import java.util.List; import org.eclipse.swt.graphics.Image; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.contentassist.CompletionProposal; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jdt.core.CompletionRequestorAdapter; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.corext.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal; import org.eclipse.jdt.internal.ui.text.java.ProposalInfo; public class CompletionEvaluator { protected final static String[] fgTagProposals= { "@author", "@deprecated", "@exception",
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
"@link", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" }; protected final static String[] fgHTMLProposals= { "<code>", "</code>", "<br>", "<b>", "</b>", "<i>", "</i>", "<pre>", "</pre>" }; private ICompilationUnit fCompilationUnit; private IDocument fDocument; private int fCurrentPos; private int fCurrentLength; private JavaElementLabelProvider fLabelProvider; private List fResult; private boolean fRestrictToMatchingCase; public CompletionEvaluator(ICompilationUnit cu, IDocument doc, int pos, int length) { fCompilationUnit= cu; fDocument= doc; fCurrentPos= pos;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
fCurrentLength= length; fResult= new ArrayList(); fRestrictToMatchingCase= false; fLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_PARAMETERS); } /** * Tells this evaluator to restrict is proposals to those * starting with matching cases. * * @param restrict <code>true</code> if proposals should be restricted */ public void restrictProposalsToMatchingCases(boolean restrict) { fRestrictToMatchingCase= restrict; } private static boolean isWordPart(char ch) { return Character.isJavaIdentifierPart(ch) || (ch == '#') || (ch == '.') || (ch == '/'); } private static int findCharBeforeWord(IDocument doc, int lineBeginPos, int pos) { int currPos= pos - 1; if (currPos > lineBeginPos) { try { while (currPos > lineBeginPos && isWordPart(doc.getChar(currPos))) { currPos--; } return currPos; } catch (BadLocationException e) { }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} return pos; } private static int findLastWhitespace(IDocument doc, int lineBeginPos, int pos) { try { int currPos= pos - 1; while (currPos >= lineBeginPos && Character.isWhitespace(doc.getChar(currPos))) { currPos--; } return currPos + 1; } catch (BadLocationException e) { } return pos; } private static int findClosingCharacter(IDocument doc, int pos, int end, char endChar) throws BadLocationException { int curr= pos; while (curr < end && (doc.getChar(curr) != endChar)) { curr++; } if (curr < end) { return curr + 1; } return pos; } private static int findReplaceEndPos(IDocument doc, String newText, String oldText, int pos) { if (oldText.length() == 0 || oldText.equals(newText)) { return pos;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} try { IRegion lineInfo= doc.getLineInformationOfOffset(pos); int end= lineInfo.getOffset() + lineInfo.getLength(); if (newText.endsWith(">")) { return findClosingCharacter(doc, pos, end, '>'); } else { char ch= 0; int pos1= pos; while (pos1 < end && Character.isJavaIdentifierPart(ch= doc.getChar(pos1))) { pos1++; } if (pos1 < end) { if ((ch == '(') && newText.endsWith(")")) { return findClosingCharacter(doc, pos1, end, ')'); } } return pos1; } } catch (BadLocationException e) { e.printStackTrace(); } return pos; }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
public ICompletionProposal[] computeProposals() throws JavaModelException { evalProposals(); ICompletionProposal[] res= new ICompletionProposal[fResult.size()]; fResult.toArray(res); fResult.clear(); return res; } private void evalProposals() throws JavaModelException { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) { return; } char firstChar= fDocument.getChar(word1Begin); if (firstChar == '@') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgTagProposals, JavaPluginImages.IMG_OBJS_JAVADOCTAG); return; } else if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); int word2End= findLastWhitespace(fDocument, lineBeginPos, word1Begin); if (word2End != lineBeginPos) { int word2Begin= findCharBeforeWord(fDocument, lineBeginPos, word2End); if (fDocument.getChar(word2Begin) == '@') { String tag= fDocument.get(word2Begin, word2End - word2Begin); if (addArgumentProposals(tag, prefix)) { return; } } } addAllTags(prefix); } catch (BadLocationException e) { } } private boolean prefixMatches(String prefix, String proposal) { if (fRestrictToMatchingCase) { return proposal.startsWith(prefix); } else if (proposal.length() >= prefix.length()) { return prefix.equalsIgnoreCase(proposal.substring(0, prefix.length())); } return false; }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
private void addAllTags(String prefix) { String jdocPrefix= "@" + prefix; for (int i= 0; i < fgTagProposals.length; i++) { String curr= fgTagProposals[i]; if (prefixMatches(jdocPrefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_JAVADOCTAG), null)); } } String htmlPrefix= "<" + prefix; for (int i= 0; i < fgHTMLProposals.length; i++) { String curr= fgHTMLProposals[i]; if (prefixMatches(htmlPrefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_HTMLTAG), null)); } } } private void addProposals(String prefix, String[] choices, String imageName) { for (int i= 0; i < choices.length; i++) { String curr= choices[i]; if (prefixMatches(prefix, curr)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(imageName), null)); } } } private void addProposals(String prefix, IJavaElement[] choices) { for (int i= 0; i < choices.length; i++) { IJavaElement elem= choices[i];
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
String curr= getReplaceString(elem); if (prefixMatches(prefix, curr)) { String info= getProposalInfo(elem); fResult.add(createCompletion(curr, prefix, fLabelProvider.getText(elem), fLabelProvider.getImage(elem), info)); } } } private String getProposalInfo(IJavaElement elem) { if (elem instanceof IMember) { try { Reader reader= JavaDocAccess.getJavaDoc((IMember)elem); if (reader != null) { return (new JavaDoc2HTMLTextReader(reader)).getString(); } } catch (JavaModelException e) { JavaPlugin.log(e); } catch (IOException e) { JavaPlugin.log(e); } } return null; } private String getReplaceString(IJavaElement elem) { if (elem instanceof IMethod) { IMethod meth= (IMethod)elem; StringBuffer buf= new StringBuffer(); buf.append(meth.getElementName());
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
buf.append('('); String[] types= meth.getParameterTypes(); int last= types.length - 1; for (int i= 0; i <= last; i++) { buf.append(Signature.toString(types[i])); if (i != last) { buf.append(", "); } } buf.append(')'); return buf.toString(); } else { return elem.getElementName(); } } /** * Returns true if case is handeled */ private boolean addArgumentProposals(String tag, String argument) throws JavaModelException { if ("@see".equals(tag) || "@link".equals(tag)) { evalSeeTag(argument); return true; } else if ("@param".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] names= ((IMethod)elem).getParameterNames(); addProposals(argument, names, JavaPluginImages.IMG_MISC_DEFAULT); } return true;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} else if ("@throws".equals(tag) || "@exception".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] exceptions= ((IMethod)elem).getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { String curr= Signature.toString(exceptions[i]); if (prefixMatches(argument, curr)) { fResult.add(createCompletion(curr, argument, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CLASS), null)); } } } return true; } else if ("@serialData".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IField) { String name= ((IField)elem).getElementName(); fResult.add(createCompletion(name, argument, name, fLabelProvider.getImage(elem), null)); } return true; } return false; } private void evalSeeTag(String arg) throws JavaModelException { int wordStart= fCurrentPos - arg.length(); int pidx= arg.indexOf('#'); if (pidx == -1) { evalTypeNameCompletions(wordStart); } else { IType parent= null;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
if (pidx > 0) { parent= getTypeNameResolve(wordStart, wordStart + pidx); } else { IJavaElement elem= fCompilationUnit.getElementAt(wordStart); if (elem != null) { parent= (IType)JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE); } } if (parent != null) { int nidx= arg.indexOf('(', pidx); if (nidx == -1) { nidx= arg.length(); } String prefix= arg.substring(pidx + 1, nidx); addProposals(prefix, parent.getMethods()); addProposals(prefix, parent.getFields()); } } } private void evalTypeNameCompletions(int wordStart) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, fCurrentPos); if (preparedCU != null) { CompletionRequestorAdapter requestor= new CompletionRequestorAdapter() { public void acceptClass(char[] packageName, char[] className, char[] completionName, int modifiers, int start, int end) { fResult.add(createSeeTypeCompletion(true, start, end, completionName, className, packageName));
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} public void acceptInterface(char[] packageName, char[] interfaceName, char[] completionName, int modifiers, int start, int end) { fResult.add(createSeeTypeCompletion(false, start, end, completionName, interfaceName, packageName)); } public void acceptType(char[] packageName, char[] typeName, char[] completionName, int start, int end) { fResult.add(createSeeTypeCompletion(true, start, end, completionName, typeName, packageName)); } }; try { preparedCU.codeComplete(fCurrentPos, requestor); } finally { preparedCU.destroy(); } } } private IType getTypeNameResolve(int wordStart, int wordEnd) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, wordEnd); if (preparedCU != null) { try { IJavaElement[] elements= preparedCU.codeSelect(wordStart, wordEnd - wordStart); if (elements != null && elements.length == 1 && elements[0] instanceof IType) { return (IType) elements[0]; } } finally { preparedCU.getBuffer().setContents(fCompilationUnit.getBuffer().getCharacters()); preparedCU.destroy(); } } return null;
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} private ICompilationUnit createPreparedCU(int wordStart, int wordEnd) throws JavaModelException { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (!(elem instanceof ISourceReference)) { return null; } int startpos= ((ISourceReference)elem).getSourceRange().getOffset(); char[] content= (char[]) fCompilationUnit.getBuffer().getCharacters().clone(); if (elem instanceof IType && (((IType)elem).getDeclaringType() == null) && (wordStart + 6 < content.length)) { content[startpos++]= 'i'; content[startpos++]= 'm'; content[startpos++]= 'p'; content[startpos++]= 'o'; content[startpos++]= 'r'; content[startpos++]= 't'; } if (wordStart < content.length) { for (int i= startpos; i < wordStart; i++) { content[i]= ' '; } } ICompilationUnit cu= fCompilationUnit; if (cu.isWorkingCopy()) { cu= (ICompilationUnit) cu.getOriginalElement(); } ICompilationUnit newCU= (ICompilationUnit) cu.getWorkingCopy(); newCU.getBuffer().setContents(content); return newCU; } private ICompletionProposal createCompletion(String newText, String oldText, String labelText, Image image, String info) { int offset= fCurrentPos - oldText.length(); int length= fCurrentLength + oldText.length();
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
if (fCurrentLength == 0) length= findReplaceEndPos(fDocument, newText, oldText, fCurrentPos) - offset; return new CompletionProposal(newText, offset, length, newText.length(), image, labelText, null, info); } private ICompletionProposal createSeeTypeCompletion(boolean isClass, int start, int end, char[] completion, char[] typeName, char[] containerName) { ProposalInfo proposalInfo= new ProposalInfo(fCompilationUnit.getJavaProject(), containerName, typeName); StringBuffer nameBuffer= new StringBuffer(); nameBuffer.append(typeName); if (containerName != null) { nameBuffer.append(" - "); if (containerName.length > 0) { nameBuffer.append(containerName); } else { nameBuffer.append(JavaDocMessages.getString("CompletionEvaluator.default_package")); } } String imageKey= isClass ? JavaPluginImages.IMG_OBJS_CLASS : JavaPluginImages.IMG_OBJS_INTERFACE; int compLen= completion.length; if (compLen > 0 && completion[compLen - 1] == ';') { compLen--; } JavaCompletionProposal proposal= new JavaCompletionProposal(new String(completion, 0, compLen), start, end - start, JavaPluginImages.get(imageKey), nameBuffer.toString()); proposal.setProposalInfo(proposalInfo); proposal.setTriggerCharacters( new char[] { '#' }); return proposal; } }
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved.
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
*/ package org.eclipse.jdt.internal.ui.util; import java.io.File; import java.io.IOException; import java.net.URL; import java.text.BreakIterator; import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.events.HelpEvent; import org.eclipse.swt.events.HelpListener; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.help.IContext; import org.eclipse.help.IHelp; import org.eclipse.help.IHelpResource; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations; import org.eclipse.jdt.internal.corext.javadoc.SingleCharReader; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.text.HTML2TextReader; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; public class JavaUIHelp {
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
public static void setHelp(StructuredViewer viewer, String contextId) { JavaUIHelpListener listener= new JavaUIHelpListener(viewer, contextId); viewer.getControl().addHelpListener(listener); } private static class JavaUIHelpListener implements HelpListener { private StructuredViewer fViewer; private String fContextId; public JavaUIHelpListener(StructuredViewer viewer, String contextId) { fViewer= viewer; fContextId= contextId; } /* * @see HelpListener#helpRequested(HelpEvent) * */ public void helpRequested(HelpEvent e) { ISelection selection= fViewer.getSelection(); Object selected= SelectionUtil.getSingleElement(selection); IHelp help= WorkbenchHelp.getHelpSupport(); IContext context= help.getContext(fContextId); if (context == null) { return; } if (selected instanceof IJavaElement) { context= new JavaUIContext(context, (IJavaElement) selected); } WorkbenchHelp.displayHelp(context); } } private static class JavaUIContext implements IContext {
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
private IJavaElement fElement; private IHelpResource[] fHelpResources; private IContext fContext; private String fText; public JavaUIContext(IContext context, IJavaElement element) { Assert.isNotNull(element); Assert.isNotNull(context); fElement= element; List helpResources= new ArrayList(); fContext= context; IHelpResource[] resources= context.getRelatedTopics(); if (resources != null) { for (int j= 0; j < resources.length; j++) { helpResources.add(resources[j]); } } try { URL url= JavaDocLocations.getJavaDocLocation(fElement, true); if (url == null || doesNotExist(url)) { if (fElement.getElementType() != IJavaElement.JAVA_PROJECT) { IPackageFragmentRoot root= JavaModelUtil.getPackageFragmentRoot(fElement); if (root != null) if (root.getKind() == IPackageFragmentRoot.K_BINARY) { url= JavaDocLocations.getJavaDocLocation(root, true); element= root; } else if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { url= JavaDocLocations.getJavaDocLocation(root.getJavaProject(), true); element= root.getJavaProject();
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
} } } if (url != null) { String extForm= url.toExternalForm(); IHelpResource javaResource= new JavaUIHelpResource(element, extForm); helpResources.add(javaResource); } } catch (CoreException e) { JavaPlugin.log(e); } fHelpResources= (IHelpResource[]) helpResources.toArray(new IHelpResource[helpResources.size()]); } private boolean doesNotExist(URL url) { if (url.getProtocol().equals("file")) { File file= new File(url.getFile()); return !file.exists(); } return false; } public IHelpResource[] getRelatedTopics() { return fHelpResources; } public String getText() { if (fElement instanceof IMember) { try { SingleCharReader reader= JavaDocAccess.getJavaDoc((IMember) fElement); if (reader != null) { HTML2TextReader htmlReader= new HTML2TextReader(reader, null); String str= htmlReader.getString();
4,166
Bug 4166 DCR: Javadoc for implementers of a method (1GJJ5LD)
If I hover over a method which implements an interface or overrides a method I would like to see the corresponding Javadoc (unless I also added my own Javadoc). NOTES:
resolved fixed
21b8181
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T17:38:40Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java
BreakIterator breakIterator= BreakIterator.getSentenceInstance(); breakIterator.setText(str); return str.substring(0, breakIterator.next()); } else return fContext.getText(); } catch (JavaModelException e) { JavaPlugin.log(e); } catch (IOException e) { JavaPlugin.log(e); } } return fContext.getText(); } } private static class JavaUIHelpResource implements IHelpResource { private IJavaElement fElement; private String fUrl; public JavaUIHelpResource(IJavaElement element, String url) { fElement= element; fUrl= url; } public String getHref() { return fUrl; } public String getLabel() { String label= JavaElementLabels.getTextLabel(fElement, JavaElementLabels.ALL_DEFAULT); return "Javadoc for " + label; } } }
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
package org.eclipse.jdt.internal.ui.text.java; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.graphics.Image; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.util.Assert; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; import org.eclipse.jdt.internal.corext.textmanipulation.TextUtil; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.OverrideMethodQuery; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; public class AnonymousTypeCompletionProposal extends JavaCompletionProposal {
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
private IType fDeclaringType; private ICompilationUnit fCompilationUnit; private ImportsStructure fImportStructure; public AnonymousTypeCompletionProposal(IJavaProject jproject, ICompilationUnit cu, int start, int length, String constructorCompletion, String displayName, String declaringTypeName) { super(constructorCompletion, start, length, null, displayName); Assert.isNotNull(declaringTypeName); Assert.isNotNull(jproject); fCompilationUnit= cu; fDeclaringType= getDeclaringType(jproject, declaringTypeName); setImage(getImageForType(fDeclaringType)); setCursorPosition(constructorCompletion.indexOf('(') + 1); } private Image getImageForType(IType type) { String imageName= JavaPluginImages.IMG_OBJS_CLASS; if (type != null) { try { if (type.isInterface()) { imageName= JavaPluginImages.IMG_OBJS_INTERFACE; } } catch (JavaModelException e) { JavaPlugin.log(e); }
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
} return JavaPluginImages.get(imageName); } private IType getDeclaringType(IJavaProject project, String typeName) { try { return JavaModelUtil.findType(project, typeName); } catch (JavaModelException e) { JavaPlugin.log(e); } return null; } /* * @see JavaCompletionProposal#applyImports(IDocument) */ protected void applyImports(IDocument document) { if (fImportStructure != null) { try { fImportStructure.create(false, null); } catch (CoreException e) { JavaPlugin.log(e); } } } /* * @see ICompletionProposalExtension#apply(IDocument, char) */ public void apply(IDocument document, char trigger, int offset) { try {
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
if (fCompilationUnit == null) { fImportStructure= null; } else { String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference(); int threshold= ImportOrganizePreferencePage.getImportNumberThreshold(); fImportStructure= new ImportsStructure(fCompilationUnit, prefOrder, threshold, true); } String replacementString= getReplacementString(); StringBuffer buf= new StringBuffer(); buf.append(replacementString); if (!replacementString.endsWith(")")) { buf.append(')'); } buf.append(" {\n"); if (!createStubs(buf, fImportStructure)) { return; } buf.append("}"); String lineDelim= StubUtility.getLineDelimiterFor(document); int tabWidth= CodeFormatterPreferencePage.getTabSize(); IRegion region= document.getLineInformationOfOffset(getReplacementOffset()); int indent= TextUtil.getIndent(document.get(region.getOffset(), region.getLength()), tabWidth); String replacement= StubUtility.codeFormat(buf.toString(), indent, lineDelim); replacement= TextUtil.removeLeadingWhiteSpaces(replacement);
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
setReplacementString(replacement); } catch (BadLocationException e) { JavaPlugin.log(e); } catch (CoreException e) { JavaPlugin.log(e); } super.apply(document, trigger, offset); } private boolean createStubs(StringBuffer buf, ImportsStructure imports) throws JavaModelException { if (fDeclaringType == null) { return true; } CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); ITypeHierarchy hierarchy= fDeclaringType.newSupertypeHierarchy(null); OverrideMethodQuery selectionQuery= fDeclaringType.isClass() ? new OverrideMethodQuery(JavaPlugin.getActiveWorkbenchShell(), true) : null; String[] unimplemented= StubUtility.evalUnimplementedMethods(fDeclaringType, hierarchy, true, settings, selectionQuery, imports); if (unimplemented != null) { for (int i= 0; i < unimplemented.length; i++) { buf.append(unimplemented[i]); buf.append('\n'); } return true; } return false; } }
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.wizards; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.IBuffer;
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchConstants; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.compiler.env.IConstants; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure; import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; import org.eclipse.jdt.internal.corext.template.Template; import org.eclipse.jdt.internal.corext.template.Templates; import org.eclipse.jdt.internal.corext.template.java.JavaContext; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
8,140
Bug 8140 Code assist for anonymous inner types adds empty line
button.addActionListener(new ActionListener() { /* * @see ActionListener#actionPerformed(ActionEvent) */ public void actionPerformed(ActionEvent e) { } <--- here ---> }
resolved fixed
2f87db2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-29T18:22:48Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.preferences.CodeGenerationPreferencePage; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.SuperInterfaceSelectionDialog; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup; import org.eclipse.jdt.internal.ui.wizards.dialogfields.Separator; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonStatusDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField; /** * <code>NewTypeWizardPage</code> contains controls and validation routines for a 'New Type WizardPage' * Implementors decide which components to add and to enable. Implementors can also * customize the validation code. * <code>NewTypeWizardPage</code> is intended to serve as base class of all wizards that create types. * Applets, Servlets, Classes, Interfaces... * See <code>NewClassWizardPage</code> or <code>NewInterfaceWizardPage</code> for an * example usage of NewTypeWizardPage. * @since 2.0 */ public abstract class NewTypeWizardPage extends NewContainerWizardPage {