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
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
scopeDescription= SearchMessages.getString("WorkspaceScope"); scope= SearchEngine.createWorkspaceScope(); break; case ISearchPageContainer.SELECTION_SCOPE: scopeDescription= SearchMessages.getString("SelectionScope"); scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(fStructuredSelection); break; case ISearchPageContainer.WORKING_SET_SCOPE: IWorkingSet[] workingSets= getContainer().getSelectedWorkingSets(); if (workingSets == null || workingSets.length < 1) return false; scopeDescription= SearchMessages.getFormattedString("WorkingSetScope", SearchUtil.toString(workingSets)); scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getContainer().getSelectedWorkingSets()); SearchUtil.updateLRUWorkingSets(getContainer().getSelectedWorkingSets()); } JavaSearchResultCollector collector= new JavaSearchResultCollector(); JavaSearchOperation op= null; if (data.javaElement != null && getPattern().equals(fInitialData.pattern)) op= new JavaSearchOperation(workspace, data.javaElement, data.limitTo, scope, scopeDescription, collector); else { data.javaElement= null; op= new JavaSearchOperation(workspace, data.pattern, data.isCaseSensitive, data.searchFor, data.limitTo, scope, scopeDescription, collector); } Shell shell= getControl().getShell(); try { getContainer().getRunnableContext().run(true, true, op); } catch (InvocationTargetException ex) { ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.search.title"), SearchMessages.getString("Search.Error.search.message"));
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
return false; } catch (InterruptedException ex) { return false; } return true; } private int getLimitTo() { for (int i= 0; i < fLimitTo.length; i++) { if (fLimitTo[i].getSelection()) return i; } return -1; } private void setLimitTo(int searchFor) { fLimitTo[DECLARATIONS].setEnabled(true); fLimitTo[IMPLEMENTORS].setEnabled(false); fLimitTo[REFERENCES].setEnabled(true); fLimitTo[ALL_OCCURRENCES].setEnabled(true); fLimitTo[READ_ACCESSES].setEnabled(false); fLimitTo[WRITE_ACCESSES].setEnabled(false); if (!(searchFor == TYPE || searchFor == INTERFACE) && fLimitTo[IMPLEMENTORS].getSelection()) { fLimitTo[IMPLEMENTORS].setSelection(false); fLimitTo[REFERENCES].setSelection(true); } if (!(searchFor == FIELD) && (getLimitTo() == READ_ACCESSES || getLimitTo() == WRITE_ACCESSES)) { fLimitTo[getLimitTo()].setSelection(false); fLimitTo[REFERENCES].setSelection(true); }
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
switch (searchFor) { case TYPE | INTERFACE: fLimitTo[IMPLEMENTORS].setEnabled(true); case FIELD: fLimitTo[READ_ACCESSES].setEnabled(true); fLimitTo[WRITE_ACCESSES].setEnabled(true); break; default : break; } } private String[] getPreviousSearchPatterns() { int patternCount= fgPreviousSearchPatterns.size(); String [] patterns= new String[patternCount]; for (int i= 0; i < patternCount; i++) patterns[i]= ((SearchPatternData) fgPreviousSearchPatterns.get(patternCount - 1 - i)).pattern; return patterns; } private int getSearchFor() { for (int i= 0; i < fSearchFor.length; i++) { if (fSearchFor[i].getSelection()) return i; } Assert.isTrue(false, "shouldNeverHappen"); return -1; } private String getPattern() {
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
return fPattern.getText(); } /** * Return search pattern data and update previous searches. * An existing entry will be updated. */ private SearchPatternData getPatternData() { String pattern= getPattern(); SearchPatternData match= null; int i= 0; int size= fgPreviousSearchPatterns.size(); while (match == null && i < size) { match= (SearchPatternData) fgPreviousSearchPatterns.get(i); i++; if (!pattern.equals(match.pattern)) match= null; }; if (match == null) { match= new SearchPatternData( getSearchFor(), getLimitTo(), pattern, fCaseSensitive.getSelection(), fJavaElement, getContainer().getSelectedScope(), getContainer().getSelectedWorkingSets()); fgPreviousSearchPatterns.add(match); } else { match.searchFor= getSearchFor();
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
match.limitTo= getLimitTo(); match.isCaseSensitive= fCaseSensitive.getSelection(); match.javaElement= fJavaElement; match.scope= getContainer().getSelectedScope(); match.workingSets= getContainer().getSelectedWorkingSets(); }; return match; } /* * Implements method from IDialogPage */ public void setVisible(boolean visible) { if (visible && fPattern != null) { if (fFirstTime) { fFirstTime= false; fPattern.setItems(getPreviousSearchPatterns()); initSelections(); } fPattern.setFocus(); getContainer().setPerformActionEnabled(fPattern.getText().length() > 0); } super.setVisible(visible); } public boolean isValid() { return true; } /**
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
* Creates the page's content. */ public void createControl(Composite parent) { initializeDialogUnits(parent); readConfiguration(); GridData gd; Composite result= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(2, false); layout.horizontalSpacing= 10; result.setLayout(layout); result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); RowLayouter layouter= new RowLayouter(layout.numColumns); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.verticalAlignment= gd.VERTICAL_ALIGN_BEGINNING | gd.VERTICAL_ALIGN_FILL; layouter.setDefaultGridData(gd, 0); layouter.setDefaultGridData(gd, 1); layouter.setDefaultSpan(); layouter.perform(createExpression(result)); layouter.perform(createSearchFor(result), createLimitTo(result), -1); SelectionAdapter javaElementInitializer= new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { if (getSearchFor() == fInitialData.searchFor) fJavaElement= fInitialData.javaElement; else fJavaElement= null;
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
setLimitTo(getSearchFor()); updateCaseSensitiveCheckbox(); } }; fSearchFor[TYPE].addSelectionListener(javaElementInitializer); fSearchFor[METHOD].addSelectionListener(javaElementInitializer); fSearchFor[FIELD].addSelectionListener(javaElementInitializer); fSearchFor[CONSTRUCTOR].addSelectionListener(javaElementInitializer); fSearchFor[PACKAGE].addSelectionListener(javaElementInitializer); setControl(result); WorkbenchHelp.setHelp(result, IJavaHelpContextIds.JAVA_SEARCH_PAGE); } private Control createExpression(Composite parent) { Composite result= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(2, false); result.setLayout(layout); GridData gd= new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); gd.horizontalSpan= 2; gd.horizontalIndent= 0; result.setLayoutData(gd); Label label= new Label(result, SWT.LEFT); label.setText(SearchMessages.getString("SearchPage.expression.label")); gd= new GridData(GridData.BEGINNING); gd.horizontalSpan= 2; label.setLayoutData(gd); fPattern= new Combo(result, SWT.SINGLE | SWT.BORDER); fPattern.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) {
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
handlePatternSelected(); } }); fPattern.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { getContainer().setPerformActionEnabled(getPattern().length() > 0); updateCaseSensitiveCheckbox(); } }); gd= new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); gd.horizontalIndent= -gd.horizontalIndent; fPattern.setLayoutData(gd); fCaseSensitive= new Button(result, SWT.CHECK); fCaseSensitive.setText(SearchMessages.getString("SearchPage.expression.caseSensitive")); gd= new GridData(); fCaseSensitive.setLayoutData(gd); fCaseSensitive.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fIsCaseSensitive= fCaseSensitive.getSelection(); writeConfiguration(); } }); return result; } private void updateCaseSensitiveCheckbox() { if (fInitialData != null && getPattern().equals(fInitialData.pattern) && fJavaElement != null) { fCaseSensitive.setEnabled(false); fCaseSensitive.setSelection(true);
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
} else { fCaseSensitive.setEnabled(true); fCaseSensitive.setSelection(fIsCaseSensitive); } } private void handlePatternSelected() { if (fPattern.getSelectionIndex() < 0) return; int index= fgPreviousSearchPatterns.size() - 1 - fPattern.getSelectionIndex(); fInitialData= (SearchPatternData) fgPreviousSearchPatterns.get(index); for (int i= 0; i < fSearchFor.length; i++) fSearchFor[i].setSelection(false); for (int i= 0; i < fLimitTo.length; i++) fLimitTo[i].setSelection(false); fSearchFor[fInitialData.searchFor].setSelection(true); setLimitTo(fInitialData.searchFor); fLimitTo[fInitialData.limitTo].setSelection(true); fPattern.setText(fInitialData.pattern); fIsCaseSensitive= fInitialData.isCaseSensitive; fJavaElement= fInitialData.javaElement; fCaseSensitive.setEnabled(fJavaElement == null); fCaseSensitive.setSelection(fInitialData.isCaseSensitive); if (fInitialData.workingSets != null) getContainer().setSelectedWorkingSets(fInitialData.workingSets); else getContainer().setSelectedScope(fInitialData.scope); } private Control createSearchFor(Composite parent) { Group result= new Group(parent, SWT.NONE);
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
result.setText(SearchMessages.getString("SearchPage.searchFor.label")); GridLayout layout= new GridLayout(); layout.numColumns= 3; result.setLayout(layout); fSearchFor= new Button[fSearchForText.length]; for (int i= 0; i < fSearchForText.length; i++) { Button button= new Button(result, SWT.RADIO); button.setText(fSearchForText[i]); fSearchFor[i]= button; } Button filler= new Button(result, SWT.RADIO); filler.setVisible(false); filler= new Button(result, SWT.RADIO); filler.setVisible(false); return result; } private Control createLimitTo(Composite parent) { Group result= new Group(parent, SWT.NONE); result.setText(SearchMessages.getString("SearchPage.limitTo.label")); GridLayout layout= new GridLayout(); layout.numColumns= 2; result.setLayout(layout); fLimitTo= new Button[fLimitToText.length]; for (int i= 0; i < fLimitToText.length; i++) { Button button= new Button(result, SWT.RADIO); button.setText(fLimitToText[i]); fLimitTo[i]= button; }
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
return result; } private void initSelections() { fStructuredSelection= asStructuredSelection(); fInitialData= tryStructuredSelection(fStructuredSelection); if (fInitialData == null) fInitialData= trySimpleTextSelection(getContainer().getSelection()); if (fInitialData == null) fInitialData= getDefaultInitValues(); fJavaElement= fInitialData.javaElement; fCaseSensitive.setSelection(fInitialData.isCaseSensitive); fCaseSensitive.setEnabled(fInitialData.javaElement == null); fSearchFor[fInitialData.searchFor].setSelection(true); setLimitTo(fInitialData.searchFor); fLimitTo[fInitialData.limitTo].setSelection(true); fPattern.setText(fInitialData.pattern); } private SearchPatternData tryStructuredSelection(IStructuredSelection selection) { if (selection == null || selection.size() > 1) return null; Object o= selection.getFirstElement(); if (o instanceof IJavaElement) { return determineInitValuesFrom((IJavaElement)o); } else if (o instanceof ISearchResultViewEntry) { IJavaElement element= SearchUtil.getJavaElement(((ISearchResultViewEntry)o).getSelectedMarker()); return determineInitValuesFrom(element); } else if (o instanceof IAdaptable) { IJavaElement element= (IJavaElement)((IAdaptable)o).getAdapter(IJavaElement.class); if (element != null) {
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
return determineInitValuesFrom(element); } else { IWorkbenchAdapter adapter= (IWorkbenchAdapter)((IAdaptable)o).getAdapter(IWorkbenchAdapter.class); if (adapter != null) return new SearchPatternData(TYPE, REFERENCES, adapter.getLabel(o), null); } } return null; } private IJavaElement getJavaElement(IMarker marker) { try { return JavaCore.create((String)marker.getAttribute(IJavaSearchUIConstants.ATT_JE_HANDLE_ID)); } catch (CoreException ex) { ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message")); return null; } } private SearchPatternData determineInitValuesFrom(IJavaElement element) { if (element == null) return null; int searchFor= UNKNOWN; int limitTo= UNKNOWN; String pattern= null; switch (element.getElementType()) { case IJavaElement.PACKAGE_FRAGMENT: searchFor= PACKAGE; limitTo= REFERENCES; pattern= element.getElementName(); break;
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
case IJavaElement.PACKAGE_FRAGMENT_ROOT: searchFor= PACKAGE; limitTo= REFERENCES; pattern= element.getElementName(); break; case IJavaElement.PACKAGE_DECLARATION: searchFor= PACKAGE; limitTo= REFERENCES; pattern= element.getElementName(); break; case IJavaElement.IMPORT_DECLARATION: pattern= element.getElementName(); IImportDeclaration declaration= (IImportDeclaration)element; if (declaration.isOnDemand()) { searchFor= PACKAGE; int index= pattern.lastIndexOf('.'); pattern= pattern.substring(0, index); } else { searchFor= TYPE; } limitTo= DECLARATIONS; break; case IJavaElement.TYPE: searchFor= TYPE; limitTo= REFERENCES; pattern= JavaModelUtil.getFullyQualifiedName((IType)element); break; case IJavaElement.COMPILATION_UNIT: ICompilationUnit cu= (ICompilationUnit)element; String mainTypeName= element.getElementName().substring(0, element.getElementName().indexOf("."));
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
IType mainType= cu.getType(mainTypeName); mainTypeName= JavaModelUtil.getTypeQualifiedName(mainType); try { mainType= JavaModelUtil.findTypeInCompilationUnit(cu, mainTypeName); if (mainType == null) { IType[] types= cu.getTypes(); if (types.length > 0) mainType= types[0]; else break; } } catch (JavaModelException ex) { ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.javaElementAccess.title"), SearchMessages.getString("Search.Error.javaElementAccess.message")); break; } searchFor= TYPE; element= mainType; limitTo= REFERENCES; pattern= JavaModelUtil.getFullyQualifiedName((IType)mainType); break; case IJavaElement.CLASS_FILE: IClassFile cf= (IClassFile)element; try { mainType= cf.getType(); } catch (JavaModelException ex) { ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.javaElementAccess.title"), SearchMessages.getString("Search.Error.javaElementAccess.message")); break; } if (mainType == null)
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
break; element= mainType; searchFor= TYPE; limitTo= REFERENCES; pattern= JavaModelUtil.getFullyQualifiedName(mainType); break; case IJavaElement.FIELD: searchFor= FIELD; limitTo= REFERENCES; IType type= ((IField)element).getDeclaringType(); StringBuffer buffer= new StringBuffer(); buffer.append(JavaModelUtil.getFullyQualifiedName(type)); buffer.append('.'); buffer.append(element.getElementName()); pattern= buffer.toString(); break; case IJavaElement.METHOD: searchFor= METHOD; try { IMethod method= (IMethod)element; if (method.isConstructor()) searchFor= CONSTRUCTOR; } catch (JavaModelException ex) { ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.javaElementAccess.title"), SearchMessages.getString("Search.Error.javaElementAccess.message")); break; } limitTo= REFERENCES; pattern= PrettySignature.getMethodSignature((IMethod)element); break; }
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
if (searchFor != UNKNOWN && limitTo != UNKNOWN && pattern != null) return new SearchPatternData(searchFor, limitTo, pattern, element); return null; } private SearchPatternData trySimpleTextSelection(ISelection selection) { SearchPatternData result= null; if (selection instanceof ITextSelection) { BufferedReader reader= new BufferedReader(new StringReader(((ITextSelection)selection).getText())); String text; try { text= reader.readLine(); if (text == null) text= ""; } catch (IOException ex) { text= ""; } result= new SearchPatternData(TYPE, REFERENCES, text, null); } return result; } private SearchPatternData getDefaultInitValues() { return new SearchPatternData(TYPE, REFERENCES, "", null); } /* * Implements method from ISearchPage */ public void setContainer(ISearchPageContainer container) {
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
fContainer= container; } /** * Returns the search page's container. */ private ISearchPageContainer getContainer() { return fContainer; } /** * Returns the structured selection from the selection. */ private IStructuredSelection asStructuredSelection() { IWorkbenchWindow wbWindow= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (wbWindow != null) { IWorkbenchPage page= wbWindow.getActivePage(); if (page != null) { IWorkbenchPart part= page.getActivePart(); if (part != null) try { return SelectionConverter.getStructuredSelection(part); } catch (JavaModelException ex) { } } } return StructuredSelection.EMPTY; }
17,576
Bug 17576 JavaSearchPage.SearchPatternData must be a static class
F1 it's a non static class now, which leads to leaks: the static variable (!always a leak danger!) in JavaSearchPage contains a list of previous patterns, each holding an instance of JavaSearchPage (exactly because SearchPatternData is not static) static fields of type List + non static nested classes = trouble
verified fixed
d4c266d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T13:26:47Z
2002-05-24T08:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
/** * Returns the page settings for this Java search page. * * @return the page settings to be used */ private IDialogSettings getDialogSettings() { IDialogSettings settings= JavaPlugin.getDefault().getDialogSettings(); fDialogSettings= settings.getSection(PAGE_NAME); if (fDialogSettings == null) fDialogSettings= settings.addNewSection(PAGE_NAME); return fDialogSettings; } /** * Initializes itself from the stored page settings. */ private void readConfiguration() { IDialogSettings s= getDialogSettings(); fIsCaseSensitive= s.getBoolean(STORE_CASE_SENSITIVE); } /** * Stores it current configuration in the dialog store. */ private void writeConfiguration() { IDialogSettings s= getDialogSettings(); s.put(STORE_CASE_SENSITIVE, fIsCaseSensitive); } }
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.preferences; import java.io.BufferedReader; import java.io.IOException;
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; import org.eclipse.swt.widgets.Text; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.resource.JFaceResources;
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.AbstractTextEditor; import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor; import org.eclipse.jdt.ui.text.IJavaColorConstants; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; import org.eclipse.jdt.internal.ui.text.ContentAssistPreference; import org.eclipse.jdt.internal.ui.util.TabFolderLayout; /* * The page for setting the editor options. */ public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public static final String BOLD= "_bold"; public static final String PREF_SHOW_TEMP_PROBLEMS= "JavaEditor.ShowTemporaryProblem"; public static final String PREF_SYNC_OUTLINE_ON_CURSOR_MOVE= "JavaEditor.SyncOutlineOnCursorMove"; public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] { new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + BOLD), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + BOLD), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_KEYWORD), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_KEYWORD + 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),
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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.STRING, CompilationUnitEditor.CURRENT_LINE_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.CURRENT_LINE), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PRINT_MARGIN_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, CompilationUnitEditor.PRINT_MARGIN_COLUMN), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PRINT_MARGIN), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.LINKED_POSITION_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PROBLEM_INDICATION_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PROBLEM_INDICATION), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, JavaEditorPreferencePage.PREF_SYNC_OUTLINE_ON_CURSOR_MOVE), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS),
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.OVERVIEW_RULER), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, JavaEditor.LINE_NUMBER_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, JavaEditor.LINE_NUMBER_RULER), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.SPACES_FOR_TABS), 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), 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), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.FILL_METHOD_ARGUMENTS) }; private final String[][] fSyntaxColorListModel= new String[][] { { JavaUIMessages.getString("JavaEditorPreferencePage.multiLineComment"), IJavaColorConstants.JAVA_MULTI_LINE_COMMENT }, { JavaUIMessages.getString("JavaEditorPreferencePage.singleLineComment"), IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT }, { JavaUIMessages.getString("JavaEditorPreferencePage.keywords"), IJavaColorConstants.JAVA_KEYWORD }, { JavaUIMessages.getString("JavaEditorPreferencePage.strings"), IJavaColorConstants.JAVA_STRING }, { JavaUIMessages.getString("JavaEditorPreferencePage.others"), IJavaColorConstants.JAVA_DEFAULT },
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocKeywords"), IJavaColorConstants.JAVADOC_KEYWORD }, { JavaUIMessages.getString("JavaEditorPreferencePage.javaDocHtmlTags"), IJavaColorConstants.JAVADOC_TAG }, { JavaUIMessages.getString("JavaEditorPreferencePage.javaDocLinks"), IJavaColorConstants.JAVADOC_LINK }, { JavaUIMessages.getString("JavaEditorPreferencePage.javaDocOthers"), IJavaColorConstants.JAVADOC_DEFAULT } }; private final String[][] fAppearanceColorListModel= new String[][] { {JavaUIMessages.getString("JavaEditorPreferencePage.lineNumberForegroundColor"), JavaEditor.LINE_NUMBER_COLOR}, {JavaUIMessages.getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"), CompilationUnitEditor.MATCHING_BRACKETS_COLOR}, {JavaUIMessages.getString("JavaEditorPreferencePage.currentLineHighlighColor"), CompilationUnitEditor.CURRENT_LINE_COLOR}, {JavaUIMessages.getString("JavaEditorPreferencePage.problemsHighlightColor"), CompilationUnitEditor.PROBLEM_INDICATION_COLOR}, {JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColor2"), CompilationUnitEditor.PRINT_MARGIN_COLOR}, {JavaUIMessages.getString("JavaEditorPreferencePage.findScopeColor2"), AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE}, {JavaUIMessages.getString("JavaEditorPreferencePage.linkedPositionColor2"), CompilationUnitEditor.LINKED_POSITION_COLOR}, }; private OverlayPreferenceStore fOverlayStore; private JavaTextTools fJavaTextTools; private Map fColorButtons= new HashMap(); private SelectionListener fColorButtonListener= new SelectionListener() { 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();
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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 ArrayList fNumberFields= new ArrayList(); private ModifyListener fNumberFieldListener= new ModifyListener() { public void modifyText(ModifyEvent e) { numberFieldChanged((Text) e.widget); } }; private WorkbenchChainedTextFontFieldEditor fFontEditor; private List fSyntaxColorList; private List fAppearanceColorList; private ColorEditor fSyntaxForegroundColorEditor; private ColorEditor fAppearanceForegroundColorEditor; private ColorEditor fBackgroundColorEditor; private Button fBackgroundDefaultRadioButton;
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private Button fBackgroundCustomRadioButton; private Button fBackgroundColorButton; private Button fBoldCheckBox; private SourceViewer fPreviewViewer; private Color fBackgroundColor; public JavaEditorPreferencePage() { setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description")); setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore()); fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys); } public static void initDefaults(IPreferenceStore store) { /* * Ensure that the display is accessed only in the UI thread. * Ensure that there are no side effects of switching the thread. */ final RGB[] rgbs= new RGB[3]; final Display display= Display.getDefault(); display.syncExec(new Runnable() { public void run() { Color c= display.getSystemColor(SWT.COLOR_GRAY); rgbs[0]= c.getRGB(); c= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); rgbs[1]= c.getRGB(); c= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); rgbs[2]= c.getRGB(); } });
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
/* * Go on in whatever thread this is. */ store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true); PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, rgbs[0]); store.setDefault(CompilationUnitEditor.CURRENT_LINE, true); PreferenceConverter.setDefault(store, CompilationUnitEditor.CURRENT_LINE_COLOR, new RGB(225, 235, 224)); store.setDefault(CompilationUnitEditor.PRINT_MARGIN, false); store.setDefault(CompilationUnitEditor.PRINT_MARGIN_COLUMN, 80); PreferenceConverter.setDefault(store, CompilationUnitEditor.PRINT_MARGIN_COLOR, new RGB(176, 180 , 185)); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE, new RGB(185, 176 , 180)); store.setDefault(CompilationUnitEditor.PROBLEM_INDICATION, true); PreferenceConverter.setDefault(store, CompilationUnitEditor.PROBLEM_INDICATION_COLOR, new RGB(255, 0 , 128)); store.setDefault(JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS, true); store.setDefault(JavaEditorPreferencePage.PREF_SYNC_OUTLINE_ON_CURSOR_MOVE, false); store.setDefault(CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS, true); store.setDefault(CompilationUnitEditor.OVERVIEW_RULER, true); store.setDefault(JavaEditor.LINE_NUMBER_RULER, false); PreferenceConverter.setDefault(store, JavaEditor.LINE_NUMBER_COLOR, new RGB(0, 0, 0)); WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setDefault(store, CompilationUnitEditor.LINKED_POSITION_COLOR, new RGB(0, 200 , 100)); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, rgbs[1]); store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, rgbs[2]); store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true); store.setDefault(JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4); store.setDefault(CompilationUnitEditor.SPACES_FOR_TABS, false); 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); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_KEYWORD, new RGB(127, 0, 85)); store.setDefault(IJavaColorConstants.JAVA_KEYWORD + "_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));
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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, true); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); 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, true); store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false); store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false); store.setDefault(ContentAssistPreference.ADD_IMPORT, true); store.setDefault(ContentAssistPreference.FILL_METHOD_ARGUMENTS, false); } /* * @see IWorkbenchPreferencePage#init() */ public void init(IWorkbench workbench) { } /*
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
* @see PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { super.createControl(parent); WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE); } private void handleSyntaxColorListSelection() { int i= fSyntaxColorList.getSelectionIndex(); String key= fSyntaxColorListModel[i][1]; RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); fSyntaxForegroundColorEditor.setColorValue(rgb); fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD)); } private void handleAppearanceColorListSelection() { int i= fAppearanceColorList.getSelectionIndex(); String key= fAppearanceColorListModel[i][1]; RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); fAppearanceForegroundColorEditor.setColorValue(rgb); } private Control createColorPage(Composite parent) { Composite colorComposite= new Composite(parent, SWT.NULL); colorComposite.setLayout(new GridLayout()); Composite backgroundComposite= new Composite(colorComposite, SWT.NULL); backgroundComposite.setLayout(new RowLayout()); Label label= new Label(backgroundComposite, SWT.NULL); label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.backgroundColor")); SelectionListener backgroundSelectionListener= new SelectionListener() { public void widgetSelected(SelectionEvent e) {
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
boolean custom= fBackgroundCustomRadioButton.getSelection(); fBackgroundColorButton.setEnabled(custom); fOverlayStore.setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom); } public void widgetDefaultSelected(SelectionEvent e) {} }; fBackgroundDefaultRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); fBackgroundDefaultRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.systemDefault")); fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener); fBackgroundCustomRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); fBackgroundCustomRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.custom")); fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener); fBackgroundColorEditor= new ColorEditor(backgroundComposite); fBackgroundColorButton= fBackgroundColorEditor.getButton(); label= new Label(colorComposite, SWT.LEFT); label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.foreground")); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite editorComposite= new Composite(colorComposite, SWT.NONE); 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); fSyntaxColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER); gd= new GridData(GridData.FILL_BOTH); gd.heightHint= convertHeightInCharsToPixels(5); fSyntaxColorList.setLayoutData(gd);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
Composite stylesComposite= new Composite(editorComposite, SWT.NONE); 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); label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color")); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; label.setLayoutData(gd); fSyntaxForegroundColorEditor= new ColorEditor(stylesComposite); Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton(); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; foregroundColorButton.setLayoutData(gd); label= new Label(stylesComposite, SWT.LEFT); label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.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);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.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); fSyntaxColorList.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { handleSyntaxColorListSelection(); } }); foregroundColorButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fSyntaxColorList.getSelectionIndex(); String key= fSyntaxColorListModel[i][1]; PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue()); } }); fBackgroundColorButton.addSelectionListener(new SelectionListener() {
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { PreferenceConverter.setValue(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, fBackgroundColorEditor.getColorValue()); } }); fBoldCheckBox.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fSyntaxColorList.getSelectionIndex(); String key= fSyntaxColorListModel[i][1]; fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection()); } }); return colorComposite; } private Control createPreviewer(Composite parent) { fJavaTextTools= new JavaTextTools(fOverlayStore); fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null)); fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); fPreviewViewer.setEditable(false);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
initializeViewerColors(fPreviewViewer); 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) { String p= event.getProperty(); if (p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND) || p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)) { initializeViewerColors(fPreviewViewer); } fPreviewViewer.invalidateTextPresentation(); } }); return fPreviewViewer.getControl(); } /** * Initializes the given viewer's colors. * * @param viewer the viewer to be initialized
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
*/ private void initializeViewerColors(ISourceViewer viewer) { IPreferenceStore store= fOverlayStore; if (store != null) { StyledText styledText= viewer.getTextWidget(); Color color= store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT) ? null : createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay()); styledText.setBackground(color); if (fBackgroundColor != null) fBackgroundColor.dispose(); fBackgroundColor= color; } } /** * Creates a color from the information stored in the given preference store. * Returns <code>null</code> if there is no such information available. */ private Color createColor(IPreferenceStore store, String key, Display display) { RGB rgb= null; if (store.contains(key)) {
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
if (store.isDefault(key)) rgb= PreferenceConverter.getDefaultColor(store, key); else rgb= PreferenceConverter.getColor(store, key); if (rgb != null) return new Color(display, rgb); } return null; } private static void setEnabled(Control control, boolean enable) { control.setEnabled(enable); if (control instanceof Composite) { Composite composite= (Composite) control; Control[] children= composite.getChildren(); for (int i= 0; i < children.length; i++) setEnabled(children[i], enable); } } private Control createBehaviorPage(Composite parent) { Composite behaviorComposite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 2; behaviorComposite.setLayout(layout); String label= JavaUIMessages.getString("JavaEditorPreferencePage.textFont"); addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label= JavaUIMessages.getString("JavaEditorPreferencePage.displayedTabWidth"); addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 3, 0, true); label= JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColumn"); addTextField(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN_COLUMN, 3, 0, true); label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.SPACES_FOR_TABS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showProblemsBeforeCompiling"); addCheckBox(behaviorComposite, label, CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightProblems"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.PROBLEM_INDICATION, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showQuickFixables"); addCheckBox(behaviorComposite, label, JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.synchronizeOnCursor"); addCheckBox(behaviorComposite, label, JavaEditorPreferencePage.PREF_SYNC_OUTLINE_ON_CURSOR_MOVE, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showOverviewRuler"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.OVERVIEW_RULER, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showLineNumbers"); addCheckBox(behaviorComposite, label, JavaEditor.LINE_NUMBER_RULER, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightMatchingBrackets"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightCurrentLine"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.CURRENT_LINE, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showPrintMargin"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN, 0);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
Label l= new Label(behaviorComposite, SWT.LEFT); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 2; l.setLayoutData(gd); l= new Label(behaviorComposite, SWT.LEFT); l.setText(JavaUIMessages.getString("JavaEditorPreferencePage.appearanceOptions")); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 2; l.setLayoutData(gd); Composite editorComposite= new Composite(behaviorComposite, SWT.NONE); layout= new GridLayout(); layout.numColumns= 2; layout.marginHeight= 0; layout.marginWidth= 0; editorComposite.setLayout(layout); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL); gd.horizontalSpan= 2; editorComposite.setLayoutData(gd); fAppearanceColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER); gd= new GridData(GridData.FILL_BOTH); gd.heightHint= convertHeightInCharsToPixels(5); fAppearanceColorList.setLayoutData(gd); Composite stylesComposite= new Composite(editorComposite, SWT.NONE); layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; stylesComposite.setLayout(layout);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); l= new Label(stylesComposite, SWT.LEFT); l.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color")); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; l.setLayoutData(gd); fAppearanceForegroundColorEditor= new ColorEditor(stylesComposite); Button foregroundColorButton= fAppearanceForegroundColorEditor.getButton(); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; foregroundColorButton.setLayoutData(gd); fAppearanceColorList.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { handleAppearanceColorListSelection(); } }); foregroundColorButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fAppearanceColorList.getSelectionIndex(); String key= fAppearanceColorListModel[i][1]; PreferenceConverter.setValue(fOverlayStore, key, fAppearanceForegroundColorEditor.getColorValue()); }
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
}); 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= JavaUIMessages.getString("JavaEditorPreferencePage.insertSingleProposalsAutomatically"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.showOnlyProposalsVisibleInTheInvocationContext"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.presentProposalsInAlphabeticalOrder"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.enableAutoActivation"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.automaticallyAddImportInsteadOfQualifiedName"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.fillArgumentNamesOnMethodCompletion"); addCheckBox(contentAssistComposite, label, ContentAssistPreference.FILL_METHOD_ARGUMENTS, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationDelay"); addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJava");
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 4, 0, false); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJavaDoc"); addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 4, 0, false); label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForCompletionProposals"); addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForCompletionProposals"); addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForMethodParameters"); addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForMethodParameters"); addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0); return contentAssistComposite; } /* * @see PreferencePage#createContents(Composite) */ protected Control createContents(Composite parent) { fOverlayStore.load(); fOverlayStore.start(); TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout());
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item= new TabItem(folder, SWT.NONE); item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.general")); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createBehaviorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.colors")); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createColorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.codeAssist")); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createContentAssistPage(folder)); initialize(); return folder; } private void initialize() { fFontEditor.setPreferenceStore(getPreferenceStore()); fFontEditor.setPreferencePage(this); fFontEditor.load(); initializeFields();
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
for (int i= 0; i < fSyntaxColorListModel.length; i++) fSyntaxColorList.add(fSyntaxColorListModel[i][0]); fSyntaxColorList.getDisplay().asyncExec(new Runnable() { public void run() { fSyntaxColorList.select(0); handleSyntaxColorListSelection(); } }); for (int i= 0; i < fAppearanceColorListModel.length; i++) fAppearanceColorList.add(fAppearanceColorListModel[i][0]); fAppearanceColorList.getDisplay().asyncExec(new Runnable() { public void run() { fAppearanceColorList.select(0); handleAppearanceColorListSelection(); } }); } 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);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
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)); } RGB rgb= PreferenceConverter.getColor(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND); fBackgroundColorEditor.setColorValue(rgb); boolean default_= fOverlayStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT); fBackgroundDefaultRadioButton.setSelection(default_); fBackgroundCustomRadioButton.setSelection(!default_); fBackgroundColorButton.setEnabled(!default_); } /* * @see PreferencePage#performOk() */ public boolean performOk() { fFontEditor.store();
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fOverlayStore.propagate(); JavaPlugin.getDefault().savePluginPreferences(); return true; } /* * @see PreferencePage#performDefaults() */ protected void performDefaults() { fFontEditor.loadDefault(); fOverlayStore.loadDefaults(); initializeFields(); handleSyntaxColorListSelection(); handleAppearanceColorListSelection(); super.performDefaults(); fPreviewViewer.invalidateTextPresentation(); } /* * @see DialogPage#dispose() */ public void dispose() { if (fJavaTextTools != null) { fJavaTextTools= null; }
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fFontEditor.setPreferencePage(null); fFontEditor.setPreferenceStore(null); if (fOverlayStore != null) { fOverlayStore.stop(); fOverlayStore= null; } super.dispose(); } private Control addColorButton(Composite composite, String label, String key, int indentation) { Label labelControl= new Label(composite, SWT.NONE); labelControl.setText(label); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); ColorEditor editor= new ColorEditor(composite); Button button= editor.getButton(); button.setData(editor); gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); button.setLayoutData(gd); button.addSelectionListener(fColorButtonListener); fColorButtons.put(editor, key); return composite;
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} private Button addCheckBox(Composite parent, String label, String key, int indentation) { Button checkBox= new Button(parent, SWT.CHECK); checkBox.setText(label); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalIndent= indentation; gd.horizontalSpan= 2; checkBox.setLayoutData(gd); checkBox.addSelectionListener(fCheckBoxListener); fCheckBoxes.put(checkBox, key); return checkBox; } private Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) { Label labelControl= new Label(composite, SWT.NONE); labelControl.setText(label); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE); gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.widthHint= convertWidthInCharsToPixels(textLimit + 1); textControl.setLayoutData(gd); textControl.setTextLimit(textLimit);
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fTextFields.put(textControl, key); if (isNumber) { fNumberFields.add(textControl); textControl.addModifyListener(fNumberFieldListener); } else { textControl.addModifyListener(fTextFieldListener); } return composite; } private void addTextFontEditor(Composite parent, String label, String key) { Composite editorComposite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 3; editorComposite.setLayout(layout); fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite); fFontEditor.setChangeButtonText(JavaUIMessages.getString("JavaEditorPreferencePage.change")); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); 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;
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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(); } private void numberFieldChanged(Text textControl) { String number= textControl.getText(); IStatus status= validatePositiveNumber(number); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue((String) fTextFields.get(textControl), number); updateStatus(status); } private IStatus validatePositiveNumber(String number) { StatusInfo status= new StatusInfo(); if (number.length() == 0) { status.setError(JavaUIMessages.getString("JavaEditorPreferencePage.empty_input")); } else { try {
17,317
Bug 17317 Preference Pages taller than the screen 1024x768
build 20020521 The preference pages is to big to fit on the screen 1024x768 1) Go on the menu: Windows -> Preferences 2) Look the page Java->Editor (First Tab: Appearance) When the preference page comes out it is big than the screen, so I have to resize (or move) it in order to reach the Button Close, for instance. For the Java->Editor, when I resize it the Table on bottom ("Appearance color options") is hidden, so I have to be dacing with the preference page resizing and moving when I need to change some thing. I guess there to many option on the same page, test replace the table by a Combo, or split the options on one more tabpage. Note, you cannot see the problem on Windows, have to be Motif since the Motif borders and trims are bigger than windows.
verified fixed
ed38095
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:28:19Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
int value= Integer.parseInt(number); if (value < 0) status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); } catch (NumberFormatException e) { status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); } } return status; } private void updateStatus(IStatus status) { if (!status.matches(IStatus.ERROR)) { for (int i= 0; i < fNumberFields.size(); i++) { Text text= (Text) fNumberFields.get(i); IStatus s= validatePositiveNumber(text.getText()); status= StatusUtil.getMoreSevere(s, status); } } setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); } public static boolean showTempProblems() { return JavaPlugin.getDefault().getPreferenceStore().getBoolean(JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS); } static public boolean synchronizeOutlineOnCursorMove() { return JavaPlugin.getDefault().getPreferenceStore().getBoolean(PREF_SYNC_OUTLINE_ON_CURSOR_MOVE); } }
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.browsing; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.IWorkingCopy; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup; import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter; import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer; import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter; import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener; import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput; import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput; import org.eclipse.jdt.internal.ui.packageview.PackagesMessages; import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter; import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter; import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.util.JavaUIHelp; import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.StandardJavaElementContentProvider; import org.eclipse.jdt.ui.actions.BuildActionGroup; import org.eclipse.jdt.ui.actions.CCPActionGroup; import org.eclipse.jdt.ui.actions.CustomFiltersActionGroup; import org.eclipse.jdt.ui.actions.GenerateActionGroup; import org.eclipse.jdt.ui.actions.ImportActionGroup;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup; import org.eclipse.jdt.ui.actions.OpenEditorActionGroup; import org.eclipse.jdt.ui.actions.OpenViewActionGroup; import org.eclipse.jdt.ui.actions.RefactorActionGroup; import org.eclipse.jdt.ui.actions.ShowActionGroup; 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.text.ITextSelection; import org.eclipse.jface.util.Assert; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.ILabelDecorator; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IOpenListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.OpenEvent; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSource;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.swt.dnd.DragSourceEvent; import org.eclipse.swt.dnd.Transfer; 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.Menu; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.IWorkingSetManager; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.NewWizardMenu; import org.eclipse.ui.part.ResourceTransfer; import org.eclipse.ui.part.ViewPart; abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
private ILabelProvider fLabelProvider; private ILabelProvider fTitleProvider; private StructuredViewer fViewer; private IMemento fMemento; private JavaElementTypeComparator fTypeComparator; private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup; private boolean fHasWorkingSetFilter= true; private OpenEditorActionGroup fOpenEditorGroup; private CCPActionGroup fCCPActionGroup; private BuildActionGroup fBuildActionGroup; protected CompositeActionGroup fActionGroups; private CustomFiltersActionGroup fCustomFiltersActionGroup; private Menu fContextMenu; private IWorkbenchPart fPreviousSelectionProvider; private Object fPreviousSelectedElement; /*
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
* Ensure selection changed events being processed only if * initiated by user interaction with this part. */ private boolean fProcessSelectionEvents= true; private IPartListener fPartListener= new IPartListener() { public void partActivated(IWorkbenchPart part) { setSelectionFromEditor(part); } public void partBroughtToTop(IWorkbenchPart part) { } public void partClosed(IWorkbenchPart part) { } public void partDeactivated(IWorkbenchPart part) { } public void partOpened(IWorkbenchPart part) { } }; /* * Implements method from IViewPart. */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); fMemento= memento; } /* * Implements method from IViewPart. */ public void saveState(IMemento memento) { if (fViewer == null) {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (fMemento != null) memento.putMemento(fMemento); return; } if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup.saveState(memento); fCustomFiltersActionGroup.saveState(memento); } protected void restoreState(IMemento memento) { if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup.restoreState(memento); fCustomFiltersActionGroup.restoreState(memento); } /** * Creates the search list inner viewer. */ public void createPartControl(Composite parent) { Assert.isTrue(fViewer == null); fTypeComparator= new JavaElementTypeComparator(); fViewer= createViewer(parent); fLabelProvider= createLabelProvider(); ILabelDecorator decorationMgr= PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(); fViewer.setLabelProvider(new DecoratingLabelProvider(fLabelProvider, decorationMgr)); fViewer.setSorter(new JavaElementSorter()); fViewer.setUseHashlookup(true); fTitleProvider= createTitleProvider(); MenuManager menuMgr= new MenuManager("#PopupMenu");
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(this); fContextMenu= menuMgr.createContextMenu(fViewer.getControl()); fViewer.getControl().setMenu(fContextMenu); getSite().registerContextMenu(menuMgr, fViewer); getSite().setSelectionProvider(fViewer); createActions(); addKeyListener(); fCustomFiltersActionGroup= new CustomFiltersActionGroup(this, fViewer); if (fMemento != null) restoreState(fMemento); fMemento= null; getSite().setSelectionProvider(fViewer); IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager(); fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager)); hookViewerListeners(); addFilters(); fViewer.setContentProvider(createContentProvider()); setInitialInput(); initDragAndDrop();
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setInitialSelection(); getViewSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this); getViewSite().getPage().addPartListener(fPartListener); fillActionBars(); setHelp(); } private void initDragAndDrop() { int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance(), ResourceTransfer.getInstance()}; TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] { new SelectionTransferDropAdapter(fViewer) }; fViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners)); Control control= fViewer.getControl(); TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] { new SelectionTransferDragAdapter(fViewer), new ResourceTransferDragAdapter(fViewer) }; DragSource source= new DragSource(control, ops);
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
source.addDragListener(new DelegatingDragAdapter(dragListeners) { public void dragStart(DragSourceEvent event) { IStructuredSelection selection= (IStructuredSelection)getSelectionProvider().getSelection(); for (Iterator iter= selection.iterator(); iter.hasNext(); ) { if (iter.next() instanceof IMember) { setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)}); break; } } super.dragStart(event); } }); } protected void fillActionBars() { IActionBars actionBars= getViewSite().getActionBars(); IToolBarManager toolBar= actionBars.getToolBarManager(); fillToolBar(toolBar); if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup.fillActionBars(getViewSite().getActionBars()); actionBars.updateActionBars(); fActionGroups.fillActionBars(actionBars); fCustomFiltersActionGroup.fillActionBars(actionBars); }
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
public void setFocus() { fViewer.getControl().setFocus(); } public void dispose() { if (fViewer != null) { getViewSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this); getViewSite().getPage().removePartListener(fPartListener); fViewer= null; } if (fActionGroups != null) fActionGroups.dispose(); super.dispose(); } /** * Adds the KeyListener */ protected void addKeyListener() { fViewer.getControl().addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent event) { handleKeyReleased(event); } }); } protected void handleKeyReleased(KeyEvent event) { if (event.stateMask != 0) return;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
int key= event.keyCode; IAction action; if (key == SWT.F5) { action= fBuildActionGroup.getRefreshAction(); if (action.isEnabled()) action.run(); } if (event.character == SWT.DEL) { action= fCCPActionGroup.getDeleteAction(); if (action.isEnabled()) action.run(); } } protected void fillToolBar(IToolBarManager tbm) { } /** * Called when the context menu is about to open. * Override to add your own context dependent menu contributions. */ public void menuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection(); int size= selection.size(); Object element= selection.getFirstElement(); IJavaElement jElement= element instanceof IJavaElement ? (IJavaElement)element : null;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (size == 0 || (size == 1 && (isNewTarget(jElement) || element instanceof IContainer))) { MenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new")); menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false); } if (size == 1) addOpenNewWindowAction(menu, element); fActionGroups.setContext(new ActionContext(selection)); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); } private boolean isNewTarget(IJavaElement element) { if (element == null) return false; int type= element.getElementType(); return type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.COMPILATION_UNIT || type == IJavaElement.TYPE; } private void addOpenNewWindowAction(IMenuManager menu, Object element) { if (element instanceof IJavaElement) { try { element= ((IJavaElement)element).getCorrespondingResource(); } catch(JavaModelException e) { } } if (!(element instanceof IContainer))
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return; menu.appendToGroup( IContextMenuConstants.GROUP_OPEN, new PatchedOpenInNewWindowAction(getSite().getWorkbenchWindow(), (IContainer)element)); } protected void createActions() { fActionGroups= new CompositeActionGroup(new ActionGroup[] { fOpenEditorGroup= new OpenEditorActionGroup(this), new OpenViewActionGroup(this), new ShowActionGroup(this), fCCPActionGroup= new CCPActionGroup(this), new RefactorActionGroup(this), new ImportActionGroup(this), new GenerateActionGroup(this), fBuildActionGroup= new BuildActionGroup(this), new JavaSearchActionGroup(this)}); String viewId= getConfigurationElement().getAttribute("id"); Assert.isNotNull(viewId); IPropertyChangeListener titleUpdater= new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { String property= event.getProperty(); if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property)) updateTitle(); } }; if (fHasWorkingSetFilter) fWorkingSetFilterActionGroup= new WorkingSetFilterActionGroup(fViewer, viewId, getShell(), titleUpdater); }
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
/** * Returns the shell to use for opening dialogs. * Used in this class, and in the actions. */ private Shell getShell() { return fViewer.getControl().getShell(); } protected final Display getDisplay() { return fViewer.getControl().getDisplay(); } /** * Returns the selection provider. */ ISelectionProvider getSelectionProvider() { return fViewer; } /** * Answers if the given <code>element</code> is a valid * input for this part. * * @param element the object to test * @return <true> if the given element is a valid input */ abstract protected boolean isValidInput(Object element); /** * Answers if the given <code>element</code> is a valid * element for this part. * * @param element the object to test * @return <true> if the given element is a valid element
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
*/ protected boolean isValidElement(Object element) { if (element == null) return false; element= getSuitableJavaElement(element); if (element == null) return false; Object input= getViewer().getInput(); if (input == null) return false; if (input instanceof Collection) return ((Collection)input).contains(element); else return input.equals(element); } private boolean isInputResetBy(Object newInput, Object input, IWorkbenchPart part) { if (newInput == null) return part == fPreviousSelectionProvider; if (input instanceof IJavaElement && newInput instanceof IJavaElement) return getTypeComparator().compare(newInput, input) > 0; else return false; } private boolean isInputResetBy(IWorkbenchPart part) { if (!(part instanceof JavaBrowsingPart)) return true; Object thisInput= getViewer().getInput(); Object partInput= ((JavaBrowsingPart)part).getViewer().getInput(); if (thisInput instanceof IJavaElement && partInput instanceof IJavaElement)
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return getTypeComparator().compare(partInput, thisInput) > 0; else return true; } protected boolean isAncestorOf(Object ancestor, Object element) { if (element instanceof IJavaElement && ancestor instanceof IJavaElement) return !element.equals(ancestor) && internalIsAncestorOf((IJavaElement)ancestor, (IJavaElement)element); return false; } private boolean internalIsAncestorOf(IJavaElement ancestor, IJavaElement element) { if (element != null) return element.equals(ancestor) || internalIsAncestorOf(ancestor, element.getParent()); else return false; } public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (!fProcessSelectionEvents || part == this || !(selection instanceof IStructuredSelection)) return; Object selectedElement= getSingleElementFromSelection(selection); if (selectedElement != null && part.equals(fPreviousSelectionProvider) && selectedElement.equals(fPreviousSelectedElement)) return; fPreviousSelectedElement= selectedElement; Object currentInput= (IJavaElement)getViewer().getInput(); if (selectedElement != null && selectedElement.equals(currentInput)) {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
IJavaElement elementToSelect= findElementToSelect(getSingleElementFromSelection(selection)); if (elementToSelect != null && getTypeComparator().compare(selectedElement, elementToSelect) < 0) setSelection(new StructuredSelection(elementToSelect), true); fPreviousSelectionProvider= part; return; } if (part != fPreviousSelectionProvider && selectedElement != null && !selectedElement.equals(currentInput) && isInputResetBy(selectedElement, currentInput, part)) { if (!isAncestorOf(selectedElement, currentInput)) setInput(null); fPreviousSelectionProvider= part; return; } else if (selection.isEmpty() && !isInputResetBy(part)) { fPreviousSelectionProvider= part; return; } else if (selectedElement == null && part == fPreviousSelectionProvider) { setInput(null); fPreviousSelectionProvider= part; return; } fPreviousSelectionProvider= part; if (selectedElement instanceof IJavaElement) adjustInputAndSetSelection((IJavaElement)selectedElement); else setSelection(StructuredSelection.EMPTY, true); } void setHasWorkingSetFilter(boolean state) {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
fHasWorkingSetFilter= state; } protected void setInput(Object input) { setViewerInput(input); updateTitle(); } private void setViewerInput(Object input) { fProcessSelectionEvents= false; fViewer.setInput(input); fProcessSelectionEvents= true; } void updateTitle() { setTitleToolTip(getToolTipText(fViewer.getInput())); } /** * Returns the tool tip text for the given element. */ String getToolTipText(Object element) { String result; if (!(element instanceof IResource)) { result= JavaElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS); } else { IPath path= ((IResource) element).getFullPath(); if (path.isRoot()) { result= getConfigurationElement().getAttribute("name"); } else { result= path.makeRelative().toString(); } }
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (fWorkingSetFilterActionGroup == null || fWorkingSetFilterActionGroup.getWorkingSet() == null) return result; IWorkingSet ws= fWorkingSetFilterActionGroup.getWorkingSet(); String wsstr= JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip", new String[] { ws.getName() }); if (result.length() == 0) return wsstr; return JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip2", new String[] { result, ws.getName() }); } public String getTitleToolTip() { if (fViewer == null) return super.getTitleToolTip(); return getToolTipText(fViewer.getInput()); } protected final StructuredViewer getViewer() { return fViewer; } protected ILabelProvider createLabelProvider() { return new AppearanceAwareLabelProvider( AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS, AppearanceAwareLabelProvider.getDecorators(true, null) ); } protected ILabelProvider createTitleProvider() { return new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_SMALL_ICONS); } protected final ILabelProvider getLabelProvider() { return fLabelProvider;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
} protected final ILabelProvider getTitleProvider() { return fTitleProvider; } /** * Creates the the viewer of this part. * * @param parent the parent for the viewer */ protected StructuredViewer createViewer(Composite parent) { return new ProblemTableViewer(parent, SWT.MULTI); } protected int getLabelProviderFlags() { return JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS | JavaElementLabelProvider.SHOW_SMALL_ICONS | JavaElementLabelProvider.SHOW_VARIABLE | JavaElementLabelProvider.SHOW_PARAMETERS; } /** * Adds filters the viewer of this part. */ protected void addFilters() { } /** * Creates the the content provider of this part. */ protected StandardJavaElementContentProvider createContentProvider() { return new JavaBrowsingContentProvider(true, this); } protected void setInitialInput() {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
ISelection selection= getSite().getPage().getSelection(); Object input= getSingleElementFromSelection(selection); if (!(input instanceof IJavaElement)) { input= getSite().getPage().getInput(); if (!(input instanceof IJavaElement) && input instanceof IAdaptable) input= ((IAdaptable)input).getAdapter(IJavaElement.class); } setInput(findInputForJavaElement((IJavaElement)input)); } protected void setInitialSelection() { Object input; ISelection selection= getSite().getPage().getSelection(); if (selection != null && !selection.isEmpty()) input= getSingleElementFromSelection(selection); else { input= getSite().getPage().getInput(); if (!(input instanceof IJavaElement)) { if (input instanceof IAdaptable) input= ((IAdaptable)input).getAdapter(IJavaElement.class); else return; } } if (findElementToSelect((IJavaElement)input) != null) adjustInputAndSetSelection((IJavaElement)input); }
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
final protected void setHelp() { JavaUIHelp.setHelp(fViewer, getHelpContextId()); } /** * Returns the context ID for the Help system * * @return the string used as ID for the Help context */ abstract protected String getHelpContextId(); /** * Adds additional listeners to this view. * This method can be overridden but should * call super. */ protected void hookViewerListeners() { fViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { if (!fProcessSelectionEvents) return; IWorkbenchPage page= getSite().getPage(); if (page == null) return; if (page.equals(JavaPlugin.getActivePage()) && JavaBrowsingPart.this.equals(page.getActivePart())) { linkToEditor((IStructuredSelection)event.getSelection()); } } }); fViewer.addOpenListener(new IOpenListener() { public void open(OpenEvent event) { IAction open= fOpenEditorGroup.getOpenAction();
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (open.isEnabled()) open.run(); } }); } void adjustInputAndSetSelection(IJavaElement je) { je= getSuitableJavaElement(je); IJavaElement elementToSelect= findElementToSelect(je); IJavaElement newInput= findInputForJavaElement(je); if (elementToSelect == null && !isValidInput(newInput)) setInput(null); else if (elementToSelect == null || getViewer().testFindItem(elementToSelect) == null) setInput(findInputForJavaElement(je)); if (elementToSelect != null) setSelection(new StructuredSelection(elementToSelect), true); else setSelection(StructuredSelection.EMPTY, true); } /** * Finds the closest Java element which can be used as input for * this part and has the given Java element as child * * @param je the Java element for which to search the closest input * @return the closest Java element used as input for this part */ protected IJavaElement findInputForJavaElement(IJavaElement je) { if (je == null || !je.exists())
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return null; if (isValidInput(je)) return je; return findInputForJavaElement(je.getParent()); } final protected IJavaElement findElementToSelect(Object obj) { if (obj instanceof IJavaElement) return findElementToSelect((IJavaElement)obj); return null; } /** * Finds the element which has to be selected in this part. * * @param je the Java element which has the focus */ abstract protected IJavaElement findElementToSelect(IJavaElement je); private Object getSingleElementFromSelection(ISelection selection) { if (!(selection instanceof StructuredSelection) || selection.isEmpty()) return null; Iterator iter= ((StructuredSelection)selection).iterator(); Object firstElement= iter.next(); if (!(firstElement instanceof IJavaElement)) { if (firstElement instanceof IAdaptable) return (IJavaElement)((IAdaptable)firstElement).getAdapter(IJavaElement.class); else return firstElement;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
} Object currentInput= (IJavaElement)getViewer().getInput(); if (currentInput == null || !currentInput.equals(findInputForJavaElement((IJavaElement)firstElement))) if (iter.hasNext()) return null; else return firstElement; while (iter.hasNext()) { Object element= iter.next(); if (!(element instanceof IJavaElement)) return null; if (!currentInput.equals(findInputForJavaElement((IJavaElement)element))) return null; } return firstElement; } /** * Gets the typeComparator. * @return Returns a JavaElementTypeComparator */ protected Comparator getTypeComparator() { return fTypeComparator; } /** * Links to editor (if option enabled) */ private void linkToEditor(IStructuredSelection selection) {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
Object obj= selection.getFirstElement(); Object element= null; if (selection.size() == 1) { IEditorPart part= EditorUtility.isOpenInEditor(obj); if (part != null) { IWorkbenchPage page= getSite().getPage(); page.bringToTop(part); if (obj instanceof IJavaElement) EditorUtility.revealInEditor(part, (IJavaElement) obj); } } } private void setSelectionFromEditor(IWorkbenchPart part) { if (part == null) return; IWorkbenchPartSite site= part.getSite(); if (site == null) return; ISelectionProvider provider= site.getSelectionProvider(); if (provider != null) setSelectionFromEditor(part, provider.getSelection()); } private void setSelectionFromEditor(IWorkbenchPart part, ISelection selection) { if (part instanceof IEditorPart && JavaBasePreferencePage.linkBrowsingViewSelectionToEditor()) { IEditorInput ei= ((IEditorPart)part).getEditorInput(); if (selection instanceof ITextSelection) { int offset= ((ITextSelection)selection).getOffset(); IJavaElement element= getElementForInputAt(ei, offset); if (element != null) { adjustInputAndSetSelection(element);
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return; } } if (ei instanceof IFileEditorInput) { IFile file= ((IFileEditorInput)ei).getFile(); IJavaElement je= (IJavaElement)file.getAdapter(IJavaElement.class); if (je == null) { setSelection(null, false); return; } adjustInputAndSetSelection(je); } else if (ei instanceof IClassFileEditorInput) { IClassFile cf= ((IClassFileEditorInput)ei).getClassFile(); adjustInputAndSetSelection(cf); } return; } } /** * Returns the element contained in the EditorInput */ Object getElementOfInput(IEditorInput input) { if (input instanceof IClassFileEditorInput) return ((IClassFileEditorInput)input).getClassFile(); else if (input instanceof IFileEditorInput) return ((IFileEditorInput)input).getFile(); else if (input instanceof JarEntryEditorInput) return ((JarEntryEditorInput)input).getStorage(); return null;
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
} private IResource getResourceFor(Object element) { if (element instanceof IJavaElement) { if (element instanceof IWorkingCopy) { IWorkingCopy wc= (IWorkingCopy)element; IJavaElement original= wc.getOriginalElement(); if (original != null) element= original; } try { element= ((IJavaElement)element).getUnderlyingResource(); } catch (JavaModelException e) { return null; } } if (!(element instanceof IResource) || ((IResource)element).isPhantom()) { return null; } return (IResource)element; } private void setSelection(ISelection selection, boolean reveal) { if (selection != null && selection.equals(fViewer.getSelection())) return; fProcessSelectionEvents= false; fViewer.setSelection(selection, reveal); fProcessSelectionEvents= true; } /** * Tries to find the given element in a workingcopy.
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
*/ protected static IJavaElement getWorkingCopy(IJavaElement input) { try { if (input instanceof ICompilationUnit) return ((ICompilationUnit)input).findSharedWorkingCopy(JavaUI.getBufferFactory()); else return EditorUtility.getWorkingCopy(input, false); } catch (JavaModelException ex) { } return null; } /** * Returns the original element from which the specified working copy * element was created from. This is a handle only method, the * returned element may or may not exist. * * @param workingCopy the element for which to get the original * @return the original Java element or <code>null</code> if this is not a working copy element */ protected static IJavaElement getOriginal(IJavaElement workingCopy) { ICompilationUnit cu= getCompilationUnit(workingCopy); if (cu != null) return ((IWorkingCopy)cu).getOriginal(workingCopy); return null; } /** * Returns the compilation unit for the given java element. * * @param element the java element whose compilation unit is searched for * @return the compilation unit of the given java element
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
*/ protected static ICompilationUnit getCompilationUnit(IJavaElement element) { if (element == null) return null; if (element instanceof IMember) return ((IMember) element).getCompilationUnit(); int type= element.getElementType(); if (IJavaElement.COMPILATION_UNIT == type) return (ICompilationUnit) element; if (IJavaElement.CLASS_FILE == type) return null; return getCompilationUnit(element.getParent()); } /** * Converts the given Java element to one which is suitable for this * view. It takes into account wether the view shows working copies or not. * * @param element the Java element to be converted * @return an element suitable for this view */ protected IJavaElement getSuitableJavaElement(Object obj) { if (!(obj instanceof IJavaElement)) return null; IJavaElement element= (IJavaElement)obj; if (fTypeComparator.compare(element, IJavaElement.COMPILATION_UNIT) > 0) return element; if (element.getElementType() == IJavaElement.CLASS_FILE)
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return element; if (((StandardJavaElementContentProvider)getViewer().getContentProvider()).getProvideWorkingCopy()) { IJavaElement wc= getWorkingCopy(element); if (wc != null) element= wc; return element; } else { ICompilationUnit cu= getCompilationUnit(element); if (cu != null && ((IWorkingCopy)cu).isWorkingCopy()) return ((IWorkingCopy)cu).getOriginal(element); else return element; } } /** * @see JavaEditor#getElementAt(int) */ protected IJavaElement getElementForInputAt(IEditorInput input, int offset) { if (input instanceof IClassFileEditorInput) { try { return ((IClassFileEditorInput)input).getClassFile().getElementAt(offset); } catch (JavaModelException ex) { return null; } } IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); ICompilationUnit unit= manager.getWorkingCopy(input); if (unit != null) try {
17,470
Bug 17470 Lose list contents when searching from Java Browsing
When you search (eg. for references) from a method selected in the method list of java browsing perspective, you lose at a minimum the contents of the method list. This can happen in two ways: 1. The first time you run the search, you lose the project, package, and type list selections, but yet the contents of all these list remain. Note this means that although a package isn't selected, the classes for it are still in the next list. The methods list always ends up empty, however. 2. If you reselect everything and rerun the same search (note you still have the previous same search result in the search results list), you lose all selections as in (1), but the packages, types, and methods list are now all empty. What is odd is that if I simply select an item from the search results list, I don't lose selections or contents, so its not simply autoselection of the search result that's causing the selection/contents change. In fact, it appears that the selection is being changed early in the search process while the progress is still moving and before any results appear.
verified fixed
3ed8df0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T14:54:55Z
2002-05-23T18:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
unit.reconcile(); return unit.getElementAt(offset); } catch (JavaModelException ex) { } return null; } protected IType getTypeForCU(ICompilationUnit cu) { cu= (ICompilationUnit)getSuitableJavaElement(cu); IType primaryType= cu.findPrimaryType(); if (primaryType != null) return primaryType; try { IType[] types= cu.getTypes(); if (types.length > 0) return types[0]; else return null; } catch (JavaModelException ex) { return null; } } void setProcessSelectionEvents(boolean state) { fProcessSelectionEvents= state; } }
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
/******************************************************************************* * Copyright (c) 2000, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.ui.actions; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map;
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog; import org.eclipse.ui.dialogs.ISelectionStatusValidator; import org.eclipse.ui.help.WorkbenchHelp; 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.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.JavaElementImageDescriptor; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.internal.corext.codemanipulation.AddGetterSetterOperation; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil;
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
import org.eclipse.jdt.internal.corext.codemanipulation.IRequestQuery; import org.eclipse.jdt.internal.corext.codemanipulation.NameProposer; import org.eclipse.jdt.internal.corext.refactoring.util.JavaElementUtil; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.ActionMessages; import org.eclipse.jdt.internal.ui.actions.SelectionConverter; import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.preferences.CodeGenerationPreferencePage; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; /** * Create Getter and Setter for selected fields. * Will open the parent compilation unit in the editor. * The result is unsaved, so the user can decide if the * changes are acceptable. * * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> * * @since 2.0 */ public class AddGetterSetterAction extends SelectionDispatchAction {
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
private CompilationUnitEditor fEditor; private static final String dialogTitle= ActionMessages.getString("AddGetterSetterAction.error.title"); /** * Creates a new <code>AddGetterSetterAction</code>. * * @param site the site providing context information for this action */ public AddGetterSetterAction(IWorkbenchSite site) { super(site); setText(ActionMessages.getString("AddGetterSetterAction.label")); setDescription(ActionMessages.getString("AddGetterSetterAction.description")); setToolTipText(ActionMessages.getString("AddGetterSetterAction.tooltip")); WorkbenchHelp.setHelp(this, IJavaHelpContextIds.GETTERSETTER_ACTION); } /** * Creates a new <code>AddGetterSetterAction</code>. * <p> * Note: This constructor is for internal use only. Clients should not call this constructor. * </p> */ public AddGetterSetterAction(CompilationUnitEditor editor) { this(editor.getEditorSite()); fEditor= editor; }
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
/* (non-Javadoc) * Method declared on SelectionDispatchAction */ protected void selectionChanged(IStructuredSelection selection) { try { setEnabled(canEnable(selection)); } catch (JavaModelException e) { JavaPlugin.log(e); setEnabled(false); } } /* (non-Javadoc) * Method declared on SelectionDispatchAction */ protected void run(IStructuredSelection selection) { try { IField[] selectedFields= getSelectedFields(selection); if (canEnableOn(selectedFields)){ run(selectedFields[0].getDeclaringType(), selectedFields, false); return; } Object firstElement= selection.getFirstElement(); if (firstElement instanceof IType) run((IType)firstElement, new IField[0], true); else if (firstElement instanceof ICompilationUnit) run(JavaElementUtil.getMainType((ICompilationUnit)firstElement), new IField[0], true); } catch (CoreException e) { JavaPlugin.log(e.getStatus()); showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed"));
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
} } private boolean canEnable(IStructuredSelection selection) throws JavaModelException{ if (canEnableOn(getSelectedFields(selection))) return true; if ((selection.size() == 1) && (selection.getFirstElement() instanceof IType)) return canEnableOn((IType)selection.getFirstElement()); if ((selection.size() == 1) && (selection.getFirstElement() instanceof ICompilationUnit)) return canEnableOn(JavaElementUtil.getMainType((ICompilationUnit)selection.getFirstElement())); return false; } private static boolean canEnableOn(IType type) throws JavaModelException { if (type == null) return false; if (type.getFields().length == 0) return false; if (type.getCompilationUnit() == null) return false; if (JavaModelUtil.isEditable(type.getCompilationUnit())) return true; return false; } private static boolean canEnableOn(IField[] fields) throws JavaModelException { return fields != null && fields.length > 0 && JavaModelUtil.isEditable(fields[0].getCompilationUnit()); }
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
private void run(IType type, IField[] preselected, boolean filterExistingMethods) throws CoreException{ ILabelProvider lp= new AddGetterSetterLabelProvider(createNameProposer()); ITreeContentProvider cp= new AddGetterSetterContentProvider(type, filterExistingMethods); CheckedTreeSelectionDialog dialog= new CheckedTreeSelectionDialog(getShell(), lp, cp); dialog.setSorter(new JavaElementSorter()); dialog.setTitle(dialogTitle); String message= ActionMessages.getFormattedString("AddGetterSetterAction.dialog.title", JavaElementUtil.createSignature(type)); dialog.setMessage(message); dialog.setValidator(createValidator()); dialog.setContainerMode(true); dialog.setSize(60, 18); dialog.setInput(type); dialog.setExpandedElements(type.getFields()); dialog.setInitialSelections(preselected); dialog.open(); Object[] result= dialog.getResult(); if (result == null) return; IField[] getterFields= getGetterFields(result); IField[] setterFields= getSetterFields(result); generate(getterFields, setterFields); } private static ISelectionStatusValidator createValidator() { return new ISelectionStatusValidator(){ public IStatus validate(Object[] selection) { int count= countSelectedMethods(selection); if (count == 0) return new StatusInfo(IStatus.ERROR, ""); if (count == 1) return new StatusInfo(IStatus.INFO, ActionMessages.getString("AddGetterSetterAction.one_selected"));
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
String message= ActionMessages.getFormattedString("AddGetterSetterAction.methods_selected", String.valueOf(count)); return new StatusInfo(IStatus.INFO, message); } }; } private static int countSelectedMethods(Object[] selection){ int count= 0; for (int i = 0; i < selection.length; i++) { if (selection[i] instanceof GetterSetterEntry) count++; } return count; } private static IField[] getGetterFields(Object[] result){ Collection list= new ArrayList(0); for (int i = 0; i < result.length; i++) { Object each= result[i]; if ((each instanceof GetterSetterEntry)){ GetterSetterEntry entry= (GetterSetterEntry)each; if (entry.isGetterEntry) list.add(entry.field); } } return (IField[]) list.toArray(new IField[list.size()]); } private static IField[] getSetterFields(Object[] result){
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
Collection list= new ArrayList(0); for (int i = 0; i < result.length; i++) { Object each= result[i]; if ((each instanceof GetterSetterEntry)){ GetterSetterEntry entry= (GetterSetterEntry)each; if (! entry.isGetterEntry) list.add(entry.field); } } return (IField[]) list.toArray(new IField[list.size()]); } private static NameProposer createNameProposer(){ return new NameProposer(getGetterSetterPrefixes(), getGetterSetterSuffixes()); } private static String[] getGetterSetterPrefixes(){ return CodeGenerationPreferencePage.getGetterStetterPrefixes(); } private static String[] getGetterSetterSuffixes(){ return CodeGenerationPreferencePage.getGetterStetterSuffixes(); } private void generate(IField[] getterFields, IField[] setterFields) throws CoreException{ if (getterFields.length == 0 && setterFields.length == 0) return; ICompilationUnit cu= null; if (getterFields.length != 0)
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
cu= getterFields[0].getCompilationUnit(); else cu= setterFields[0].getCompilationUnit(); IEditorPart editor= EditorUtility.openInEditor(cu); IField[] workingCopyGetterFields= getWorkingCopyFields(getterFields); IField[] workingCopySetterFields= getWorkingCopyFields(setterFields); if (workingCopyGetterFields != null && workingCopySetterFields != null) run(workingCopyGetterFields, workingCopySetterFields, editor); } private IField[] getWorkingCopyFields(IField[] fields) throws CoreException{ if (fields.length == 0) return new IField[0]; ICompilationUnit cu= fields[0].getCompilationUnit(); ICompilationUnit workingCopyCU; IField[] workingCopyFields; if (cu.isWorkingCopy()) { workingCopyCU= cu; workingCopyFields= fields; } else { workingCopyCU= EditorUtility.getWorkingCopy(cu); if (workingCopyCU == null) { showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed")); return null; } workingCopyFields= new IField[fields.length]; for (int i= 0; i < fields.length; i++) {
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
IField field= fields[i]; IField workingCopyField= (IField) JavaModelUtil.findMemberInCompilationUnit(workingCopyCU, field); if (workingCopyField == null) { showError(ActionMessages.getFormattedString("AddGetterSetterAction.error.fieldNotExisting", field.getElementName())); return null; } workingCopyFields[i]= workingCopyField; } } return workingCopyFields; } /* (non-Javadoc) * Method declared on SelectionDispatchAction */ protected void selectionChanged(ITextSelection selection) { setEnabled(fEditor != null); } /* (non-Javadoc) * Method declared on SelectionDispatchAction */ protected void run(ITextSelection selection) { try { IJavaElement[] elements= SelectionConverter.codeResolve(fEditor); if (elements.length == 1 && (elements[0] instanceof IField)) { IField field= (IField)elements[0]; if (! checkCu(field)) return; run(field.getDeclaringType(), new IField[] {field}, false);
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
return; } IJavaElement element= SelectionConverter.getElementAtOffset(fEditor); if (element != null){ IType type= (IType)element.getAncestor(IJavaElement.TYPE); if (type != null){ if (! checkCu(type)) return; if (type.getFields().length > 0){ run(type, new IField[0], true); return; } } } MessageDialog.openInformation(getShell(), dialogTitle, ActionMessages.getString("AddGetterSetterAction.not_applicable")); } catch (CoreException e) { JavaPlugin.log(e.getStatus()); showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed")); } } private boolean checkCu(IMember member) throws JavaModelException{ if (JavaModelUtil.isEditable(member.getCompilationUnit())) return true; MessageDialog.openInformation(getShell(), dialogTitle, ActionMessages.getFormattedString("AddGetterSetterAction.read_only", member.getElementName())); return false; }
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
private void run(IField[] getterFields, IField[] setterFields, IEditorPart editor) { try{ AddGetterSetterOperation op= createAddGetterSetterOperation(getterFields, setterFields); new ProgressMonitorDialog(getShell()).run(false, true, new WorkbenchRunnableAdapter(op)); IMethod[] createdMethods= op.getCreatedAccessors(); if (createdMethods.length > 0) { EditorUtility.revealInEditor(editor, createdMethods[0]); } } catch (InvocationTargetException e) { JavaPlugin.log(e); showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed")); } catch (InterruptedException e) { } } private AddGetterSetterOperation createAddGetterSetterOperation(IField[] getterFields, IField[] setterFields) { IRequestQuery skipSetterForFinalQuery= skipSetterForFinalQuery(); IRequestQuery skipReplaceQuery= skipReplaceQuery(); CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); return new AddGetterSetterOperation(getterFields, setterFields, createNameProposer(), settings, skipSetterForFinalQuery, skipReplaceQuery); } private IRequestQuery skipSetterForFinalQuery() { return new IRequestQuery() { public int doQuery(IMember field) { int[] returnCodes= {IRequestQuery.YES, IRequestQuery.NO, IRequestQuery.YES_ALL, IRequestQuery.CANCEL}; String[] options= {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
String fieldName= JavaElementLabels.getElementLabel(field, 0); String formattedMessage= ActionMessages.getFormattedString("AddGetterSetterAction.SkipSetterForFinalDialog.message", fieldName); return showQueryDialog(formattedMessage, options, returnCodes); } }; } private IRequestQuery skipReplaceQuery() { return new IRequestQuery() { public int doQuery(IMember method) { int[] returnCodes= {IRequestQuery.YES, IRequestQuery.NO, IRequestQuery.YES_ALL, IRequestQuery.CANCEL}; String skipLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.skip.label"); String replaceLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.replace.label"); String skipAllLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.skipAll.label"); String[] options= { skipLabel, replaceLabel, skipAllLabel, IDialogConstants.CANCEL_LABEL}; String methodName= JavaElementLabels.getElementLabel(method, JavaElementLabels.M_PARAMETER_TYPES); String formattedMessage= ActionMessages.getFormattedString("AddGetterSetterAction.SkipExistingDialog.message", methodName); return showQueryDialog(formattedMessage, options, returnCodes); } }; } private int showQueryDialog(final String message, final String[] buttonLabels, int[] returnCodes) { final Shell shell= getShell(); if (shell == null) { JavaPlugin.logErrorMessage("AddGetterSetterAction.showQueryDialog: No active shell found"); return IRequestQuery.CANCEL; } final int[] result= { MessageDialog.CANCEL };
17,383
Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
verified fixed
b14dfd0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-27T15:11:06Z
2002-05-23T16:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
shell.getDisplay().syncExec(new Runnable() { public void run() { String title= ActionMessages.getString("AddGetterSetterAction.QueryDialog.title"); MessageDialog dialog= new MessageDialog(shell, title, null, message, MessageDialog.QUESTION, buttonLabels, 0); result[0]= dialog.open(); } }); int returnVal= result[0]; return returnVal < 0 ? IRequestQuery.CANCEL : returnCodes[returnVal]; } private void showError(String message) { MessageDialog.openError(getShell(), dialogTitle, message); } /* * Returns fields in the selection or <code>null</code> if the selection is * empty or not valid. */ private IField[] getSelectedFields(IStructuredSelection selection) { List elements= selection.toList(); int nElements= elements.size(); if (nElements > 0) { IField[] res= new IField[nElements]; ICompilationUnit cu= null; for (int i= 0; i < nElements; i++) { Object curr= elements.get(i); if (curr instanceof IField) { IField fld= (IField)curr; if (i == 0) {