issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AnnotationErrorTickProvider.java
package org.eclipse.jdt.internal.ui.javaeditor; import java.util.Iterator; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.Position; import org.eclipse.jface.text.source.Annotation; import org.eclipse.jface.text.source.IAnnotationModel; import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.MarkerAnnotation; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModelMarker; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.viewsupport.IErrorTickProvider; public class AnnotationErrorTickProvider implements IErrorTickProvider {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AnnotationErrorTickProvider.java
private IAnnotationModel fAnnotationModel; public AnnotationErrorTickProvider(IAnnotationModel model) { fAnnotationModel= model; } public AnnotationErrorTickProvider(ITextEditor editor) { this(editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput())); } /** * @see IErrorTickProvider#getErrorInfo(IJavaElement) */ public int getErrorInfo(IJavaElement element) { int info= 0; if (element instanceof ISourceReference) { try { ISourceRange range= ((ISourceReference)element).getSourceRange(); Iterator iter= fAnnotationModel.getAnnotationIterator(); while ((info != ERRORTICK_ERROR) && iter.hasNext()) { Annotation curr= (Annotation) iter.next(); IMarker marker= isApplicable(curr, range); if (marker != null) { int priority= marker.getAttribute(IMarker.SEVERITY, -1); if (priority == IMarker.SEVERITY_WARNING) { info= ERRORTICK_WARNING;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AnnotationErrorTickProvider.java
} else if (priority == IMarker.SEVERITY_ERROR) { info= ERRORTICK_ERROR; } } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } return info; } private IMarker isApplicable(Annotation annot, ISourceRange range) { try { if (annot instanceof MarkerAnnotation) { IMarker marker= ((MarkerAnnotation)annot).getMarker(); if (marker.exists() && marker.isSubtypeOf(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER)) { Position pos= fAnnotationModel.getPosition(annot); if (pos.overlapsWith(range.getOffset(), range.getLength())) { return marker; } } } } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } return null; } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/IErrorTickProvider.java
package org.eclipse.jdt.internal.ui.viewsupport; import org.eclipse.jdt.core.IJavaElement; /** * Used by the JavaElementLabelProvider to evaluate the error tick * of a element. */ public interface IErrorTickProvider { public static final int ERRORTICK_WARNING= 1; public static final int ERRORTICK_ERROR= 2; /** * Evaluate the error tick state of a Java element. * @returns ERRORTICK_ERROR or ERRORTICK_WARNING */ int getErrorInfo(IJavaElement element); }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.viewsupport; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.util.Assert; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; /** * Default strategy of the Java plugin for the construction of Java element icons. */
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
public class JavaElementImageProvider { /** * Flags for the JavaImageLabelProvider: * Generate images with overlays. */ public final static int OVERLAY_ICONS= 0x1; /** * Generate small sized images. */ public final static int SMALL_ICONS= 0x2; /** * Use the 'light' style for rendering types. */ public final static int LIGHT_TYPE_ICONS= 0x4; private static final Point SMALL_SIZE= new Point(16, 16); private static final Point BIG_SIZE= new Point(22, 16); private static ImageDescriptor DESC_OBJ_PROJECT_CLOSED; private static ImageDescriptor DESC_OBJ_PROJECT; private static ImageDescriptor DESC_OBJ_FOLDER; { ISharedImages images= JavaPlugin.getDefault().getWorkbench().getSharedImages(); DESC_OBJ_PROJECT_CLOSED= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT_CLOSED); DESC_OBJ_PROJECT= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT); DESC_OBJ_FOLDER= images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER); }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
private ImageDescriptorRegistry fRegistry; private IErrorTickProvider fErrorTickProvider; public JavaElementImageProvider() { fRegistry= JavaPlugin.getImageDescriptorRegistry(); } public void setErrorTickProvider(IErrorTickProvider provider) { fErrorTickProvider= provider; } /** * Returns the icon for a given Java elements. The icon depends on the element type * and element properties. If configured, overlay icons are constructed for * <code>ISourceReference</code>s. * @param flags Flags as defined by the JavaImageLabelProvider */ public Image getImageLabel(IJavaElement element, int flags) { ImageDescriptor descriptor= getImageDescriptor(element, flags); return fRegistry.get(descriptor); } private boolean showOverlayIcons(int flags) { return (flags & OVERLAY_ICONS) != 0; } private boolean useLightIcons(int flags) { return (flags & LIGHT_TYPE_ICONS) != 0; }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
private boolean useSmallSize(int flags) { return (flags & SMALL_ICONS) != 0; } /** * Returns an image descriptor for a java element. The descriptor includes overlays, if specified. */ public ImageDescriptor getImageDescriptor(IJavaElement element, int flags) { int adornmentFlags= showOverlayIcons(flags) ? computeAdornmentFlags(element) : 0; Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE; return new JavaElementImageDescriptor(getBaseImageDescriptor(element, flags), adornmentFlags, size); } /** * Returns an image descriptor for a java element. This is the base image, no overlays. */ public ImageDescriptor getBaseImageDescriptor(IJavaElement element, int renderFlags) { try { switch (element.getElementType()) { case IJavaElement.INITIALIZER: case IJavaElement.METHOD: case IJavaElement.FIELD: { IMember member= (IMember) element; if (member.getDeclaringType().isInterface()) return JavaPluginImages.DESC_MISC_PUBLIC; int flags= member.getFlags();
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
if (Flags.isPublic(flags)) return JavaPluginImages.DESC_MISC_PUBLIC; if (Flags.isProtected(flags)) return JavaPluginImages.DESC_MISC_PROTECTED; if (Flags.isPrivate(flags)) return JavaPluginImages.DESC_MISC_PRIVATE; return JavaPluginImages.DESC_MISC_DEFAULT; } case IJavaElement.PACKAGE_DECLARATION: return JavaPluginImages.DESC_OBJS_PACKDECL; case IJavaElement.IMPORT_DECLARATION: return JavaPluginImages.DESC_OBJS_IMPDECL; case IJavaElement.IMPORT_CONTAINER: return JavaPluginImages.DESC_OBJS_IMPCONT; case IJavaElement.TYPE: { IType type= (IType) element; if (useLightIcons(renderFlags)) { if (type.isClass()) return JavaPluginImages.DESC_OBJS_CLASSALT; else return JavaPluginImages.DESC_OBJS_INTERFACEALT; } int flags= type.getFlags(); boolean hasVisibility= Flags.isPublic(flags) || Flags.isPrivate(flags) || Flags.isProtected(flags);
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
if (type.isClass()) return hasVisibility ? JavaPluginImages.DESC_OBJS_CLASS : JavaPluginImages.DESC_OBJS_PCLASS; return hasVisibility ? JavaPluginImages.DESC_OBJS_INTERFACE : JavaPluginImages.DESC_OBJS_PINTERFACE; } case IJavaElement.PACKAGE_FRAGMENT_ROOT: { IPackageFragmentRoot root= (IPackageFragmentRoot) element; if (root.isArchive()) { IPath attach= root.getSourceAttachmentPath(); if (root.isExternal()) { if (attach == null) { return JavaPluginImages.DESC_OBJS_EXTJAR; } else { return JavaPluginImages.DESC_OBJS_EXTJAR_WSRC; } } else { if (attach == null) { return JavaPluginImages.DESC_OBJS_JAR; } else { return JavaPluginImages.DESC_OBJS_JAR_WSRC; } } } else { return JavaPluginImages.DESC_OBJS_PACKFRAG_ROOT; } } case IJavaElement.PACKAGE_FRAGMENT: IPackageFragment fragment= (IPackageFragment)element; try {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
if (!fragment.hasChildren() && (fragment.getNonJavaResources().length >0)) return DESC_OBJ_FOLDER; } catch(JavaModelException e) { return DESC_OBJ_FOLDER; } return JavaPluginImages.DESC_OBJS_PACKAGE; case IJavaElement.COMPILATION_UNIT: return JavaPluginImages.DESC_OBJS_CUNIT; case IJavaElement.CLASS_FILE: /* this is too expensive for large packages try { IClassFile cfile= (IClassFile)element; if (cfile.isClass()) return JavaPluginImages.IMG_OBJS_CFILECLASS; return JavaPluginImages.IMG_OBJS_CFILEINT; } catch(JavaModelException e) { // fall through; }*/ return JavaPluginImages.DESC_OBJS_CFILE; case IJavaElement.JAVA_PROJECT: IJavaProject jp= (IJavaProject)element; if (jp.getProject().isOpen()) { IProject project= jp.getProject(); IWorkbenchAdapter adapter= (IWorkbenchAdapter)project.getAdapter(IWorkbenchAdapter.class); if (adapter != null) { ImageDescriptor result= adapter.getImageDescriptor(project);
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
if (result != null) return result; } return DESC_OBJ_PROJECT; } return DESC_OBJ_PROJECT_CLOSED; case IJavaElement.JAVA_MODEL: return JavaPluginImages.DESC_OBJS_JAVA_MODEL; } Assert.isTrue(false, JavaUIMessages.getString("JavaImageLabelprovider.assert.wrongImage")); return null; } catch (CoreException e) { JavaPlugin.log(e); return JavaPluginImages.DESC_OBJS_GHOST; } } private int computeAdornmentFlags(IJavaElement element) { int flags= 0; if (fErrorTickProvider != null) { int info= fErrorTickProvider.getErrorInfo(element); if ((info & IErrorTickProvider.ERRORTICK_ERROR) != 0) { flags |= JavaElementImageDescriptor.ERROR; } else if ((info & IErrorTickProvider.ERRORTICK_WARNING) != 0) { flags |= JavaElementImageDescriptor.WARNING;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
} } if (element instanceof ISourceReference) { ISourceReference sourceReference= (ISourceReference)element; int modifiers= getModifiers(sourceReference); if (Flags.isAbstract(modifiers) && confirmAbstract((IMember) sourceReference)) flags |= JavaElementImageDescriptor.ABSTRACT; if (Flags.isFinal(modifiers)) flags |= JavaElementImageDescriptor.FINAL; if (Flags.isSynchronized(modifiers) && confirmSynchronized((IMember) sourceReference)) flags |= JavaElementImageDescriptor.SYNCHRONIZED; if (Flags.isStatic(modifiers)) flags |= JavaElementImageDescriptor.STATIC; if (sourceReference instanceof IType) { try { if (JavaModelUtil.hasMainMethod((IType)sourceReference)) flags |= JavaElementImageDescriptor.RUNNABLE; } catch (JavaModelException e) { } } } return flags; } private boolean confirmAbstract(IMember member) {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
IType t= member.getDeclaringType(); if (t == null && member instanceof IType) t= (IType) member; if (t != null) { try { return !t.isInterface(); } catch (JavaModelException x) { } } return true; } private boolean confirmSynchronized(IMember member) { return !(member instanceof IType); } private int getModifiers(ISourceReference sourceReference) { if (sourceReference instanceof IMember) { try { return ((IMember) sourceReference).getFlags(); } catch (JavaModelException x) { } } return 0; } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java
package org.eclipse.jdt.internal.ui.viewsupport; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModelMarker; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; /** * Used by the JavaElementLabelProvider to evaluate the error tick state of * an element. */ public class MarkerErrorTickProvider implements IErrorTickProvider { /* * @see IErrorTickProvider#getErrorInfo */ public int getErrorInfo(IJavaElement element) { int info= 0; try {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java
IResource res= null; ISourceRange range= null; int depth= IResource.DEPTH_INFINITE; int type= element.getElementType(); if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.CLASS_FILE || type == IJavaElement.COMPILATION_UNIT) { res= element.getCorrespondingResource(); if (type == IJavaElement.PACKAGE_FRAGMENT) { depth= IResource.DEPTH_ONE; } else if (type == IJavaElement.JAVA_PROJECT) { IMarker[] bpMarkers= res.findMarkers(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER, true, IResource.DEPTH_ONE); info= accumulateProblems(bpMarkers, info, null); } } else if (element instanceof ISourceReference) { ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(element, IJavaElement.COMPILATION_UNIT); if (cu != null) { res= element.getUnderlyingResource(); range= ((ISourceReference)element).getSourceRange(); } } if (res != null) { IMarker[] markers= res.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, depth); if (markers != null) { info= accumulateProblems(markers, info, range); } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java
} catch (CoreException e) { JavaPlugin.log(e.getStatus()); } return info; } private int accumulateProblems(IMarker[] markers, int info, ISourceRange range) { if (markers != null) { for (int i= 0; i < markers.length && (info != ERRORTICK_ERROR); i++) { IMarker curr= markers[i]; if (range == null || isInRange(curr, range)) { int priority= curr.getAttribute(IMarker.SEVERITY, -1); if (priority == IMarker.SEVERITY_WARNING) { info= ERRORTICK_WARNING; } else if (priority == IMarker.SEVERITY_ERROR) { info= ERRORTICK_ERROR; } } } } return info; } private boolean isInRange(IMarker marker, ISourceRange range) { int pos= marker.getAttribute(IMarker.CHAR_START, -1); int offset= range.getOffset(); return (offset <= pos && offset + range.getLength() > pos); } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
package org.eclipse.jdt.internal.ui.viewsupport; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Item; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IOpenable; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; /** * Helper class for updating error markers. * Items are mapped to paths of their underlying resources. * Method <code>problemsChanged</code> updates all items that are affected from the changed * elements. */ public class ProblemItemMapper {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
private HashMap fPathToItem; public ProblemItemMapper() { fPathToItem= new HashMap(); } /** * Updates the icons of all mapped elements containing to the changed elements. * Must be called from the UI thread. */ public void problemsChanged(Collection changedPaths, ILabelProvider lprovider) { if (changedPaths.size() <= fPathToItem.size()) { iterateChanges(changedPaths, lprovider); } else { iterateItems(changedPaths, lprovider); } } private void iterateChanges(Collection changedPaths, ILabelProvider lprovider) {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
Iterator elements= changedPaths.iterator(); while (elements.hasNext()) { IPath curr= (IPath) elements.next(); Object obj= fPathToItem.get(curr); if (obj == null) { } else if (obj instanceof Item) { refreshIcon(lprovider, (Item)obj); } else { List list= (List) obj; for (int i= 0; i < list.size(); i++) { refreshIcon(lprovider, (Item) list.get(i)); } } } } private void iterateItems(Collection changedPaths, ILabelProvider lprovider) { Iterator keys= fPathToItem.keySet().iterator(); while (keys.hasNext()) { IPath curr= (IPath) keys.next(); if (changedPaths.contains(curr)) { Object obj= fPathToItem.get(curr); if (obj instanceof Item) { refreshIcon(lprovider, (Item)obj); } else { List list= (List) obj; for (int i= 0; i < list.size(); i++) { refreshIcon(lprovider, (Item) list.get(i)); }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
} } } } private void refreshIcon(ILabelProvider lprovider, Item item) { if (!item.isDisposed()) { Object data= item.getData(); if (data instanceof IJavaElement && ((IJavaElement)data).exists()) { Image old= item.getImage(); Image image= lprovider.getImage(data); if (image != null && image != old) { item.setImage(image); } } } } /** * Adds a new item to the map. * @param element Element to map * @param item The item used for the element */ public void addToMap(Object element, Item item) { IPath path= getCorrespondingPath(element); if (path != null) { Object existingMapping= fPathToItem.get(path); if (existingMapping == null) { fPathToItem.put(path, item); } else if (existingMapping instanceof Item) { if (existingMapping != item) {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
ArrayList list= new ArrayList(2); list.add(existingMapping); list.add(item); fPathToItem.put(path, list); } } else { List list= (List)existingMapping; if (!list.contains(item)) { list.add(item); } } } } /** * Removes an element from the map. */ public void removeFromMap(Object element, Item item) { IPath path= getCorrespondingPath(element); if (path != null) { Object existingMapping= fPathToItem.get(path); if (existingMapping == null) { return; } else if (existingMapping instanceof Item) { fPathToItem.remove(path); } else { List list= (List) existingMapping; list.remove(item); } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
} /** * Clears the map. */ public void clearMap() { fPathToItem.clear(); } /** * Method that decides which elements can have error markers * Returns null if an element can not have error markers. */ private static IPath getCorrespondingPath(Object element) { if (element instanceof IJavaElement) { return getJavaElementPath((IJavaElement)element); } return null; } /** * Gets the path of the underlying resource without throwing * a JavaModelException if the resource does not exist. */ private static IPath getJavaElementPath(IJavaElement elem) { switch (elem.getElementType()) { case IJavaElement.JAVA_MODEL: return null; case IJavaElement.JAVA_PROJECT: return ((IJavaProject)elem).getProject().getFullPath();
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java
case IJavaElement.PACKAGE_FRAGMENT_ROOT: IPackageFragmentRoot root= (IPackageFragmentRoot)elem; if (!root.isArchive()) { return root.getPath(); } return null; case IJavaElement.PACKAGE_FRAGMENT: String packName= elem.getElementName(); IPath rootPath= getJavaElementPath(elem.getParent()); if (rootPath != null && packName.length() > 0) { rootPath= rootPath.append(packName.replace('.', '/')); } return rootPath; case IJavaElement.CLASS_FILE: case IJavaElement.COMPILATION_UNIT: IPath packPath= getJavaElementPath(elem.getParent()); if (packPath != null) { packPath= packPath.append(elem.getElementName()); } return packPath; default: IOpenable openable= JavaModelUtil.getOpenable(elem); if (openable instanceof IJavaElement) { return getJavaElementPath((IJavaElement)openable); } return null; } } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
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;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
import java.util.ArrayList; 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.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaModelMarker; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jface.util.ListenerList; /** * Listens to resource deltas and filters for marker changes of type * IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER and IJavaModelMarker.BUILDPATH_PROBLEM_MARKER. * Viewers showing error ticks should register as listener to * this type. */ public class ProblemMarkerManager implements IResourceChangeListener { /** * Visitors used to filter the element delta changes */ private static class ProjectErrorVisitor implements IResourceDeltaVisitor {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
private class PkgFragmentRootErrorVisitor implements IResourceDeltaVisitor { private IPath fRoot; private boolean fInsideRoot; public PkgFragmentRootErrorVisitor() { } public void init(IPath rootPath) { fRoot= rootPath; fInsideRoot= false; } public boolean visit(IResourceDelta delta) throws CoreException { IPath path= delta.getFullPath(); if (!fInsideRoot) { if (fRoot.equals(path)) { fInsideRoot= true; return true; } return (path.isPrefixOf(fRoot)); } checkInvalidate(delta, path); return true; } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
private PkgFragmentRootErrorVisitor fPkgFragmentRootErrorVisitor; private HashSet fChangedElements; public ProjectErrorVisitor(HashSet changedElements) { fPkgFragmentRootErrorVisitor= new PkgFragmentRootErrorVisitor(); fChangedElements= changedElements; } public boolean visit(IResourceDelta delta) throws CoreException { IResource res= delta.getResource(); if (res instanceof IProject && delta.getKind() == IResourceDelta.CHANGED) { try { IJavaProject jProject= getJavaProject((IProject)res); if (jProject != null) { checkInvalidate(delta, res.getFullPath()); IClasspathEntry[] cps= jProject.getRawClasspath(); for (int i= 0; i < cps.length; i++) { if (cps[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) { fPkgFragmentRootErrorVisitor.init(cps[i].getPath()); delta.accept(fPkgFragmentRootErrorVisitor); } } } } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } return false; } return true;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
} private void checkInvalidate(IResourceDelta delta, IPath path) { int kind= delta.getKind(); if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { while (!path.isEmpty() && !path.isRoot()) { 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(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER) || markerDeltas[i].isSubtypeOf(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER)) { int kind= markerDeltas[i].getKind(); if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED) return true; int severity= markerDeltas[i].getAttribute(IMarker.SEVERITY, -1); int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1); if (newSeverity != severity) return true; } } } return false;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
} private IJavaProject getJavaProject(IProject proj) throws CoreException { if (proj.hasNature(JavaCore.NATURE_ID) && proj.isOpen()) { return JavaCore.create(proj); } return null; } } 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);
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
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); } } }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.swt.graphics.Image; import org.eclipse.core.resources.IStorage; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.ui.IEditorRegistry; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.internal.ui.viewsupport.IErrorTickProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; /** * Standard label provider for Java elements. * Use this class when you want to present the Java elements in a viewer. * <p>
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
* The implementation also handles non-Java elements by forwarding the requests to an * internal <code>WorkbenchLabelProvider</code>. * </p> * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> * * @see org.eclipse.ui.model.WorkbenchLabelProvider */ public class JavaElementLabelProvider extends LabelProvider { /** * Flag (bit mask) indicating that methods labels include the method return type. (prepended) */ public final static int SHOW_RETURN_TYPE= 0x001; /** * Flag (bit mask) indicating that method label include method parameter types. */ public final static int SHOW_PARAMETERS= 0x002; /** * Flag (bit mask) indicating that the label of a member should include the container. * For example, include the name of the type enclosing a field. * @deprecated Use SHOW_QUALIFIED or SHOW_ROOT instead */ public final static int SHOW_CONTAINER= 0x004; /** * Flag (bit mask) indicating that the label of a type should be fully qualified. * For example, include the fully qualified name of the type enclosing a type.
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
* @deprecated Use SHOW_QUALIFIED instead */ public final static int SHOW_CONTAINER_QUALIFICATION= 0x008; /** * Flag (bit mask) indicating that the label should include overlay icons * for element type and modifiers. */ public final static int SHOW_OVERLAY_ICONS= 0x010; /** * Flag (bit mask) indicating thata field label should include the declared type. */ public final static int SHOW_TYPE= 0x020; /** * Flag (bit mask) indicating that the label should include the name of the * package fragment root (appended). */ public final static int SHOW_ROOT= 0x040; /** * Flag (bit mask) indicating that the label qualification of a type should * be shown after the name. * @deprecated SHOW_POST_QUALIFIED instead */ public final static int SHOW_POSTIFIX_QUALIFICATION= 0x080; /** * Flag (bit mask) indicating that the label should show the icons with no space * reserved for overlays. */ public final static int SHOW_SMALL_ICONS= 0x100;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
/** * Flag (bit mask) indicating that the packagefragment roots from variables should * be rendered with the variable in the name */ public final static int SHOW_VARIABLE= 0x200; /** * Flag (bit mask) indicating that Complation Units, Class Files, Types, Declarations and Members * should be rendered qualified. * Examples: java.lang.String, java.util.Vector.size() */ public final static int SHOW_QUALIFIED= 0x400; /** * Flag (bit mask) indicating that Complation Units, Class Files, Types, Declarations and Members * should be rendered qualified. The qualifcation is appended * Examples: String - java.lang, size() - java.util.Vector */ public final static int SHOW_POST_QUALIFIED= 0x800; /** * Constant (value <code>0</code>) indicating that the label should show * the basic images only. */ public final static int SHOW_BASICS= 0x000; /** * Constant indicating the default label rendering. * Currently the default is equivalent to
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
* <code>SHOW_PARAMETERS | SHOW_OVERLAY_ICONS</code>. */ public final static int SHOW_DEFAULT= new Integer(SHOW_PARAMETERS | SHOW_OVERLAY_ICONS).intValue(); private JavaElementImageProvider fImageLabelProvider; private WorkbenchLabelProvider fWorkbenchLabelProvider; private int fFlags; private int fImageFlags; private int fTextFlags; private Map fJarImageMap= new HashMap(10); /** * Creates a new label provider with <code>SHOW_DEFAULT</code> flag. * * @see #SHOW_DEFAULT * @since 2.0 */ public JavaElementLabelProvider() { this(SHOW_DEFAULT); } /** * Creates a new label provider. * * @param flags the initial options; a bitwise OR of <code>SHOW_* </code> constants */ public JavaElementLabelProvider(int flags) { fImageLabelProvider= new JavaElementImageProvider(); fWorkbenchLabelProvider= new WorkbenchLabelProvider(); fFlags= flags;
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
updateImageProviderFlags(); updateTextProviderFlags(); } private boolean getFlag( int flag) { return (fFlags & flag) != 0; } /** * Turns on the rendering options specified in the given flags. * * @param flags the options; a bitwise OR of <code>SHOW_* </code> constants */ public void turnOn(int flags) { fFlags |= flags; updateImageProviderFlags(); updateTextProviderFlags(); } /** * Turns off the rendering options specified in the given flags. * * @param flags the initial options; a bitwise OR of <code>SHOW_* </code> constants */ public void turnOff(int flags) { fFlags &= (~flags); updateImageProviderFlags(); updateTextProviderFlags(); }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
private void updateImageProviderFlags() { fImageFlags= 0; if (getFlag(SHOW_OVERLAY_ICONS)) { fImageFlags |= JavaElementImageProvider.OVERLAY_ICONS; } if (getFlag(SHOW_SMALL_ICONS)) { fImageFlags |= JavaElementImageProvider.SMALL_ICONS; } } private void updateTextProviderFlags() { fTextFlags= 0; if (getFlag(SHOW_RETURN_TYPE)) { fTextFlags |= JavaElementLabels.M_PRE_RETURNTYPE; } if (getFlag(SHOW_PARAMETERS)) { fTextFlags |= JavaElementLabels.M_PARAMETER_TYPES; } if (getFlag(SHOW_CONTAINER)) { fTextFlags |= JavaElementLabels.P_POST_QUALIFIED | JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED | JavaElementLabels.M_POST_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED; } if (getFlag(SHOW_POSTIFIX_QUALIFICATION)) { fTextFlags |= (JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED); } else if (getFlag(SHOW_CONTAINER_QUALIFICATION)) { fTextFlags |=(JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.CF_QUALIFIED | JavaElementLabels.CU_QUALIFIED); } if (getFlag(SHOW_TYPE)) { fTextFlags |= JavaElementLabels.F_APP_TYPE_SIGNATURE; } if (getFlag(SHOW_ROOT)) {
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
fTextFlags |= JavaElementLabels.APPEND_ROOT_PATH; } if (getFlag(SHOW_VARIABLE)) { fTextFlags |= JavaElementLabels.ROOT_VARIABLE; } if (getFlag(SHOW_QUALIFIED)) { fTextFlags |= (JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.I_FULLY_QUALIFIED | JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.D_QUALIFIED | JavaElementLabels.CF_QUALIFIED | JavaElementLabels.CU_QUALIFIED); } if (getFlag(SHOW_POST_QUALIFIED)) { fTextFlags |= (JavaElementLabels.F_POST_QUALIFIED | JavaElementLabels.M_POST_QUALIFIED | JavaElementLabels.I_POST_QUALIFIED | JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.D_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED); } } /* (non-Javadoc) * @see ILabelProvider#getImage */ public Image getImage(Object element) { if (element instanceof IJavaElement) { IJavaElement e= (IJavaElement) element; return fImageLabelProvider.getImageLabel(e, fImageFlags); } Image result= fWorkbenchLabelProvider.getImage(element); if (result != null) { return result; } if (element instanceof IStorage) return getImageForJarEntry((IStorage)element); return super.getImage(element);
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
} /* (non-Javadoc) * @see ILabelProvider#getText */ public String getText(Object element) { if (element instanceof IJavaElement) { return JavaElementLabels.getElementLabel((IJavaElement) element, fTextFlags); } String text= fWorkbenchLabelProvider.getText(element); if (text.length() > 0) { return text; } if (element instanceof IStorage) { return ((IStorage)element).getName(); } return super.getText(element); } /* (non-Javadoc) * * @see IBaseLabelProvider#dispose */ public void dispose() { fWorkbenchLabelProvider.dispose(); disposeJarEntryImages(); } public void setErrorTickManager(IErrorTickProvider provider) { fImageLabelProvider.setErrorTickProvider(provider); }
6,718
Bug 6718 Error ticks on non-Java resources
This is a VAME request. They would like to show error ticks on manifest files.
resolved fixed
01c855e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T17:32:22Z
2001-12-10T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
/* * Dispose the cached images for JarEntry files */ private void disposeJarEntryImages() { Iterator each= fJarImageMap.values().iterator(); while (each.hasNext()) { Image image= (Image)each.next(); image.dispose(); } fJarImageMap.clear(); } /* * Gets and caches an image for a JarEntryFile. * The image for a JarEntryFile is retrieved from the EditorRegistry. */ private Image getImageForJarEntry(IStorage element) { String extension= element.getFullPath().getFileExtension(); Image image= (Image)fJarImageMap.get(extension); if (image != null) return image; IEditorRegistry registry= PlatformUI.getWorkbench().getEditorRegistry(); ImageDescriptor desc= registry.getImageDescriptor(element.getName()); image= desc.createImage(); fJarImageMap.put(extension, image); return image; } }
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
package org.eclipse.jdt.internal.ui.text.java; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import org.eclipse.swt.graphics.Image; import org.eclipse.core.resources.IMarker; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.ICompletionRequestor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; /** * Bin to collect the proposal of the infrastructure on code assist in a java text. */ public class ResultCollector implements ICompletionRequestor {
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
private class ProposalComparator implements Comparator { public int compare(Object o1, Object o2) { ICompletionProposal c1= (ICompletionProposal) o1; ICompletionProposal c2= (ICompletionProposal) o2; return c1.getDisplayString().compareToIgnoreCase(c2.getDisplayString()); } }; private final static char[] METHOD_WITH_ARGUMENTS_TRIGGERS= new char[] { '(', '-' }; private final static char[] GENERAL_TRIGGERS= new char[] { ';', ',', '.', '\t', '(', '{', '[' };
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
private ArrayList fFields= new ArrayList(), fKeywords= new ArrayList(), fLabels= new ArrayList(), fMethods= new ArrayList(), fModifiers= new ArrayList(), fPackages= new ArrayList(), fTypes= new ArrayList(), fVariables= new ArrayList(); private IMarker fLastProblem; private IJavaProject fJavaProject; private ICompilationUnit fCompilationUnit; private int fCodeAssistOffset; private ArrayList[] fResults = new ArrayList[] { fVariables, fFields, fMethods, fTypes, fKeywords, fModifiers, fLabels, fPackages }; private int fUserReplacementLength; /* * Is eating code assist enabled or disabled? PR #3666 * When eating is enabled, JavaCompletionProposal must be revisited: PR #5533 */ private boolean fPreventEating= true; /* * @see ICompletionRequestor#acceptClass */ public void acceptClass(char[] packageName, char[] typeName, char[] completionName, int modifiers, int start, int end) { ProposalInfo info= new ProposalInfo(fJavaProject, packageName, typeName); fTypes.add(createTypeCompletion(start, end, new String(completionName), JavaPluginImages.IMG_OBJS_CLASS, new String(typeName), new String(packageName), info)); }
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
/* * @see ICompletionRequestor#acceptError */ public void acceptError(IMarker problemMarker) { fLastProblem= problemMarker; } /* * @see ICompletionRequestor#acceptField */ public void acceptField( char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[] typePackageName, char[] typeName, char[] completionName, int modifiers, int start, int end) { String iconName= JavaPluginImages.IMG_MISC_DEFAULT; if (Flags.isPublic(modifiers)) { iconName= JavaPluginImages.IMG_MISC_PUBLIC; } else if (Flags.isProtected(modifiers)) { iconName= JavaPluginImages.IMG_MISC_PROTECTED; } else if (Flags.isPrivate(modifiers)) { iconName= JavaPluginImages.IMG_MISC_PRIVATE; } StringBuffer nameBuffer= new StringBuffer(); nameBuffer.append(name); if (typeName.length > 0) { nameBuffer.append(" "); nameBuffer.append(typeName); }
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
if (declaringTypeName != null && declaringTypeName.length > 0) { nameBuffer.append(" - "); nameBuffer.append(declaringTypeName); } JavaCompletionProposal proposal= createCompletion(start, end, new String(completionName), iconName, nameBuffer.toString()); proposal.setProposalInfo(new ProposalInfo(fJavaProject, declaringTypePackageName, declaringTypeName, name)); fFields.add(proposal); } /* * @see ICompletionRequestor#acceptInterface */ public void acceptInterface(char[] packageName, char[] typeName, char[] completionName, int modifiers, int start, int end) { ProposalInfo info= new ProposalInfo(fJavaProject, packageName, typeName); fTypes.add(createTypeCompletion(start, end, new String(completionName), JavaPluginImages.IMG_OBJS_INTERFACE, new String(typeName), new String(packageName), info)); } /* * @see ICompletionRequestor#acceptKeyword */ public void acceptKeyword(char[] keyword, int start, int end) { String kw= new String(keyword); fKeywords.add(createCompletion(start, end, kw, null, kw)); } /* * @see ICompletionRequestor#acceptLabel */
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
public void acceptLabel(char[] labelName, int start, int end) { String ln= new String(labelName); fLabels.add(createCompletion(start, end, ln, null, ln)); } /* * @see ICompletionRequestor#acceptLocalVariable */ public void acceptLocalVariable(char[] name, char[] typePackageName, char[] typeName, int modifiers, int start, int end) { StringBuffer buf= new StringBuffer(); buf.append(name); if (typeName != null) { buf.append(" "); buf.append(typeName); } fVariables.add(createCompletion(start, end, new String(name), null, buf.toString())); } private String getParameterSignature(char[][] parameterTypeNames, char[][] parameterNames) { StringBuffer buf = new StringBuffer(); if (parameterTypeNames != null) { for (int i = 0; i < parameterTypeNames.length; i++) { if (i > 0) { buf.append(','); buf.append(' '); } buf.append(parameterTypeNames[i]); if (parameterNames[i] != null) { buf.append(' '); buf.append(parameterNames[i]);
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
} } } return buf.toString(); } /* * @see ICodeCompletionRequestor#acceptMethod(char[], char[], char[], char[][], char[][], char[][], char[], char[], char[], int, int, int) */ public void acceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[][] parameterPackageNames, char[][] parameterTypeNames, char[][] parameterNames, char[] returnTypePackageName, char[] returnTypeName, char[] completionName, int modifiers, int start, int end) { JavaCompletionProposal proposal= createMethodCompletion(declaringTypeName, name, parameterTypeNames, parameterNames, returnTypeName, completionName, modifiers, start, end); proposal.setProposalInfo(new ProposalInfo(fJavaProject, declaringTypePackageName, declaringTypeName, name, parameterPackageNames, parameterTypeNames, returnTypeName.length == 0)); boolean hasClosingBracket= completionName.length > 0 && completionName[completionName.length - 1] == ')'; ProposalContextInformation contextInformation= null; if (hasClosingBracket && parameterTypeNames.length > 0) { contextInformation= new ProposalContextInformation(); contextInformation.setInformationDisplayString(getParameterSignature(parameterTypeNames, parameterNames)); contextInformation.setContextDisplayString(proposal.getDisplayString()); proposal.setContextInformation(contextInformation); } boolean userMustCompleteParameters= (contextInformation != null && completionName.length > 0); char[] triggers= userMustCompleteParameters ? METHOD_WITH_ARGUMENTS_TRIGGERS : GENERAL_TRIGGERS; proposal.setTriggerCharacters(triggers);
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
if (userMustCompleteParameters) { proposal.setCursorPosition(completionName.length - 1); } fMethods.add(proposal); if (returnTypeName.length == 0 && fCompilationUnit != null) { proposal= createAnonymousTypeCompletion(declaringTypePackageName, declaringTypeName, name, parameterTypeNames, parameterNames, completionName, start, end); proposal.setProposalInfo(new ProposalInfo(fJavaProject, declaringTypePackageName, declaringTypeName)); fTypes.add(proposal); } } /* * @see ICompletionRequestor#acceptModifier */ public void acceptModifier(char[] modifier, int start, int end) { String mod= new String(modifier); fModifiers.add(createCompletion(start, end, mod, null, mod)); } /* * @see ICompletionRequestor#acceptPackage */ public void acceptPackage(char[] packageName, char[] completionName, int start, int end) { fPackages.add(createCompletion(start, end, new String(completionName), JavaPluginImages.IMG_OBJS_PACKAGE, new String(packageName))); } /*
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
* @see ICompletionRequestor#acceptType */ public void acceptType(char[] packageName, char[] typeName, char[] completionName, int start, int end) { ProposalInfo info= new ProposalInfo(fJavaProject, packageName, typeName); fTypes.add(createTypeCompletion(start, end, new String(completionName), JavaPluginImages.IMG_OBJS_CLASS, new String(typeName), new String(packageName), info)); } /* * @see ICodeCompletionRequestor#acceptMethodDeclaration(char[], char[], char[], char[][], char[][], char[][], char[], char[], char[], int, int, int) */ public void acceptMethodDeclaration(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[][] parameterPackageNames, char[][] parameterTypeNames, char[][] parameterNames, char[] returnTypePackageName, char[] returnTypeName, char[] completionName, int modifiers, int start, int end) { JavaCompletionProposal proposal= createMethodCompletion(declaringTypeName, name, parameterTypeNames, parameterNames, returnTypeName, completionName, modifiers, start, end); fMethods.add(proposal); } /* * @see ICodeCompletionRequestor#acceptVariableName(char[], char[], char[], char[], int, int) */ public void acceptVariableName(char[] typePackageName, char[] typeName, char[] name, char[] completionName, int start, int end) { StringBuffer buf= new StringBuffer(); buf.append(name); if (typeName != null && typeName.length > 0) { buf.append(" - "); buf.append(typeName); } fVariables.add(createCompletion(start, end, new String(completionName), null, buf.toString())); }
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
public String getErrorMessage() { if (fLastProblem != null) return fLastProblem.getAttribute(IMarker.MESSAGE, JavaTextMessages.getString("ResultCollector.compile_error.message")); return ""; } public JavaCompletionProposal[] getResults() { ArrayList result= new ArrayList(); ProposalComparator comperator= new ProposalComparator(); for (int i= 0; i < fResults.length; i++) { ArrayList bucket = fResults[i]; int size= bucket.size(); if (size == 1) { result.add(bucket.get(0)); } else if (size > 1) { Object[] sortedBucket = new Object[size]; bucket.toArray(sortedBucket); Arrays.sort(sortedBucket, comperator); for (int j= 0; j < sortedBucket.length; j++) result.add(sortedBucket[j]); } } return (JavaCompletionProposal[]) result.toArray(new JavaCompletionProposal[result.size()]); } protected JavaCompletionProposal createMethodCompletion(char[] declaringTypeName, char[] name, char[][] parameterTypeNames, char[][] parameterNames, char[] returnTypeName, char[] completionName, int modifiers, int start, int end) { String iconName= JavaPluginImages.IMG_MISC_DEFAULT; if (Flags.isPublic(modifiers)) { iconName= JavaPluginImages.IMG_MISC_PUBLIC; } else if (Flags.isProtected(modifiers)) { iconName= JavaPluginImages.IMG_MISC_PROTECTED; } else if (Flags.isPrivate(modifiers)) {
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
iconName= JavaPluginImages.IMG_MISC_PRIVATE; } StringBuffer nameBuffer= new StringBuffer(); nameBuffer.append(name); nameBuffer.append('('); if (parameterTypeNames.length > 0) { nameBuffer.append(getParameterSignature(parameterTypeNames, parameterNames)); } nameBuffer.append(')'); if (returnTypeName.length > 0) { nameBuffer.append(" "); nameBuffer.append(returnTypeName); } if (declaringTypeName.length > 0) { nameBuffer.append(" - "); nameBuffer.append(declaringTypeName); } return createCompletion(start, end, new String(completionName), iconName, nameBuffer.toString()); } private JavaCompletionProposal createAnonymousTypeCompletion(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[][] parameterTypeNames, char[][] parameterNames, char[] completionName, int start, int end) { StringBuffer declTypeBuf= new StringBuffer(); if (declaringTypePackageName.length > 0) { declTypeBuf.append(declaringTypePackageName); declTypeBuf.append('.'); } declTypeBuf.append(declaringTypeName); StringBuffer nameBuffer= new StringBuffer(); nameBuffer.append(name); nameBuffer.append('(');
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
if (parameterTypeNames.length > 0) { nameBuffer.append(getParameterSignature(parameterTypeNames, parameterNames)); } nameBuffer.append(')'); nameBuffer.append(" "); nameBuffer.append(JavaTextMessages.getString("ResultCollector.anonymous_type")); int length= end - start; return new AnonymousTypeCompletionProposal(fCompilationUnit, start, length, new String(completionName), nameBuffer.toString(), declTypeBuf.toString()); } protected JavaCompletionProposal createTypeCompletion(int start, int end, String completion, String iconName, String typeName, String containerName, ProposalInfo proposalInfo) { IImportDeclaration importDeclaration= null; if (containerName != null && fCompilationUnit != null) { if (completion.equals(JavaModelUtil.concatenateName(containerName, typeName))) { importDeclaration= fCompilationUnit.getImport(completion); completion= typeName; } } StringBuffer buf= new StringBuffer(typeName); if (containerName != null) { buf.append(" - "); buf.append(containerName); } String name= buf.toString(); JavaCompletionProposal proposal= createCompletion(start, end, completion, iconName, name); proposal.setImportDeclaration(importDeclaration); proposal.setProposalInfo(proposalInfo);
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
return proposal; } protected JavaCompletionProposal createCompletion(int start, int end, String completion, String iconName, String name) { int length; if (fUserReplacementLength == -1) { length= fPreventEating ? fCodeAssistOffset - start : end - start; } else { length= fUserReplacementLength; if (start < fCodeAssistOffset) { length+= fCodeAssistOffset - start; } } Image icon= null; if (iconName != null) icon= JavaPluginImages.get(iconName); return new JavaCompletionProposal(completion, start, length, icon, name); } /** * Specifies the context of the code assist operation. * @param codeAssistOffset The Offset on which the code assist will be called. * Used to modify the offsets of the created proposals. ('Non Eating') * @param jproject The Java project to which the underlying source belongs. * Needed to find types referred. * @param cu The compilation unit that is edited. Used to add import statements. * Can be <code>null</code> if no import statements should be added. */
6,696
Bug 6696 Code completion should indicate deprecated methods
The icon for deprecated methods should be overlaid with a warning icon.
verified fixed
c91513f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-17T19:31:38Z
2001-12-08T00:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
public void reset(int codeAssistOffset, IJavaProject jproject, ICompilationUnit cu) { fJavaProject= jproject; fCompilationUnit= cu; fCodeAssistOffset= codeAssistOffset; fUserReplacementLength= -1; fLastProblem= null; for (int i= 0; i < fResults.length; i++) fResults[i].clear(); } /** * If the replacement length is set, it overrides the length returned from * the content assist infrastructure. * Use this setting if code assist is called with a none empty selection. */ public void setReplacementLength(int length) { fUserReplacementLength= length; } /** * If set, proposals created will not remove characters after the code assist position * @param preventEating The preventEating to set */ public void setPreventEating(boolean preventEating) { fPreventEating= preventEating; } }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.core; import java.io.File; import java.util.zip.ZipFile; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.JavaTestPlugin; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.IChooseImportQuery; import org.eclipse.jdt.internal.ui.util.TypeInfo; public class ImportOrganizeTest extends TestCase {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
private static final Class THIS= ImportOrganizeTest.class; private IJavaProject fJProject1; public ImportOrganizeTest(String name) { super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), THIS, args); } public static Test suite() { return new TestSuite(THIS);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
} protected void setUp() throws Exception { fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); assertTrue("rt not found", JavaProjectHelper.addRTJar(fJProject1) != null); File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC); assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists()); ZipFile zipfile= new ZipFile(junitSrcArchive); JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", zipfile); } protected void tearDown() throws Exception { JavaProjectHelper.delete(fJProject1); } private IChooseImportQuery createQuery(final String name, final String[] choices, final int[] nEntries) { return new IChooseImportQuery() { public TypeInfo[] chooseImports(TypeInfo[][] openChoices, ISourceRange[] ranges) { assertTrue(name + "-query-nchoices1", choices.length == openChoices.length); assertTrue(name + "-query-nchoices2", nEntries.length == openChoices.length); if (nEntries != null) { for (int i= 0; i < nEntries.length; i++) { assertTrue(name + "-query-cnt" + i, openChoices[i].length == nEntries[i]); } } TypeInfo[] res= new TypeInfo[openChoices.length]; for (int i= 0; i < openChoices.length; i++) { TypeInfo[] selection= openChoices[i]; assertNotNull(name + "-query-setset" + i, selection); assertTrue(name + "-query-setlen" + i, selection.length > 0); TypeInfo found= null; for (int k= 0; k < selection.length; k++) {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
if (selection[k].getFullyQualifiedName().equals(choices[i])) { found= selection[k]; } } assertNotNull(name + "-query-notfound" + i, found); res[i]= found; } return res; } }; } private void assertImports(ICompilationUnit cu, String[] imports) throws Exception { IImportDeclaration[] desc= cu.getImports(); assertTrue(cu.getElementName() + "-count", desc.length == imports.length); for (int i= 0; i < imports.length; i++) { assertEquals(cu.getElementName() + "-cmpentries" + i, desc[i].getElementName(), imports[i]); } } public void test1() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/runner/BaseTestRunner.java")); assertNotNull("BaseTestRunner.java", cu); IPackageFragmentRoot root= (IPackageFragmentRoot)cu.getParent().getParent(); IPackageFragment pack= root.createPackageFragment("mytest", true, null); ICompilationUnit colidingCU= pack.getCompilationUnit("TestListener.java"); colidingCU.createType("public abstract class TestListener {\n}\n", null, true, null);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
String[] order= new String[0]; IChooseImportQuery query= createQuery("BaseTestRunner", new String[] { "junit.framework.TestListener" }, new int[] { 2 }); OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 99, true, query); op.run(null); assertImports(cu, new String[] { "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.io.PrintWriter", "java.io.StringReader", "java.io.StringWriter", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.text.NumberFormat", "java.util.Properties", "junit.framework.Test", "junit.framework.TestListener", "junit.framework.TestSuite" }); } public void test2() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/runner/LoadingTestCollector.java")); assertNotNull("LoadingTestCollector.java", cu);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
String[] order= new String[0]; IChooseImportQuery query= createQuery("LoadingTestCollector", new String[] { }, new int[] { }); OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 99, true, query); op.run(null); assertImports(cu, new String[] { "java.lang.reflect.Constructor", "java.lang.reflect.Method", "java.lang.reflect.Modifier", "junit.framework.Test" }); } public void test3() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/runner/TestCaseClassLoader.java")); assertNotNull("TestCaseClassLoader.java", cu); String[] order= new String[0]; IChooseImportQuery query= createQuery("TestCaseClassLoader", new String[] { }, new int[] { }); OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 3, true, query); op.run(null); assertImports(cu, new String[] { "java.io.*", "java.net.URL", "java.util.*", "java.util.zip.ZipEntry",
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
"java.util.zip.ZipFile", }); } public void test4() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/textui/TestRunner.java")); assertNotNull("TestRunner.java", cu); String[] order= new String[0]; IChooseImportQuery query= createQuery("TestRunner", new String[] {}, new int[] {}); OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 99, true, query); op.run(null); assertImports(cu, new String[] { "java.io.PrintStream", "java.util.Enumeration", "junit.framework.AssertionFailedError", "junit.framework.Test", "junit.framework.TestFailure", "junit.framework.TestResult", "junit.framework.TestSuite", "junit.runner.BaseTestRunner", "junit.runner.StandardTestSuiteLoader", "junit.runner.TestSuiteLoader", "junit.runner.Version" }); } }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
/*
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
* (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.core; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipFile; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.search.IJavaSearchConstants; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.ITypeNameRequestor; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.JavaTestPlugin; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoRequestor; public class TypeInfoTest extends TestCase {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
private IJavaProject fJProject1; private IJavaProject fJProject2; public TypeInfoTest(String name) { super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), TypeInfoTest.class, args); } public static Test suite() { return new TestSuite(TypeInfoTest.class); } protected void setUp() throws Exception { fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); assertNotNull("jre is null", JavaProjectHelper.addRTJar(fJProject1)); fJProject2= JavaProjectHelper.createJavaProject("TestProject2", "bin"); assertNotNull("jre is null", JavaProjectHelper.addRTJar(fJProject2)); File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC); assertTrue("Junit source", junitSrcArchive != null && junitSrcArchive.exists()); ZipFile zipfile= new ZipFile(junitSrcArchive); JavaProjectHelper.addSourceContainerWithImport(fJProject2, "src", zipfile); } protected void tearDown() throws Exception { JavaProjectHelper.delete(fJProject1); JavaProjectHelper.delete(fJProject2);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
} public void test1() throws Exception { IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJProject1, "src"); IPackageFragment pack1= root1.createPackageFragment("com.oti", true, null); ICompilationUnit cu1= pack1.getCompilationUnit("V.java"); IType type1= cu1.createType("public class V {\n static class VInner {\n}\n}\n", null, true, null); JavaProjectHelper.addRequiredProject(fJProject1, fJProject2); ArrayList result= new ArrayList(); IJavaElement[] elements= new IJavaElement[] { fJProject1 }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements); ITypeNameRequestor requestor= new TypeInfoRequestor(result); SearchEngine engine= new SearchEngine(); engine.searchAllTypeNames( fJProject1.getJavaModel().getWorkspace(), null, new char[] {'V'}, IJavaSearchConstants.PREFIX_MATCH, IJavaSearchConstants.CASE_INSENSITIVE, IJavaSearchConstants.TYPE, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); findTypeRef(result, "com.oti.V"); findTypeRef(result, "com.oti.V.VInner");
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
findTypeRef(result, "java.lang.VerifyError"); findTypeRef(result, "java.lang.Void"); findTypeRef(result, "java.util.Vector"); findTypeRef(result, "junit.samples.VectorTest"); assertTrue("Should find 9 elements, is " + result.size(), result.size() == 9); for (int i= 0; i < result.size(); i++) { TypeInfo ref= (TypeInfo) result.get(i); IType resolvedType= ref.resolveType(scope); if (resolvedType == null) { assertTrue("Could not be resolved: " + ref.toString(), false); } } } private void findTypeRef(List refs, String fullname) { for (int i= 0; i <refs.size(); i++) { TypeInfo curr= (TypeInfo) refs.get(i); if (fullname.equals(curr.getFullyQualifiedName())) { return; } } assertTrue("Type not found: " + fullname, false); } public void test2() throws Exception { ArrayList result= new ArrayList(); IJavaProject[] elements= new IJavaProject[] { fJProject2 }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
ITypeNameRequestor requestor= new TypeInfoRequestor(result); SearchEngine engine= new SearchEngine(); engine.searchAllTypeNames( fJProject1.getJavaModel().getWorkspace(), null, new char[] {'T'}, IJavaSearchConstants.PREFIX_MATCH, IJavaSearchConstants.CASE_INSENSITIVE, IJavaSearchConstants.TYPE, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); findTypeRef(result, "junit.extensions.TestDecorator"); findTypeRef(result, "junit.framework.Test"); findTypeRef(result, "junit.framework.TestListener"); findTypeRef(result, "junit.tests.TestCaseTest.TornDown"); assertTrue("Should find 37 elements, is " + result.size(), result.size() == 37); for (int i= 0; i < result.size(); i++) { TypeInfo ref= (TypeInfo) result.get(i); IType resolvedType= ref.resolveType(scope); if (resolvedType == null) { assertTrue("Could not be resolved: " + ref.toString(), false); } } } }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
package org.eclipse.jdt.internal.ui.javaeditor;
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.lang.reflect.InvocationTargetException; import java.util.List; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportContainer; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.internal.compiler.IProblem; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.IChooseImportQuery; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter; import org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; public class OrganizeImportsAction extends Action {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
private ITextEditor fEditor; public OrganizeImportsAction() { this(null); } public OrganizeImportsAction(ITextEditor editor) { super(JavaEditorMessages.getString("OrganizeImportsAction.label")); setToolTipText(JavaEditorMessages.getString("OrganizeImportsAction.tooltip")); setDescription(JavaEditorMessages.getString("OrganizeImportsAction.description")); setContentEditor(editor); WorkbenchHelp.setHelp(this, new Object[] { IJavaHelpContextIds.ORGANIZE_IMPORTS_ACTION }); } public static boolean canActionBeAdded(ISelection selection) { if (selection instanceof IStructuredSelection && !selection.isEmpty()) { List elements= ((IStructuredSelection)selection).toList(); if (elements.size() == 1) { return (elements.get(0) instanceof IImportContainer); } } return false; } /** * @see IAction#actionPerformed */ public void run() {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput()); if (cu != null) { String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference(); int threshold= ImportOrganizePreferencePage.getImportNumberThreshold(); OrganizeImportsOperation op= new OrganizeImportsOperation(cu, prefOrder, threshold, false, createChooseImportQuery()); try { BusyIndicatorRunnableContext context= new BusyIndicatorRunnableContext(); context.run(false, true, new WorkbenchRunnableAdapter(op)); } catch (InvocationTargetException e) { JavaPlugin.log(e); MessageDialog.openError(JavaPlugin.getActiveWorkbenchShell(), JavaEditorMessages.getString("OrganizeImportsAction.error.title"), e.getTargetException().getMessage()); } catch (InterruptedException e) { IProblem problem= op.getParsingError(); if (problem != null) { showParsingErrorDialog(problem); int start= problem.getSourceStart(); int end= problem.getSourceEnd(); if (start != -1 && end != -1) { fEditor.selectAndReveal(start, end - start); } } } } else { JavaPlugin.logErrorMessage("OrganizeImportsAction.run: Working copy is null"); } } private IChooseImportQuery createChooseImportQuery() { return new IChooseImportQuery() {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
public TypeInfo[] chooseImports(TypeInfo[][] openChoices, ISourceRange[] ranges) { return doChooseImports(openChoices, ranges); } }; } private TypeInfo[] doChooseImports(TypeInfo[][] openChoices, final ISourceRange[] ranges) { ISelection sel= fEditor.getSelectionProvider().getSelection(); TypeInfo[] result= null;; ILabelProvider labelProvider= new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED); MultiElementListSelectionDialog dialog= new MultiElementListSelectionDialog(JavaPlugin.getActiveWorkbenchShell(), labelProvider) { protected void handleSelectionChanged() { super.handleSelectionChanged(); doListSelectionChanged(getCurrentPage(), ranges); } }; dialog.setTitle(JavaEditorMessages.getString("OrganizeImportsAction.selectiondialog.title")); dialog.setMessage(JavaEditorMessages.getString("OrganizeImportsAction.selectiondialog.message")); dialog.setElements(openChoices); if (dialog.open() == dialog.OK) { Object[] res= dialog.getResult(); result= new TypeInfo[res.length]; for (int i= 0; i < res.length; i++) { Object[] array= (Object[]) res[i]; if (array.length > 0) result[i]= (TypeInfo) array[0]; }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OrganizeImportsAction.java
} if (sel instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection) sel; fEditor.selectAndReveal(textSelection.getOffset(), textSelection.getLength()); } return result; } private void doListSelectionChanged(int page, ISourceRange[] ranges) { if (page >= 0 && page < ranges.length) { ISourceRange range= ranges[page]; fEditor.selectAndReveal(range.getOffset(), range.getLength()); } } public void setContentEditor(ITextEditor editor) { fEditor= editor; setEnabled(editor != null && fEditor.isEditable()); } private void showParsingErrorDialog(IProblem problem) { String title= JavaEditorMessages.getString("OrganizeImportsAction.error.title"); String[] args= { String.valueOf(problem.getSourceLineNumber()), problem.getMessage() }; String message= JavaEditorMessages.getFormattedString("OrganizeImportsAction.error.parsing.message", args); MessageDialog.openInformation(JavaPlugin.getActiveWorkbenchShell(), title, message); } }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.preferences; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.StringTokenizer; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control;
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
import org.eclipse.swt.widgets.FileDialog; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.DialogPageContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; 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.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField; import org.eclipse.jdt.internal.ui.wizards.swt.MGridData; import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout; /* * The page for setting the organize import settings */ public class ImportOrganizePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
private static final String PREF_IMPORTORDER= JavaUI.ID_PLUGIN + ".importorder"; private static final String PREF_ONDEMANDTHRESHOLD= JavaUI.ID_PLUGIN + ".ondemandthreshold"; private static final String PREF_LASTLOADPATH= JavaUI.ID_PLUGIN + ".importorder.loadpath"; private static final String PREF_LASTSAVEPATH= JavaUI.ID_PLUGIN + ".importorder.savepath"; public static String[] getImportOrderPreference() { IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); String str= prefs.getString(PREF_IMPORTORDER); if (str != null) { return unpackOrderList(str); } return new String[0]; } private static String[] unpackOrderList(String str) { StringTokenizer tok= new StringTokenizer(str, ";"); int nTokens= tok.countTokens(); String[] res= new String[nTokens]; for (int i= 0; i < nTokens; i++) { res[i]= tok.nextToken(); } return res; }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
private static String packOrderList(List orderList) { StringBuffer buf= new StringBuffer(); for (int i= 0; i < orderList.size(); i++) { buf.append((String) orderList.get(i)); buf.append(';'); } return buf.toString(); } public static int getImportNumberThreshold() { IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); int threshold= prefs.getInt(PREF_ONDEMANDTHRESHOLD); if (threshold == 0) { threshold= Integer.MAX_VALUE; } return threshold; } /** * Initializes the default values of this page in the preference bundle. * Will be called on startup of the JavaPlugin */ public static void initDefaults(IPreferenceStore prefs) { prefs.setDefault(PREF_IMPORTORDER, "java;javax;com"); prefs.setDefault(PREF_ONDEMANDTHRESHOLD, 99); } private static class ImportOrganizeLabelProvider extends LabelProvider {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
private static final Image PCK_ICON= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_PACKAGE); public Image getImage(Object element) { return PCK_ICON; } } private class ImportOrganizeAdapter implements IListAdapter, IDialogFieldListener {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
public void customButtonPressed(DialogField field, int index) { doButtonPressed(index); } public void selectionChanged(DialogField field) { doSelectionChanged(); } public void dialogFieldChanged(DialogField field) { if (field == fThresholdField) { doThresholdChanged(); } } } private ListDialogField fOrderListField; private StringDialogField fThresholdField; public ImportOrganizePreferencePage() { super(); setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore()); setDescription(JavaUIMessages.getString("ImportOrganizePreferencePage.description")); String[] buttonLabels= new String[] { JavaUIMessages.getString("ImportOrganizePreferencePage.order.add.button"), JavaUIMessages.getString("ImportOrganizePreferencePage.order.edit.button"), null, JavaUIMessages.getString("ImportOrganizePreferencePage.order.up.button"), JavaUIMessages.getString("ImportOrganizePreferencePage.order.down.button"),
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
null, JavaUIMessages.getString("ImportOrganizePreferencePage.order.remove.button"), null, JavaUIMessages.getString("ImportOrganizePreferencePage.order.load.button"), JavaUIMessages.getString("ImportOrganizePreferencePage.order.save.button") }; ImportOrganizeAdapter adapter= new ImportOrganizeAdapter(); fOrderListField= new ListDialogField(adapter, buttonLabels, new ImportOrganizeLabelProvider()); fOrderListField.setDialogFieldListener(adapter); fOrderListField.setLabelText(JavaUIMessages.getString("ImportOrganizePreferencePage.order.label")); fOrderListField.setUpButtonIndex(3); fOrderListField.setDownButtonIndex(4); fOrderListField.setRemoveButtonIndex(6); fOrderListField.enableButton(1, false); fThresholdField= new StringDialogField(); fThresholdField.setDialogFieldListener(adapter); fThresholdField.setLabelText(JavaUIMessages.getString("ImportOrganizePreferencePage.threshold.label")); } /** * @see PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { super.createControl(parent); WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.ORGANIZE_IMPORTS_PREFERENCE_PAGE));
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
} protected Control createContents(Composite parent) { initialize(getImportOrderPreference(), getImportNumberThreshold()); Composite composite= new Composite(parent, SWT.NONE); MGridLayout layout= new MGridLayout(); layout.numColumns= 2; layout.marginWidth= 0; layout.marginHeight= 0; composite.setLayout(layout); fOrderListField.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fOrderListField.getLabelControl(null), 2); fThresholdField.doFillIntoGrid(composite, 2); ((MGridData) fThresholdField.getTextControl(null).getLayoutData()).grabExcessHorizontalSpace= false; return composite; } private void initialize(String[] importOrder, int threshold) { fOrderListField.removeAllElements(); for (int i= 0; i < importOrder.length; i++) { fOrderListField.addElement(importOrder[i]); } fThresholdField.setText(String.valueOf(threshold)); }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
private void doThresholdChanged() { StatusInfo status= new StatusInfo(); String thresholdString= fThresholdField.getText(); try { int threshold= Integer.parseInt(thresholdString); if (threshold < 0) { status.setError(JavaUIMessages.getString("ImportOrganizePreferencePage.error.invalidthreshold")); } } catch (NumberFormatException e) { status.setError(JavaUIMessages.getString("ImportOrganizePreferencePage.error.invalidthreshold")); } updateStatus(status); } private void doButtonPressed(int index) { if (index == 0) { List existing= fOrderListField.getElements(); ImportOrganizeInputDialog dialog= new ImportOrganizeInputDialog(getShell(), existing); if (dialog.open() == dialog.OK) { fOrderListField.addElement(dialog.getResult()); } } else if (index == 1) { List selected= fOrderListField.getSelectedElements(); if (selected.isEmpty()) { return; } String editedEntry= (String) selected.get(0); List existing= fOrderListField.getElements(); existing.remove(editedEntry);
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
ImportOrganizeInputDialog dialog= new ImportOrganizeInputDialog(getShell(), existing); dialog.setInitialString(editedEntry); if (dialog.open() == dialog.OK) { fOrderListField.replaceElement(editedEntry, dialog.getResult()); } } else if (index == 8) { List order= loadImportOrder(); if (order != null) { fOrderListField.setElements(order); } } else if (index == 9) { saveImportOrder(fOrderListField.getElements()); } } private void doSelectionChanged() { List selected= fOrderListField.getSelectedElements(); fOrderListField.enableButton(1, selected.size() == 1); } /** * The import order file is a property file with keys * "0", "1" ... last entry. * values must be valid package names */ private List loadFromProperties(Properties properties) { ArrayList res= new ArrayList(); int nEntries= properties.size();
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
for (int i= 0 ; i < nEntries; i++) { String curr= properties.getProperty(String.valueOf(i)); if (curr != null) { if (JavaConventions.validatePackageName(curr).isOK()) { res.add(curr); } else { return null; } } else { return res; } } return res; } private List loadImportOrder() { FileDialog dialog= new FileDialog(getShell(), SWT.OPEN); dialog.setText(JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.title")); ) dialog.setFilterExtensions(new String[] {"*.importorder", "*.*"}); String lastPath= getPreferenceStore().getString(PREF_LASTLOADPATH); if (lastPath != null) { dialog.setFilterPath(lastPath); } String fileName= dialog.open(); if (fileName != null) { getPreferenceStore().putValue(PREF_LASTLOADPATH, dialog.getFilterPath()); Properties properties= new Properties(); FileInputStream fis= null; try {
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
fis= new FileInputStream(fileName); properties.load(fis); List res= loadFromProperties(properties); if (res != null) { return res; } } catch (IOException e) { JavaPlugin.log(e); } finally { if (fis != null) { try { fis.close(); } catch (IOException e) {} } } String title= JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.error.title"); String message= JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.error.message"); MessageDialog.openError(getShell(), title, message); } return null; } private void saveImportOrder(List elements) { FileDialog dialog= new FileDialog(getShell(), SWT.SAVE); dialog.setText(JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.title")); ) dialog.setFilterExtensions(new String[] {"*.importorder", "*.*"}); dialog.setFileName("example.importorder"); String lastPath= getPreferenceStore().getString(PREF_LASTSAVEPATH); if (lastPath != null) { dialog.setFilterPath(lastPath); } String fileName= dialog.open();
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
if (fileName != null) { getPreferenceStore().putValue(PREF_LASTSAVEPATH, dialog.getFilterPath()); Properties properties= new Properties(); for (int i= 0; i < elements.size(); i++) { properties.setProperty(String.valueOf(i), (String) elements.get(i)); } FileOutputStream fos= null; try { fos= new FileOutputStream(fileName); properties.store(fos, "Organize Import Order"); } catch (IOException e) { JavaPlugin.log(e); String title= JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.error.title"); String message= JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.error.message"); MessageDialog.openError(getShell(), title, message); } finally { if (fos != null) { try { fos.close(); } catch (IOException e) {} } } } } public void init(IWorkbench workbench) { } private void updateStatus(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
6,977
Bug 6977 organize imports imports unnecessary classes
I'm talking about integration build of December 11: Here is a code (for jdk1.4): ------------ import java.io.IOException; public class test1 { static Thread thr = new Thread() { public void run() { System.out.println("Shutting down"); try { int c = System.in.read(); System.out.println(c); } catch (IOException e) { } } }; int o = 5; /** * Method main. * * @param args */ public static void main(String[] args) { Runtime r = Runtime.getRuntime(); r.traceInstructions(true); r.traceMethodCalls(true); r.addShutdownHook(thr); System.out.println("Available procs: " + r.availableProcessors ()); System.out.println("Free Memory: " + r.freeMemory()/1024 + "Kb"); System.out.println("Total Memory: " + r.totalMemory()/1024 + "Kb"); System.out.println("Max Memory: " + r.maxMemory()/1024 + "Kb"); System.getProperties().list(System.out); try { System.in.read(); } catch (Exception e) { } } } ---------- end of example code ------ Pressing CTRL+SHIFT+O to organize imports adds the following two imports: import sun.security.krb5.internal.r; import sun.security.krb5.internal.crypto.c; for the "c" and "r" VARIABLES!. This is a bad bad thing...... Surprisingly it skips the "o" field....
resolved wontfix
18ff003
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T11:02:38Z
2001-12-15T21:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
/** * @see PreferencePage#performDefaults() */ protected void performDefaults() { String[] order; IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); String str= prefs.getDefaultString(PREF_IMPORTORDER); if (str != null) { order= unpackOrderList(str); } else { order= new String[0]; } int threshold= prefs.getDefaultInt(PREF_ONDEMANDTHRESHOLD); if (threshold == 0) { threshold= Integer.MAX_VALUE; } initialize(order, threshold); } /** * @see IPreferencePage#performOk() */ public boolean performOk() { IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); prefs.putValue(PREF_IMPORTORDER, packOrderList(fOrderListField.getElements())); prefs.putValue(PREF_ONDEMANDTHRESHOLD, fThresholdField.getText()); return true; } }
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import java.util.Set; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlAdapter; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.ToolBarManager;
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IMemento; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.actions.OpenJavaElementAction; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter; import org.eclipse.jdt.internal.ui.viewsupport.MarkerErrorTickProvider; import org.eclipse.jdt.internal.ui.viewsupport.ProblemItemMapper; /** * Method viewer shows a list of methods of a input type. * Offers filter actions. * No dependency to the type hierarchy view */ public class MethodsViewer extends TableViewer implements IProblemChangedListener {
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
private ProblemItemMapper fProblemItemMapper; /** * Sorter that uses the unmodified labelprovider (No declaring class names) */ private static class MethodsViewerSorter extends JavaElementSorter { public MethodsViewerSorter() { } public int compare(Viewer viewer, Object e1, Object e2) { int cat1 = category(e1); int cat2 = category(e2); if (cat1 != cat2) return cat1 - cat2; String name1= JavaElementLabels.getElementLabel((IJavaElement) e1, JavaElementLabels.ALL_DEFAULT); String name2= JavaElementLabels.getElementLabel((IJavaElement) e2, JavaElementLabels.ALL_DEFAULT);
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
return getCollator().compare(name1, name2); } } private static final String TAG_HIDEFIELDS= "hidefields"; private static final String TAG_HIDESTATIC= "hidestatic"; private static final String TAG_HIDENONPUBLIC= "hidenonpublic"; private static final String TAG_SHOWINHERITED= "showinherited"; private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll"; private MethodsViewerFilterAction[] fFilterActions; private MethodsViewerFilter fFilter; private OpenJavaElementAction fOpen; private ShowInheritedMembersAction fShowInheritedMembersAction; private ContextMenuGroup[] fStandardGroups; public MethodsViewer(Composite parent, IWorkbenchPart part) { super(new Table(parent, SWT.MULTI)); fProblemItemMapper= new ProblemItemMapper(); JavaElementLabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); lprovider.setErrorTickManager(new MarkerErrorTickProvider()); MethodsContentProvider contentProvider= new MethodsContentProvider(); setLabelProvider(lprovider); setContentProvider(contentProvider);
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
fOpen= new OpenJavaElementAction(this); addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { fOpen.run(); } }); fFilter= new MethodsViewerFilter(); String title= TypeHierarchyMessages.getString("MethodsViewer.hide_fields.label"); String helpContext= IJavaHelpContextIds.FILTER_FIELDS_ACTION; MethodsViewerFilterAction hideFields= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_FIELDS, helpContext, false); hideFields.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.description")); hideFields.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.checked")); hideFields.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideFields, "fields_co.gif"); title= TypeHierarchyMessages.getString("MethodsViewer.hide_static.label"); helpContext= IJavaHelpContextIds.FILTER_STATIC_ACTION; MethodsViewerFilterAction hideStatic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_STATIC, helpContext, false); hideStatic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_static.description")); hideStatic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.checked")); hideStatic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideStatic, "static_co.gif"); title= TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.label");
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
helpContext= IJavaHelpContextIds.FILTER_PUBLIC_ACTION; MethodsViewerFilterAction hideNonPublic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_NONPUBLIC, helpContext, false); hideNonPublic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.description")); hideNonPublic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.checked")); hideNonPublic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.unchecked")); JavaPluginImages.setLocalImageDescriptors(hideNonPublic, "public_co.gif"); fFilterActions= new MethodsViewerFilterAction[] { hideFields, hideStatic, hideNonPublic }; addFilter(fFilter); fShowInheritedMembersAction= new ShowInheritedMembersAction(this, false); showInheritedMethods(false); fStandardGroups= new ContextMenuGroup[] { new JavaSearchGroup(), new GenerateGroup() }; setSorter(new MethodsViewerSorter()); } /** * Show inherited methods */ public void showInheritedMethods(boolean on) { MethodsContentProvider cprovider= (MethodsContentProvider) getContentProvider(); try { cprovider.showInheritedMethods(on); fShowInheritedMembersAction.setChecked(on);
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
JavaElementLabelProvider lprovider= (JavaElementLabelProvider) getLabelProvider(); if (on) { lprovider.turnOn(JavaElementLabelProvider.SHOW_POST_QUALIFIED); } else { lprovider.turnOff(JavaElementLabelProvider.SHOW_POST_QUALIFIED); } refresh(); } catch (JavaModelException e) { ExceptionHandler.handle(e, getControl().getShell(), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.title"), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.message")); } } /* * @see Viewer#inputChanged(Object, Object) */ protected void inputChanged(Object input, Object oldInput) { super.inputChanged(input, oldInput); } /** * Returns <code>true</code> if inherited methods are shown. */ public boolean isShowInheritedMethods() { return ((MethodsContentProvider) getContentProvider()).isShowInheritedMethods(); } /** * Filters the method list */
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
public void setMemberFilter(int filterProperty, boolean set) { if (set) { fFilter.addFilter(filterProperty); } else { fFilter.removeFilter(filterProperty); } for (int i= 0; i < fFilterActions.length; i++) { if (fFilterActions[i].getFilterProperty() == filterProperty) { fFilterActions[i].setChecked(set); } } refresh(); } /** * Returns <code>true</code> if the given filter is set. */ public boolean hasMemberFilter(int filterProperty) { return fFilter.hasFilter(filterProperty); } /** * Saves the state of the filter actions */ public void saveState(IMemento memento) { memento.putString(TAG_HIDEFIELDS, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_FIELDS))); memento.putString(TAG_HIDESTATIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_STATIC))); memento.putString(TAG_HIDENONPUBLIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC))); memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods())); ScrollBar bar= getTable().getVerticalBar(); int position= bar != null ? bar.getSelection() : 0;
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position)); } /** * Restores the state of the filter actions */ public void restoreState(IMemento memento) { boolean set= Boolean.valueOf(memento.getString(TAG_HIDEFIELDS)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_FIELDS, set); set= Boolean.valueOf(memento.getString(TAG_HIDESTATIC)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_STATIC, set); set= Boolean.valueOf(memento.getString(TAG_HIDENONPUBLIC)).booleanValue(); setMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC, set); set= Boolean.valueOf(memento.getString(TAG_SHOWINHERITED)).booleanValue(); showInheritedMethods(set); ScrollBar bar= getTable().getVerticalBar(); if (bar != null) { Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL); if (vScroll != null) { bar.setSelection(vScroll.intValue()); } } } /** * Attaches a contextmenu listener to the table */ public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager();
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getTable()); getTable().setMenu(menu); viewSite.registerContextMenu(popupId, menuMgr, this); } /** * Fills up the context menu with items for the method viewer * Should be called by the creator of the context menu */ public void contributeToContextMenu(IMenuManager menu) { if (fOpen.canActionBeAdded()) { menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen); } ContextMenuGroup.add(menu, fStandardGroups, this); } /** * Fills up the tool bar with items for the method viewer * Should be called by the creator of the tool bar */ public void contributeToToolBar(ToolBarManager tbm) { tbm.add(fShowInheritedMembersAction); tbm.add(new Separator()); tbm.add(fFilterActions[0]); tbm.add(fFilterActions[1]); tbm.add(fFilterActions[2]); } /*
5,466
Bug 5466 Hierarchy view should try to preserve method selection
1) Open a hierachy view on a type hiearchy that has a method which is overrided at several levels. 2) Select the method. 3) Select other types. 4) Note that the method selection is lost. We should try to preserve the selection (show the same method for the selected type whenever possible). This is a little trickier when the method list is showing all inherited methods but its still possible.
resolved fixed
d005b8d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T12:05:56Z
2001-11-02T14:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
* @see IProblemChangedListener#problemsChanged */ public void problemsChanged(final Set changed) { Control control= getControl(); if (control != null && !control.isDisposed()) { control.getDisplay().asyncExec(new Runnable() { public void run() { fProblemItemMapper.problemsChanged(changed, (ILabelProvider)getLabelProvider()); } }); } } /* * @see StructuredViewer#associate(Object, Item) */ protected void associate(Object element, Item item) { if (item.getData() != element) { fProblemItemMapper.addToMap(element, item); } super.associate(element, item); } /* * @see StructuredViewer#disassociate(Item) */ protected void disassociate(Item item) { fProblemItemMapper.removeFromMap(item.getData(), item); super.disassociate(item); } }
4,964
Bug 4964 Automatic Code Assist needs to be smarter
Build 204 While writing SWT code, I type the following: button.dispose At this point, I do not realize that the code assist list is up because I am not looking. There are 2 items in the list now: DISPOSED int - Widget dispose() void - Widget I then type "(" because the line I was typing was supposed to be: button.dispose(); But as soon as I type the "(" then automatic code assist seems to insert whatever is selected. Since DISPOSED is first in the list and is selected, I ended up with: button.DISPOSED which isn't even close to what I want, and I have to delete it all and start again, paying more attention this time. Code assist should notice that I have typed a ( and that this matches "dispose ()" far better than "DISPOSED". Either that, or it needs to be case sensitive when it is automatically inserting stuff.
resolved fixed
4d3b16a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-12-18T14:58:10Z
2001-10-14T22:53: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 {