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
unknown
report_datetime
unknown
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.text.template; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.TypedEvent; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.internal.ui.JavaPlugin; /**
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
* A popup dialog to request the user to fill the variables of the chosen template. */ public class TemplateEditorPopup implements ModifyListener, VerifyKeyListener, ControlListener, FocusListener { private static final int BORDER_WIDTH= 1; private TemplateContext fContext; private TemplateModel fModel; private Shell fShell; private Composite fComposite; private SourceViewer fViewer; private EditBox[] fEditBoxes; private boolean fResult; public TemplateEditorPopup(TemplateContext context, TemplateModel model) { fContext= context; fModel= model; } private void create() { Control control= fContext.getViewer().getTextWidget(); control.getShell().addControlListener(this); Display display= control.getDisplay(); fShell= new Shell(control.getShell(), SWT.NO_TRIM | SWT.APPLICATION_MODAL); fShell.setBackground(display.getSystemColor(SWT.COLOR_RED)); fComposite= new Composite(fShell, SWT.NONE); int[] indices= fModel.getEditableTexts(); int count= indices.length; fEditBoxes= new EditBox[count];
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
for (int i= 0; i != count; i++) { fEditBoxes[i]= new EditBox(fComposite, fContext, fModel, indices[i]); fEditBoxes[i].getText().addFocusListener(this); } fViewer= createViewer(fComposite); fViewer.getTextWidget().setText(fModel.toString()); } private static SourceViewer createViewer(Composite parent) { SourceViewer viewer= new SourceViewer(parent, null, SWT.NONE); JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools(); viewer.configure(new JavaSourceViewerConfiguration(tools, null)); viewer.setEditable(false); viewer.setDocument(new Document()); Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT); viewer.getTextWidget().setFont(font); return viewer; } private void show() { updateSize(); updatePosition(); fShell.open(); } public void dispose() { if ((fShell != null) && !fShell.isDisposed()) { fShell.dispose(); Control control= fContext.getViewer().getTextWidget(); control.getShell().removeControlListener(this);
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
} fShell= null; } public boolean open() { create(); show(); Display display= fShell.getDisplay(); while (display.readAndDispatch()); fEditBoxes[0].selectAll(); while ((fShell != null) && !fShell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); return fResult; } private int findEditBoxIndex(TypedEvent e) { StyledText text= (StyledText) e.widget; for (int i= 0; i != fEditBoxes.length; i++) if (fEditBoxes[i].getText().equals(text)) return i; return -1; }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
private EditBox getEditBox(TypedEvent e) { int index= findEditBoxIndex(e); return fEditBoxes[index]; } public void modifyText(ModifyEvent e) { EditBox box= getEditBox(e); String modifiedText= box.getText().getText(); int rangeIndex= box.getRangeIndex(); fModel.setText(rangeIndex, box.getText().getText()); for (int i= 0; i != fEditBoxes.length; i++) { if (fModel.shareSameModel(fEditBoxes[i].getRangeIndex(), rangeIndex)) { if (box.equals(fEditBoxes[i])) { StyledText text= fEditBoxes[i].getText(); int offset= text.getCaretOffset(); Point selection= text.getSelection(); text.removeModifyListener(this); text.setText(modifiedText); text.addModifyListener(this); text.setCaretOffset(offset); text.setSelection(selection); } else { fEditBoxes[i].getText().setText(modifiedText); } }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
} fViewer.getTextWidget().setText(fModel.toString()); updateSize(); updatePosition(); } public void verifyKey(VerifyEvent e) { switch (e.character) { case 0x09: int index= findEditBoxIndex(e); if (e.stateMask == SWT.SHIFT) { if (index == 0) { fShell.getDisplay().beep(); } else { fEditBoxes[index].unselect(); fEditBoxes[index - 1].selectAll(); } } else { if (index == fEditBoxes.length - 1) { fShell.getDisplay().beep(); } else { fEditBoxes[index].unselect(); fEditBoxes[index + 1].selectAll(); } }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
e.doit= false; break; case 0x0D: dispose(); fResult= true; e.doit= false; break; case 0x1B: dispose(); fResult= false; e.doit= false; break; } } public void controlMoved(ControlEvent e) { updatePosition(); } public void controlResized(ControlEvent e) { updatePosition(); } public void focusGained(FocusEvent e) { EditBox box= getEditBox(e); box.getText().addModifyListener(this); box.getText().addVerifyKeyListener(this); }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
public void focusLost(FocusEvent e) { EditBox box= getEditBox(e); box.getText().removeModifyListener(this); box.getText().removeVerifyKeyListener(this); box.unselect(); } private void updatePosition() { if ((fShell == null) || fShell.isDisposed()) return; StyledText text= fContext.getViewer().getTextWidget(); Point location= text.getLocationAtOffset(fContext.getStart()); location= text.toDisplay(location); location.x -= BORDER_WIDTH; location.y -= BORDER_WIDTH; Point size= fShell.getSize(); Display display= fShell.getDisplay(); Rectangle rectangle= display.getBounds(); if (location.x > rectangle.width - size.x) location.x = rectangle.width - size.x; if (location.y > rectangle.height - size.y) location.y = rectangle.height - size.y; fShell.setLocation(location.x, location.y); }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
private void updateSize() { if ((fShell == null) || fShell.isDisposed()) return; StyledText text= fViewer.getTextWidget(); Point size= text.computeSize(SWT.DEFAULT, SWT.DEFAULT); text.setSize(size); fComposite.setSize(size); fComposite.setLocation(BORDER_WIDTH, BORDER_WIDTH); size.x += BORDER_WIDTH * 2; size.y += BORDER_WIDTH * 2; fShell.setSize(size); text.setLocation(0, 0); for (int i= 0; i != fEditBoxes.length; i++) fEditBoxes[i].updatePosition(fViewer.getTextWidget()); } public String getText() { return fModel.toString(); } public int[] getSelection() { return fModel.getSelection(); } }
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.text.template; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.internal.core.Assert; import org.eclipse.jdt.internal.core.refactoring.TextUtilities; import org.eclipse.jdt.internal.formatter.CodeFormatter; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage; import org.eclipse.jdt.internal.ui.refactoring.changes.TextBuffer; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.DefaultInformationControl; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.custom.StyledText; /** * A template proposal. */ public class TemplateProposal implements ICompletionProposal {
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
private final Template fTemplate; private final TemplateContext fContext; private int fSelectionStart;
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
private int fSelectionEnd; private CursorSelectionEvaluator fCursorSelectionEvaluator= new CursorSelectionEvaluator(); private VariableEvaluator fLocalVariableEvaluator= new LocalVariableEvaluator(); private TemplateInterpolator fInterpolator= new TemplateInterpolator(); private ArgumentEvaluator fArgumentEvaluator; private ModelEvaluator fModelEvaluator= new ModelEvaluator(); private boolean fDisposed; /** * Creates a template proposal with a template and the range of its key. * @param template the template * @param arguments arguments to the template, or <code>null</code> for no arguments * @param start the starting position of the key. * @param end the ending position of the key (exclusive). */ TemplateProposal(Template template, String[] arguments, TemplateContext context) { Assert.isNotNull(template); Assert.isNotNull(context); fTemplate= template; fArgumentEvaluator= new ArgumentEvaluator(arguments); fContext= context; } /** * @see ICompletionProposal#apply(IDocument) */ public void apply(IDocument document) { int indentationLevel= guessIndentationLevel(document, fContext.getStart()); String pattern= fTemplate.getPattern();
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator); pattern= fInterpolator.interpolate(pattern, fContext); fInterpolator.interpolate(pattern, fModelEvaluator); TemplateModel model= fModelEvaluator.getModel(); if (model.getEditableCount() == 0) { pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator); int cursorStart= fCursorSelectionEvaluator.getStart(); if (cursorStart == -1) { fSelectionStart= pattern.length(); fSelectionEnd= fSelectionStart; } else { fSelectionStart= cursorStart; fSelectionEnd= fCursorSelectionEvaluator.getEnd(); } } else { TemplateEditorPopup popup= new TemplateEditorPopup(fContext, model); if (!popup.open()) { fSelectionStart= fContext.getEnd() - fContext.getStart(); fSelectionEnd= fSelectionStart; return; } pattern= popup.getText(); int[] selection= popup.getSelection(); if (selection[0] == -1) {
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
fSelectionStart= pattern.length(); fSelectionEnd= fSelectionStart; } else { fSelectionStart= selection[0]; fSelectionEnd= selection[1]; } } if (TemplatePreferencePage.useCodeFormatter() && fTemplate.getContext().equals("java")) { CodeFormatter formatter= new CodeFormatter(JavaCore.getOptions()); formatter.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd}); formatter.setInitialIndentationLevel(indentationLevel); pattern= formatter.formatSourceString(pattern); int[] positions= formatter.getMappedPositions(); fSelectionStart= positions[0]; fSelectionEnd= positions[1]; } else { CodeIndentator indentator= new CodeIndentator(); indentator.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd}); indentator.setIndentationLevel(indentationLevel); pattern= indentator.indentate(pattern); int[] positions= indentator.getMappedPositions(); fSelectionStart= positions[0]; fSelectionEnd= positions[1]; } String finalString= trimBegin(pattern); int charactersRemoved= pattern.length() - finalString.length(); fSelectionStart -= charactersRemoved;
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
fSelectionEnd -= charactersRemoved; int start= fContext.getStart(); int length= fContext.getEnd() - start; try { document.replace(start, length, finalString); } catch (BadLocationException x) {} } private static String trimBegin(String string) { int i= 0; while ((i != string.length()) && Character.isWhitespace(string.charAt(i))) i++; return string.substring(i); } /** * @see ICompletionProposal#getSelection(IDocument) */ public Point getSelection(IDocument document) { return new Point(fContext.getStart() + fSelectionStart, fSelectionEnd - fSelectionStart); } /** * @see ICompletionProposal#getAdditionalProposalInfo() */ public String getAdditionalProposalInfo() { String pattern= fTemplate.getPattern(); pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator); pattern= fInterpolator.interpolate(pattern, fContext); pattern= fInterpolator.interpolate(pattern, fLocalVariableEvaluator); pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator);
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
return textToHTML(pattern); } /** * @see ICompletionProposal#getDisplayString() */ public String getDisplayString() { return fTemplate.getName() + TemplateMessages.getString("TemplateProposal.delimiter") + fTemplate.getDescription(); } /** * @see ICompletionProposal#getImage() */ public Image getImage() { return fTemplate.getImage(); } /** * @see ICompletionProposal#getContextInformation() */ public IContextInformation getContextInformation() { return null; } private static int guessIndentationLevel(IDocument document, int offset) { TextBuffer buffer= new TextBuffer(document); String line= buffer.getLineContentOfOffset(offset); return TextUtilities.getIndent(line, CodeFormatterPreferencePage.getTabSize()); } private static String textToHTML(String string) { StringBuffer buffer= new StringBuffer(string.length()); buffer.append("<pre>");
4,360
Bug 4360 Template - cursor at wrong position
null
resolved wontfix
6498fcf
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T08:12:23Z"
"2001-10-11T11:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
for (int i= 0; i != string.length(); i++) { char ch= string.charAt(i); switch (ch) { case '&': buffer.append("&amp;"); break; case '<': buffer.append("&lt;"); break; case '>': buffer.append("&gt;"); break; case '\t': buffer.append(" "); break; case '\n': buffer.append("<br>"); break; default: buffer.append(ch); break; } } buffer.append("</pre>"); return buffer.toString(); } }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.preferences; import java.lang.reflect.InvocationTargetException; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.ui.dialogs.PropertyPage; import org.eclipse.ui.help.DialogPageContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; import org.eclipse.jdt.internal.ui.wizards.buildpaths.SourceAttachmentBlock; /** * Property page to configure a archive's JARs source attachment */ public class SourceAttachmentPropertyPage extends PropertyPage implements IStatusChangeListener {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
private SourceAttachmentBlock fSourceAttachmentBlock; private IPackageFragmentRoot fJarRoot; public SourceAttachmentPropertyPage() { } /* * @see PreferencePage#createContents */ protected Control createContents(Composite composite) { fJarRoot= getJARPackageFragmentRoot(); if (fJarRoot != null) { try { IClasspathEntry entry= JavaModelUtil.getRawClasspathEntry(fJarRoot); if (entry == null) { entry= JavaCore.newLibraryEntry(fJarRoot.getPath(), null, null); } IWorkspaceRoot wsroot= fJarRoot.getJavaModel().getWorkspace().getRoot(); fSourceAttachmentBlock= new SourceAttachmentBlock(wsroot, this, entry); return fSourceAttachmentBlock.createControl(composite); } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } } Label label= new Label(composite, SWT.LEFT + SWT.WRAP); label.setText(JavaUIMessages.getString("SourceAttachmentPropertyPage.noarchive.message")); label.setFont(composite.getFont());
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
WorkbenchHelp.setHelp(composite, new DialogPageContextComputer(this, IJavaHelpContextIds.SOURCE_ATTACHMENT_PROPERTY_PAGE)); return label; } /* * @see IPreferencePage#performOk */ public boolean performOk() { if (fSourceAttachmentBlock != null) { try { IRunnableWithProgress runnable= fSourceAttachmentBlock.getRunnable(fJarRoot.getJavaProject(), getShell()); new ProgressMonitorDialog(getShell()).run(true, true, runnable); } catch (InvocationTargetException e) { String title= JavaUIMessages.getString("SourceAttachmentPropertyPage.error.title"); String message= JavaUIMessages.getString("SourceAttachmentPropertyPage.error.message"); ExceptionHandler.handle(e, getShell(), title, message); return false; } catch (InterruptedException e) { return false; } } return true; } private IPackageFragmentRoot getJARPackageFragmentRoot() { IAdaptable adaptable= getElement(); IJavaElement elem= (IJavaElement) adaptable.getAdapter(IJavaElement.class); if (elem instanceof IPackageFragmentRoot) { IPackageFragmentRoot root= (IPackageFragmentRoot) elem;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
if (root.isArchive()) { return root; } else { return null; } } IResource resource= (IResource) adaptable.getAdapter(IResource.class); if (resource instanceof IFile) { IProject proj= resource.getProject(); try { if (proj.hasNature(JavaCore.NATURE_ID)) { IJavaProject jproject= JavaCore.create(proj); return jproject.getPackageFragmentRoot(resource); } } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } } return null; } /* * @see IStatusChangeListener#statusChanged */ public void statusChanged(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); } }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.buildpaths; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
import java.util.zip.ZipFile; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.model.WorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.swt.MGridData; import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout; /** * UI to set the source attachment archive and root. * Same implementation for both setting attachments for libraries from * variable entries and for normal (internal or external) jar. */ public class SourceAttachmentBlock { private IStatusChangeListener fContext; private StringButtonDialogField fFileNameField; private SelectionButtonDialogField fInternalButtonField; private StringButtonDialogField fPrefixField; private StringButtonDialogField fJavaDocField; private boolean fIsVariableEntry;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
private IStatus fNameStatus; private IStatus fPrefixStatus; private IStatus fJavaDocStatus; private IPath fJARPath; /** * The file to which the archive path points to. * Only set when the file exists. */ private File fResolvedFile; /** * The path to which the archive variable points. * Null if invalid path or not resolvable. Must not exist. */ private IPath fFileVariablePath; private URL fJavaDocLocation; private IWorkspaceRoot fRoot; private Control fSWTWidget; private CLabel fFullPathResolvedLabel; private CLabel fPrefixResolvedLabel; public SourceAttachmentBlock(IWorkspaceRoot root, IStatusChangeListener context, IClasspathEntry oldEntry) { fContext= context; fRoot= root;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
fIsVariableEntry= (oldEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE); fNameStatus= new StatusInfo(); fPrefixStatus= new StatusInfo(); fJavaDocStatus= new StatusInfo(); fJARPath= (oldEntry != null) ? oldEntry.getPath() : Path.EMPTY; SourceAttachmentAdapter adapter= new SourceAttachmentAdapter(); if (fIsVariableEntry) { fFileNameField= new VariablePathDialogField(adapter); fFileNameField.setDialogFieldListener(adapter); fFileNameField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.varlabel")); fFileNameField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.external.varbutton")); ((VariablePathDialogField)fFileNameField).setVariableButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.variable.button")); fPrefixField= new VariablePathDialogField(adapter); fPrefixField.setDialogFieldListener(adapter); fPrefixField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.prefix.varlabel")); fPrefixField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.varbutton")); ((VariablePathDialogField)fPrefixField).setVariableButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.variable.button")); } else { fFileNameField= new StringButtonDialogField(adapter); fFileNameField.setDialogFieldListener(adapter); fFileNameField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.label"));
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
fFileNameField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.external.button")); fInternalButtonField= new SelectionButtonDialogField(SWT.PUSH); fInternalButtonField.setDialogFieldListener(adapter); fInternalButtonField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.internal.button")); fPrefixField= new StringButtonDialogField(adapter); fPrefixField.setDialogFieldListener(adapter); fPrefixField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.prefix.label")); fPrefixField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.button")); } fJavaDocField= new StringButtonDialogField(adapter); fJavaDocField.setDialogFieldListener(adapter); fJavaDocField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.javadoc.label")); fJavaDocField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.javadoc.button")); if (oldEntry != null && oldEntry.getSourceAttachmentPath() != null) { fFileNameField.setText(oldEntry.getSourceAttachmentPath().toString()); } else { fFileNameField.setText(""); } if (oldEntry != null && oldEntry.getSourceAttachmentRootPath() != null) { fPrefixField.setText(oldEntry.getSourceAttachmentRootPath().toString()); } else { fPrefixField.setText(""); }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
} /** * Gets the source attachment path chosen by the user */ public IPath getSourceAttachmentPath() { if (fFileNameField.getText().length() == 0) { return null; } return new Path(fFileNameField.getText()); } /** * Gets the source attachment root chosen by the user */ public IPath getSourceAttachmentRootPath() { if (getSourceAttachmentPath() == null) { return null; } else { return new Path(fPrefixField.getText()); } }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
private Label createHelpText(Composite composite, int style, int widthHint, boolean indented, String text) { if (indented) { DialogField.createEmptySpace(composite, 1); } Label helpTextLabel= new Label(composite, style); helpTextLabel.setText(text); MGridData gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL); gd.widthHint= widthHint; helpTextLabel.setLayoutData(gd); if (indented) { DialogField.createEmptySpace(composite, 2); gd.horizontalSpan= 1; } else { gd.horizontalSpan= 4; } return helpTextLabel; } /** * Creates the control */ public Control createControl(Composite parent) { fSWTWidget= parent; Composite composite= new Composite(parent, SWT.NONE); MGridLayout layout= new MGridLayout(); layout.marginHeight= 0; layout.marginWidth= 0;
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
layout.minimumWidth= 450; layout.minimumHeight= 0; layout.numColumns= 4; composite.setLayout(layout); createHelpText(composite, SWT.LEFT, SWT.DEFAULT, false, NewWizardMessages.getFormattedString("SourceAttachmentBlock.message", fJARPath.lastSegment())); if (fIsVariableEntry) { createHelpText(composite, SWT.LEFT + SWT.WRAP, 300, true, NewWizardMessages.getString("SourceAttachmentBlock.filename.description")); } fFileNameField.doFillIntoGrid(composite, 4); MGridData gd= (MGridData)fFileNameField.getTextControl(null).getLayoutData(); gd.widthHint= 300; if (!fIsVariableEntry) { DialogField.createEmptySpace(composite, 3); fInternalButtonField.doFillIntoGrid(composite, 1); } else { DialogField.createEmptySpace(composite, 1); fFullPathResolvedLabel= new CLabel(composite, SWT.LEFT); fFullPathResolvedLabel.setText(getResolvedLabelString(fFileNameField.getText(), true)); fFullPathResolvedLabel.setLayoutData(new MGridData(MGridData.HORIZONTAL_ALIGN_FILL)); DialogField.createEmptySpace(composite, 2); } createHelpText(composite, SWT.LEFT + SWT.WRAP, 300, true, NewWizardMessages.getString("SourceAttachmentBlock.prefix.description"));
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
fPrefixField.doFillIntoGrid(composite, 4); gd= (MGridData)fPrefixField.getTextControl(null).getLayoutData(); gd.widthHint= 300; if (fIsVariableEntry) { DialogField.createEmptySpace(composite, 1); fPrefixResolvedLabel= new CLabel(composite, SWT.LEFT); fPrefixResolvedLabel.setText(getResolvedLabelString(fPrefixField.getText(), false)); fPrefixResolvedLabel.setLayoutData(new MGridData(MGridData.HORIZONTAL_ALIGN_FILL)); DialogField.createEmptySpace(composite, 2); } fFileNameField.postSetFocusOnDialogField(parent.getDisplay()); WorkbenchHelp.setHelp(composite, new Object[] { IJavaHelpContextIds.SOURCE_ATTACHMENT_BLOCK }); return composite; } private class SourceAttachmentAdapter implements IStringButtonAdapter, IDialogFieldListener {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
public void changeControlPressed(DialogField field) { attachmentChangeControlPressed(field); } public void dialogFieldChanged(DialogField field) { attachmentDialogFieldChanged(field); } } private void attachmentChangeControlPressed(DialogField field) { if (field == fFileNameField) { IPath jarFilePath= chooseExtJarFile(); if (jarFilePath != null) { fFileNameField.setText(jarFilePath.toString()); } } else if (field == fPrefixField) { IPath prefixPath= choosePrefix(); if (prefixPath != null) {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
fPrefixField.setText(prefixPath.toString()); } } else if (field == fJavaDocField) { URL jdocURL= chooseJavaDocLocation(); if (jdocURL != null) { fJavaDocField.setText(jdocURL.toExternalForm()); } } } private void attachmentDialogFieldChanged(DialogField field) { if (field == fFileNameField) { fNameStatus= updateFileNameStatus(); } else if (field == fInternalButtonField) { IPath jarFilePath= chooseInternalJarFile(fFileNameField.getText()); if (jarFilePath != null) { fFileNameField.setText(jarFilePath.toString()); } return; } else if (field == fPrefixField) { fPrefixStatus= updatePrefixStatus(); } else if (field == fJavaDocField) { fJavaDocStatus= updateJavaDocLocationStatus(); } doStatusLineUpdate(); } private void doStatusLineUpdate() { fPrefixField.enableButton(canBrowsePrefix());
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
fFileNameField.enableButton(canBrowseFileName()); if (fFullPathResolvedLabel != null) { fFullPathResolvedLabel.setText(getResolvedLabelString(fFileNameField.getText(), true)); } if (fPrefixResolvedLabel != null) { fPrefixResolvedLabel.setText(getResolvedLabelString(fPrefixField.getText(), false)); } IStatus status= StatusUtil.getMostSevere(new IStatus[] { fNameStatus, fPrefixStatus, fJavaDocStatus }); fContext.statusChanged(status); } private boolean canBrowseFileName() { if (!fIsVariableEntry) { return true; } if (fFileVariablePath != null) { return fFileVariablePath.toFile().isDirectory(); } return false; } private boolean canBrowsePrefix() { if (fResolvedFile != null) { if (fIsVariableEntry) {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
return fPrefixStatus.isOK(); } return true; } return false; } private String getResolvedLabelString(String path, boolean osPath) { IPath resolvedPath= getResolvedPath(new Path(path)); if (resolvedPath != null) { if (osPath) { return resolvedPath.toOSString(); } else { return resolvedPath.toString(); } } return ""; } private IPath getResolvedPath(IPath path) { if (path != null) { String varName= path.segment(0); if (varName != null) { IPath varPath= JavaCore.getClasspathVariable(varName); if (varPath != null) { return varPath.append(path.removeFirstSegments(1)); } } }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
return null; } private IStatus updatePrefixStatus() { StatusInfo status= new StatusInfo(); String prefix= fPrefixField.getText(); if (prefix.length() == 0) { return status; } else { if (!Path.EMPTY.isValidPath(prefix)) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.notvalid")); return status; } IPath path= new Path(prefix); if (fIsVariableEntry) { IPath resolvedPath= getResolvedPath(path); if (resolvedPath == null) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.varnotexists")); return status; } if (resolvedPath.getDevice() != null) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.deviceinvar")); return status; } } else { if (path.getDevice() != null) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.deviceinpath"));
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
return status; } } } return status; } private IStatus updateFileNameStatus() { StatusInfo status= new StatusInfo(); fResolvedFile= null; fFileVariablePath= null; String fileName= fFileNameField.getText(); if (fileName.length() == 0) { return status; } else { if (!Path.EMPTY.isValidPath(fileName)) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.notvalid")); return status; } IPath filePath= new Path(fileName); IPath resolvedPath; if (fIsVariableEntry) { if (filePath.getDevice() != null) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.deviceinpath")); return status; } String varName= filePath.segment(0); if (varName == null) {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.notvalid")); return status; } fFileVariablePath= JavaCore.getClasspathVariable(varName); if (fFileVariablePath == null) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.varnotexists")); return status; } resolvedPath= fFileVariablePath.append(filePath.removeFirstSegments(1)); if (resolvedPath.isEmpty()) { status.setWarning(NewWizardMessages.getString("SourceAttachmentBlock.filename.warning.varempty")); return status; } File file= resolvedPath.toFile(); if (!file.isFile()) { String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.filename.error.filenotexists", resolvedPath.toOSString()); status.setWarning(message); return status; } fResolvedFile= file; } else { File file= filePath.toFile(); IResource res= fRoot.findMember(filePath); if (res != null) { file= res.getLocation().toFile(); } if (!file.isFile()) { String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.filename.error.filenotexists", filePath.toString());
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
status.setError(message); return status; } fResolvedFile= file; } } return status; } private IStatus updateJavaDocLocationStatus() { StatusInfo status= new StatusInfo(); fJavaDocLocation= null; String jdocLocation= fJavaDocField.getText(); if (!"".equals(jdocLocation)) { try { URL url= new URL(jdocLocation); if ("file".equals(url.getProtocol())) { File dir= new File(url.getFile()); if (!dir.isDirectory()) { status.setError(NewWizardMessages.getString("SourceAttachmentBlock.javadoc.error.notafolder")); return status; } /*else { File indexFile= new File(dir, "index.html"); File packagesFile= new File(dir, "package-list"); if (!packagesFile.exists() || !indexFile.exists()) { fJavaDocStatusInfo.setWarning(NewWizardMessages.getString(ERR_JDOCLOCATION_IDXNOTFOUND)); // only a warning, go on }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
}*/ } fJavaDocLocation= url; } catch (MalformedURLException e) { status.setError(NewWizardMessages.getFormattedString("SourceAttachmentBlock.javadoc.error.malformed", e.getLocalizedMessage())); return status; } } return status; } /* * Opens a dialog to choose a jar from the file system. */ private IPath chooseExtJarFile() { IPath currPath= new Path(fFileNameField.getText()); if (currPath.isEmpty()) { currPath= fJARPath; } IPath resolvedPath= currPath; if (fIsVariableEntry) { resolvedPath= getResolvedPath(currPath); if (resolvedPath == null) { resolvedPath= Path.EMPTY; } } String ext= resolvedPath.getFileExtension(); if ("jar".equals(ext) || "zip".equals(ext)) { resolvedPath= resolvedPath.removeLastSegments(1);
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
} FileDialog dialog= new FileDialog(getShell()); dialog.setText(NewWizardMessages.getString("SourceAttachmentBlock.extjardialog.text")); dialog.setFilterExtensions(new String[] {"*.jar;*.zip"}); dialog.setFilterPath(resolvedPath.toOSString()); String res= dialog.open(); if (res != null) { IPath returnPath= new Path(res).makeAbsolute(); if (fIsVariableEntry) { returnPath= modifyPath(returnPath, currPath.segment(0)); } return returnPath; } return null; } /* * Opens a dialog to choose an internal jar. */ private IPath chooseInternalJarFile(String initSelection) { Class[] acceptedClasses= new Class[] { IFile.class }; ISelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false); ViewerFilter filter= new ArchiveFileFilter(null); ILabelProvider lp= new WorkbenchLabelProvider(); ITreeContentProvider cp= new WorkbenchContentProvider(); IResource initSel= fRoot.findMember(new Path(initSelection)); if (initSel == null) { initSel= fRoot.findMember(fJARPath); }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); dialog.setAllowMultiple(false); dialog.setValidator(validator); dialog.addFilter(filter); dialog.setTitle(NewWizardMessages.getString("SourceAttachmentBlock.intjardialog.title")); dialog.setMessage(NewWizardMessages.getString("SourceAttachmentBlock.intjardialog.message")); dialog.setInput(fRoot); dialog.setInitialSelection(initSel); if (dialog.open() == dialog.OK) { IFile file= (IFile) dialog.getFirstResult(); return file.getFullPath(); } return null; } /* * Opens a dialog to choose path in a zip file. */ private IPath choosePrefix() { if (fResolvedFile != null) { IPath currPath= new Path(fPrefixField.getText()); String initSelection= null; if (fIsVariableEntry) { IPath resolvedPath= getResolvedPath(currPath); if (resolvedPath != null) { initSelection= resolvedPath.toString(); } } else { initSelection= currPath.toString(); }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
try { ZipFile zipFile= new ZipFile(fResolvedFile); ZipContentProvider contentProvider= new ZipContentProvider(); contentProvider.setInitialInput(zipFile); ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), new ZipLabelProvider(), contentProvider); dialog.setAllowMultiple(false); dialog.setTitle(NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.title")); dialog.setMessage(NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.message")); dialog.setInput(zipFile); dialog.setInitialSelection(contentProvider.getSelectedNode(initSelection)); if (dialog.open() == dialog.OK) { Object obj= dialog.getFirstResult(); IPath path= new Path(obj.toString()); if (fIsVariableEntry) { path= modifyPath(path, currPath.segment(0)); } return path; } } catch (IOException e) { String title= NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.error.title"); String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.prefixdialog.error.message", fResolvedFile.getPath()); MessageDialog.openError(getShell(), title, message); JavaPlugin.log(e); } } return null; } /*
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
* Opens a dialog to choose a root in the file system. */ private URL chooseJavaDocLocation() { String initPath= ""; if (fJavaDocLocation != null && "file".equals(fJavaDocLocation.getProtocol())) { initPath= (new File(fJavaDocLocation.getFile())).getPath(); } DirectoryDialog dialog= new DirectoryDialog(getShell()); dialog.setText(NewWizardMessages.getString("SourceAttachmentBlock.jdocdialog.text")); dialog.setMessage(NewWizardMessages.getString("SourceAttachmentBlock.jdocdialog.message")); dialog.setFilterPath(initPath); String res= dialog.open(); if (res != null) { try { return (new File(res)).toURL(); } catch (MalformedURLException e) { JavaPlugin.log(e); } } return null; } private Shell getShell() { if (fSWTWidget != null) { return fSWTWidget.getShell(); } return JavaPlugin.getActiveWorkbenchShell(); }
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
/** * Takes a path and replaces the beginning with a variable name * (if the beginning matches with the variables value) */ private IPath modifyPath(IPath path, String varName) { if (varName == null || path == null) { return null; } if (path.isEmpty()) { return new Path(varName); } IPath varPath= JavaCore.getClasspathVariable(varName); if (varPath != null) { if (varPath.isPrefixOf(path)) { path= path.removeFirstSegments(varPath.segmentCount()); } else { path= new Path(path.lastSegment()); } } else { path= new Path(path.lastSegment()); } return new Path(varName).append(path); } /** * Creates a runnable that sets the source attachment by modifying the project's classpath. */
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
public IRunnableWithProgress getRunnable(final IJavaProject jproject, final Shell shell) { return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { IClasspathEntry newEntry; if (fIsVariableEntry) { newEntry= JavaCore.newVariableEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), false); } else { newEntry= JavaCore.newLibraryEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), false); } IClasspathEntry[] entries= modifyClasspath(jproject, newEntry, shell); if (entries != null) { jproject.setRawClasspath(entries, monitor); } } catch (JavaModelException e) { throw new InvocationTargetException(e); } } }; } private IClasspathEntry[] modifyClasspath(IJavaProject jproject, IClasspathEntry newEntry, Shell shell) throws JavaModelException{ IClasspathEntry[] oldClasspath= jproject.getRawClasspath(); int nEntries= oldClasspath.length; ArrayList newEntries= new ArrayList(nEntries + 1); int entryKind= newEntry.getEntryKind(); IPath jarPath= newEntry.getPath(); boolean found= false; for (int i= 0; i < nEntries; i++) { IClasspathEntry curr= oldClasspath[i]; if (curr.getEntryKind() == entryKind && curr.getPath().equals(jarPath)) {
3,555
Bug 3555 source for binaries - 'defaults' button does not work (1G840M4)
AK (1/25/01 2:43:33 PM) 1. create a java project 2. open the properties page for rt.jar in the project 3. clear the 'Sources JAR file' field 4. press 'Defaults' nothing happens NOTES: EG (2/1/01 10:02:53 AM) wait until we finish the Library presentation issue.
verified fixed
e593dc7
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:06:00Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
newEntries.add(newEntry); found= true; } else { newEntries.add(curr); } } if (!found) { if (newEntry.getSourceAttachmentPath() == null || !putJarOnClasspathDialog(shell)) { return null; } newEntries.add(newEntry); } return (IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]); } private boolean putJarOnClasspathDialog(Shell shell) { final boolean[] result= new boolean[1]; shell.getDisplay().syncExec(new Runnable() { public void run() { String title= NewWizardMessages.getString("SourceAttachmentBlock.putoncpdialog.title"); String message= NewWizardMessages.getString("SourceAttachmentBlock.putoncpdialog.message"); result[0]= MessageDialog.openQuestion(JavaPlugin.getActiveWorkbenchShell(), title, message); } }); return result[0]; } }
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/HTMLPrinter.java
package org.eclipse.jdt.internal.ui.text; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.io.IOException; import java.io.Reader; /** * Provides a set of convenience methods for creating HTML pages. */ public class HTMLPrinter { private HTMLPrinter() { } public static String read(Reader rd) { StringBuffer buffer= new StringBuffer();
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/HTMLPrinter.java
char[] readBuffer= new char[2048]; try { int n= rd.read(readBuffer); while (n > 0) { buffer.append(readBuffer, 0, n); n= rd.read(readBuffer); } return buffer.toString(); } catch (IOException x) { } return null; } public static void addPageProlog(StringBuffer buffer) { buffer.append("<html><body text=\"#000000\" bgcolor=\"#FFFF88\"><font size=-1>"); } public static void addPageEpilog(StringBuffer buffer) { buffer.append("</font></body></html>"); } public static void startBulletList(StringBuffer buffer) { buffer.append("<ul>"); } public static void endBulletList(StringBuffer buffer) { buffer.append("</ul>"); }
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/HTMLPrinter.java
public static void addBullet(StringBuffer buffer, String bullet) { if (bullet != null) { buffer.append("<li>"); buffer.append(bullet); buffer.append("</li>"); } } public static void addSmallHeader(StringBuffer buffer, String header) { if (header != null) { buffer.append("<h5>"); buffer.append(header); buffer.append("</h5>"); } } public static void addParagraph(StringBuffer buffer, String paragraph) { if (paragraph != null) { buffer.append("<p>"); buffer.append(paragraph); buffer.append("</p>"); } } public static void addParagraph(StringBuffer buffer, Reader paragraphReader) { if (paragraphReader != null) addParagraph(buffer, read(paragraphReader)); } }
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
package org.eclipse.jdt.internal.ui.text.java.hover; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextHover; import org.eclipse.jface.text.ITextViewer; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.jdt.core.ICodeAssist; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditorInput; import org.eclipse.jdt.internal.ui.text.HTMLPrinter; import org.eclipse.jdt.internal.ui.text.JavaWordFinder; import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocAccess; import org.eclipse.jdt.internal.ui.viewsupport.JavaTextLabelProvider; public class JavaTypeHover implements ITextHover { private IEditorPart fEditor; private JavaTextLabelProvider fTextRenderer; public JavaTypeHover(IEditorPart editor) {
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
fEditor= editor; fTextRenderer= new JavaTextLabelProvider(JavaElementLabelProvider.SHOW_CONTAINER_QUALIFICATION | JavaElementLabelProvider.SHOW_PARAMETERS); } private ICodeAssist getCodeAssist() { if (fEditor != null) { IEditorInput input= fEditor.getEditorInput(); if (input instanceof ClassFileEditorInput) { ClassFileEditorInput cfeInput= (ClassFileEditorInput) input; return cfeInput.getClassFile(); } IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input); } return null; } private String getInfoText(IMember member) { if (member.getElementType() != IJavaElement.TYPE) { StringBuffer buffer= new StringBuffer(); buffer.append(fTextRenderer.getTextLabel(member.getDeclaringType())); buffer.append('.'); buffer.append(fTextRenderer.getTextLabel(member)); return buffer.toString(); } return fTextRenderer.getTextLabel(member); }
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
/* * @see ITextHover#getHoverRegion(ITextViewer, int) */ public IRegion getHoverRegion(ITextViewer textViewer, int offset) { return JavaWordFinder.findWord(textViewer.getDocument(), offset); } /* * @see ITextHover#getHoverInfo(ITextViewer, IRegion) */ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { ICodeAssist resolve= getCodeAssist(); if (resolve != null) { try { IJavaElement[] result= resolve.codeSelect(hoverRegion.getOffset(), hoverRegion.getLength()); if (result == null) return null; int nResults= result.length; if (nResults == 0) return null; StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); if (nResults > 1) {
5,120
Bug 5120 Empty popup doc in java editor
1. Go to Java Perspective. 2. Double click on a java file. 3. Move the i-beam over the beginning prefixes of an import statement. For example, the "org" of "import org.eclipse.swt.SWT". An empty hover help box is displayed.
resolved fixed
34be391
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T14:39:24Z"
"2001-10-19T19:33:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaTypeHover.java
for (int i= 0; i < result.length; i++) { HTMLPrinter.startBulletList(buffer); IJavaElement curr= result[i]; if (curr instanceof IMember) HTMLPrinter.addBullet(buffer, getInfoText((IMember) curr)); HTMLPrinter.endBulletList(buffer); } } else { IJavaElement curr= result[0]; if (curr instanceof IMember) { IMember member= (IMember) curr; HTMLPrinter.addSmallHeader(buffer, getInfoText(member)); HTMLPrinter.addParagraph(buffer, JavaDocAccess.getJavaDoc(member)); } } HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); } catch (JavaModelException x) { JavaPlugin.log(x.getStatus()); } } return null; } }
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
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.ICodeCompletionRequestor; 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.ui.util.JavaModelUtil; /** * Bin to collect the proposal of the infrastructure on code assist in a java text. */ public class ResultCollector implements ICodeCompletionRequestor { private class ProposalComparator implements Comparator { public int compare(Object o1, Object o2) { ICompletionProposal c1= (ICompletionProposal) o1; ICompletionProposal c2= (ICompletionProposal) o2; return c1.getDisplayString().compareTo(c2.getDisplayString());
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
} } private final static char[] METHOD_WITH_ARGUMENTS_TRIGGERS= new char[] { '(', '-' }; private final static char[] GENERAL_TRIGGERS= new char[] { ';', ',', '.', '\t', '(', '{', '[' }; 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 ArrayList[] fResults = new ArrayList[] { fVariables, fFields, fMethods, fTypes, fKeywords, fModifiers, fLabels, fPackages }; private int fUserReplacementLength; private int fUserReplacementOffset; /* * @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)); }
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
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); }
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
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 */
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
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]);
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
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)); 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);
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
if (userMustCompleteParameters) { proposal.setCursorPosition(completionName.length - 1); } fMethods.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))); } /* * @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)); }
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
/* * @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())); } public String getErrorMessage() { if (fLastProblem != null) return fLastProblem.getAttribute(IMarker.MESSAGE, JavaTextMessages.getString("ResultCollector.compile_error.message")); return ""; } public ICompletionProposal[] getResults() {
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
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 (ICompletionProposal[]) result.toArray(new ICompletionProposal[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)) { iconName= JavaPluginImages.IMG_MISC_PRIVATE; } StringBuffer nameBuffer= new StringBuffer(); nameBuffer.append(name); nameBuffer.append('('); if (parameterTypeNames.length > 0) {
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
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()); } 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);
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
proposal.setImportDeclaration(importDeclaration); proposal.setProposalInfo(proposalInfo); return proposal; } protected JavaCompletionProposal createCompletion(int start, int end, String completion, String iconName, String name) { int length; if (fUserReplacementLength == -1) { length= end - start; } else { length= fUserReplacementLength; } if (fUserReplacementOffset != -1) { start= fUserReplacementOffset; } 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 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. */ public void reset(IJavaProject jproject, ICompilationUnit cu) {
3,666
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.
verified fixed
2846b5d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-22T15:21:02Z"
"2001-10-11T03:13:20Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
fJavaProject= jproject; fCompilationUnit= cu; fUserReplacementLength= -1; fUserReplacementOffset= -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 the replacement offset is set, it overrides the offset used for the content assist. * Use this setting if the code assist proposals generated will be applied on a document different than * the one used for evaluating the code assist. */ public void setReplacementOffset(int offset) { fUserReplacementOffset= offset; } }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/ToggleOrientationAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import org.eclipse.jface.action.Action; import org.eclipse.jdt.internal.ui.JavaPluginImages; /** * Toggles horizontaol / vertical layout of the type hierarchy */ public class ToggleOrientationAction extends Action {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/ToggleOrientationAction.java
private TypeHierarchyViewPart fView; public ToggleOrientationAction(TypeHierarchyViewPart v, boolean initHorizontal) { super(TypeHierarchyMessages.getString("ToggleOrientationAction.label")); setDescription(TypeHierarchyMessages.getString("ToggleOrientationAction.description")); setToolTipText(TypeHierarchyMessages.getString("ToggleOrientationAction.tooltip")); JavaPluginImages.setLocalImageDescriptors(this, "impl_co.gif"); fView= v; setChecked(initHorizontal); } /* * @see Action#actionPerformed */ public void run() { fView.setOrientation(isChecked()); } /* * @see Action#setChecked */ public void setChecked(boolean checked) { if (checked) { setToolTipText(TypeHierarchyMessages.getString("ToggleOrientationAction.tooltip.checked")); } else { setToolTipText(TypeHierarchyMessages.getString("ToggleOrientationAction.tooltip.unchecked")); } super.setChecked(checked); } }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/ToggleViewAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import org.eclipse.jface.action.Action; import org.eclipse.ui.help.WorkbenchHelp; /** * Action to switch between the different hierarchy views. */ public class ToggleViewAction extends Action {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/ToggleViewAction.java
private TypeHierarchyViewPart fViewPart; private int fViewerIndex; public ToggleViewAction(TypeHierarchyViewPart v, int viewerIndex, String title, String contextHelpId, boolean isChecked) { super(title); fViewPart= v; fViewerIndex= viewerIndex; setChecked(isChecked); WorkbenchHelp.setHelp(this, new Object[] { contextHelpId }); } public int getViewerIndex() { return fViewerIndex; } /* * @see Action#actionPerformed */ public void run() { fViewPart.setView(fViewerIndex); } }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.custom.ViewForm; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSource; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.ToolBar; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.IBasicPropertyConstants; import org.eclipse.jface.viewers.IInputSelectionProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IMemento;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
import org.eclipse.ui.IPartListener; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.actions.OpenWithMenu; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.part.PageBook; import org.eclipse.ui.part.ViewPart; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.ITypeHierarchyViewPart; import org.eclipse.jdt.ui.JavaElementLabelProvider; 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.actions.AddMethodStubAction; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.compare.JavaReplaceWithEditionAction; import org.eclipse.jdt.internal.ui.dnd.BasicSelectionTransferDragAdapter; import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.packageview.BuildGroup;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup; import org.eclipse.jdt.internal.ui.reorg.ReorgGroup; import org.eclipse.jdt.internal.ui.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil; import org.eclipse.jdt.internal.ui.util.SelectionUtil; import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener; import org.eclipse.jdt.internal.ui.viewsupport.MarkerErrorTickProvider; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; /** * view showing the supertypes/subtypes of its input. */ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyViewPart { public static final int VIEW_ID_TYPE= 2; public static final int VIEW_ID_SUPER= 0; public static final int VIEW_ID_SUB= 1; private static final String DIALOGSTORE_HIERARCHYVIEW= "TypeHierarchyViewPart.hierarchyview"; private static final String DIALOGSTORE_VIEWORIENTATION= "TypeHierarchyViewPart.orientation"; private static final String TAG_INPUT= "input"; private static final String TAG_VIEW= "view"; private static final String TAG_ORIENTATION= "orientation"; private static final String TAG_RATIO= "ratio"; private static final String TAG_SELECTION= "selection"; private static final String TAG_VERTICAL_SCROLL= "vertical_scroll"; private IType fInput; private IMemento fMemento;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private ArrayList fInputHistory; private int fCurrHistoryIndex; private IProblemChangedListener fHierarchyProblemListener; private TypeHierarchyLifeCycle fHierarchyLifeCycle; private ITypeHierarchyLifeCycleListener fTypeHierarchyLifeCycleListener; private MethodsViewer fMethodsViewer; private int fCurrentViewerIndex; private TypeHierarchyViewer[] fAllViewers; private boolean fIsEnableMemberFilter; private SashForm fTypeMethodsSplitter; private PageBook fViewerbook; private PageBook fPagebook; private Label fNoHierarchyShownLabel; private Label fEmptyTypesViewer; private ViewForm fTypeViewerViewForm; private CLabel fMethodViewerPaneLabel; private JavaElementLabelProvider fPaneLabelProvider; private IDialogSettings fDialogSettings; private ToggleViewAction[] fViewActions; private HistoryDropDownAction fHistoryDropDownAction;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private ToggleOrientationAction fToggleOrientationAction; private EnableMemberFilterAction fEnableMemberFilterAction; private AddMethodStubAction fAddStubAction; private FocusOnTypeAction fFocusOnTypeAction; private FocusOnSelectionAction fFocusOnSelectionAction; private IPartListener fPartListener; public TypeHierarchyViewPart() { fHierarchyLifeCycle= new TypeHierarchyLifeCycle(); fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() { public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes) { doTypeHierarchyChanged(typeHierarchy, changedTypes); } }; fHierarchyLifeCycle.addChangedListener(fTypeHierarchyLifeCycleListener); fHierarchyProblemListener= null; fIsEnableMemberFilter= false; fInputHistory= new ArrayList(); fCurrHistoryIndex= -1; fAllViewers= null; String title= TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.supertypes.label"); String contextHelpId= IJavaHelpContextIds.SHOW_SUPERTYPES;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
ToggleViewAction superViewAction= new ToggleViewAction(this, VIEW_ID_SUPER, title, contextHelpId, true); superViewAction.setDescription(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.supertypes.description")); superViewAction.setToolTipText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.supertypes.tooltip")); JavaPluginImages.setLocalImageDescriptors(superViewAction, "super_co.gif"); title= TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.subtypes.label"); contextHelpId= IJavaHelpContextIds.SHOW_SUPERTYPES; ToggleViewAction subViewAction= new ToggleViewAction(this, VIEW_ID_SUB, title, contextHelpId, false); subViewAction.setDescription(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.subtypes.description")); subViewAction.setToolTipText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.subtypes.tooltip")); JavaPluginImages.setLocalImageDescriptors(subViewAction, "sub_co.gif"); title= TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.vajhierarchy.label"); ToggleViewAction vajViewAction= new ToggleViewAction(this, VIEW_ID_TYPE, title, contextHelpId, false); vajViewAction.setDescription(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.vajhierarchy.description")); vajViewAction.setToolTipText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.toggleaction.vajhierarchy.tooltip")); JavaPluginImages.setLocalImageDescriptors(vajViewAction, "hierarchy_co.gif"); fViewActions= new ToggleViewAction[] { vajViewAction, superViewAction, subViewAction }; fDialogSettings= JavaPlugin.getDefault().getDialogSettings(); fHistoryDropDownAction= new HistoryDropDownAction(this); fToggleOrientationAction= new ToggleOrientationAction(this, fDialogSettings.getBoolean(DIALOGSTORE_VIEWORIENTATION)); fEnableMemberFilterAction= new EnableMemberFilterAction(this, false); fFocusOnTypeAction= new FocusOnTypeAction(this); fPaneLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS); fPaneLabelProvider.setErrorTickManager(new MarkerErrorTickProvider());
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fAddStubAction= new AddMethodStubAction(); fFocusOnSelectionAction= new FocusOnSelectionAction(this); fPartListener= new IPartListener() { public void partActivated(IWorkbenchPart part) { if (part instanceof IEditorPart) editorActivated((IEditorPart) part); } public void partBroughtToTop(IWorkbenchPart part) {} public void partClosed(IWorkbenchPart part) {} public void partDeactivated(IWorkbenchPart part) {} public void partOpened(IWorkbenchPart part) {} }; } /** * Selects an member in the methods list */ public void selectMember(IMember member) { fMethodsViewer.setSelection(new StructuredSelection(member), true); } /** * Gets the current input (IType) */ public IType getInput() { return fInput; } private void addHistoryEntry(IType entry) {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fCurrHistoryIndex= fInputHistory.size(); fInputHistory.add(entry); } /** * Gets the entry at the given index. * @param index The index of the entry * @return The entry from the index or null if no entry available */ public IType getHistoryEntry(int index) { while (index >= 0 && index < fInputHistory.size()) { IType type= (IType) fInputHistory.get(index); if (type.exists()) { return type; } else { fInputHistory.remove(index); if (fCurrHistoryIndex >= index && fCurrHistoryIndex > 0) { fCurrHistoryIndex--; } } } return null; } /** * Goes to the next or previous entry from the history */ public void gotoHistoryEntry(int index) { IType elem= getHistoryEntry(index); if (elem != null) { updateInput(elem);
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fCurrHistoryIndex= index; } } public int getCurrentHistoryIndex() { return fCurrHistoryIndex; } /** * Sets the input to a new type */ public void setInput(IType type) { if (type != null) { ICompilationUnit cu= type.getCompilationUnit(); if (cu != null && cu.isWorkingCopy()) { type= (IType)cu.getOriginal(type); } } if (type != null && !type.equals(fInput)) { addHistoryEntry(type); } updateInput(type); } /** * Changes the input to a new type */ public void updateInput(IType type) {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
boolean typeChanged= (type != fInput); fInput= type; if (fInput == null) { clearInput(); } else { enableMemberFilter(false); try { fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInput); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); clearInput(); return; } fPagebook.showPage(fTypeMethodsSplitter); if (typeChanged) { updateHierarchyViewer(); } getCurrentViewer().setSelection(new StructuredSelection(fInput)); updateMethodViewer(fInput); updateTitle(); } }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private void clearInput() { fInput= null; fHierarchyLifeCycle.freeHierarchy(); updateHierarchyViewer(); } /* * @see IWorbenchPart#setFocus */ public void setFocus() { fPagebook.setFocus(); } /* * @see IWorkbenchPart#dispose */ public void dispose() { fHierarchyLifeCycle.freeHierarchy(); fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener); fPaneLabelProvider.dispose(); getSite().getPage().removePartListener(fPartListener); if (fHierarchyProblemListener != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener); } if (fMethodsViewer != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fMethodsViewer); } super.dispose(); } private Control createTypeViewerControl(Composite parent) {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fViewerbook= new PageBook(parent, SWT.NULL); ISelectionChangedListener selectionChangedListener= new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { typeSelectionChanged(event.getSelection()); } }; KeyListener keyListener= new KeyAdapter() { public void keyPressed(KeyEvent event) { if (event.stateMask == SWT.NONE) { if (event.keyCode == SWT.F4) { Object elem= SelectionUtil.getSingleElement(getCurrentViewer().getSelection()); if (elem instanceof IType) { IType[] arr= new IType[] { (IType) elem }; OpenTypeHierarchyUtil.open(arr, getSite().getWorkbenchWindow()); } else { getCurrentViewer().getControl().getDisplay().beep(); } return; } else if (event.keyCode == SWT.F5) { updateHierarchyViewer(); return; } } viewPartKeyShortcuts(event); } };
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
TypeHierarchyViewer superTypesViewer= new SuperTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this); initializeTypesViewer(superTypesViewer, selectionChangedListener, keyListener, IContextMenuConstants.TARGET_ID_SUPERTYPES_VIEW); TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this); initializeTypesViewer(subTypesViewer, selectionChangedListener, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW); TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this); initializeTypesViewer(vajViewer, selectionChangedListener, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW); fAllViewers= new TypeHierarchyViewer[3]; fAllViewers[VIEW_ID_SUPER]= superTypesViewer; fAllViewers[VIEW_ID_SUB]= subTypesViewer; fAllViewers[VIEW_ID_TYPE]= vajViewer; int currViewerIndex; try { currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW); if (currViewerIndex < 0 || currViewerIndex > 2) { currViewerIndex= VIEW_ID_TYPE; } } catch (NumberFormatException e) { currViewerIndex= VIEW_ID_TYPE; } fEmptyTypesViewer= new Label(fViewerbook, SWT.LEFT); for (int i= 0; i < fAllViewers.length; i++) { fAllViewers[i].setInput(fAllViewers[i]); }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fCurrentViewerIndex= -1; setView(currViewerIndex); return fViewerbook; } private void initializeTypesViewer(final TypeHierarchyViewer typesViewer, ISelectionChangedListener selectionChangedListener, KeyListener keyListener, String cotextHelpId) { typesViewer.getControl().setVisible(false); typesViewer.getControl().addKeyListener(keyListener); typesViewer.initContextMenu(new IMenuListener() { public void menuAboutToShow(IMenuManager menu) { fillTypesViewerContextMenu(typesViewer, menu); } }, cotextHelpId, getSite()); typesViewer.addSelectionChangedListener(selectionChangedListener); } private Control createMethodViewerControl(Composite parent) { fMethodsViewer= new MethodsViewer(parent, this); fMethodsViewer.initContextMenu(new IMenuListener() { public void menuAboutToShow(IMenuManager menu) { fillMethodsViewerContextMenu(menu); } }, IContextMenuConstants.TARGET_ID_MEMBERS_VIEW, getSite()); fMethodsViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { methodSelectionChanged(event.getSelection()); } }); Control control= fMethodsViewer.getTable(); control.addKeyListener(new KeyAdapter() {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
public void keyPressed(KeyEvent event) { viewPartKeyShortcuts(event); } }); JavaPlugin.getDefault().getProblemMarkerManager().addListener(fMethodsViewer); return control; } private void initDragAndDrop() { Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance() }; int ops= DND.DROP_COPY; DragSource source= new DragSource(fMethodsViewer.getControl(), ops); source.setTransfer(transfers); source.addDragListener(new BasicSelectionTransferDragAdapter(fMethodsViewer)); for (int i= 0; i < fAllViewers.length; i++) { TypeHierarchyViewer curr= fAllViewers[i]; curr.addDropSupport(ops, transfers, new TypeHierarchyTransferDropAdapter(curr)); } } private void viewPartKeyShortcuts(KeyEvent event) { if (event.stateMask == SWT.CTRL) { if (event.character == '1') { setView(VIEW_ID_TYPE); } else if (event.character == '2') { setView(VIEW_ID_SUPER); } else if (event.character == '3') {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
setView(VIEW_ID_SUB); } } } /** * Returns the inner component in a workbench part. * @see IWorkbenchPart#createPartControl */ public void createPartControl(Composite container) { fPagebook= new PageBook(container, SWT.NONE); fTypeMethodsSplitter= new SashForm(fPagebook, SWT.VERTICAL); fTypeMethodsSplitter.setVisible(false); fTypeViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE); Control typeViewerControl= createTypeViewerControl(fTypeViewerViewForm); fTypeViewerViewForm.setContent(typeViewerControl); ViewForm methodViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE); fTypeMethodsSplitter.setWeights(new int[] {35, 65}); Control methodViewerPart= createMethodViewerControl(methodViewerViewForm); methodViewerViewForm.setContent(methodViewerPart); fMethodViewerPaneLabel= new CLabel(methodViewerViewForm, SWT.NONE); methodViewerViewForm.setTopLeft(fMethodViewerPaneLabel);
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
initDragAndDrop(); ToolBar methodViewerToolBar= new ToolBar(methodViewerViewForm, SWT.FLAT | SWT.WRAP); methodViewerViewForm.setTopCenter(methodViewerToolBar); fNoHierarchyShownLabel= new Label(fPagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); fNoHierarchyShownLabel.setText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.empty")); MenuManager menu= new MenuManager(); menu.add(fFocusOnTypeAction); fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel)); fPagebook.showPage(fNoHierarchyShownLabel); setOrientation(fToggleOrientationAction.isChecked()); IActionBars actionBars= getViewSite().getActionBars(); IMenuManager viewMenu= actionBars.getMenuManager(); viewMenu.add(fToggleOrientationAction); ToolBarManager lowertbmanager= new ToolBarManager(methodViewerToolBar); lowertbmanager.add(fEnableMemberFilterAction); lowertbmanager.add(new Separator()); fMethodsViewer.contributeToToolBar(lowertbmanager); lowertbmanager.update(true);
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
int nHierarchyViewers= fAllViewers.length; Viewer[] trackedViewers= new Viewer[nHierarchyViewers + 1]; for (int i= 0; i < nHierarchyViewers; i++) { trackedViewers[i]= fAllViewers[i]; } trackedViewers[nHierarchyViewers]= fMethodsViewer; ISelectionProvider selProvider= new SelectionProviderMediator(trackedViewers); IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager(); selProvider.addSelectionChangedListener(new StatusBarUpdater(slManager)); getSite().setSelectionProvider(selProvider); getSite().getPage().addPartListener(fPartListener); IType input= determineInputElement(); if (fMemento != null) { restoreState(fMemento, input); } else if (input != null) { setInput(input); } else { setViewerVisibility(false); } WorkbenchHelp.setHelp(fPagebook, new ViewContextComputer(this, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW)); } /** * called from ToggleOrientationAction */
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
public void setOrientation(boolean horizontal) { if (fTypeMethodsSplitter != null && !fTypeMethodsSplitter.isDisposed()) { fTypeMethodsSplitter.setOrientation(horizontal ? SWT.HORIZONTAL : SWT.VERTICAL); updateMainToolbar(horizontal); } fToggleOrientationAction.setChecked(horizontal); fDialogSettings.put(DIALOGSTORE_VIEWORIENTATION, horizontal); } private void updateMainToolbar(boolean horizontal) { IActionBars actionBars= getViewSite().getActionBars(); IToolBarManager tbmanager= actionBars.getToolBarManager(); if (horizontal) { clearMainToolBar(tbmanager); ToolBar typeViewerToolBar= new ToolBar(fTypeViewerViewForm, SWT.FLAT | SWT.WRAP); fillMainToolBar(new ToolBarManager(typeViewerToolBar)); fTypeViewerViewForm.setTopLeft(typeViewerToolBar); } else { fTypeViewerViewForm.setTopLeft(null); fillMainToolBar(tbmanager); } } private void fillMainToolBar(IToolBarManager tbmanager) { tbmanager.removeAll(); tbmanager.add(fHistoryDropDownAction); for (int i= 0; i < fViewActions.length; i++) { tbmanager.add(fViewActions[i]); }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
tbmanager.update(false); } private void clearMainToolBar(IToolBarManager tbmanager) { tbmanager.removeAll(); tbmanager.update(false); } /** * Creates the context menu for the hierarchy viewers */ private void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) { JavaPlugin.createStandardGroups(menu); viewer.contributeToContextMenu(menu); IStructuredSelection selection= (IStructuredSelection)viewer.getSelection(); if (JavaBasePreferencePage.openTypeHierarchyInPerspective()) { addOpenPerspectiveItem(menu, selection); } addOpenWithMenu(menu, selection); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnTypeAction); if (fFocusOnSelectionAction.canActionBeAdded()) menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnSelectionAction); addRefactoring(menu, viewer); ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, viewer); } /** * Creates the context menu for the method viewer
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
*/ private void fillMethodsViewerContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); fMethodsViewer.contributeToContextMenu(menu); if (fAddStubAction.init(fInput, fMethodsViewer.getSelection())) { menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddStubAction); } menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new JavaReplaceWithEditionAction(fMethodsViewer)); addOpenWithMenu(menu, (IStructuredSelection)fMethodsViewer.getSelection()); addRefactoring(menu, fMethodsViewer); ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, fMethodsViewer); } private void addRefactoring(IMenuManager menu, IInputSelectionProvider viewer){ MenuManager refactoring= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.refactor")); ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, viewer); if (!refactoring.isEmpty()) menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring); } private void addOpenWithMenu(IMenuManager menu, IStructuredSelection selection) { if (selection.size() != 1) return; Object element= selection.getFirstElement(); if (!(element instanceof IJavaElement)) return; IResource resource= null;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
try { resource= ((IJavaElement)element).getUnderlyingResource(); } catch(JavaModelException e) { } if (!(resource instanceof IFile)) return; MenuManager submenu= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.open")); submenu.add(new OpenWithMenu(getSite().getPage(), (IFile) resource)); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu); } private void addOpenPerspectiveItem(IMenuManager menu, IStructuredSelection selection) { OpenTypeHierarchyUtil.addToMenu(getSite().getWorkbenchWindow(), menu, selection); } /** * Toggles between the empty viewer page and the hierarchy */ private void setViewerVisibility(boolean showHierarchy) { if (showHierarchy) { fViewerbook.showPage(getCurrentViewer().getControl()); } else { fViewerbook.showPage(fEmptyTypesViewer); } } /** * Sets the member filter. <code>null</code> disables member filtering. */
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private void setMemberFilter(IMember[] memberFilter) { Assert.isNotNull(fAllViewers); for (int i= 0; i < fAllViewers.length; i++) { fAllViewers[i].setMemberFilter(memberFilter); } updateHierarchyViewer(); updateTitle(); } /** * When the input changed or the hierarchy pane becomes visible, * <code>updateHierarchyViewer<code> brings up the correct view and refreshes * the current tree */ private void updateHierarchyViewer() { if (fInput == null) { fPagebook.showPage(fNoHierarchyShownLabel); } else { if (getCurrentViewer().containsElements()) { Runnable runnable= new Runnable() { public void run() { getCurrentViewer().updateContent(); } }; BusyIndicator.showWhile(getDisplay(), runnable); if (!isChildVisible(fViewerbook, getCurrentViewer().getControl())) { setViewerVisibility(true); } } else { fEmptyTypesViewer.setText(TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.nodecl", fInput.getElementName()));
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
setViewerVisibility(false); } } } private void updateMethodViewer(IType input) { if (input != fMethodsViewer.getInput()) { if (input != null) { fMethodViewerPaneLabel.setText(fPaneLabelProvider.getText(input)); fMethodViewerPaneLabel.setImage(fPaneLabelProvider.getImage(input)); } else { fMethodViewerPaneLabel.setText(""); fMethodViewerPaneLabel.setImage(null); } fMethodsViewer.setInput(input); } } private void methodSelectionChanged(ISelection sel) { if (sel instanceof IStructuredSelection) { List selected= ((IStructuredSelection)sel).toList(); int nSelected= selected.size(); if (fIsEnableMemberFilter) { IMember[] memberFilter= null; if (nSelected > 0) { memberFilter= new IMember[nSelected]; selected.toArray(memberFilter); } setMemberFilter(memberFilter); }
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (nSelected == 1) { revealElementInEditor(selected.get(0)); } } } private void typeSelectionChanged(ISelection sel) { if (sel instanceof IStructuredSelection) { List selected= ((IStructuredSelection)sel).toList(); int nSelected= selected.size(); if (nSelected != 0) { List types= new ArrayList(nSelected); for (int i= nSelected-1; i >= 0; i--) { Object elem= selected.get(i); if (elem instanceof IType && !types.contains(elem)) { types.add(elem); } } if (types.size() == 1) { IType selectedType= (IType)types.get(0); if (!fIsEnableMemberFilter && !selectedType.equals(fMethodsViewer.getInput())) { updateMethodViewer(selectedType); } } else if (types.size() == 0) { } if (nSelected == 1) { revealElementInEditor(selected.get(0)); } } else {
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (!fIsEnableMemberFilter && fMethodsViewer.getInput() != null) { updateMethodViewer(null); } } } } private void revealElementInEditor(Object elem) { if (getSite().getPage().getActivePart() != this) { return; } IEditorPart editorPart= EditorUtility.isOpenInEditor(elem); if (editorPart != null && (elem instanceof ISourceReference)) { try { EditorUtility.openInEditor(elem, false); EditorUtility.revealInEditor(editorPart, (ISourceReference)elem); } catch (CoreException e) { JavaPlugin.log(e); } } } private Display getDisplay() { if (fPagebook != null && !fPagebook.isDisposed()) { return fPagebook.getDisplay(); } return null;
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} private boolean isChildVisible(Composite pb, Control child) { Control[] children= pb.getChildren(); for (int i= 0; i < children.length; i++) { if (children[i] == child && children[i].isVisible()) return true; } return false; } private void updateTitle() { String title= getCurrentViewer().getTitle(); setTitle(getCurrentViewer().getTitle()); String tooltip; if (fInput != null) { String[] args= new String[] { title, JavaModelUtil.getFullyQualifiedName(fInput) }; tooltip= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.tooltip", args); } else { tooltip= title; } setTitleToolTip(tooltip); } /** * Sets the current view (see view id) * called from ToggleViewAction. Must be called after creation of the viewpart. */ public void setView(int viewerIndex) { Assert.isNotNull(fAllViewers);
5,116
Bug 5116 Showing methods in the Type Hierarchy View is redundant
It seems that showing methods in the Type Hierarchy View is reduntant. Couldn't we remove it and make the Type Hierarchy Perspective composed by the upper part of the Type Hierarchy View (showing the types) plus the outliner?
resolved fixed
0fa38ed
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
"2001-10-23T11:00:10Z"
"2001-10-19T16:46:40Z"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (viewerIndex < fAllViewers.length && fCurrentViewerIndex != viewerIndex) { fCurrentViewerIndex= viewerIndex; updateHierarchyViewer(); if (fInput != null) { ISelection currSelection= getCurrentViewer().getSelection(); if (currSelection == null || currSelection.isEmpty()) { getCurrentViewer().setSelection(new StructuredSelection(getInput())); } if (!fIsEnableMemberFilter) { typeSelectionChanged(getCurrentViewer().getSelection()); } } updateTitle(); if (fHierarchyProblemListener != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener); } fHierarchyProblemListener= getCurrentViewer(); JavaPlugin.getDefault().getProblemMarkerManager().addListener(fHierarchyProblemListener); fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex); getCurrentViewer().getTree().setFocus(); } for (int i= 0; i < fViewActions.length; i++) { ToggleViewAction action= fViewActions[i]; action.setChecked(fCurrentViewerIndex == action.getViewerIndex()); } }