issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_KEYWORD + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_TYPE), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_TYPE + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_STRING), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_STRING + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_DEFAULT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_KEYWORD), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_KEYWORD + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_TAG), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_TAG + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_LINK), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_LINK + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_DEFAULT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.MATCHING_BRACKETS_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.MATCHING_BRACKETS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOACTIVATION), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND),
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_IMPORT) }; private final String[][] fListModel= new String[][] { { "Multi-line comment", IJavaColorConstants.JAVA_MULTI_LINE_COMMENT }, { "Single-line comment", IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT }, { "Keywords", IJavaColorConstants.JAVA_KEYWORD }, { "Built-in types", IJavaColorConstants.JAVA_TYPE }, { "Strings", IJavaColorConstants.JAVA_STRING }, { "Others", IJavaColorConstants.JAVA_DEFAULT }, { "JavaDoc keywords", IJavaColorConstants.JAVADOC_KEYWORD }, { "JavaDoc HTML tags", IJavaColorConstants.JAVADOC_TAG }, { "JavaDoc links", IJavaColorConstants.JAVADOC_LINK }, {"JavaDoc others", IJavaColorConstants.JAVADOC_DEFAULT } }; private OverlayPreferenceStore fOverlayStore; private JavaTextTools fJavaTextTools; private Map fColorButtons= new HashMap(); private SelectionListener fColorButtonListener= new SelectionListener() {
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { ColorEditor editor= (ColorEditor) e.widget.getData(); PreferenceConverter.setValue(fOverlayStore, (String) fColorButtons.get(editor), editor.getColorValue()); } }; private Map fCheckBoxes= new HashMap(); private SelectionListener fCheckBoxListener= new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Button button= (Button) e.widget; fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection()); } }; private Map fTextFields= new HashMap(); private ModifyListener fTextFieldListener= new ModifyListener() { public void modifyText(ModifyEvent e) { Text text= (Text) e.widget; fOverlayStore.setValue((String) fTextFields.get(text), text.getText()); } }; private WorkbenchChainedTextFontFieldEditor fFontEditor; private List fList; private ColorEditor fColorEditor; private Button fBoldCheckBox;
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private SourceViewer fPreviewViewer; public JavaEditorPreferencePage() { setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description")); setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore()); fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys); } public static void initDefaults(IPreferenceStore store) { Color color; Display display= Display.getDefault(); store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true); color= display.getSystemColor(SWT.COLOR_BLUE); PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, color.getRGB()); WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT); color= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, color.getRGB()); color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB()); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + "_bold", false);
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_KEYWORD, new RGB(127, 0, 85)); store.setDefault(IJavaColorConstants.JAVA_KEYWORD + "_bold", true); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_TYPE, new RGB(127, 0, 85)); store.setDefault(IJavaColorConstants.JAVA_TYPE + "_bold", true); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_STRING, new RGB(42, 0, 255)); store.setDefault(IJavaColorConstants.JAVA_STRING + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_DEFAULT, new RGB(0, 0, 0)); store.setDefault(IJavaColorConstants.JAVA_DEFAULT + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_KEYWORD, new RGB(127, 159, 191)); store.setDefault(IJavaColorConstants.JAVADOC_KEYWORD + "_bold", true); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_TAG, new RGB(127, 127, 159)); store.setDefault(IJavaColorConstants.JAVADOC_TAG + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_LINK, new RGB(63, 63, 191)); store.setDefault(IJavaColorConstants.JAVADOC_LINK + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_DEFAULT, new RGB(63, 95, 191)); store.setDefault(IJavaColorConstants.JAVADOC_DEFAULT + "_bold", false); store.setDefault(ContentAssistPreference.AUTOACTIVATION, true); store.setDefault(ContentAssistPreference.AUTOACTIVATION_DELAY, 500); store.setDefault(ContentAssistPreference.AUTOINSERT, false); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0));
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233)); PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0)); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, ".,"); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, "@"); store.setDefault(ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, false); store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false); store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false); store.setDefault(ContentAssistPreference.ADD_IMPORT, true); } /* * @see IWorkbenchPreferencePage#init() */ public void init(IWorkbench workbench) { } /* * @see PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { super.createControl(parent); WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE)); } private void handleListSelection() { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); fColorEditor.setColorValue(rgb); fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold")); } private Control createColorPage(Composite parent) {
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
Composite colorComposite= new Composite(parent, SWT.NULL); colorComposite.setLayout(new GridLayout()); Label label= new Label(colorComposite, SWT.LEFT); label.setText("Colors"); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite editorComposite= new Composite(colorComposite, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; layout.marginHeight= 0; layout.marginWidth= 0; editorComposite.setLayout(layout); GridData gd= new GridData(GridData.FILL_BOTH); editorComposite.setLayoutData(gd); fList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL); gd= new GridData(GridData.FILL_BOTH); gd.heightHint= convertHeightInCharsToPixels(5); fList.setLayoutData(gd); Composite stylesComposite= new Composite(editorComposite, SWT.NULL); layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; stylesComposite.setLayout(layout); stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); label= new Label(stylesComposite, SWT.LEFT);
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label.setText("Foreground:"); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; label.setLayoutData(gd); fColorEditor= new ColorEditor(stylesComposite); Button colorButton= fColorEditor.getButton(); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; colorButton.setLayoutData(gd); label= new Label(stylesComposite, SWT.LEFT); label.setText("Bold:"); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; label.setLayoutData(gd); fBoldCheckBox= new Button(stylesComposite, SWT.CHECK); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; fBoldCheckBox.setLayoutData(gd); label= new Label(colorComposite, SWT.LEFT); label.setText("Preview"); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Control previewer= createPreviewer(colorComposite); gd= new GridData(GridData.FILL_BOTH); gd.widthHint= convertWidthInCharsToPixels(80); gd.heightHint= convertHeightInCharsToPixels(15); previewer.setLayoutData(gd);
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fList.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { handleListSelection(); } }); colorButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; PreferenceConverter.setValue(fOverlayStore, key, fColorEditor.getColorValue()); } }); fBoldCheckBox.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; fOverlayStore.setValue(key + "_bold", fBoldCheckBox.getSelection()); }
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
}); return colorComposite; } private Control createPreviewer(Composite parent) { fJavaTextTools= new JavaTextTools(fOverlayStore); fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL); fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null)); fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); fPreviewViewer.setEditable(false); String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); IDocument document= new Document(content); IDocumentPartitioner partitioner= fJavaTextTools.createDocumentPartitioner(); partitioner.connect(document); document.setDocumentPartitioner(partitioner); fPreviewViewer.setDocument(document); fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { fPreviewViewer.invalidateTextPresentation(); } }); return fPreviewViewer.getControl(); }
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private Control createBehaviorPage(Composite parent) { Composite behaviorComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; behaviorComposite.setLayout(layout); String label= "Highlight matching brackets"; addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0); label= "Matching brackets highlight color:"; addColorButton(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, 0); label= "Text font:"; addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT); return behaviorComposite; } private Control createContentAssistPage(Composite parent) { Composite contentAssistComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; contentAssistComposite.setLayout(layout); String label= "Insert &single proposals automatically"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0); label= "Show only proposals visible in the invocation &context"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0);
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label= "Present proposals in &alphabetical order"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0); label= "&Enable auto activation"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0); label= "Automatically add &import instead of qualified name"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0); label= "Auto activation &delay:"; addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0); label= "Auto activation &triggers for Java:"; addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 25, 0); label= "Auto activation tri&ggers for JavaDoc:"; addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 25, 0); label= "&Background for completion proposals:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0); label= "&Foreground for completion proposals:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0); label= "B&ackground for method parameters:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0); label= "F&oreground for method parameters:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0); return contentAssistComposite;
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} /* * @see PreferencePage#createContents(Composite) */ protected Control createContents(Composite parent) { fOverlayStore.load(); fOverlayStore.start(); TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item= new TabItem(folder, SWT.NONE); item.setText("&General"); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createBehaviorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText("&Colors"); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createColorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText("Code &Assist"); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createContentAssistPage(folder)); initialize();
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
return folder; } private void initialize() { fFontEditor.setPreferenceStore(getPreferenceStore()); fFontEditor.setPreferencePage(this); fFontEditor.load(); initializeFields(); for (int i= 0; i < fListModel.length; i++) fList.add(fListModel[i][0]); fList.getDisplay().asyncExec(new Runnable() { public void run() { fList.select(0); handleListSelection(); } }); } private void initializeFields() { Iterator e= fColorButtons.keySet().iterator(); while (e.hasNext()) { ColorEditor c= (ColorEditor) e.next(); String key= (String) fColorButtons.get(c); RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); c.setColorValue(rgb);
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} e= fCheckBoxes.keySet().iterator(); while (e.hasNext()) { Button b= (Button) e.next(); String key= (String) fCheckBoxes.get(b); b.setSelection(fOverlayStore.getBoolean(key)); } e= fTextFields.keySet().iterator(); while (e.hasNext()) { Text t= (Text) e.next(); String key= (String) fTextFields.get(t); t.setText(fOverlayStore.getString(key)); } } /* * @see PreferencePage#performOk() */ public boolean performOk() { fFontEditor.store(); fOverlayStore.propagate(); return true; } /* * @see PreferencePage#performDefaults() */ protected void performDefaults() {
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fFontEditor.loadDefault(); fOverlayStore.loadDefaults(); initializeFields(); handleListSelection(); super.performDefaults(); fPreviewViewer.invalidateTextPresentation(); } /* * @see DialogPage#dispose() */ public void dispose() { if (fJavaTextTools != null) { fJavaTextTools= null; } fFontEditor.setPreferencePage(null); fFontEditor.setPreferenceStore(null); if (fOverlayStore != null) { fOverlayStore.stop(); fOverlayStore= null; } super.dispose();
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} private void addColorButton(Composite parent, String label, String key, int indentation) { Label labelControl= new Label(parent, SWT.NONE); labelControl.setText(label); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); ColorEditor editor= new ColorEditor(parent); Button button= editor.getButton(); button.setData(editor); gd= new GridData(); gd.horizontalAlignment= GridData.END; button.setLayoutData(gd); button.addSelectionListener(fColorButtonListener); fColorButtons.put(editor, key); } private void addCheckBox(Composite parent, String label, String key, int indentation) { Button checkBox= new Button(parent, SWT.CHECK); checkBox.setText(label); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; gd.horizontalSpan= 2;
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
checkBox.setLayoutData(gd); checkBox.addSelectionListener(fCheckBoxListener); fCheckBoxes.put(checkBox, key); } private void addTextField(Composite parent, String label, String key, int textLimit, int indentation) { Label labelControl= new Label(parent, SWT.NONE); labelControl.setText(label); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); Text textControl= new Text(parent, SWT.BORDER | SWT.SINGLE); gd= new GridData(GridData.FILL_HORIZONTAL); gd.widthHint= convertWidthInCharsToPixels(textLimit + 1); gd.horizontalAlignment= GridData.END; textControl.setLayoutData(gd); textControl.setTextLimit(textLimit); textControl.addModifyListener(fTextFieldListener); fTextFields.put(textControl, key); } private void addTextFontEditor(Composite parent, String label, String key) { Composite editorComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 3;
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
editorComposite.setLayout(layout); fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= 2; editorComposite.setLayoutData(gd); } private String loadPreviewContentFromFile(String filename) { String line; String separator= System.getProperty("line.separator"); StringBuffer buffer= new StringBuffer(512); BufferedReader reader= null; try { reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename))); while ((line= reader.readLine()) != null) { buffer.append(line); buffer.append(separator); } } catch (IOException io) { JavaPlugin.log(io); } finally { if (reader != null) { try { reader.close(); } catch (IOException e) {} } } return buffer.toString(); } }
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
package org.eclipse.jdt.ui.text; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.DefaultInformationControl; import org.eclipse.jface.text.DefaultTextDoubleClickStrategy; import org.eclipse.jface.text.IAutoIndentStrategy; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IInformationControl; import org.eclipse.jface.text.IInformationControlCreator; import org.eclipse.jface.text.ITextDoubleClickStrategy; import org.eclipse.jface.text.ITextHover; import org.eclipse.jface.text.contentassist.ContentAssistant; import org.eclipse.jface.text.contentassist.IContentAssistant; import org.eclipse.jface.text.formatter.ContentFormatter; import org.eclipse.jface.text.formatter.IContentFormatter; import org.eclipse.jface.text.formatter.IFormattingStrategy; import org.eclipse.jface.text.information.IInformationPresenter; import org.eclipse.jface.text.information.IInformationProvider; import org.eclipse.jface.text.information.InformationPresenter; import org.eclipse.jface.text.presentation.IPresentationReconciler;
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
import org.eclipse.jface.text.presentation.PresentationReconciler; import org.eclipse.jface.text.reconciler.IReconciler; import org.eclipse.jface.text.reconciler.MonoReconciler; import org.eclipse.jface.text.rules.RuleBasedDamagerRepairer; import org.eclipse.jface.text.rules.RuleBasedScanner; import org.eclipse.jface.text.source.IAnnotationHover; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.text.ContentAssistPreference; import org.eclipse.jdt.internal.ui.text.HTMLTextPresenter; import org.eclipse.jdt.internal.ui.text.JavaAnnotationHover; import org.eclipse.jdt.internal.ui.text.JavaPartitionScanner; import org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy; import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor; import org.eclipse.jdt.internal.ui.text.java.JavaDoubleClickSelector; import org.eclipse.jdt.internal.ui.text.java.JavaFormattingStrategy; import org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy; import org.eclipse.jdt.internal.ui.text.java.hover.JavaInformationProvider; import org.eclipse.jdt.internal.ui.text.java.hover.JavaTextHover; import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocAutoIndentStrategy; import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocCompletionProcessor; /** * Configuration for a source viewer which shows Java code. * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> */ public class JavaSourceViewerConfiguration extends SourceViewerConfiguration {
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
private JavaTextTools fJavaTextTools; private ITextEditor fTextEditor; /** * Creates a new Java source viewer configuration for viewers in the given editor * using the given Java tools. * * @param tools the Java tools to be used * @param editor the editor in which the configured viewer(s) will reside */ public JavaSourceViewerConfiguration(JavaTextTools tools, ITextEditor editor) { fJavaTextTools= tools; fTextEditor= editor; } /** * Returns the Java source code scanner for this configuration. * * @return the Java source code scanner */ protected RuleBasedScanner getCodeScanner() { return fJavaTextTools.getCodeScanner(); }
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
/** * Returns the Java multiline comment scanner for this configuration. * * @return the Java multiline comment scanner */ protected RuleBasedScanner getMultilineCommentScanner() { return fJavaTextTools.getMultilineCommentScanner(); } /** * Returns the Java singleline comment scanner for this configuration. * * @return the Java singleline comment scanner */ protected RuleBasedScanner getSinglelineCommentScanner() { return fJavaTextTools.getSinglelineCommentScanner(); } /** * Returns the JavaDoc scanner for this configuration. * * @return the JavaDoc scanner */ protected RuleBasedScanner getJavaDocScanner() { return fJavaTextTools.getJavaDocScanner(); } /** * Returns the color manager for this configuration.
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
* * @return the color manager */ protected IColorManager getColorManager() { return fJavaTextTools.getColorManager(); } /** * Returns the editor in which the configured viewer(s) will reside. * * @return the enclosing editor */ protected ITextEditor getEditor() { return fTextEditor; } /** * Returns the preference store used for by this configuration to initialize * the individula bits and pieces. */ protected IPreferenceStore getPreferenceStore() { return JavaPlugin.getDefault().getPreferenceStore(); } /* * @see ISourceViewerConfiguration#getPresentationReconciler(ISourceViewer) */ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler= new PresentationReconciler(); RuleBasedDamagerRepairer dr= new RuleBasedDamagerRepairer(getCodeScanner());
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr= new RuleBasedDamagerRepairer(getJavaDocScanner()); reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC); reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC); dr= new RuleBasedDamagerRepairer(getMultilineCommentScanner()); reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT); reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT); dr= new RuleBasedDamagerRepairer(getSinglelineCommentScanner()); reconciler.setDamager(dr, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT); reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT); return reconciler; } /* * @see SourceViewerConfiguration#getContentAssistant(ISourceViewer) */ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { if (getEditor() != null) { ContentAssistant assistant= new ContentAssistant(); assistant.setContentAssistProcessor(new JavaCompletionProcessor(getEditor()), IDocument.DEFAULT_CONTENT_TYPE); assistant.setContentAssistProcessor(new JavaDocCompletionProcessor(getEditor()), JavaPartitionScanner.JAVA_DOC); ContentAssistPreference.configure(assistant, getPreferenceStore()); assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE); assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
return assistant; } return null; } /* * @see SourceViewerConfiguration#getReconciler(ISourceViewer) */ public IReconciler getReconciler(ISourceViewer sourceViewer) { if (getEditor() != null && getEditor().isEditable()) { MonoReconciler reconciler= new MonoReconciler(new JavaReconcilingStrategy(getEditor()), false); reconciler.setDelay(500); return reconciler; } return null; } /* * @see SourceViewerConfiguration#getAutoIndentStrategy(ISourceViewer, String) */ public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer, String contentType) { if (JavaPartitionScanner.JAVA_DOC.equals(contentType) || JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT.equals(contentType)) return new JavaDocAutoIndentStrategy(); return new JavaAutoIndentStrategy(); } /* * @see SourceViewerConfiguration#getDoubleClickStrategy(ISourceViewer, String) */
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) { if (JavaPartitionScanner.JAVA_DOC.equals(contentType) || JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT.equals(contentType) || JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT.equals(contentType)) return new DefaultTextDoubleClickStrategy(); return new JavaDoubleClickSelector(); } /* * @see SourceViewerConfiguration#getDefaultPrefix(ISourceViewer, String) */ public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) { return new String[] { "//", "" }; } /* * @see SourceViewerConfiguration#getIndentPrefixes(ISourceViewer, String) */ public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) { return new String[] {"\t", " ", ""}; } /* * @see SourceViewerConfiguration#getTabWidth(ISourceViewer) */ public int getTabWidth(ISourceViewer sourceViewer) { return 4; } /* * @see SourceViewerConfiguration#getAnnotationHover(ISourceViewer) */ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) { return new JavaAnnotationHover();
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
} /* * @see SourceViewerConfiguration#getTextHover(ISourceViewer, String) */ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) { return new JavaTextHover(getEditor()); } /* * @see SourceViewerConfiguration#getConfiguredContentTypes(ISourceViewer) */ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { return new String[] { IDocument.DEFAULT_CONTENT_TYPE, JavaPartitionScanner.JAVA_DOC, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT }; } /* * @see SourceViewerConfiguration#getContentFormatter(ISourceViewer) */ public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) { ContentFormatter formatter= new ContentFormatter(); IFormattingStrategy strategy= new JavaFormattingStrategy(sourceViewer); formatter.setFormattingStrategy(strategy, IDocument.DEFAULT_CONTENT_TYPE); formatter.enablePartitionAwareFormatting(false); formatter.setPartitionManagingPositionCategories(fJavaTextTools.getPartitionManagingPositionCategories()); return formatter; }
6,092
Bug 6092 JavaEditor should honor the tab width setting of the JavaFormatter
null
verified fixed
896299e
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:00:03Z
2001-11-20T09:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
/* * @see SourceViewerConfiguration#getHoverControlCreator(ISourceViewer) */ public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) { return getInformationControlCreator(sourceViewer, true); } private IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer, final boolean cutDown) { return new IInformationControlCreator() { public IInformationControl createInformationControl(Shell parent) { int style= cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL); return new DefaultInformationControl(parent, style, new HTMLTextPresenter(cutDown)); } }; } /* * @see SourceViewerConfiguration#getInformationPresenter(ISourceViewer) */ public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) { InformationPresenter presenter= new InformationPresenter(getInformationControlCreator(sourceViewer, false)); IInformationProvider provider= new JavaInformationProvider(getEditor()); presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE); presenter.setInformationProvider(provider, JavaPartitionScanner.JAVA_DOC); presenter.setSizeConstraints(60, 10, true, true); return presenter; } }
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.dialogs; import java.util.Comparator; import java.util.HashSet; import java.util.Set; import java.util.Vector; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event;
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jdt.internal.core.Assert; import org.eclipse.jdt.internal.ui.util.StringMatcher; /** * A composite widget which holds a list of elements for user selection. * The elements are sorted alphabetically. * Optionally, the elements can be filtered and duplicate entries can * be hidden (folding). */ public class FilteredList extends Composite { public interface FilterMatcher { /** * Sets the filter. * * @param pattern the filter pattern. * @param ignoreCase a flag indicating whether pattern matching is case insensitive or not. * @param ignoreWildCards a flag indicating whether wildcard characters are interpreted or not. */ void setFilter(String pattern, boolean ignoreCase, boolean ignoreWildCards); /** * Returns <code>true</code> if the object matches the pattern, <code>false</code> otherwise. * <code>setFilter()</code> must have been called at least once prior to a call to this method. */ boolean match(Object element); } private class DefaultFilterMatcher implements FilterMatcher {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
private StringMatcher fMatcher; public void setFilter(String pattern, boolean ignoreCase, boolean ignoreWildCards) { fMatcher= new StringMatcher(pattern + '*', ignoreCase, ignoreWildCards); } public boolean match(Object element) { return fMatcher.match(fRenderer.getText(element)); } } private Table fList; private ILabelProvider fRenderer; private boolean fMatchEmtpyString= true; private boolean fIgnoreCase; private boolean fAllowDuplicates; private String fFilter= ""; private TwoArrayQuickSorter fSorter; private Object[] fElements= new Object[0]; private Label[] fLabels; private Vector fImages= new Vector(); private int[] fFoldedIndices; private int fFoldedCount; private int[] fFilteredIndices; private int fFilteredCount; private FilterMatcher fFilterMatcher= new DefaultFilterMatcher(); private static class Label {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
public final String string; public final Image image; public Label(String string, Image image) { this.string= string; this.image= image; } public boolean equals(Label label) { if (label == null) return false; return string.equals(label.string) && image.equals(label.image); } } private class LabelComparator implements Comparator {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
private boolean fIgnoreCase; LabelComparator(boolean ignoreCase) { fIgnoreCase= ignoreCase; } public int compare(Object left, Object right) { Label leftLabel= (Label) left; Label rightLabel= (Label) right; int value= fIgnoreCase ? leftLabel.string.compareToIgnoreCase(rightLabel.string) : leftLabel.string.compareTo(rightLabel.string); if (value != 0) return value; if (leftLabel.image == null) { return (rightLabel.image == null) ? 0 : -1;
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
} else if (rightLabel.image == null) { return +1; } else { return fImages.indexOf(leftLabel.image) - fImages.indexOf(rightLabel.image); } } } /** * Constructs a new instance of a filtered list. * @param parent the parent composite. * @param style the widget style. * @param renderer the label renderer. * @param ignoreCase specifies whether sorting and folding is case sensitive. * @param allowDuplicates specifies whether folding of duplicates is desired. * @param matchEmptyString specifies whether empty filter strings should filter everything or nothing. */ public FilteredList(Composite parent, int style, ILabelProvider renderer, boolean ignoreCase, boolean allowDuplicates, boolean matchEmptyString) { super(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; setLayout(layout); fList= new Table(this, style);
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
fList.setLayoutData(new GridData(GridData.FILL_BOTH)); fList.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { fRenderer.dispose(); } }); fRenderer= renderer; fIgnoreCase= ignoreCase; fSorter= new TwoArrayQuickSorter(new LabelComparator(ignoreCase)); fAllowDuplicates= allowDuplicates; fMatchEmtpyString= matchEmptyString; } /** * Sets the list of elements. * @param elements the elements to be shown in the list. */ public void setElements(Object[] elements) { if (elements == null) { fElements= new Object[0]; } else { fElements= new Object[elements.length]; System.arraycopy(elements, 0, fElements, 0, elements.length); } int length= fElements.length; fLabels= new Label[length]; Set imageSet= new HashSet();
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
for (int i= 0; i != length; i++) { String text= fRenderer.getText(fElements[i]); Image image= fRenderer.getImage(fElements[i]); fLabels[i]= new Label(text, image); imageSet.add(image); } fImages.clear(); fImages.addAll(imageSet); fSorter.sort(fLabels, fElements); fFilteredIndices= new int[length]; fFilteredCount= filter(); fFoldedIndices= new int[length]; fFoldedCount= fold(); updateList(); } /** * Tests if the list (before folding and filtering) is empty. * @return returns <code>true</code> if the list is empty, <code>false</code> otherwise. */ public boolean isEmpty() { return (fElements == null) || (fElements.length == 0); } /** * Sets the filter matcher. */ public void setFilterMatcher(FilterMatcher filterMatcher) { Assert.isNotNull(filterMatcher); fFilterMatcher= filterMatcher;
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
} /** * Adds a selection listener to the list. * @param listener the selection listener to be added. */ public void addSelectionListener(SelectionListener listener) { fList.addSelectionListener(listener); } /** * Removes a selection listener from the list. * @param listener the selection listener to be removed. */ public void removeSelectionListener(SelectionListener listener) { fList.removeSelectionListener(listener); } /** * Sets the selection of the list. * @param selection an array of indices specifying the selection. */ public void setSelection(int[] selection) { fList.setSelection(selection); } /** * Returns the selection of the list. * @return returns an array of indices specifying the current selection. */ public int[] getSelectionIndices() { return fList.getSelectionIndices(); }
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
/** * Returns the selection of the list. * This is a convenience function for <code>getSelectionIndices()</code>. * @return returns the index of the selection, -1 for no selection. */ public int getSelectionIndex() { return fList.getSelectionIndex(); } /** * Sets the selection of the list. * @param elements the array of elements to be selected. */ public void setSelection(Object[] elements) { if ((elements == null) || (fElements == null)) return; int[] indices= new int[elements.length]; for (int i= 0; i != elements.length; i++) { int j; for (j= 0; j != fFoldedCount; j++) { int max= (j == fFoldedCount - 1) ? fFilteredCount : fFoldedIndices[j + 1]; int l; for (l= fFoldedIndices[j]; l != max; l++) { if (fElements[fFilteredIndices[l]].equals(elements[i])) {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
indices[i]= j; break; } } if (l != max) break; } if (j == fFoldedCount) indices[i] = 0; } fList.setSelection(indices); } /** * Returns an array of the selected elements. The type of the elements * returned in the list are the same as the ones passed with * <code>setElements</code>. The array does not contain the rendered strings. * @return returns the array of selected elements. */ public Object[] getSelection() { if (fList.isDisposed() || (fList.getSelectionCount() == 0)) return new Object[0]; int[] indices= fList.getSelectionIndices(); Object[] elements= new Object[indices.length]; for (int i= 0; i != indices.length; i++)
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
elements[i]= fElements[fFilteredIndices[fFoldedIndices[indices[i]]]]; return elements; } /** * Sets the filter pattern. Current only prefix filter patterns are supported. * @param filter the filter pattern. */ public void setFilter(String filter) { fFilter= (filter == null) ? "" : filter; fFilteredCount= filter(); fFoldedCount= fold(); updateList(); } /** * Returns the filter pattern. * @return returns the filter pattern. */ public String getFilter() { return fFilter; } /** * Returns all elements which are folded together to one entry in the list. * @param index the index selecting the entry in the list. * @return returns an array of elements folded together, <code>null</code> if index is out of range. */ public Object[] getFoldedElements(int index) { if ((index < 0) || (index >= fFoldedCount)) return null;
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
int start= fFoldedIndices[index]; int count= (index == fFoldedCount - 1) ? fFilteredCount - start : fFoldedIndices[index + 1] - start; Object[] elements= new Object[count]; for (int i= 0; i != count; i++) elements[i]= fElements[fFilteredIndices[start + i]]; return elements; } /* * Folds duplicate entries. Two elements are considered as a pair of * duplicates if they coiincide in the rendered string and image. * @return returns the number of elements after folding. */ private int fold() { if (fAllowDuplicates) { for (int i= 0; i != fFilteredCount; i++) fFoldedIndices[i]= i; return fFilteredCount; } else { int k= 0; Label last= null; for (int i= 0; i != fFilteredCount; i++) { int j= fFilteredIndices[i]; Label current= fLabels[j];
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
if (! current.equals(last)) { fFoldedIndices[k]= i; k++; last= current; } } return k; } } /* * Filters the list with the filter pattern. * @return returns the number of elements after filtering. */ private int filter() { if (((fFilter == null) || (fFilter.length() == 0)) && !fMatchEmtpyString) return 0; fFilterMatcher.setFilter(fFilter.trim(), fIgnoreCase, false); int k= 0; for (int i= 0; i != fElements.length; i++) { if (fFilterMatcher.match(fElements[i])) fFilteredIndices[k++]= i; } return k; } /* * Updates the list widget. */ private void updateList() {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java
if (fList.isDisposed()) return; fList.setRedraw(false); int itemCount= fList.getItemCount(); if (fFoldedCount < itemCount) fList.remove(0, itemCount - fFoldedCount - 1); else if (fFoldedCount > itemCount) for (int i= 0; i != fFoldedCount - itemCount; i++) new TableItem(fList, SWT.NONE); TableItem[] items= fList.getItems(); for (int i= 0; i != fFoldedCount; i++) { TableItem item= items[i]; Label label= fLabels[fFilteredIndices[fFoldedIndices[i]]]; item.setText(label.string); item.setImage(label.image); } if (fList.getItemCount() > 0) fList.setSelection(0); fList.setRedraw(true); fList.notifyListeners(SWT.Selection, new Event()); } }
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.dialogs; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.util.Assert; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine; import org.eclipse.jdt.internal.ui.util.StringMatcher; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; /** * A dialog to select a type from a list of types. */ public class TypeSelectionDialog extends TwoPaneElementSelector {
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
private static class TypeFilterMatcher implements FilteredList.FilterMatcher { private StringMatcher fMatcher; private StringMatcher fQualifierMatcher; /*
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
* @see FilteredList.FilterMatcher#setFilter(String, boolean) */ public void setFilter(String pattern, boolean ignoreCase, boolean igoreWildCards) { int qualifierIndex= pattern.lastIndexOf("."); if (qualifierIndex == -1) { fQualifierMatcher= null; fMatcher= new StringMatcher(pattern + '*', ignoreCase, igoreWildCards); } else { fQualifierMatcher= new StringMatcher(pattern.substring(0, qualifierIndex), ignoreCase, igoreWildCards); fMatcher= new StringMatcher(pattern.substring(qualifierIndex + 1), ignoreCase, igoreWildCards); } } /* * @see FilteredList.FilterMatcher#match(Object) */ public boolean match(Object element) { if (!(element instanceof TypeInfo)) return false; TypeInfo type= (TypeInfo) element; if (!fMatcher.match(type.getTypeName())) return false; if (fQualifierMatcher == null) return true; return fQualifierMatcher.match(type.getTypeContainerName()); } } private IRunnableContext fRunnableContext;
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
private IJavaSearchScope fScope; private int fStyle; /** * Constructs a type selection dialog. * @param parent the parent shell. * @param context the runnable context. * @param scope the java search scope. * @param style the widget style. */ public TypeSelectionDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style) { super(parent, new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_ONLY), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_CONTAINER_ONLY + TypeInfoLabelProvider.SHOW_ROOT_POSTFIX)); Assert.isNotNull(context); Assert.isNotNull(scope); fRunnableContext= context; fScope= scope; fStyle= style; setUpperListLabel(JavaUIMessages.getString("TypeSelectionDialog.upperLabel")); setLowerListLabel(JavaUIMessages.getString("TypeSelectionDialog.lowerLabel")); } public void create() { if (getFilter() == null) setFilter("A"); super.create(); }
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
/* * @see AbstractElementListSelectionDialog#createFilteredList(Composite) */ protected FilteredList createFilteredList(Composite parent) { FilteredList list= super.createFilteredList(parent); fFilteredList.setFilterMatcher(new TypeFilterMatcher()); return list; } /** * @see Window#open() */ public int open() { AllTypesSearchEngine engine= new AllTypesSearchEngine(JavaPlugin.getWorkspace()); List typeList= engine.searchTypes(fRunnableContext, fScope, fStyle); if (typeList.isEmpty()) { String title= JavaUIMessages.getString("TypeSelectionDialog.notypes.title"); String message= JavaUIMessages.getString("TypeSelectionDialog.notypes.message"); MessageDialog.openInformation(getShell(), title, message); return CANCEL; } TypeInfo[] typeRefs= (TypeInfo[])typeList.toArray(new TypeInfo[typeList.size()]); setElements(typeRefs); return super.open(); }
6,322
Bug 6322 All types dialog shows obfuscated classes
JDK 1.4 includes obfuscated classes (a, a1, b, c, d) etc. This classes show up prominently in the Open Type dialog. They should be less prominent. Options: a) sort lower case class names after the ones that start with a capital letter b) filter them out completly. I suggest to a)
verified fixed
b87b856
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T15:36:28Z
2001-11-26T18:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
/** * @see SelectionStatusDialog#computeResult() */ protected void computeResult() { TypeInfo ref= (TypeInfo) getLowerSelectedElement(); if (ref == null) return; try { IType type= ref.resolveType(fScope); if (type == null) { String title= JavaUIMessages.getString("TypeSelectionDialog.errorTitle"); String message= JavaUIMessages.getString("TypeSelectionDialog.errorMessage"); MessageDialog.openError(getShell(), title, message); setResult(null); } else { List result= new ArrayList(1); result.add(type); setResult(result); } } catch (JavaModelException e) { String title= JavaUIMessages.getString("TypeSelectionDialog.errorTitle"); String message= JavaUIMessages.getString("TypeSelectionDialog.errorMessage"); MessageDialog.openError(getShell(), title, message); setResult(null); } } }
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
package org.eclipse.jdt.internal.ui.text.javadoc; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.util.ArrayList; import java.util.List; import org.eclipse.swt.graphics.Image; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.contentassist.CompletionProposal; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.text.java.ResultCollector; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; public class CompletionEvaluator {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
protected final static String[] fgTagProposals= { "@author", "@deprecated", "@exception", "@link", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" };
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
protected final static String[] fgHTMLProposals= { "<code>", "</code>", "<br>", "<b>", "</b>", "<i>", "</i>", "<pre>", "</pre>" }; private ICompilationUnit fCompilationUnit; private IDocument fDocument; private int fCurrentPos; private int fCurrentLength; private JavaElementLabelProvider fLabelProvider; private List fResult; public CompletionEvaluator(ICompilationUnit cu, IDocument doc, int pos, int length) { fCompilationUnit= cu; fDocument= doc; fCurrentPos= pos; fCurrentLength= length; fResult= new ArrayList(); fLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_PARAMETERS); } private static boolean isWordPart(char ch) { return Character.isJavaIdentifierPart(ch) || (ch == '#') || (ch == '.') || (ch == '/'); }
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
private static int findCharBeforeWord(IDocument doc, int lineBeginPos, int pos) { int currPos= pos - 1; if (currPos > lineBeginPos) { try { while (currPos > lineBeginPos && isWordPart(doc.getChar(currPos))) { currPos--; } return currPos; } catch (BadLocationException e) { } } return pos; } private static int findLastWhitespace(IDocument doc, int lineBeginPos, int pos) { try { int currPos= pos - 1; while (currPos >= lineBeginPos && Character.isWhitespace(doc.getChar(currPos))) { currPos--; } return currPos + 1; } catch (BadLocationException e) { } return pos; } private static int findClosingCharacter(IDocument doc, int pos, int end, char endChar) throws BadLocationException { int curr= pos; while (curr < end && (doc.getChar(curr) != endChar)) { curr++;
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} if (curr < end) { return curr + 1; } return pos; } private static int findReplaceEndPos(IDocument doc, String newText, String oldText, int pos) { if (oldText.length() == 0 || oldText.equals(newText)) { return pos; } try { IRegion lineInfo= doc.getLineInformationOfOffset(pos); int end= lineInfo.getOffset() + lineInfo.getLength(); if (newText.endsWith(">")) { return findClosingCharacter(doc, pos, end, '>'); } else { char ch= 0; int pos1= pos; while (pos1 < end && Character.isJavaIdentifierPart(ch= doc.getChar(pos1))) { pos1++; } if (pos1 < end) { if ((ch == '(') && newText.endsWith(")")) { return findClosingCharacter(doc, pos1, end, ')'); }
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} return pos1; } } catch (BadLocationException e) { e.printStackTrace(); } return pos; } public ICompletionProposal[] computeProposals() throws JavaModelException { evalProposals(); ICompletionProposal[] res= new ICompletionProposal[fResult.size()]; fResult.toArray(res); fResult.clear(); return res; } private void evalProposals() throws JavaModelException { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) { return; } char firstChar= fDocument.getChar(word1Begin); if (firstChar == '@') {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgTagProposals, JavaPluginImages.IMG_OBJS_JAVADOCTAG); return; } else if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; } String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); int word2End= findLastWhitespace(fDocument, lineBeginPos, word1Begin); if (word2End != lineBeginPos) { int word2Begin= findCharBeforeWord(fDocument, lineBeginPos, word2End); if (fDocument.getChar(word2Begin) == '@') { String tag= fDocument.get(word2Begin, word2End - word2Begin); if (addArgumentProposals(tag, prefix)) { return; } } } addAllTags(prefix); } catch (BadLocationException e) { } } private void addAllTags(String prefix) {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
String jdocPrefix= "@" + prefix; for (int i= 0; i < fgTagProposals.length; i++) { String curr= fgTagProposals[i]; if (curr.startsWith(jdocPrefix)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_JAVADOCTAG), null)); } } String htmlPrefix= "<" + prefix; for (int i= 0; i < fgHTMLProposals.length; i++) { String curr= fgHTMLProposals[i]; if (curr.startsWith(htmlPrefix)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_HTMLTAG), null)); } } } private void addProposals(String prefix, String[] choices, String imageName) { for (int i= 0; i < choices.length; i++) { String curr= choices[i]; if (curr.startsWith(prefix)) { fResult.add(createCompletion(curr, prefix, curr, JavaPluginImages.get(imageName), null)); } } } private void addProposals(String prefix, IJavaElement[] choices) { for (int i= 0; i < choices.length; i++) { IJavaElement elem= choices[i]; String curr= getReplaceString(elem); if (curr.startsWith(prefix)) {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
String info= getProposalInfo(elem); fResult.add(createCompletion(curr, prefix, fLabelProvider.getText(elem), fLabelProvider.getImage(elem), info)); } } } private String getProposalInfo(IJavaElement elem) { if (elem instanceof IMember) { try { return JavaDocAccess.getJavaDocText((IMember)elem); } catch (JavaModelException e) { JavaPlugin.getDefault().log(e.getStatus()); } } return null; } private String getReplaceString(IJavaElement elem) { if (elem instanceof IMethod) { IMethod meth= (IMethod)elem; StringBuffer buf= new StringBuffer(); buf.append(meth.getElementName()); buf.append('('); String[] types= meth.getParameterTypes(); int last= types.length - 1; for (int i= 0; i <= last; i++) { buf.append(Signature.toString(types[i])); if (i != last) { buf.append(", ");
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
} } buf.append(')'); return buf.toString(); } else { return elem.getElementName(); } } /** * Returns true if case is handeled */ private boolean addArgumentProposals(String tag, String argument) throws JavaModelException { if ("@see".equals(tag) || "@link".equals(tag)) { evalSeeTag(argument); return true; } else if ("@param".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] names= ((IMethod)elem).getParameterNames(); addProposals(argument, names, JavaPluginImages.IMG_MISC_DEFAULT); } return true; } else if ("@throws".equals(tag) || "@exception".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IMethod) { String[] exceptions= ((IMethod)elem).getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { String curr= Signature.toString(exceptions[i]); if (curr.startsWith(argument)) {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
fResult.add(createCompletion(curr, argument, curr, JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CLASS), null)); } } } return true; } else if ("@serialData".equals(tag)) { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (elem instanceof IField) { String name= ((IField)elem).getElementName(); fResult.add(createCompletion(name, argument, name, fLabelProvider.getImage(elem), null)); } return true; } return false; } private void evalSeeTag(String arg) throws JavaModelException { int wordStart= fCurrentPos - arg.length(); int pidx= arg.indexOf('#'); if (pidx == -1) { ICompletionProposal[] completions= getTypeNameCompletion(wordStart); if (completions != null) { for (int i= 0; i < completions.length; i++) { fResult.add(completions[i]); } } } else { IType parent= null; if (pidx > 0) {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
parent= getTypeNameResolve(wordStart, wordStart + pidx); } else { IJavaElement elem= fCompilationUnit.getElementAt(wordStart); if (elem != null) { parent= (IType)JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE); } } if (parent != null) { int nidx= arg.indexOf('(', pidx); if (nidx == -1) { nidx= arg.length(); } String prefix= arg.substring(pidx + 1, nidx); addProposals(prefix, parent.getMethods()); addProposals(prefix, parent.getFields()); } } } private ICompletionProposal[] getTypeNameCompletion(int wordStart) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, fCurrentPos); if (preparedCU != null) { ResultCollector collector= new ResultCollector(); collector.reset(fCurrentPos, fCompilationUnit.getJavaProject(), fCompilationUnit); try { preparedCU.codeComplete(fCurrentPos, collector); } finally {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
preparedCU.destroy(); } return collector.getResults(); } return null; } private IType getTypeNameResolve(int wordStart, int wordEnd) throws JavaModelException { ICompilationUnit preparedCU= createPreparedCU(wordStart, wordEnd); if (preparedCU != null) { try { IJavaElement[] elements= preparedCU.codeSelect(wordStart, wordEnd - wordStart); if (elements != null && elements.length == 1 && elements[0] instanceof IType) { return (IType) elements[0]; } } finally { preparedCU.getBuffer().setContents(fCompilationUnit.getBuffer().getCharacters()); preparedCU.destroy(); } } return null; } private ICompilationUnit createPreparedCU(int wordStart, int wordEnd) throws JavaModelException { IJavaElement elem= fCompilationUnit.getElementAt(fCurrentPos); if (!(elem instanceof ISourceReference)) { return null; } int startpos= ((ISourceReference)elem).getSourceRange().getOffset();
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/CompletionEvaluator.java
char[] content= (char[]) fCompilationUnit.getBuffer().getCharacters().clone(); if (wordStart < content.length) { for (int i= startpos; i < wordStart; i++) { content[i]= ' '; } } if (wordEnd + 2 < content.length) { content[wordEnd]= ' '; content[wordEnd + 1]= 'x'; } ICompilationUnit cu= fCompilationUnit; if (cu.isWorkingCopy()) { cu= (ICompilationUnit) cu.getOriginalElement(); } ICompilationUnit newCU= (ICompilationUnit) cu.getWorkingCopy(); newCU.getBuffer().setContents(content); return newCU; } private ICompletionProposal createCompletion(String newText, String oldText, String labelText, Image image, String info) { int offset= fCurrentPos - oldText.length(); int length= fCurrentLength + oldText.length(); if (fCurrentLength == 0) length= findReplaceEndPos(fDocument, newText, oldText, fCurrentPos) - offset; return new CompletionProposal(newText, offset, length, newText.length(), image, labelText, null, info); } }
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
package org.eclipse.jdt.internal.ui.text.javadoc; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.util.Arrays; import java.util.Comparator; import org.eclipse.swt.graphics.Point; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.contentassist.IContextInformationValidator; import org.eclipse.ui.IEditorPart; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.text.template.TemplateContext; import org.eclipse.jdt.internal.ui.text.template.TemplateEngine; /** * Simple Java doc completion processor. */ public class JavaDocCompletionProcessor implements IContentAssistProcessor {
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
private static class CompletionProposalComparator implements Comparator { public int compare(Object o1, Object o2) { ICompletionProposal c1= (ICompletionProposal) o1; ICompletionProposal c2= (ICompletionProposal) o2; return c1.getDisplayString().compareTo(c2.getDisplayString()); } }; private IEditorPart fEditor; private IWorkingCopyManager fManager; private char[] fProposalAutoActivationSet;
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
private Comparator fComparator; private TemplateEngine fTemplateEngine; public JavaDocCompletionProcessor(IEditorPart editor) { fEditor= editor; fManager= JavaPlugin.getDefault().getWorkingCopyManager(); fTemplateEngine= new TemplateEngine(TemplateContext.JAVADOC); } /** * Tells this processor to order the proposals alphabetically. * * @param order <code>true</code> if proposals should be ordered. */ public void orderProposalsAlphabetically(boolean order) { fComparator= order ? new CompletionProposalComparator() : null; } /** * Tells this processor to restrict is proposals to those * starting with matching cases. * * @param restrict <code>true</code> if proposals should be restricted */ public void restrictProposalsToMatchingCases(boolean restrict) { } /**
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
* @see IContentAssistProcessor#getErrorMessage() */ public String getErrorMessage() { return null; } /** * @see IContentAssistProcessor#getContextInformationValidator() */ public IContextInformationValidator getContextInformationValidator() { return null; } /** * @see IContentAssistProcessor#getContextInformationAutoActivationCharacters() */ public char[] getContextInformationAutoActivationCharacters() { return null; } /** * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters() */ public char[] getCompletionProposalAutoActivationCharacters() { return fProposalAutoActivationSet; } /** * Sets this processor's set of characters triggering the activation of the * completion proposal computation. * * @param activationSet the activation set */
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
public void setCompletionProposalAutoActivationCharacters(char[] activationSet) { fProposalAutoActivationSet= activationSet; } /** * @see IContentAssistProcessor#computeContextInformation(ITextViewer, int) */ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { return null; } /** * @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int) */ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput()); IDocument document= viewer.getDocument(); ICompletionProposal[] results= new ICompletionProposal[0]; try { if (unit != null) { int offset= documentOffset; int length= 0; Point selection= viewer.getSelectedRange(); if (selection.y > 0) { offset= selection.x; length= selection.y; } CompletionEvaluator evaluator= new CompletionEvaluator(unit, document, offset, length); results= evaluator.computeProposals();
6,062
Bug 6062 JavaDocCompletionProcessor should be have configurable case sensitivity
Need implementation of the following JavaDocCompletionProcessor method public void restrictProposalsToMatchingCases(boolean restrict.
resolved fixed
0114a08
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T17:30:16Z
2001-11-19T14:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
} } catch (JavaModelException x) { } try { fTemplateEngine.reset(); fTemplateEngine.complete(viewer, documentOffset, unit); } catch (JavaModelException x) { } ICompletionProposal[] templateResults= fTemplateEngine.getResults(); ICompletionProposal[] total= new ICompletionProposal[results.length + templateResults.length]; System.arraycopy(templateResults, 0, total, 0, templateResults.length); System.arraycopy(results, 0, total, templateResults.length, results.length); /* * Order here and not in result collector to make sure that the order * applies to all proposals and not just those of the compilation unit. */ return order(total); } /** * Order the given proposals. */ private ICompletionProposal[] order(ICompletionProposal[] proposals) { if (fComparator != null) Arrays.sort(proposals, fComparator); return proposals; } }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
package org.eclipse.jdt.internal.ui.javaeditor; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.Menu;
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.Widget; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; 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.util.Assert; import org.eclipse.jface.util.ListenerList; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.part.Page; import org.eclipse.ui.texteditor.IUpdate; import org.eclipse.ui.views.contentoutline.IContentOutlinePage; import org.eclipse.jdt.core.ElementChangedEvent; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IElementChangedListener; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement;
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
import org.eclipse.jdt.core.IJavaElementDelta; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IParent; import org.eclipse.jdt.core.ISourceRange; 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.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.actions.OpenHierarchyPerspectiveItem; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup; import org.eclipse.jdt.internal.ui.reorg.DeleteAction; import org.eclipse.jdt.internal.ui.reorg.ReorgGroup; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; /** * The content outline page of the Java editor. The viewer implements a proprietary * update mechanism based on Java model deltas. It does not react on domain changes. * It is specified to show the content of ICompilationUnits and IClassFiles. */ class JavaOutlinePage extends Page implements IContentOutlinePage {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * The element change listener of the java outline viewer. * @see IElementChangedListener */ class ElementChangedListener implements IElementChangedListener { public void elementChanged(final ElementChangedEvent e) { Display d= getControl().getDisplay(); if (d != null) { d.asyncExec(new Runnable() { public void run() { IJavaElementDelta delta= findElement( (ICompilationUnit) fInput, e.getDelta()); if (delta != null && fOutlineViewer != null) { fOutlineViewer.reconcile(delta); } } }); } } protected IJavaElementDelta findElement(ICompilationUnit unit, IJavaElementDelta delta) { if (delta == null || unit == null)
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
return null; IJavaElement element= delta.getElement(); if (unit.equals(element)) return delta; if (element.getElementType() > IJavaElement.CLASS_FILE) return null; IJavaElementDelta[] children= delta.getAffectedChildren(); if (children == null || children.length == 0) return null; for (int i= 0; i < children.length; i++) { IJavaElementDelta d= findElement(unit, children[i]); if (d != null) return d; } return null; } }; /** * Content provider for the children of an ICompilationUnit or * an IClassFile * @see ITreeContentProvider */ class ChildrenProvider implements ITreeContentProvider {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
private ElementChangedListener fListener; private JavaOutlineErrorTickUpdater fErrorTickUpdater; protected boolean matches(IJavaElement element) { if (element.getElementType() == IJavaElement.METHOD) { String name= element.getElementName(); return (name != null && name.indexOf('<') >= 0); } return false; } protected IJavaElement[] filter(IJavaElement[] children) { boolean initializers= false; for (int i= 0; i < children.length; i++) { if (matches(children[i])) { initializers= true; break; } } if (!initializers) return children;
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
Vector v= new Vector(); for (int i= 0; i < children.length; i++) { if (matches(children[i])) continue; v.addElement(children[i]); } IJavaElement[] result= new IJavaElement[v.size()]; v.copyInto(result); return result; } public Object[] getChildren(Object parent) { if (parent instanceof IParent) { IParent c= (IParent) parent; try { return filter(c.getChildren()); } catch (JavaModelException x) { JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.getChildren.message1"), x.getStatus()); } } return new Object[0]; } public Object[] getElements(Object parent) { return getChildren(parent); } public Object getParent(Object child) {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if (child instanceof IJavaElement) { IJavaElement e= (IJavaElement) child; return e.getParent(); } return null; } public boolean hasChildren(Object parent) { if (parent instanceof IParent) { IParent c= (IParent) parent; try { IJavaElement[] children= filter(c.getChildren()); return (children != null && children.length > 0); } catch (JavaModelException x) { JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.hasChildren.message1"), x.getStatus()); } } return false; } public boolean isDeleted(Object o) { return false; } public void dispose() { if (fListener != null) { JavaCore.removeElementChangedListener(fListener); fListener= null; } if (fErrorTickUpdater != null) {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
fErrorTickUpdater.setAnnotationModel(null); fErrorTickUpdater= null; } } /** * @see IContentProvider#inputChanged(Viewer, Object, Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { boolean isCU= (newInput instanceof ICompilationUnit); if (isCU && fListener == null) { fListener= new ElementChangedListener(); JavaCore.addElementChangedListener(fListener); fErrorTickUpdater= new JavaOutlineErrorTickUpdater(fOutlineViewer); fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput())); } else if (isCU && fErrorTickUpdater != null) { fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput())); } else if (!isCU && fListener != null) { JavaCore.removeElementChangedListener(fListener); fListener= null; fErrorTickUpdater.setAnnotationModel(null); fErrorTickUpdater= null; } } }; class JavaOutlineViewer extends TreeViewer {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * Indicates an item which has been reused. At the point of * its reuse it has been expanded. This field is used to * communicate between <code>internalExpandToLevel</code> and * <code>reuseTreeItem</code>. */ private Item fReusedExpandedItem; public JavaOutlineViewer(Tree tree) { super(tree); setAutoExpandLevel(ALL_LEVELS); } /**
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
* Investigates the given element change event and if affected incrementally * updates the outline. */ public void reconcile(IJavaElementDelta delta) { if (getSorter() == null) { Widget w= findItem(fInput); if (w != null) update(w, delta); } else { refresh(); } } /** * @see TreeViewer#internalExpandToLevel */ protected void internalExpandToLevel(Widget node, int level) { if (node instanceof Item) { Item i= (Item) node; if (i.getData() instanceof IJavaElement) { IJavaElement je= (IJavaElement) i.getData(); if (je.getElementType() == IJavaElement.IMPORT_CONTAINER || isInnerType(je)) { if (i != fReusedExpandedItem) { setExpanded(i, false); return; } } } }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
super.internalExpandToLevel(node, level); } protected void reuseTreeItem(Item item, Object element) { Item[] c= getChildren(item); if (c != null && c.length > 0) { if (getExpanded(item)) fReusedExpandedItem= item; for (int k= 0; k < c.length; k++) { if (c[k].getData() != null) disassociate(c[k]); c[k].dispose(); } } updateItem(item, element); updatePlus(item, element); internalExpandToLevel(item, ALL_LEVELS); fReusedExpandedItem= null; } /** * @see TreeViewer#createTreeItem */ protected void createTreeItem(Widget parent, Object element, int ix) {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
Item[] children= getChildren(parent); boolean expand= (parent instanceof Item && (children == null || children.length == 0)); Item item= newItem(parent, SWT.NULL, ix); updateItem(item, element); updatePlus(item, element); if (expand) setExpanded((Item) parent, true); internalExpandToLevel(item, ALL_LEVELS); } protected boolean mustUpdateParent(IJavaElementDelta delta, IJavaElement element) { if (element instanceof IMethod) { if ((delta.getKind() & IJavaElementDelta.ADDED) != 0) { try { return JavaModelUtil.isMainMethod((IMethod)element); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } return "main".equals(element.getElementName()); } return false; } protected ISourceRange getSourceRange(IJavaElement element) throws JavaModelException { if (element instanceof IMember) return ((IMember) element).getNameRange();
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if (element instanceof ISourceReference) return ((ISourceReference) element).getSourceRange(); return null; } protected boolean overlaps(ISourceRange range, int start, int end) { return start <= (range.getOffset() + range.getLength() - 1) && range.getOffset() <= end; } protected boolean filtered(IJavaElement parent, IJavaElement child) { Object[] result= new Object[] { child }; ViewerFilter[] filters= getFilters(); for (int i= 0; i < filters.length; i++) { result= filters[i].filter(this, parent, result); if (result.length == 0) return true; } return false; } protected void update(Widget w, IJavaElementDelta delta) { Item item; Object element; IJavaElement parent= delta.getElement(); IJavaElementDelta[] affected= delta.getAffectedChildren(); Item[] children= getChildren(w);
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
boolean doUpdateParent= false; Vector deletions= new Vector(); Vector additions= new Vector(); go1: for (int i= 0; i < children.length; i++) { item= children[i]; element= item.getData(); for (int j= 0; j < affected.length; j++) { IJavaElement affectedElement= affected[j].getElement(); int status= affected[j].getKind(); if (affectedElement.equals(element)) { if ((status & IJavaElementDelta.REMOVED) != 0) { deletions.addElement(item); doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], affectedElement); continue go1; } if ((status & IJavaElementDelta.CHANGED) != 0) { int change= affected[j].getFlags(); doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], affectedElement); if ((change & IJavaElementDelta.F_MODIFIERS) != 0) { if (filtered(parent, affectedElement)) deletions.addElement(item);
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
else updateItem(item, affectedElement); } if ((change & IJavaElementDelta.F_CONTENT) != 0) updateItem(item, affectedElement); if ((change & IJavaElementDelta.F_CHILDREN) != 0) update(item, affected[j]); continue go1; } } else { if ((status & IJavaElementDelta.CHANGED) != 0 && (affected[j].getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 && !filtered(parent, affectedElement)) additions.addElement(affected[j]); } } } IJavaElementDelta[] add= delta.getAddedChildren(); if (additions.size() > 0) { IJavaElementDelta[] tmp= new IJavaElementDelta[add.length + additions.size()]; System.arraycopy(add, 0, tmp, 0, add.length); for (int i= 0; i < additions.size(); i++) tmp[i + add.length]= (IJavaElementDelta) additions.elementAt(i);
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
add= tmp; } go2: for (int i= 0; i < add.length; i++) { try { IJavaElement e= add[i].getElement(); if (filtered(parent, e)) continue go2; doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e); ISourceRange rng= getSourceRange(e); int start= rng.getOffset(); int end= start + rng.getLength() - 1; Item last= null; item= null; children= getChildren(w); for (int j= 0; j < children.length; j++) { item= children[j]; IJavaElement r= (IJavaElement) item.getData(); if (r == null) { continue go2; }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
try { rng= getSourceRange(r); if (overlaps(rng, start, end)) { reuseTreeItem(item, e); continue go2; } else if (rng.getOffset() > start) { if (last != null && deletions.contains(last)) { deletions.removeElement(last); reuseTreeItem(last, (Object) e); } else { createTreeItem(w, (Object) e, j); } continue go2; } } catch (JavaModelException x) { } last= item; }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if (last != null && deletions.contains(last)) { deletions.removeElement(last); reuseTreeItem(last, e); } else { createTreeItem(w, e, -1); } } catch (JavaModelException x) { } } Enumeration e= deletions.elements(); while (e.hasMoreElements()) { item= (Item) e.nextElement(); disassociate(item); item.dispose(); } if (doUpdateParent) updateItem(w, delta.getElement()); } }; class LexicalSortingAction extends Action {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
private JavaElementSorter fSorter= new JavaElementSorter(); public LexicalSortingAction() { super(); setText(JavaEditorMessages.getString("JavaOutlinePage.Sort.label")); JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean("LexicalSortingAction.isChecked"); valueChanged(checked, false); } public void run() { valueChanged(isChecked(), true); } private void valueChanged(boolean on, boolean store) { setChecked(on); fOutlineViewer.setSorter(on ? fSorter : null); setToolTipText(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.unchecked")); setDescription(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.description.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.description.unchecked")); if (store) JavaPlugin.getDefault().getPreferenceStore().setValue("LexicalSortingAction.isChecked", on); } }; class FieldFilter extends ViewerFilter {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
public boolean select(Viewer viewer, Object parentElement, Object element) { return !(element instanceof IField); } }; class VisibilityFilter extends ViewerFilter {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
public final static int PUBLIC= 0; public final static int PROTECTED= 1; public final static int PRIVATE= 2; public final static int DEFAULT= 3; public final static int NOT_STATIC= 4; private int fVisibility; public VisibilityFilter(int visibility) { fVisibility= visibility; } /* * 1GEWBY4: ITPJUI:ALL - filtering incorrect on interfaces. */ private boolean belongsToInterface(IMember member) { IType type= member.getDeclaringType(); if (type != null) { try { return type.isInterface(); } catch (JavaModelException x) { } } return false; }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
public boolean select(Viewer viewer, Object parentElement, Object element) { if ( !(element instanceof IMember)) return true; if (element instanceof IType) { IType type= (IType) element; IJavaElement parent= type.getParent(); if (parent == null) return true; int elementType= parent.getElementType(); if (elementType == IJavaElement.COMPILATION_UNIT || elementType == IJavaElement.CLASS_FILE) return true; } IMember member= (IMember) element; try { int flags= member.getFlags(); switch (fVisibility) { case PUBLIC: return Flags.isPublic(flags) || belongsToInterface(member); case PROTECTED: return Flags.isProtected(flags); case PRIVATE: return Flags.isPrivate(flags); case DEFAULT: {
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
boolean dflt= !(Flags.isPublic(flags) || Flags.isProtected(flags) || Flags.isPrivate(flags)); return dflt ? !belongsToInterface(member) : dflt; } case NOT_STATIC: return !Flags.isStatic(flags); } } catch (JavaModelException x) { } return false; } }; class FilterAction extends Action { private ViewerFilter fFilter; private String fCheckedDesc; private String fUncheckedDesc; private String fCheckedTooltip; private String fUncheckedTooltip; private String fPreferenceKey; public FilterAction(ViewerFilter filter, String label, String checkedDesc, String uncheckedDesc, String checkedTooltip, String uncheckedTooltip, String prefKey) { super(); fFilter= filter; setText(label); fCheckedDesc= checkedDesc;
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
fUncheckedDesc= uncheckedDesc; fCheckedTooltip= checkedTooltip; fUncheckedTooltip= uncheckedTooltip; fPreferenceKey= prefKey; boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean(fPreferenceKey); valueChanged(checked, false); } public void run() { valueChanged(isChecked(), true); } private void valueChanged(boolean on, boolean store) { setChecked(on); if (on) { fOutlineViewer.addFilter(fFilter); setToolTipText(fCheckedTooltip); setDescription(fCheckedDesc); } else { fOutlineViewer.removeFilter(fFilter); setToolTipText(fUncheckedTooltip); setDescription(fUncheckedDesc); } if (store) JavaPlugin.getDefault().getPreferenceStore().setValue(fPreferenceKey, on); }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
}; private IJavaElement fInput; private String fContextMenuID; private Menu fMenu; private JavaOutlineViewer fOutlineViewer; private JavaEditor fEditor; private ListenerList fSelectionChangedListeners= new ListenerList(); private Hashtable fActions= new Hashtable(); private ContextMenuGroup[] fActionGroups; public JavaOutlinePage(String contextMenuID, JavaEditor editor) { super(); Assert.isNotNull(editor); fContextMenuID= contextMenuID; fEditor= editor; } private void fireSelectionChanged(ISelection selection) { SelectionChangedEvent event= new SelectionChangedEvent(this, selection); Object[] listeners= fSelectionChangedListeners.getListeners(); for (int i= 0; i < listeners.length; ++i) ((ISelectionChangedListener) listeners[i]).selectionChanged(event); }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * @see IPage#createControl */ public void createControl(Composite parent) { Tree tree= new Tree(parent, SWT.MULTI); JavaElementLabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS | JavaElementLabelProvider.SHOW_TYPE); fOutlineViewer= new JavaOutlineViewer(tree); fOutlineViewer.setContentProvider(new ChildrenProvider()); fOutlineViewer.setLabelProvider(lprovider); MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID); manager.setRemoveAllWhenShown(true); manager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { contextMenuAboutToShow(manager); } }); fMenu= manager.createContextMenu(tree); tree.setMenu(fMenu); fActionGroups= new ContextMenuGroup[] { new GenerateGroup(), new JavaSearchGroup(), new ReorgGroup() }; fOutlineViewer.setInput(fInput); fOutlineViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent e) { fireSelectionChanged(e.getSelection()); } });
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
fOutlineViewer.getControl().addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { handleKeyPressed(e); } }); } public void dispose() { if (fEditor == null) return; fEditor.outlinePageClosed(); fEditor= null; Object[] listeners= fSelectionChangedListeners.getListeners(); for (int i= 0; i < listeners.length; i++) fSelectionChangedListeners.remove(listeners[i]); fSelectionChangedListeners= null; if (fMenu != null && !fMenu.isDisposed()) { fMenu.dispose(); fMenu= null; } super.dispose(); }
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
public Control getControl() { if (fOutlineViewer != null) return fOutlineViewer.getControl(); return null; } public void setInput(IJavaElement inputElement) { fInput= inputElement; if (fOutlineViewer != null) fOutlineViewer.setInput(fInput); } public void select(ISourceReference reference) { if (fOutlineViewer != null) { ISelection s= StructuredSelection.EMPTY; if (reference != null) s= new StructuredSelection(reference); fOutlineViewer.setSelection(s, true); } } public void setAction(String actionID, IAction action) { Assert.isNotNull(actionID); if (action == null) fActions.remove(actionID); else fActions.put(actionID, action);
6,356
Bug 6356 Outliner has to delete actions
Product version: smoke test for integration build 20011127 - load compilation unit into Java editor - open context menu in outliner observe: there are two delete actions
verified fixed
7f801b9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-27T18:41:06Z
2001-11-27T16:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
} public IAction getAction(String actionID) { Assert.isNotNull(actionID); return (IAction) fActions.get(actionID); } /** * Convenience method to add the action installed under the given actionID to the * specified group of the menu. */ protected void addAction(IMenuManager menu, String group, String actionID) { IAction action= getAction(actionID); if (action != null) { if (action instanceof IUpdate) ((IUpdate) action).update(); if (action.isEnabled()) { IMenuManager subMenu= menu.findMenuUsingPath(group); if (subMenu != null) subMenu.add(action); else menu.appendToGroup(group, action); } } } private void addRefactoring(IMenuManager menu){ MenuManager refactoring= new MenuManager(JavaEditorMessages.getString("JavaOutlinePage.ContextMenu.refactoring.label")); ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, fOutlineViewer);