issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
unknown | report_datetime
unknown | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | button.setText(fSearchForText[i]);
fSearchFor[i]= button;
}
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;
}
return result;
}
private void initSelections() {
fJavaElement= null;
ISelection selection= getSelection();
SearchPatternData values= null;
values= tryTypedTextSelection(selection);
if (values == null)
values= trySelection(selection);
if (values == null) |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | values= trySimpleTextSelection(selection);
if (values == null)
values= getDefaultInitValues();
fSearchFor[values.searchFor].setSelection(true);
fLimitTo[values.limitTo].setSelection(true);
if (values.searchFor != TYPE)
fLimitTo[IMPLEMENTORS].setEnabled(false);
fInitialPattern= values.pattern;
fPattern.setText(fInitialPattern);
fJavaElement= values.javaElement;
}
private SearchPatternData tryTypedTextSelection(ISelection selection) {
if (selection instanceof ITextSelection) {
IEditorPart e= getEditorPart();
if (e != null) {
ITextSelection ts= (ITextSelection)selection;
ICodeAssist assist= getCodeAssist(e);
if (assist != null) {
IJavaElement[] elements= null;
try {
elements= assist.codeSelect(ts.getOffset(), ts.getLength());
} catch (JavaModelException ex) {
ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createJavaElement.title"), SearchMessages.getString("Search.Error.createJavaElement.message"));
}
if (elements != null && elements.length > 0) {
if (elements.length == 1)
fJavaElement= elements[0];
else
fJavaElement= chooseFromList(elements); |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | if (fJavaElement != null)
return determineInitValuesFrom(fJavaElement);
}
}
}
}
return null;
}
private ICodeAssist getCodeAssist(IEditorPart editorPart) {
IEditorInput input= editorPart.getEditorInput();
if (input instanceof ClassFileEditorInput)
return ((ClassFileEditorInput)input).getClassFile();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
private SearchPatternData trySelection(ISelection selection) {
SearchPatternData result= null;
if (selection == null)
return result;
Object o= null;
if (selection instanceof IStructuredSelection)
o= ((IStructuredSelection)selection).getFirstElement();
if (o instanceof IJavaElement) {
fJavaElement= (IJavaElement)o;
result= determineInitValuesFrom(fJavaElement);
} else if (o instanceof ISearchResultViewEntry) {
fJavaElement= getJavaElement(((ISearchResultViewEntry)o).getSelectedMarker());
result= determineInitValuesFrom(fJavaElement);
} else if (o instanceof IAdaptable) { |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | IJavaElement element= (IJavaElement)((IAdaptable)o).getAdapter(IJavaElement.class);
if (element != null) {
result= determineInitValuesFrom(element);
} else {
IWorkbenchAdapter adapter= (IWorkbenchAdapter)((IAdaptable)o).getAdapter(IWorkbenchAdapter.class);
result= new SearchPatternData(TYPE, REFERENCES, adapter.getLabel(o), null);
}
}
return result;
}
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(); |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | break;
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; |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | String mainTypeName= element.getElementName().substring(0, element.getElementName().indexOf("."));
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;
} |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | if (mainType == null)
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; |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | 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);
}
private IJavaElement chooseFromList(IJavaElement[] openChoices) {
ILabelProvider labelProvider= new JavaElementLabelProvider(
JavaElementLabelProvider.SHOW_DEFAULT |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | | JavaElementLabelProvider.SHOW_CONTAINER_QUALIFICATION);
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setTitle(SearchMessages.getString("SearchElementSelectionDialog.title"));
dialog.setMessage(SearchMessages.getString("SearchElementSelectionDialog.message"));
dialog.setElements(openChoices);
if (dialog.open() == dialog.OK)
return (IJavaElement)dialog.getFirstResult();
return null;
}
/*
* Implements method from ISearchPage
*/
public void setContainer(ISearchPageContainer container) {
fContainer= container;
}
/**
* Returns the search page's container.
*/
private ISearchPageContainer getContainer() {
return fContainer;
}
/**
* Returns the current active selection.
*/
private ISelection getSelection() {
return fContainer.getSelection();
} |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java | /**
* Returns the current active editor part.
*/
private IEditorPart getEditorPart() {
IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page= window.getActivePage();
if (page != null)
return page.getActiveEditor();
}
return null;
}
private IJavaSearchScope getSelectedResourcesScope() {
ArrayList resources= new ArrayList(10);
if (!getSelection().isEmpty() && getSelection() instanceof IStructuredSelection) {
Iterator iter= ((IStructuredSelection)getSelection()).iterator();
while (iter.hasNext()) {
Object selection= iter.next();
if (selection instanceof IResource)
resources.add(selection);
else if (selection instanceof IAdaptable) {
IResource resource= (IResource)((IAdaptable)selection).getAdapter(IResource.class);
if (resource != null)
resources.add(resource);
}
}
}
return SearchEngine.createJavaSearchScope((IResource[])resources.toArray(new IResource[resources.size()]));
}
} |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import java.text.MessageFormat;
import java.util.HashMap;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.IInputSelectionProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchPage; |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.search.ui.IContextMenuContributor;
import org.eclipse.search.ui.ISearchResultView;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.search.IJavaSearchResultCollector;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.GroupContext;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.util.SelectionUtil;
public class JavaSearchResultCollector implements IJavaSearchResultCollector {
private static final String MATCH= SearchMessages.getString("SearchResultCollector.match");
private static final String MATCHES= SearchMessages.getString("SearchResultCollector.matches");
private static final String DONE= SearchMessages.getString("SearchResultCollector.done");
private static final String SEARCHING= SearchMessages.getString("SearchResultCollector.searching");
private static final Integer POTENTIAL_MATCH_VALUE= new Integer(POTENTIAL_MATCH);
private IProgressMonitor fMonitor;
private IContextMenuContributor fContextMenu;
private ISearchResultView fView;
private JavaSearchOperation fOperation;
private int fMatchCount= 0;
private Integer[] fMessageFormatArgs= new Integer[1];
private class ContextMenuContributor implements IContextMenuContributor { |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | public void fill(IMenuManager menu, IInputSelectionProvider inputProvider) {
JavaPlugin.createStandardGroups(menu);
new JavaSearchGroup().fill(menu, new GroupContext(inputProvider));
OpenTypeHierarchyUtil.addToMenu(getWorbenchWindow(), menu, convertSelection(inputProvider.getSelection()));
}
private Object convertSelection(ISelection selection) {
Object element= SelectionUtil.getSingleElement(selection);
if (!(element instanceof ISearchResultViewEntry))
return null;
IMarker marker= ((ISearchResultViewEntry)element).getSelectedMarker();
try {
return JavaCore.create((String) ((IMarker) marker).getAttribute(IJavaSearchUIConstants.ATT_JE_HANDLE_ID));
} catch (CoreException ex) {
ExceptionHandler.log(ex, SearchMessages.getString("Search.Error.createJavaElement.message"));
return null;
}
}
}
public JavaSearchResultCollector() {
fContextMenu= new ContextMenuContributor();
}
/**
* @see IJavaSearchResultCollector#aboutToStart().
*/
public void aboutToStart() {
fView= SearchUI.getSearchResultView();
fMatchCount= 0;
if (fView != null) { |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | fView.searchStarted(
JavaSearchPage.EXTENSION_POINT_ID,
fOperation.getDescription(),
fOperation.getImageDescriptor(),
fContextMenu,
JavaSearchResultLabelProvider.INSTANCE,
new GotoMarkerAction(),
new GroupByKeyComputer(),
fOperation);
}
if (!getProgressMonitor().isCanceled())
getProgressMonitor().subTask(SEARCHING);
}
/**
* @see IJavaSearchResultCollector#accept
*/
public void accept(IResource resource, int start, int end, IJavaElement enclosingElement, int accuracy) throws CoreException {
IMarker marker= resource.createMarker(SearchUI.SEARCH_MARKER);
HashMap attributes;
Object groupKey= enclosingElement;
if (accuracy == POTENTIAL_MATCH) {
attributes= new HashMap(6);
attributes.put(IJavaSearchUIConstants.ATT_ACCURACY, POTENTIAL_MATCH_VALUE);
if (groupKey == null)
groupKey= "?:null";
else
groupKey= "?:" + enclosingElement.getHandleIdentifier();
} else
attributes= new HashMap(5); |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | JavaCore.addJavaElementMarkerAttributes(attributes, enclosingElement);
attributes.put(IJavaSearchUIConstants.ATT_JE_HANDLE_ID, enclosingElement.getHandleIdentifier());
attributes.put(IMarker.CHAR_START, new Integer(Math.max(start, 0)));
attributes.put(IMarker.CHAR_END, new Integer(Math.max(end, 0)));
if (enclosingElement instanceof IMember && ((IMember)enclosingElement).isBinary())
attributes.put(IWorkbenchPage.EDITOR_ID_ATTR, JavaUI.ID_CF_EDITOR);
else
attributes.put(IWorkbenchPage.EDITOR_ID_ATTR, JavaUI.ID_CU_EDITOR);
marker.setAttributes(attributes);
fView.addMatch(enclosingElement.getElementName(), groupKey, resource, marker);
fMatchCount++;
if (!getProgressMonitor().isCanceled())
getProgressMonitor().subTask(getFormattedMatchesString(fMatchCount));
}
/**
* @see IJavaSearchResultCollector#done().
*/
public void done() {
if (!getProgressMonitor().isCanceled()) {
String matchesString= getFormattedMatchesString(fMatchCount);
getProgressMonitor().setTaskName(MessageFormat.format(DONE, new String[]{matchesString}));
}
if (fView != null)
fView.searchFinished();
fView= null;
fMonitor= null;
} |
5,231 | Bug 5231 Add search for field read and write references | The UI should support the following new JDT Core feature: Search for field read and field write references. Two new constants have been added on IJavaSearchConstants to be used when creating a field reference search pattern: - READ_REFERENCES: the search results contain *only* read access to a field. - WRITE_REFERENCES: the search results contain *only* write access to a field. If REFERENCES is used, then search results contain both read and write accesss to a field. | resolved fixed | 5c5661b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-26T13:56:25Z" | "2001-10-25T08:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java | /**
* @see IJavaSearchResultCollector#getProgressMonitor().
*/
public IProgressMonitor getProgressMonitor() {
return fMonitor;
};
void setProgressMonitor(IProgressMonitor pm) {
fMonitor= pm;
}
void setOperation(JavaSearchOperation operation) {
fOperation= operation;
}
private String getFormattedMatchesString(int count) {
if (fMatchCount == 1)
return MATCH;
fMessageFormatArgs[0]= new Integer(count);
return MessageFormat.format(MATCHES, fMessageFormatArgs);
}
private IWorkbenchWindow getWorbenchWindow() {
IWorkbenchWindow wbWindow= null;
if (fView != null && fView.getSite() != null)
wbWindow= fView.getSite().getWorkbenchWindow();
if (wbWindow == null)
wbWindow= JavaPlugin.getActiveWorkbenchWindow();
return wbWindow;
}
} |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.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;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Hashtable;
import org.eclipse.swt.SWT;
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.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.formatter.CodeFormatter;
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.util.TabFolderLayout;
/*
* The page for setting code formatter options
*/
public class CodeFormatterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private static final String PREF_NEWLINE_OPENING_BRACES= "org.eclipse.jdt.core.formatter.newline.openingBrace";
private static final String PREF_NEWLINE_CONTROL_STATEMENT= "org.eclipse.jdt.core.formatter.newline.controlStatement";
private static final String PREF_NEWLINE_CLEAR_ALL= "org.eclipse.jdt.core.formatter.newline.clearAll";
private static final String PREF_NEWLINE_ELSE_IF= "org.eclipse.jdt.core.formatter.newline.elseIf";
private static final String PREF_NEWLINE_EMPTY_BLOCK= "org.eclipse.jdt.core.formatter.newline.emptyBlock";
private static final String PREF_LINE_SPLIT= "org.eclipse.jdt.core.formatter.lineSplit";
private static final String PREF_STYLE_COMPACT_ASSIGNEMENT= "org.eclipse.jdt.core.formatter.style.assignment";
private static final String PREF_TAB_CHAR= "org.eclipse.jdt.core.formatter.tabulation.char";
private static final String PREF_TAB_SIZE= "org.eclipse.jdt.core.formatter.tabulation.size";
private static final String INSERT= "insert";
private static final String DO_NOT_INSERT= "do not insert";
private static final String COMPACT= "compact";
private static final String NORMAL= "normal";
private static final String TAB= "tab";
private static final String SPACE= "space"; |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private static final String CLEAR_ALL= "clear all";
private static final String PRESERVE_ONE= "preserve one";
private static String[] getAllKeys() {
return new String[] {
PREF_NEWLINE_OPENING_BRACES, PREF_NEWLINE_CONTROL_STATEMENT, PREF_NEWLINE_CLEAR_ALL,
PREF_NEWLINE_ELSE_IF, PREF_NEWLINE_EMPTY_BLOCK, PREF_LINE_SPLIT,
PREF_STYLE_COMPACT_ASSIGNEMENT, PREF_TAB_CHAR, PREF_TAB_SIZE
};
}
/**
* Gets the currently configured tab size
*/
public static int getTabSize() {
String string= (String) JavaCore.getOptions().get(PREF_TAB_SIZE);
return getIntValue(string, 4);
}
/**
* Gets the current compating assignement configuration
*/
public static boolean isCompactingAssignment() {
return COMPACT.equals(JavaCore.getOptions().get(PREF_STYLE_COMPACT_ASSIGNEMENT));
}
private static int getIntValue(String string, int dflt) {
try {
return Integer.parseInt(string); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | } catch (NumberFormatException e) {
}
return dflt;
}
/**
* Initializes the current options (read from preference store)
*/
public static void initDefaults(IPreferenceStore store) {
Hashtable hashtable= JavaCore.getDefaultOptions();
Hashtable currOptions= JavaCore.getOptions();
String[] allKeys= getAllKeys();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String defValue= (String) hashtable.get(key);
if (defValue != null) {
store.setDefault(key, defValue);
} else {
JavaPlugin.logErrorMessage("CodeFormatterPreferencePage: value is null: " + key);
}
String val= store.getString(key);
if (val != null) {
currOptions.put(key, val);
}
}
JavaCore.setOptions(currOptions);
}
private static class ControlData { |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private String fKey;
private String[] fValues;
public ControlData(String key, String[] values) {
fKey= key;
fValues= values;
}
public String getKey() {
return fKey;
}
public String getValue(boolean selection) {
int index= selection ? 0 : 1;
return fValues[index];
} |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | public String getValue(int index) {
return fValues[index];
}
public int getSelection(String value) {
for (int i= 0; i < fValues.length; i++) {
if (value.equals(fValues[i])) {
return i;
}
}
throw new IllegalArgumentException();
}
}
private Hashtable fWorkingValues;
private ArrayList fCheckBoxes;
private ArrayList fTextBoxes;
private SelectionListener fButtonSelectionListener;
private ModifyListener fTextModifyListener;
private String fPreviewText;
private IDocument fPreviewDocument;
private Text fTabSizeTextBox;
public CodeFormatterPreferencePage() {
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("CodeFormatterPreferencePage.description")); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fWorkingValues= JavaCore.getOptions();
fCheckBoxes= new ArrayList();
fTextBoxes= new ArrayList();
fButtonSelectionListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
if (!e.widget.isDisposed()) {
controlChanged((Button) e.widget);
}
}
};
fTextModifyListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
if (!e.widget.isDisposed()) {
textChanged((Text) e.widget);
}
}
};
fPreviewDocument= new Document();
fPreviewText= loadPreviewFile("CodeFormatterPreviewCode.txt");
}
/*
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
}
/* |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | * @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.CODEFORMATTER_PREFERENCE_PAGE));
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
Composite composite= new Composite(parent, SWT.NONE);
composite.setLayout(layout);
TabFolder folder= new TabFolder(composite, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
String[] insertNotInsert= new String[] { INSERT, DO_NOT_INSERT };
layout= new GridLayout();
layout.numColumns= 2;
Composite newlineComposite= new Composite(folder, SWT.NULL);
newlineComposite.setLayout(layout); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | String label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_opening_braces.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_OPENING_BRACES, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_control_statement.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_CONTROL_STATEMENT, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_clear_lines");
addCheckBox(newlineComposite, label, PREF_NEWLINE_CLEAR_ALL, new String[] { CLEAR_ALL, PRESERVE_ONE } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_else_if.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_ELSE_IF, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_empty_block.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_EMPTY_BLOCK, insertNotInsert);
layout= new GridLayout();
layout.numColumns= 2;
Composite lineSplittingComposite= new Composite(folder, SWT.NULL);
lineSplittingComposite.setLayout(layout);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.split_line.label");
addTextField(lineSplittingComposite, label, PREF_LINE_SPLIT);
layout= new GridLayout();
layout.numColumns= 2;
Composite styleComposite= new Composite(folder, SWT.NULL);
styleComposite.setLayout(layout);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.style_compact_assignement.label");
addCheckBox(styleComposite, label, PREF_STYLE_COMPACT_ASSIGNEMENT, new String[] { COMPACT, NORMAL } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_char.label");
addCheckBox(styleComposite, label, PREF_TAB_CHAR, new String[] { TAB, SPACE } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_size.label"); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fTabSizeTextBox= addTextField(styleComposite, label, PREF_TAB_SIZE);
fTabSizeTextBox.setEnabled(!usesTabs());
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.newline.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_IMPDECL));
item.setControl(newlineComposite);
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.linesplit.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(lineSplittingComposite);
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.style.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_SEARCH_REF));
item.setControl(styleComposite);
createPreview(parent);
updatePreview();
return composite;
}
private Control createPreview(Composite parent) {
SourceViewer previewViewer= new SourceViewer(parent, null, SWT.V_SCROLL);
JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();
previewViewer.configure(new JavaSourceViewerConfiguration(tools, null));
previewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
previewViewer.setEditable(false);
previewViewer.setDocument(fPreviewDocument); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | Control control= previewViewer.getControl();
control.setLayoutData(new GridData(GridData.FILL_BOTH));
return control;
}
private Button addCheckBox(Composite parent, String label, String key, String[] values) {
ControlData data= new ControlData(key, values);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
Button checkBox= new Button(parent, SWT.CHECK);
checkBox.setText(label);
checkBox.setData(data);
checkBox.setLayoutData(gd);
String currValue= (String)fWorkingValues.get(key);
checkBox.setSelection(data.getSelection(currValue) == 0);
checkBox.addSelectionListener(fButtonSelectionListener);
fCheckBoxes.add(checkBox);
return checkBox;
}
private Text addTextField(Composite parent, String label, String key) {
Label labelControl= new Label(parent, SWT.NONE);
labelControl.setText(label);
labelControl.setLayoutData(new GridData());
Text textBox= new Text(parent, SWT.BORDER | SWT.SINGLE); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | textBox.setData(key);
textBox.setLayoutData(new GridData());
String currValue= (String)fWorkingValues.get(key);
textBox.setText(String.valueOf(getIntValue(currValue, 1)));
textBox.setTextLimit(3);
textBox.addModifyListener(fTextModifyListener);
GridData gd= new GridData();
gd.widthHint= convertWidthInCharsToPixels(5);
textBox.setLayoutData(gd);
fTextBoxes.add(textBox);
return textBox;
}
private void controlChanged(Button button) {
ControlData data= (ControlData) button.getData();
boolean selection= button.getSelection();
String newValue= data.getValue(selection);
fWorkingValues.put(data.getKey(), newValue);
updatePreview();
if (PREF_TAB_CHAR.equals(data.getKey())) {
fTabSizeTextBox.setEnabled(!selection);
updateStatus(new StatusInfo());
if (selection) {
fTabSizeTextBox.setText((String)fWorkingValues.get(PREF_TAB_SIZE));
}
}
} |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private void textChanged(Text textControl) {
String key= (String) textControl.getData();
String number= textControl.getText();
IStatus status= validatePositiveNumber(number);
if (!status.matches(IStatus.ERROR)) {
fWorkingValues.put(key, number);
}
updateStatus(status);
updatePreview();
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
String[] allKeys= getAllKeys();
Hashtable actualOptions= JavaCore.getOptions();
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String val= (String) fWorkingValues.get(key);
actualOptions.put(key, val);
store.putValue(key, val);
}
JavaCore.setOptions(actualOptions);
return super.performOk();
} |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | /*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fWorkingValues= JavaCore.getDefaultOptions();
updateControls();
super.performDefaults();
}
private String loadPreviewFile(String filename) {
String separator= System.getProperty("line.separator");
StringBuffer btxt= new StringBuffer(512);
BufferedReader rin= null;
try {
rin= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
String line;
while ((line= rin.readLine()) != null) {
btxt.append(line);
btxt.append(separator);
}
} catch (IOException io) {
JavaPlugin.log(io);
} finally {
if (rin != null) {
try { rin.close(); } catch (IOException e) {}
}
}
return btxt.toString();
}
private void updatePreview() { |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fPreviewDocument.set(CodeFormatter.format(fPreviewText, 0, fWorkingValues));
}
private void updateControls() {
for (int i= fCheckBoxes.size() - 1; i >= 0; i--) {
Button curr= (Button) fCheckBoxes.get(i);
ControlData data= (ControlData) curr.getData();
String currValue= (String) fWorkingValues.get(data.getKey());
curr.setSelection(data.getSelection(currValue) == 0);
}
for (int i= fTextBoxes.size() - 1; i >= 0; i--) {
Text curr= (Text) fTextBoxes.get(i);
String key= (String) curr.getData();
String currValue= (String) fWorkingValues.get(key);
curr.setText(currValue);
}
fTabSizeTextBox.setEnabled(!usesTabs());
}
private IStatus validatePositiveNumber(String number) {
StatusInfo status= new StatusInfo();
if (number.length() == 0) {
status.setError(JavaUIMessages.getString("CodeFormatterPreferencePage.empty_input"));
} else {
try {
int value= Integer.parseInt(number);
if (value < 0) {
status.setError(JavaUIMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number)); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | }
} catch (NumberFormatException e) {
status.setError(JavaUIMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number));
}
}
return status;
}
private void updateStatus(IStatus status) {
if (!status.matches(IStatus.ERROR)) {
for (int i= 0; i < fTextBoxes.size(); i++) {
Text curr= (Text) fTextBoxes.get(i);
if (!(curr == fTabSizeTextBox && usesTabs())) {
IStatus currStatus= validatePositiveNumber(curr.getText());
status= StatusUtil.getMoreSevere(currStatus, status);
}
}
}
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private boolean usesTabs() {
return TAB.equals(fWorkingValues.get(PREF_TAB_CHAR));
}
} |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | package org.eclipse.jdt.internal.ui.text.java;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DefaultAutoIndentStrategy;
import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jdt.internal.ui.text.JavaPartitionScanner;
/**
* Auto indent strategy sensitive to brackets.
*/
public class JavaAutoIndentStrategy extends DefaultAutoIndentStrategy {
public JavaAutoIndentStrategy() {
}
protected int findMatchingOpenBracket(IDocument d, int line, int end, int closingBracketIncrease) throws BadLocationException {
int start= d.getLineOffset(line);
int brackcount= getBracketCount(d, start, end, false) - closingBracketIncrease;
while (brackcount < 0) {
line--; |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | if (line < 0) {
return -1;
}
start= d.getLineOffset(line);
end= start + d.getLineLength(line) - 1;
brackcount += getBracketCount(d, start, end, false);
}
return line;
}
private int getBracketCount(IDocument d, int start, int end, boolean ignoreCloseBrackets) throws BadLocationException {
int bracketcount= 0;
while (start < end) {
char curr= d.getChar(start);
start++;
switch (curr) {
case '/' :
if (start < end) {
char next= d.getChar(start);
if (next == '*') {
start= getCommentEnd(d, start + 1, end);
} else if (next == '/') {
start= end;
}
}
break;
case '*' :
if (start < end) {
char next= d.getChar(start); |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | if (next == '/') {
bracketcount= 0;
start++;
}
}
break;
case '{' :
bracketcount++;
ignoreCloseBrackets= false;
break;
case '}' :
if (!ignoreCloseBrackets) {
bracketcount--;
}
break;
case '"' :
case '\'' :
start= getStringEnd(d, start, end, curr);
break;
default :
}
}
return bracketcount;
}
private int getCommentEnd(IDocument d, int pos, int end) throws BadLocationException {
while (pos < end) {
char curr= d.getChar(pos);
pos++; |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | if (curr == '*') {
if (pos < end && d.getChar(pos) == '/') {
return pos + 1;
}
}
}
return end;
}
protected String getIndentOfLine(IDocument d, int line) throws BadLocationException {
if (line > -1) {
int start= d.getLineOffset(line);
int end= start + d.getLineLength(line) - 1;
int whiteend= findEndOfWhiteSpace(d, start, end);
return d.get(start, whiteend - start);
} else {
return "";
}
}
private int getStringEnd(IDocument d, int pos, int end, char ch) throws BadLocationException {
while (pos < end) {
char curr= d.getChar(pos);
pos++;
if (curr == '\\') {
pos++;
} else if (curr == ch) {
return pos;
}
}
return end; |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | }
protected void smartInsertAfterBracket(IDocument d, DocumentCommand c) {
if (c.offset == -1 || d.getLength() == 0)
return;
try {
int p= (c.offset == d.getLength() ? c.offset - 1 : c.offset);
int line= d.getLineOfOffset(p);
int start= d.getLineOffset(line);
int whiteend= findEndOfWhiteSpace(d, start, c.offset);
if (whiteend == c.offset) {
int indLine= findMatchingOpenBracket(d, line, c.offset, 1);
if (indLine != -1 && indLine != line) {
StringBuffer replaceText= new StringBuffer(getIndentOfLine(d, indLine));
replaceText.append(d.get(whiteend, c.offset - whiteend));
replaceText.append(c.text);
c.length += c.offset - start;
c.offset= start;
c.text= replaceText.toString();
}
}
} catch (BadLocationException excp) {
System.out.println(JavaTextMessages.getString("AutoIndent.error.bad_location.message1"));
}
}
protected void smartIndentAfterNewLine(IDocument d, DocumentCommand c) { |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | int docLength= d.getLength();
if (c.offset == -1 || docLength == 0)
return;
try {
int p= (c.offset == docLength ? c.offset - 1 : c.offset);
int line= d.getLineOfOffset(p);
StringBuffer buf= new StringBuffer(c.text);
if (c.offset < docLength && d.getChar(c.offset) == '}') {
int indLine= findMatchingOpenBracket(d, line, c.offset, 0);
if (indLine == -1) {
indLine= line;
}
buf.append(getIndentOfLine(d, indLine));
} else {
int start= d.getLineOffset(line);
IDocumentPartitioner partitioner= d.getDocumentPartitioner();
if (partitioner != null) {
ITypedRegion region= partitioner.getPartition(start);
if (JavaPartitionScanner.JAVA_DOC.equals(region.getType()))
start= d.getLineInformationOfOffset(region.getOffset()).getOffset();
}
int whiteend= findEndOfWhiteSpace(d, start, c.offset);
buf.append(d.get(start, whiteend - start));
if (getBracketCount(d, start, c.offset, true) > 0) {
buf.append('\t');
}
}
c.text= buf.toString();
} catch (BadLocationException excp) { |
3,348 | Bug 3348 DCR: Code formatter enhancement (1GIYHQR) | null | verified fixed | d723bdd | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T16:49:01Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java | System.out.println(JavaTextMessages.getString("AutoIndent.error.bad_location.message2"));
}
}
/**
* Returns whether the text ends with one of the given search strings.
*/
private boolean endsWithDelimiter(IDocument d, String txt) {
String[] delimiters= d.getLegalLineDelimiters();
for (int i= 0; i < delimiters.length; i++) {
if (txt.endsWith(delimiters[i]))
return true;
}
return false;
}
/**
* @see IAutoIndentStrategy#customizeDocumentCommand
*/
public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text))
smartIndentAfterNewLine(d, c);
else if ("}".equals(c.text)) {
smartInsertAfterBracket(d, c);
}
}
} |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.launcher;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy; |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.FilteredList;
import org.eclipse.jdt.internal.ui.dialogs.StatusDialog;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine;
import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext;
import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.util.TypeInfo;
import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider;
/**
* Lots of stuff commented out because pending API change in
* Debugger
*/
public class AddExceptionDialog extends StatusDialog {
private static final String DIALOG_SETTINGS= "AddExceptionDialog";
private static final String SETTING_CAUGHT_CHECKED= "caughtChecked";
private static final String SETTING_UNCAUGHT_CHECKED= "uncaughtChecked";
private Text fFilterText;
private FilteredList fTypeList;
private boolean fTypeListInitialized= false;
private Button fCaughtBox;
private Button fUncaughtBox;
public static final int CHECKED_EXCEPTION= 0;
public static final int UNCHECKED_EXCEPTION= 1; |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | public static final int NO_EXCEPTION= -1;
private SelectionListener fListListener= new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
validateListSelection();
}
public void widgetDefaultSelected(SelectionEvent e) {
validateListSelection();
if (getStatus().isOK())
okPressed();
}
};
private Object fResult;
private int fExceptionType= NO_EXCEPTION;
private boolean fIsCaughtSelected= true;
private boolean fIsUncaughtSelected= true;
/**
* Constructor for AddExceptionDialog
*/
public AddExceptionDialog(Shell parentShell) {
super(parentShell);
setTitle(LauncherMessages.getString("AddExceptionDialog.title"));
}
protected Control createDialogArea(Composite ancestor) {
initFromDialogSettings();
Composite parent= new Composite(ancestor, SWT.NULL);
GridLayout layout= new GridLayout(); |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | parent.setLayout(layout);
Label l= new Label(parent, SWT.NULL);
l.setLayoutData(new GridData());
l.setText(LauncherMessages.getString("AddExceptionDialog.message"));
fFilterText = new Text(parent, SWT.BORDER);
GridData data= new GridData();
data.grabExcessVerticalSpace= false;
data.grabExcessHorizontalSpace= true;
data.horizontalAlignment= GridData.FILL;
data.verticalAlignment= GridData.BEGINNING;
fFilterText.setLayoutData(data);
Listener listener= new Listener() {
public void handleEvent(Event e) {
fTypeList.setFilter(fFilterText.getText());
}
};
fFilterText.addListener(SWT.Modify, listener);
fTypeList= new FilteredList(parent, SWT.BORDER | SWT.SINGLE,
new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_PACKAGE_POSTFIX),
true, true, true);
GridData gd= new GridData(GridData.FILL_BOTH);
gd.widthHint= convertWidthInCharsToPixels(65);
gd.heightHint= convertHeightInCharsToPixels(20);
fTypeList.setLayoutData(gd);
fCaughtBox= new Button(parent, SWT.CHECK); |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | fCaughtBox.setLayoutData(new GridData());
fCaughtBox.setText(LauncherMessages.getString("AddExceptionDialog.caught"));
fCaughtBox.setSelection(fIsCaughtSelected);
fUncaughtBox= new Button(parent, SWT.CHECK);
fUncaughtBox.setLayoutData(new GridData());
fUncaughtBox.setText(LauncherMessages.getString("AddExceptionDialog.uncaught"));
fUncaughtBox.setSelection(fIsUncaughtSelected);
addFromListSelected(true);
return parent;
}
public void addFromListSelected(boolean selected) {
fTypeList.setEnabled(selected);
if (selected) {
if (!fTypeListInitialized) {
initializeTypeList();
}
fTypeList.addSelectionListener(fListListener);
validateListSelection();
} else
fTypeList.removeSelectionListener(fListListener);
}
protected void okPressed() {
TypeInfo typeRef= (TypeInfo)fTypeList.getSelection()[0];
IType resolvedType= null; |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | try {
resolvedType= typeRef.resolveType(SearchEngine.createWorkspaceScope());
} catch (JavaModelException e) {
updateStatus(e.getStatus());
return;
}
fExceptionType= getExceptionType(resolvedType);
if (fExceptionType == NO_EXCEPTION) {
StatusInfo status= new StatusInfo();
status.setError(LauncherMessages.getString("AddExceptionDialog.error.notThrowable"));
updateStatus(status);
return;
}
fIsCaughtSelected= fCaughtBox.getSelection();
fIsUncaughtSelected= fUncaughtBox.getSelection();
fResult= resolvedType;
saveDialogSettings();
super.okPressed();
}
private int getExceptionType(final IType type) {
final int[] result= new int[] { NO_EXCEPTION };
BusyIndicatorRunnableContext context= new BusyIndicatorRunnableContext();
IRunnableWithProgress runnable= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) {
try {
ITypeHierarchy hierarchy= type.newSupertypeHierarchy(pm); |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | IType curr= type;
while (curr != null) {
String name= JavaModelUtil.getFullyQualifiedName(curr);
if ("java.lang.Throwable".equals(name)) {
result[0]= CHECKED_EXCEPTION;
return;
}
if ("java.lang.RuntimeException".equals(name) || "java.lang.Error".equals(name)) {
result[0]= UNCHECKED_EXCEPTION;
return;
}
curr= hierarchy.getSuperclass(curr);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
};
try {
context.run(false, false, runnable);
} catch (InterruptedException e) {
} catch (InvocationTargetException e) {
JavaPlugin.log(e);
}
return result[0];
}
public Object getResult() {
return fResult; |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | }
public int getExceptionType() {
return fExceptionType;
}
public boolean isCaughtSelected() {
return fIsCaughtSelected;
}
public boolean isUncaughtSelected() {
return fIsUncaughtSelected;
}
public void initializeTypeList() {
AllTypesSearchEngine searchEngine= new AllTypesSearchEngine(JavaPlugin.getWorkspace());
int flags= IJavaElementSearchConstants.CONSIDER_BINARIES |
IJavaElementSearchConstants.CONSIDER_CLASSES |
IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS;
List result= searchEngine.searchTypes(new ProgressMonitorDialog(getShell()), SearchEngine.createWorkspaceScope(), flags);
fFilterText.setText("*Exception*");
fTypeList.setElements(result.toArray());
fTypeListInitialized= true;
}
private void validateListSelection() {
StatusInfo status= new StatusInfo();
if (fTypeList.getSelection().length != 1) {
status.setError(LauncherMessages.getString("AddExceptionDialog.error.noSelection"));
} |
5,340 | Bug 5340 Cancelling add exception breakpoint has no effect | 1) Go to the breakpoints pane in the debug perspective 2) Click the J! button to add an exception 3) In the progress dialog, click cancel. The progress dialog closes immediately 4) Eventually the exception list comes up, it ignored the cancelation request. It should either honour the cancellation request or diable the cancel button (when calling ProgressMonitorDialog.run pass false for the canceleable parameter). | verified fixed | 8cf182b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:12Z" | "2001-10-29T21:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/launcher/AddExceptionDialog.java | updateStatus(status);
}
private void initFromDialogSettings() {
IDialogSettings allSetttings= JavaPlugin.getDefault().getDialogSettings();
IDialogSettings section= allSetttings.getSection(DIALOG_SETTINGS);
if (section == null) {
section= allSetttings.addNewSection(DIALOG_SETTINGS);
section.put(SETTING_CAUGHT_CHECKED, true);
section.put(SETTING_UNCAUGHT_CHECKED, true);
}
fIsCaughtSelected= section.getBoolean(SETTING_CAUGHT_CHECKED);
fIsUncaughtSelected= section.getBoolean(SETTING_UNCAUGHT_CHECKED);
}
private void saveDialogSettings() {
IDialogSettings allSetttings= JavaPlugin.getDefault().getDialogSettings();
IDialogSettings section= allSetttings.getSection(DIALOG_SETTINGS);
section.put(SETTING_CAUGHT_CHECKED, fIsCaughtSelected);
section.put(SETTING_UNCAUGHT_CHECKED, fIsUncaughtSelected);
}
public void create() {
super.create();
fFilterText.selectAll();
fFilterText.setFocus();
}
} |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
/**
* Sorts Java elements:
* Package fragment roots are sorted as ordered in the classpath.
*/
public class JavaElementSorter extends ViewerSorter {
private static final int CU_MEMBERS= 0; |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | private static final int INNER_TYPES= 1;
private static final int CONSTRUCTORS= 2;
private static final int STATIC_INIT= 3;
private static final int STATIC_METHODS= 4;
private static final int INIT= 5;
private static final int METHODS= 6;
private static final int STATIC_FIELDS= 7;
private static final int FIELDS= 8;
private static final int JAVAELEMENTS= 9;
private static final int PACKAGEFRAGMENTROOT= 10;
private static final int RESOURCEPACKAGES= 11;
private static final int RESOURCEFOLDERS= 12;
private static final int RESOURCES= 13;
private static final int STORAGE= 14;
private static final int OTHERS= 20;
private IClasspathEntry[] fClassPath;
/*
* @see ViewerSorter#sort
*/
public void sort(Viewer v, Object[] property) {
fClassPath= null;
try {
super.sort(v, property);
} finally {
fClassPath= null;
}
}
/* |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | * @see ViewerSorter#isSorterProperty
*/
public boolean isSorterProperty(Object element, Object property) {
return true;
}
/*
* @see ViewerSorter#category
*/
public int category(Object element) {
if (element instanceof IJavaElement) {
try {
IJavaElement je= (IJavaElement) element;
switch (je.getElementType()) {
case IJavaElement.METHOD: {
IMethod method= (IMethod) je;
if (method.isConstructor())
return CONSTRUCTORS;
int flags= method.getFlags();
return Flags.isStatic(flags) ? STATIC_METHODS : METHODS;
}
case IJavaElement.FIELD: {
int flags= ((IField) je).getFlags();
return Flags.isStatic(flags) ? STATIC_FIELDS : FIELDS;
}
case IJavaElement.INITIALIZER: {
int flags= ((IInitializer) je).getFlags(); |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | return Flags.isStatic(flags) ? STATIC_INIT : INIT;
}
case IJavaElement.TYPE: {
if (((IType)element).getDeclaringType() != null) {
return INNER_TYPES;
} else {
return CU_MEMBERS;
}
}
case IJavaElement.PACKAGE_DECLARATION:
return CU_MEMBERS;
case IJavaElement.IMPORT_CONTAINER:
return CU_MEMBERS;
case IJavaElement.PACKAGE_FRAGMENT:
IPackageFragment pack= (IPackageFragment) je;
if (!pack.hasChildren() && pack.getNonJavaResources().length > 0) {
return RESOURCEPACKAGES;
}
if (pack.getParent().getUnderlyingResource() instanceof IProject) {
return PACKAGEFRAGMENTROOT;
}
break;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
return PACKAGEFRAGMENTROOT;
}
} catch (JavaModelException x) {
JavaPlugin.log(x); |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | }
return JAVAELEMENTS;
} else if (element instanceof IFile) {
return RESOURCES;
} else if (element instanceof IContainer) {
return RESOURCEFOLDERS;
} else if (element instanceof IStorage) {
return STORAGE;
}
return OTHERS;
}
/*
* @see ViewerSorter#compare
*/
public int compare(Viewer viewer, Object e1, Object e2) {
int cat1= category(e1);
int cat2= category(e2);
if (cat1 != cat2)
return cat1 - cat2;
switch (cat1) {
case OTHERS:
return 0;
case CU_MEMBERS:
return 0;
case PACKAGEFRAGMENTROOT:
int p1= getClassPathIndex(JavaModelUtil.getPackageFragmentRoot((IJavaElement)e1)); |
5,165 | Bug 5165 package viewer project sorting | i have a (library) project Refactoring Tests Resources and other projects org.eclipse.... before 205 they used to be sorted alphabetically now they're not. is that intentional? | resolved fixed | 21646f3 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T17:03:20Z" | "2001-10-23T09:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java | int p2= getClassPathIndex(JavaModelUtil.getPackageFragmentRoot((IJavaElement)e2));
return p1 - p2;
case STORAGE:
return ((IStorage)e1).getName().compareToIgnoreCase(((IStorage)e2).getName());
case RESOURCES:
case RESOURCEFOLDERS:
return ((IResource)e1).getName().compareToIgnoreCase(((IResource)e2).getName());
case RESOURCEPACKAGES:
return ((IJavaElement)e1).getElementName().compareToIgnoreCase(((IJavaElement)e2).getElementName());
default:
return ((IJavaElement)e1).getElementName().compareTo(((IJavaElement)e2).getElementName());
}
}
private int getClassPathIndex(IPackageFragmentRoot root) {
try {
if (fClassPath == null)
fClassPath= root.getJavaProject().getResolvedClasspath(true);
} catch (JavaModelException e) {
return 0;
}
for (int i= 0; i < fClassPath.length; i++) {
if (fClassPath[i].getPath().equals(root.getPath()))
return i;
}
return 0;
}
}; |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.actions;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISelectionService;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
*/
public abstract class StructuredSelectionProvider { |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | public static int FLAGS_DO_CODERESOLVE= 1;
public static int FLAGS_DO_ELEMENT_AT_OFFSET= 2;
private static abstract class Adapter extends StructuredSelectionProvider {
private ITextSelection fLastTextSelection;
private IStructuredSelection fLastStructuredSelection;
private Adapter() {
}
protected IStructuredSelection asStructuredSelection(ITextSelection selection, int flags) {
IEditorPart editor= JavaPlugin.getActivePage().getActiveEditor();
if (editor == null)
return null;
return asStructuredSelection(selection, editor, flags); |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | }
protected IStructuredSelection asStructuredSelection(ITextSelection selection, IEditorPart editor, int flags) {
if ((flags & FLAGS_DO_CODERESOLVE) != 0) {
if (selection.getLength() == 0)
return StructuredSelection.EMPTY;
IStructuredSelection result= considerCache(selection);
if (result != null)
return result;
IJavaElement assist= getEditorInput(editor);
if (assist instanceof ICodeAssist) {
try {
IJavaElement[] elements= ((ICodeAssist)assist).codeSelect(selection.getOffset(), selection.getLength());
result= new StructuredSelection(elements);
} catch (JavaModelException e) {
ExceptionHandler.handle(e, "Selection Converter", "Unexpected exception while converting text selection.");
}
cacheResult(selection, result);
return result;
}
} else if ((flags & FLAGS_DO_ELEMENT_AT_OFFSET) != 0) {
try {
IJavaElement assist= getEditorInput(editor);
if (assist instanceof ICompilationUnit) {
IJavaElement ref= ((ICompilationUnit)assist).getElementAt(selection.getOffset());
return new StructuredSelection(ref);
} else if (assist instanceof IClassFile) {
IJavaElement ref= ((IClassFile)assist).getElementAt(selection.getOffset());
return new StructuredSelection(ref); |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | }
} catch (JavaModelException e) {
ExceptionHandler.handle(e, "Selection Converter", "Unexpected exception while converting text selection.");
}
}
return StructuredSelection.EMPTY;
}
private IStructuredSelection considerCache(ITextSelection selection) {
if (selection != fLastTextSelection) {
fLastTextSelection= null;
fLastStructuredSelection= null;
}
return fLastStructuredSelection;
}
private void cacheResult(ITextSelection selection, IStructuredSelection result) {
fLastTextSelection= selection;
fLastStructuredSelection= result;
}
private IJavaElement getEditorInput(IEditorPart editorPart) {
IEditorInput input= editorPart.getEditorInput();
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
}
private static class SelectionProviderAdapter extends Adapter { |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | private ISelectionProvider fProvider;
public SelectionProviderAdapter(ISelectionProvider provider) {
super();
fProvider= provider;
Assert.isNotNull(fProvider);
}
public IStructuredSelection getSelection(int flags) {
ISelection result= fProvider.getSelection();
if (result instanceof IStructuredSelection)
return (IStructuredSelection)result;
if (result instanceof ITextSelection && fProvider instanceof IEditorPart)
return asStructuredSelection((ITextSelection)result, (IEditorPart)fProvider, flags);
return StructuredSelection.EMPTY;
}
}
private static class SelectionServiceAdapter extends Adapter {
private ISelectionService fService;
public SelectionServiceAdapter(ISelectionService service) {
super();
fService= service; |
5,328 | Bug 5328 NPE in Open Super Method action | 1) make an empty selection in the text editor outside of a type's range, e.g, in the import 2) execute Show in Packages View ->NPE Notice: I've changed the Show in Packages View action and it might be the culprit. Issue: unclear why this code is executed when running the other action. org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133) at org.eclipse.jface.util.Assert.isNotNull(Assert.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredSelection.<init> (StructuredSelection.java:54) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:75) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$Adapter.asStruct uredSelection(StructuredSelectionProvider.java:48) at org.eclipse.jdt.internal.ui.actions.StructuredSelectionProvider$SelectionService Adapter.getSelection(StructuredSelectionProvider.java:138) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.getMethod (OpenSuperImplementationAction.java:69) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.canOperateOn (OpenSuperImplementationAction.java:61) at org.eclipse.jdt.internal.ui.actions.OpenSuperImplementationAction.update (OpenSuperImplementationAction.java:57) at org.eclipse.ui.texteditor.AbstractTextEditor.addAction (AbstractTextEditor.java:1693) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.editorContextMenuAboutToShow (JavaEditor.java:138) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.editorContextMenuAb outToShow(CompilationUnitEditor.java:298) at org.eclipse.ui.texteditor.AbstractTextEditor$2.menuAboutToShow (AbstractTextEditor.java:659) at org.eclipse.jface.action.MenuManager.fireAboutToShow (MenuManager.java:220) at org.eclipse.jface.action.MenuManager.handleAboutToShow (MenuManager.java:253) at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:250) at org.eclipse.jface.action.MenuManager$1.menuShown (MenuManager.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:112) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:828) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:2787) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:983) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:740) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2612) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java (Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3446) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1136) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1165) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at SlimLauncher.main(SlimLauncher.java:14) | resolved fixed | b6c438e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:17:00Z" | "2001-10-29T15:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/StructuredSelectionProvider.java | Assert.isNotNull(fService);
}
public IStructuredSelection getSelection(int flags) {
ISelection result= fService.getSelection();
if (result instanceof IStructuredSelection)
return (IStructuredSelection)result;
if (result instanceof ITextSelection)
return asStructuredSelection((ITextSelection)result, flags);
return null;
}
}
public IStructuredSelection getSelection() {
return getSelection(FLAGS_DO_CODERESOLVE);
}
public abstract IStructuredSelection getSelection(int flags);
private StructuredSelectionProvider() {
}
public static StructuredSelectionProvider createFrom(ISelectionProvider provider) {
return new SelectionProviderAdapter(provider);
}
public static StructuredSelectionProvider createFrom(ISelectionService service) {
return new SelectionServiceAdapter(service);
}
} |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.typehierarchy;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IRegion;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.ITypeHierarchyChangedListener;
import org.eclipse.jdt.core.IWorkingCopy;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
/**
* Manages a type hierarchy, to keep it refreshed, and to allow it to be shared.
*/
public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IElementChangedListener {
private boolean fHierarchyRefreshNeeded;
private ITypeHierarchy fHierarchy;
private IJavaElement fInputElement;
private boolean fIsSuperTypesOnly;
private List fChangeListeners;
public TypeHierarchyLifeCycle() {
this(false);
}
public TypeHierarchyLifeCycle(boolean isSuperTypesOnly) {
fHierarchy= null;
fInputElement= null;
fIsSuperTypesOnly= isSuperTypesOnly;
fChangeListeners= new ArrayList(2);
}
public ITypeHierarchy getHierarchy() {
return fHierarchy;
}
public IJavaElement getInputElement() {
return fInputElement; |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | }
public void freeHierarchy() {
if (fHierarchy != null) {
fHierarchy.removeTypeHierarchyChangedListener(this);
JavaCore.removeElementChangedListener(this);
fHierarchy= null;
fInputElement= null;
}
}
public void removeChangedListener(ITypeHierarchyLifeCycleListener listener) {
fChangeListeners.remove(listener);
}
public void addChangedListener(ITypeHierarchyLifeCycleListener listener) {
if (!fChangeListeners.contains(listener)) {
fChangeListeners.add(listener);
}
}
private void fireChange(IType[] changedTypes) {
for (int i= fChangeListeners.size()-1; i>=0; i--) {
ITypeHierarchyLifeCycleListener curr= (ITypeHierarchyLifeCycleListener) fChangeListeners.get(i);
curr.typeHierarchyChanged(this, changedTypes);
}
}
public void ensureRefreshedTypeHierarchy() throws JavaModelException { |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | if (fHierarchy != null) {
ensureRefreshedTypeHierarchy(fInputElement);
}
}
public void ensureRefreshedTypeHierarchy(final IJavaElement element) throws JavaModelException {
if (element == null) {
freeHierarchy();
return;
}
boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement));
if (hierachyCreationNeeded || fHierarchyRefreshNeeded) {
IRunnableWithProgress op= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) throws InvocationTargetException {
try {
doHierarchyRefresh(element, pm);
} catch (JavaModelException e) {
throw new InvocationTargetException(e);
}
}
};
try {
new BusyIndicatorRunnableContext().run(true, false, op);
} catch (InvocationTargetException e) {
Throwable th= e.getTargetException();
if (th instanceof JavaModelException) {
throw (JavaModelException)th;
} else { |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | throw new JavaModelException(th, IStatus.ERROR);
}
} catch (InterruptedException e) {
}
fHierarchyRefreshNeeded= false;
}
}
private void doHierarchyRefresh(IJavaElement element, IProgressMonitor pm) throws JavaModelException {
boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement));
if (hierachyCreationNeeded) {
if (fHierarchy != null) {
fHierarchy.removeTypeHierarchyChangedListener(this);
JavaCore.removeElementChangedListener(this);
}
fInputElement= element;
if (element.getElementType() == IJavaElement.TYPE) {
IType type= (IType) element;
if (fIsSuperTypesOnly) {
fHierarchy= type.newSupertypeHierarchy(pm);
} else {
fHierarchy= type.newTypeHierarchy(pm);
}
} else {
IJavaProject jproject= element.getJavaProject();
IRegion region= JavaCore.newRegion();
region.add(element);
fHierarchy= jproject.newTypeHierarchy(region, pm); |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | }
fHierarchy.addTypeHierarchyChangedListener(this);
JavaCore.addElementChangedListener(this);
} else {
fHierarchy.refresh(pm);
}
}
/*
* @see ITypeHierarchyChangedListener#typeHierarchyChanged
*/
public void typeHierarchyChanged(ITypeHierarchy typeHierarchy) {
fHierarchyRefreshNeeded= true;
}
/*
* @see IElementChangedListener#elementChanged(ElementChangedEvent)
*/
public void elementChanged(ElementChangedEvent event) {
IJavaElement elem= event.getDelta().getElement();
if (elem instanceof IWorkingCopy && ((IWorkingCopy)elem).isWorkingCopy()) {
return;
}
if (fHierarchyRefreshNeeded) {
fireChange(null);
} else {
ArrayList changedTypes= new ArrayList();
processDelta(event.getDelta(), changedTypes);
fireChange((IType[]) changedTypes.toArray(new IType[changedTypes.size()]));
}
} |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | /*
* Assume that the hierarchy is intact (no refresh needed)
*/
private void processDelta(IJavaElementDelta delta, ArrayList changedTypes) {
IJavaElement element= delta.getElement();
switch (element.getElementType()) {
case IJavaElement.TYPE:
processTypeDelta((IType) element, changedTypes);
processChildrenDelta(delta, changedTypes);
break;
case IJavaElement.JAVA_MODEL:
case IJavaElement.JAVA_PROJECT:
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
case IJavaElement.PACKAGE_FRAGMENT:
processChildrenDelta(delta, changedTypes);
break;
case IJavaElement.COMPILATION_UNIT:
if (delta.getKind() == IJavaElementDelta.CHANGED && delta.getFlags() == IJavaElementDelta.F_CONTENT) {
try {
IType[] types= ((ICompilationUnit) element).getAllTypes();
for (int i= 0; i < types.length; i++) {
processTypeDelta(types[i], changedTypes);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
} else {
processChildrenDelta(delta, changedTypes);
} |
5,358 | Bug 5358 Suspicious usage of IJavaElementDelta.getFlags() | Build 20011025 Searching for references to IJavaElement.getFlags(), I found suspicious usage in JDT UI code. There are pattern of code like this one: delta.getFlags() == IJavaElementDelta.F_CONTENT where it should be: (delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0 | resolved fixed | 10e602c | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:22:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java | break;
case IJavaElement.CLASS_FILE:
if (delta.getKind() == IJavaElementDelta.CHANGED && delta.getFlags() == IJavaElementDelta.F_CONTENT) {
try {
IType type= ((IClassFile) element).getType();
processTypeDelta(type, changedTypes);
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
} else {
processChildrenDelta(delta, changedTypes);
}
break;
}
}
private void processTypeDelta(IType type, ArrayList changedTypes) {
if (getHierarchy().contains(type)) {
changedTypes.add(type);
}
}
private void processChildrenDelta(IJavaElementDelta delta, ArrayList changedTypes) {
IJavaElementDelta[] children= delta.getAffectedChildren();
for (int i= 0; i < children.length; i++) {
processDelta(children[i], changedTypes);
}
}
} |
5,361 | Bug 5361 No error tick on imports in Packages view | Add an import that causes an error (e.g. dani.is.bad) and save. ==> The Outline view shows the error ticks on the imports but the package view doesn't | resolved fixed | 491a8fb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:31:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java | package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModelMarker;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Used by the JavaElementLabelProvider to evaluate the error tick state of
* an element.
*/
public class MarkerErrorTickProvider implements IErrorTickProvider {
/*
* @see IErrorTickProvider#getErrorInfo
*/
public int getErrorInfo(IJavaElement element) {
int info= 0;
try { |
5,361 | Bug 5361 No error tick on imports in Packages view | Add an import that causes an error (e.g. dani.is.bad) and save. ==> The Outline view shows the error ticks on the imports but the package view doesn't | resolved fixed | 491a8fb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:31:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java | IResource res= null;
ISourceRange range= null;
int depth= IResource.DEPTH_INFINITE;
int type= element.getElementType();
if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT
|| type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.CLASS_FILE || type == IJavaElement.COMPILATION_UNIT) {
res= element.getCorrespondingResource();
if (type == IJavaElement.PACKAGE_FRAGMENT) {
depth= IResource.DEPTH_ONE;
} else if (type == IJavaElement.JAVA_PROJECT) {
IMarker[] bpMarkers= res.findMarkers(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
info= accumulateProblems(bpMarkers, info, null);
}
} else if (type == IJavaElement.TYPE || type == IJavaElement.METHOD || type == IJavaElement.INITIALIZER) {
ICompilationUnit cu= ((IMember)element).getCompilationUnit();
if (cu != null) {
res= element.getUnderlyingResource();
range= ((IMember)element).getSourceRange();
}
}
if (res != null) {
IMarker[] markers= res.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, depth);
if (markers != null) {
info= accumulateProblems(markers, info, range);
}
} |
5,361 | Bug 5361 No error tick on imports in Packages view | Add an import that causes an error (e.g. dani.is.bad) and save. ==> The Outline view shows the error ticks on the imports but the package view doesn't | resolved fixed | 491a8fb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-31T18:31:06Z" | "2001-10-30T16:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/MarkerErrorTickProvider.java | } catch (CoreException e) {
JavaPlugin.log(e.getStatus());
}
return info;
}
private int accumulateProblems(IMarker[] markers, int info, ISourceRange range) {
if (markers != null) {
for (int i= 0; i < markers.length && (info != ERRORTICK_ERROR); i++) {
IMarker curr= markers[i];
if (range == null || isInRange(curr, range)) {
int priority= curr.getAttribute(IMarker.SEVERITY, -1);
if (priority == IMarker.SEVERITY_WARNING) {
info= ERRORTICK_WARNING;
} else if (priority == IMarker.SEVERITY_ERROR) {
info= ERRORTICK_ERROR;
}
}
}
}
return info;
}
private boolean isInRange(IMarker marker, ISourceRange range) {
int pos= marker.getAttribute(IMarker.CHAR_START, -1);
int offset= range.getOffset();
return (offset <= pos && offset + range.getLength() > pos);
}
} |
5,392 | Bug 5392 Eclipse dies without warning | build 205 on Win98. This happened 3 times. 1). I was looking at Java code and selected something in the Outline view and Eclipse died without any warning. No log messages or dialogs. 2). I restarted, opened up the Java class again, clicked around in the Outline and it was ok. Then I clicked on a method in the outline, did a search, then double-clicked on the single search result and Eclipse died without warning again. Again without a log or dialog. 3). Restarted again. Pressed the Open to Type button, typed in the class name and hit ok. Eclipse died, got 3 dialogs saying that an error has occurred, and got the following in my log file. Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) | resolved fixed | 02264f5 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T08:39:47Z" | "2001-10-31T17:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorErrorTickUpdater.java | package org.eclipse.jdt.internal.ui.javaeditor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelListener;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorInput;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
/**
* The <code>JavaEditorErrorTickUpdater</code> will register as a AnnotationModelListener
* on the annotation model of a Java Editor and update the title images when the annotation
* model changed.
*/
public class JavaEditorErrorTickUpdater implements IAnnotationModelListener {
private JavaEditor fJavaEditor;
private IAnnotationModel fAnnotationModel;
private JavaElementLabelProvider fLabelProvider;
public JavaEditorErrorTickUpdater(JavaEditor editor) { |
5,392 | Bug 5392 Eclipse dies without warning | build 205 on Win98. This happened 3 times. 1). I was looking at Java code and selected something in the Outline view and Eclipse died without any warning. No log messages or dialogs. 2). I restarted, opened up the Java class again, clicked around in the Outline and it was ok. Then I clicked on a method in the outline, did a search, then double-clicked on the single search result and Eclipse died without warning again. Again without a log or dialog. 3). Restarted again. Pressed the Open to Type button, typed in the class name and hit ok. Eclipse died, got 3 dialogs saying that an error has occurred, and got the following in my log file. Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) | resolved fixed | 02264f5 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T08:39:47Z" | "2001-10-31T17:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorErrorTickUpdater.java | fJavaEditor= editor;
Assert.isNotNull(editor);
}
/**
* Defines the annotation model to listen to. To be called when the
* annotation model changes.
* @param model The new annotation model or <code>null</code>
* to uninstall.
*/
public void setAnnotationModel(IAnnotationModel model) {
if (fAnnotationModel != null) {
fAnnotationModel.removeAnnotationModelListener(this);
}
if (model != null) {
fAnnotationModel=model;
fAnnotationModel.addAnnotationModelListener(this);
if (fLabelProvider == null) {
fLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_SMALL_ICONS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS);
}
fLabelProvider.setErrorTickManager(new AnnotationErrorTickProvider(fAnnotationModel));
modelChanged(fAnnotationModel);
} else {
fAnnotationModel= null;
if (fLabelProvider != null) {
fLabelProvider.dispose();
fLabelProvider= null;
}
} |
5,392 | Bug 5392 Eclipse dies without warning | build 205 on Win98. This happened 3 times. 1). I was looking at Java code and selected something in the Outline view and Eclipse died without any warning. No log messages or dialogs. 2). I restarted, opened up the Java class again, clicked around in the Outline and it was ok. Then I clicked on a method in the outline, did a search, then double-clicked on the single search result and Eclipse died without warning again. Again without a log or dialog. 3). Restarted again. Pressed the Open to Type button, typed in the class name and hit ok. Eclipse died, got 3 dialogs saying that an error has occurred, and got the following in my log file. Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Wed Oct 31 13:50:35 EST 2001 2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in: org.eclipse.ui. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.SWT.error(SWT.java:1737) at org.eclipse.swt.custom.CTabItem.getDisplay(CTabItem.java:78) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Item.getText(Item.java:67) at org.eclipse.swt.custom.CTabItem.setText(CTabItem.java:387) at org.eclipse.ui.internal.EditorWorkbook.updateEditorTab (EditorWorkbook.java:681) at org.eclipse.ui.internal.EditorWorkbook.propertyChanged (EditorWorkbook.java:371) at org.eclipse.ui.part.WorkbenchPart$1.run(WorkbenchPart.java:81) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:812) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.jface.window.Window.runEventLoop(Window.java:536) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:33) at org.eclipse.ui.part.WorkbenchPart$1.handleException (WorkbenchPart.java:84) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:429) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:814) at org.eclipse.core.runtime.Platform.run(Platform.java:395) at org.eclipse.ui.part.WorkbenchPart.firePropertyChange (WorkbenchPart.java:79) at org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange (AbstractTextEditor.java:1952) at org.eclipse.ui.part.WorkbenchPart.setTitleImage (WorkbenchPart.java:222) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updatedTitleImage (JavaEditor.java:343) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.doUpdateErrorT icks(JavaEditorErrorTickUpdater.java:76) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater.access$0 (JavaEditorErrorTickUpdater.java:72) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater$1.run (JavaEditorErrorTickUpdater.java:66) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1163) at org.eclipse.swt.widgets.Display.release(Display.java:1213) at org.eclipse.swt.graphics.Device.dispose(Device.java:200) at org.eclipse.ui.internal.Workbench.run(Workbench.java:663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) | resolved fixed | 02264f5 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T08:39:47Z" | "2001-10-31T17:40:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorErrorTickUpdater.java | }
/**
* @see IAnnotationModelListener#modelChanged(IAnnotationModel)
*/
public void modelChanged(IAnnotationModel model) {
if (fJavaEditor.getTitleImage() == null) {
return;
}
Shell shell= fJavaEditor.getEditorSite().getShell();
if (shell != null && !shell.isDisposed()) {
shell.getDisplay().asyncExec(new Runnable() {
public void run() {
doUpdateErrorTicks();
}
});
}
}
private void doUpdateErrorTicks() {
IEditorInput input= fJavaEditor.getEditorInput();
if (fLabelProvider != null && input != null) {
IJavaElement jelement= (IJavaElement) input.getAdapter(IJavaElement.class);
if (jelement != null) {
fJavaEditor.updatedTitleImage(fLabelProvider.getImage(jelement));
}
}
}
} |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.util.ArrayList; |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | import java.util.Hashtable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.JavaCore;
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.util.TabFolderLayout;
/*
* The page for setting the compiler options.
*/
public class CompilerPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | private static final String PREF_LOCAL_VARIABLE_ATTR= "org.eclipse.jdt.core.compiler.debug.localVariable";
private static final String PREF_LINE_NUMBER_ATTR= "org.eclipse.jdt.core.compiler.debug.lineNumber";
private static final String PREF_SOURCE_FILE_ATTR= "org.eclipse.jdt.core.compiler.debug.sourceFile";
private static final String PREF_CODEGEN_UNUSED_LOCAL= "org.eclipse.jdt.core.compiler.codegen.unusedLocal";
private static final String PREF_CODEGEN_TARGET_PLATFORM= "org.eclipse.jdt.core.compiler.codegen.targetPlatform";
private static final String PREF_PB_UNREACHABLE_CODE= "org.eclipse.jdt.core.compiler.problem.unreachableCode";
private static final String PREF_PB_INVALID_IMPORT= "org.eclipse.jdt.core.compiler.problem.invalidImport";
private static final String PREF_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD= "org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod";
private static final String PREF_PB_METHOD_WITH_CONSTRUCTOR_NAME= "org.eclipse.jdt.core.compiler.problem.methodWithConstructorName";
private static final String PREF_PB_DEPRECATION= "org.eclipse.jdt.core.compiler.problem.deprecation";
private static final String PREF_PB_HIDDEN_CATCH_BLOCK= "org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock";
private static final String PREF_PB_UNUSED_LOCAL= "org.eclipse.jdt.core.compiler.problem.unusedLocal";
private static final String PREF_PB_UNUSED_PARAMETER= "org.eclipse.jdt.core.compiler.problem.unusedParameter";
private static final String PREF_PB_SYNTHETIC_ACCESS_EMULATION= "org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation";
private static final String PREF_PB_NON_EXTERNALIZED_STRINGS= "org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral";
private static final String PREF_PB_ASSERT_AS_IDENTIFIER= "org.eclipse.jdt.core.compiler.problem.assertIdentifier";
private static final String PREF_SOURCE_COMPATIBILITY= "org.eclipse.jdt.core.compiler.source";
private static final String GENERATE= "generate";
private static final String DO_NOT_GENERATE= "do not generate";
private static final String PRESERVE= "preserve";
private static final String OPTIMIZE_OUT= "optimize out";
private static final String VERSION_1_1= "1.1"; |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | private static final String VERSION_1_2= "1.2";
private static final String VERSION_1_3= "1.3";
private static final String VERSION_1_4= "1.4";
private static final String ERROR= "error";
private static final String WARNING= "warning";
private static final String IGNORE= "ignore";
private static String[] getAllKeys() {
return new String[] {
PREF_LOCAL_VARIABLE_ATTR, PREF_LINE_NUMBER_ATTR, PREF_SOURCE_FILE_ATTR, PREF_CODEGEN_UNUSED_LOCAL,
PREF_CODEGEN_TARGET_PLATFORM, PREF_PB_UNREACHABLE_CODE, PREF_PB_INVALID_IMPORT, PREF_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD,
PREF_PB_METHOD_WITH_CONSTRUCTOR_NAME, PREF_PB_DEPRECATION, PREF_PB_HIDDEN_CATCH_BLOCK, PREF_PB_UNUSED_LOCAL,
PREF_PB_UNUSED_PARAMETER, PREF_PB_SYNTHETIC_ACCESS_EMULATION, PREF_PB_NON_EXTERNALIZED_STRINGS,
PREF_PB_ASSERT_AS_IDENTIFIER, PREF_SOURCE_COMPATIBILITY
};
}
/**
* Initializes the current options (read from preference store)
*/
public static void initDefaults(IPreferenceStore store) {
Hashtable hashtable= JavaCore.getDefaultOptions();
Hashtable currOptions= JavaCore.getOptions();
String[] allKeys= getAllKeys();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String defValue= (String) hashtable.get(key);
if (defValue != null) {
store.setDefault(key, defValue);
} else {
JavaPlugin.logErrorMessage("CompilerPreferencePage: value is null: " + key); |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | }
String val= store.getString(key);
if (val != null) {
currOptions.put(key, val);
}
}
JavaCore.setOptions(currOptions);
}
private static class ControlData {
private String fKey;
private String[] fValues;
public ControlData(String key, String[] values) {
fKey= key;
fValues= values;
}
public String getKey() {
return fKey;
}
public String getValue(boolean selection) {
int index= selection ? 0 : 1;
return fValues[index];
}
public String getValue(int index) {
return fValues[index];
} |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | public int getSelection(String value) {
for (int i= 0; i < fValues.length; i++) {
if (value.equals(fValues[i])) {
return i;
}
}
throw new IllegalArgumentException();
}
}
private Hashtable fWorkingValues;
private ArrayList fCheckBoxes;
private ArrayList fComboBoxes;
private SelectionListener fSelectionListener;
public CompilerPreferencePage() {
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("CompilerPreferencePage.description"));
fWorkingValues= JavaCore.getOptions();
fCheckBoxes= new ArrayList();
fComboBoxes= new ArrayList();
fSelectionListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
controlChanged(e.widget);
}
}; |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | }
/**
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
}
/**
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.COMPILER_PREFERENCE_PAGE));
}
/**
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
TabFolder folder= new TabFolder(parent, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
String[] errorWarningIgnore= new String[] { ERROR, WARNING, IGNORE };
String[] errorWarningIgnoreLabels= new String[] {
JavaUIMessages.getString("CompilerPreferencePage.error"),
JavaUIMessages.getString("CompilerPreferencePage.warning"),
JavaUIMessages.getString("CompilerPreferencePage.ignore")
}; |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | GridLayout layout= new GridLayout();
layout.numColumns= 2;
Composite warningsComposite= new Composite(folder, SWT.NULL);
warningsComposite.setLayout(layout);
String label= JavaUIMessages.getString("CompilerPreferencePage.pb_unreachable_code.label");
addComboBox(warningsComposite, label, PREF_PB_UNREACHABLE_CODE, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_invalid_import.label");
addComboBox(warningsComposite, label, PREF_PB_INVALID_IMPORT, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_overriding_pkg_dflt.label");
addComboBox(warningsComposite, label, PREF_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_method_naming.label");
addComboBox(warningsComposite, label, PREF_PB_METHOD_WITH_CONSTRUCTOR_NAME, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_deprecation.label");
addComboBox(warningsComposite, label, PREF_PB_DEPRECATION, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_hidden_catchblock.label");
addComboBox(warningsComposite, label, PREF_PB_HIDDEN_CATCH_BLOCK, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_unused_local.label");
addComboBox(warningsComposite, label, PREF_PB_UNUSED_LOCAL, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_unused_parameter.label");
addComboBox(warningsComposite, label, PREF_PB_UNUSED_PARAMETER, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_synth_access_emul.label");
addComboBox(warningsComposite, label, PREF_PB_SYNTHETIC_ACCESS_EMULATION, errorWarningIgnore, errorWarningIgnoreLabels);
label= JavaUIMessages.getString("CompilerPreferencePage.pb_non_externalized_strings.label");
addComboBox(warningsComposite, label, PREF_PB_NON_EXTERNALIZED_STRINGS, errorWarningIgnore, errorWarningIgnoreLabels); |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | label= JavaUIMessages.getString("CompilerPreferencePage.pb_assert_as_identifier.label");
addComboBox(warningsComposite, label, PREF_PB_ASSERT_AS_IDENTIFIER, errorWarningIgnore, errorWarningIgnoreLabels);
String[] generateValues= new String[] { GENERATE, DO_NOT_GENERATE };
layout= new GridLayout();
layout.numColumns= 2;
Composite codeGenComposite= new Composite(folder, SWT.NULL);
codeGenComposite.setLayout(layout);
label= JavaUIMessages.getString("CompilerPreferencePage.variable_attr.label");
addCheckBox(codeGenComposite, label, PREF_LOCAL_VARIABLE_ATTR, generateValues);
label= JavaUIMessages.getString("CompilerPreferencePage.line_number_attr.label");
addCheckBox(codeGenComposite, label, PREF_LINE_NUMBER_ATTR, generateValues);
label= JavaUIMessages.getString("CompilerPreferencePage.source_file_attr.label");
addCheckBox(codeGenComposite, label, PREF_SOURCE_FILE_ATTR, generateValues);
label= JavaUIMessages.getString("CompilerPreferencePage.codegen_unused_local.label");
addCheckBox(codeGenComposite, label, PREF_CODEGEN_UNUSED_LOCAL, new String[] { PRESERVE, OPTIMIZE_OUT });
String[] values= new String[] { VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4 };
String[] valuesLabels= new String[] {
JavaUIMessages.getString("CompilerPreferencePage.jvm11"),
JavaUIMessages.getString("CompilerPreferencePage.jvm12"),
JavaUIMessages.getString("CompilerPreferencePage.jvm13"),
JavaUIMessages.getString("CompilerPreferencePage.jvm14")
};
label= JavaUIMessages.getString("CompilerPreferencePage.codegen_targetplatform.label");
addComboBox(codeGenComposite, label, PREF_CODEGEN_TARGET_PLATFORM, values, valuesLabels);
values= new String[] { VERSION_1_3, VERSION_1_4 };
valuesLabels= new String[] {
JavaUIMessages.getString("CompilerPreferencePage.version13"), |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | JavaUIMessages.getString("CompilerPreferencePage.version14")
};
label= JavaUIMessages.getString("CompilerPreferencePage.source_compatibility.label");
addComboBox(codeGenComposite, label, PREF_SOURCE_COMPATIBILITY, values, valuesLabels);
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CompilerPreferencePage.warnings.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_REFACTORING_WARNING));
item.setControl(warningsComposite);
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CompilerPreferencePage.generation.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(codeGenComposite);
return folder;
}
private void addCheckBox(Composite parent, String label, String key, String[] values) {
ControlData data= new ControlData(key, values);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
Button checkBox= new Button(parent, SWT.CHECK);
checkBox.setText(label);
checkBox.setData(data);
checkBox.setLayoutData(gd);
checkBox.addSelectionListener(fSelectionListener); |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | String currValue= (String)fWorkingValues.get(key);
checkBox.setSelection(data.getSelection(currValue) == 0);
fCheckBoxes.add(checkBox);
}
private void addComboBox(Composite parent, String label, String key, String[] values, String[] valueLabels) {
ControlData data= new ControlData(key, values);
Label labelControl= new Label(parent, SWT.NONE);
labelControl.setText(label);
labelControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridData gd= new GridData();
gd.horizontalAlignment= GridData.END;
Combo comboBox= new Combo(parent, SWT.READ_ONLY);
comboBox.setItems(valueLabels);
comboBox.setData(data);
comboBox.setLayoutData(gd);
comboBox.addSelectionListener(fSelectionListener);
String currValue= (String)fWorkingValues.get(key);
comboBox.select(data.getSelection(currValue));
fComboBoxes.add(comboBox);
}
private void controlChanged(Widget widget) { |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | ControlData data= (ControlData) widget.getData();
String newValue= null;
if (widget instanceof Button) {
newValue= data.getValue(((Button)widget).getSelection());
} else if (widget instanceof Combo) {
newValue= data.getValue(((Combo)widget).getSelectionIndex());
} else {
return;
}
fWorkingValues.put(data.getKey(), newValue);
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
String[] allKeys= getAllKeys();
Hashtable actualOptions= JavaCore.getOptions();
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String val= (String) fWorkingValues.get(key);
actualOptions.put(key, val);
store.putValue(key, val);
}
JavaCore.setOptions(actualOptions);
return super.performOk();
} |
4,273 | Bug 4273 Compiler option changes not handled correctly (1GKWRI3) | Nothing happens if auto-build is on and (some) compiler options are changed . If something was reported as error and now I choose that to be reported as warning and if autobuild is on I expect a rebuild. Same if I switch from 1.2 to 1.3 compatibilty. NOTES: EG (01.10.2001 14:57:06) we should prompt the user for a rebuild whenever an option changes. MA (01.10.2001 15:16:25) The description in the pages says everything. EG (02.10.2001 18:16:59) yes, but this is isn't sufficient. We should show a dialog with the option to rebuild the workspace after apply. | resolved fixed | 2c430ec | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:02:10Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java | /*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fWorkingValues= JavaCore.getDefaultOptions();
updateControls();
super.performDefaults();
}
private void updateControls() {
for (int i= fCheckBoxes.size() - 1; i >= 0; i--) {
Button curr= (Button) fCheckBoxes.get(i);
ControlData data= (ControlData) curr.getData();
String currValue= (String) fWorkingValues.get(data.getKey());
curr.setSelection(data.getSelection(currValue) == 0);
}
for (int i= fComboBoxes.size() - 1; i >= 0; i--) {
Combo curr= (Combo) fComboBoxes.get(i);
ControlData data= (ControlData) curr.getData();
String currValue= (String) fWorkingValues.get(data.getKey());
curr.select(data.getSelection(currValue));
}
}
} |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.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;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Hashtable;
import org.eclipse.swt.SWT;
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.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.formatter.CodeFormatter;
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.util.TabFolderLayout;
/*
* The page for setting code formatter options
*/
public class CodeFormatterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private static final String PREF_NEWLINE_OPENING_BRACES= "org.eclipse.jdt.core.formatter.newline.openingBrace";
private static final String PREF_NEWLINE_CONTROL_STATEMENT= "org.eclipse.jdt.core.formatter.newline.controlStatement";
private static final String PREF_NEWLINE_CLEAR_ALL= "org.eclipse.jdt.core.formatter.newline.clearAll";
private static final String PREF_NEWLINE_ELSE_IF= "org.eclipse.jdt.core.formatter.newline.elseIf";
private static final String PREF_NEWLINE_EMPTY_BLOCK= "org.eclipse.jdt.core.formatter.newline.emptyBlock";
private static final String PREF_LINE_SPLIT= "org.eclipse.jdt.core.formatter.lineSplit";
private static final String PREF_STYLE_COMPACT_ASSIGNEMENT= "org.eclipse.jdt.core.formatter.style.assignment";
private static final String PREF_TAB_CHAR= "org.eclipse.jdt.core.formatter.tabulation.char";
private static final String PREF_TAB_SIZE= "org.eclipse.jdt.core.formatter.tabulation.size";
private static final String INSERT= "insert";
private static final String DO_NOT_INSERT= "do not insert";
private static final String COMPACT= "compact";
private static final String NORMAL= "normal";
private static final String TAB= "tab";
private static final String SPACE= "space";
private static final String CLEAR_ALL= "clear all";
private static final String PRESERVE_ONE= "preserve one";
private static String[] getAllKeys() {
return new String[] {
PREF_NEWLINE_OPENING_BRACES, PREF_NEWLINE_CONTROL_STATEMENT, PREF_NEWLINE_CLEAR_ALL,
PREF_NEWLINE_ELSE_IF, PREF_NEWLINE_EMPTY_BLOCK, PREF_LINE_SPLIT, |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | PREF_STYLE_COMPACT_ASSIGNEMENT, PREF_TAB_CHAR, PREF_TAB_SIZE
};
}
/**
* Gets the currently configured tab size
*/
public static int getTabSize() {
String string= (String) JavaCore.getOptions().get(PREF_TAB_SIZE);
return getIntValue(string, 4);
}
/**
* Gets the current compating assignement configuration
*/
public static boolean isCompactingAssignment() {
return COMPACT.equals(JavaCore.getOptions().get(PREF_STYLE_COMPACT_ASSIGNEMENT));
}
/**
* Gets the current compating assignement configuration
*/
public static boolean useSpaces() {
return SPACE.equals(JavaCore.getOptions().get(PREF_TAB_CHAR));
}
private static int getIntValue(String string, int dflt) {
try {
return Integer.parseInt(string); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | } catch (NumberFormatException e) {
}
return dflt;
}
/**
* Initializes the current options (read from preference store)
*/
public static void initDefaults(IPreferenceStore store) {
Hashtable hashtable= JavaCore.getDefaultOptions();
Hashtable currOptions= JavaCore.getOptions();
String[] allKeys= getAllKeys();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String defValue= (String) hashtable.get(key);
if (defValue != null) {
store.setDefault(key, defValue);
} else {
JavaPlugin.logErrorMessage("CodeFormatterPreferencePage: value is null: " + key);
}
String val= store.getString(key);
if (val != null) {
currOptions.put(key, val);
}
}
JavaCore.setOptions(currOptions);
}
private static class ControlData { |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private String fKey;
private String[] fValues;
public ControlData(String key, String[] values) {
fKey= key;
fValues= values;
}
public String getKey() {
return fKey;
}
public String getValue(boolean selection) {
int index= selection ? 0 : 1;
return fValues[index];
} |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | public String getValue(int index) {
return fValues[index];
}
public int getSelection(String value) {
for (int i= 0; i < fValues.length; i++) {
if (value.equals(fValues[i])) {
return i;
}
}
throw new IllegalArgumentException();
}
}
private Hashtable fWorkingValues;
private ArrayList fCheckBoxes;
private ArrayList fTextBoxes;
private SelectionListener fButtonSelectionListener;
private ModifyListener fTextModifyListener;
private String fPreviewText;
private IDocument fPreviewDocument;
private Text fTabSizeTextBox;
public CodeFormatterPreferencePage() {
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("CodeFormatterPreferencePage.description")); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fWorkingValues= JavaCore.getOptions();
fCheckBoxes= new ArrayList();
fTextBoxes= new ArrayList();
fButtonSelectionListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
if (!e.widget.isDisposed()) {
controlChanged((Button) e.widget);
}
}
};
fTextModifyListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
if (!e.widget.isDisposed()) {
textChanged((Text) e.widget);
}
}
};
fPreviewDocument= new Document();
fPreviewText= loadPreviewFile("CodeFormatterPreviewCode.txt");
}
/*
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
}
/* |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | * @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.CODEFORMATTER_PREFERENCE_PAGE));
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
Composite composite= new Composite(parent, SWT.NONE);
composite.setLayout(layout);
TabFolder folder= new TabFolder(composite, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
String[] insertNotInsert= new String[] { INSERT, DO_NOT_INSERT };
layout= new GridLayout();
layout.numColumns= 2;
Composite newlineComposite= new Composite(folder, SWT.NULL);
newlineComposite.setLayout(layout); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | String label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_opening_braces.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_OPENING_BRACES, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_control_statement.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_CONTROL_STATEMENT, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_clear_lines");
addCheckBox(newlineComposite, label, PREF_NEWLINE_CLEAR_ALL, new String[] { CLEAR_ALL, PRESERVE_ONE } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_else_if.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_ELSE_IF, insertNotInsert);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_empty_block.label");
addCheckBox(newlineComposite, label, PREF_NEWLINE_EMPTY_BLOCK, insertNotInsert);
layout= new GridLayout();
layout.numColumns= 2;
Composite lineSplittingComposite= new Composite(folder, SWT.NULL);
lineSplittingComposite.setLayout(layout);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.split_line.label");
addTextField(lineSplittingComposite, label, PREF_LINE_SPLIT);
layout= new GridLayout();
layout.numColumns= 2;
Composite styleComposite= new Composite(folder, SWT.NULL);
styleComposite.setLayout(layout);
label= JavaUIMessages.getString("CodeFormatterPreferencePage.style_compact_assignement.label");
addCheckBox(styleComposite, label, PREF_STYLE_COMPACT_ASSIGNEMENT, new String[] { COMPACT, NORMAL } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_char.label");
addCheckBox(styleComposite, label, PREF_TAB_CHAR, new String[] { TAB, SPACE } );
label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_size.label"); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fTabSizeTextBox= addTextField(styleComposite, label, PREF_TAB_SIZE);
fTabSizeTextBox.setEnabled(!usesTabs());
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.newline.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_IMPDECL));
item.setControl(newlineComposite);
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.linesplit.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(lineSplittingComposite);
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("CodeFormatterPreferencePage.tab.style.tabtitle"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_SEARCH_REF));
item.setControl(styleComposite);
createPreview(parent);
updatePreview();
return composite;
}
private Control createPreview(Composite parent) {
SourceViewer previewViewer= new SourceViewer(parent, null, SWT.V_SCROLL);
JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();
previewViewer.configure(new JavaSourceViewerConfiguration(tools, null));
previewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
previewViewer.setEditable(false);
previewViewer.setDocument(fPreviewDocument); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | Control control= previewViewer.getControl();
control.setLayoutData(new GridData(GridData.FILL_BOTH));
return control;
}
private Button addCheckBox(Composite parent, String label, String key, String[] values) {
ControlData data= new ControlData(key, values);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
Button checkBox= new Button(parent, SWT.CHECK);
checkBox.setText(label);
checkBox.setData(data);
checkBox.setLayoutData(gd);
String currValue= (String)fWorkingValues.get(key);
checkBox.setSelection(data.getSelection(currValue) == 0);
checkBox.addSelectionListener(fButtonSelectionListener);
fCheckBoxes.add(checkBox);
return checkBox;
}
private Text addTextField(Composite parent, String label, String key) {
Label labelControl= new Label(parent, SWT.NONE);
labelControl.setText(label);
labelControl.setLayoutData(new GridData());
Text textBox= new Text(parent, SWT.BORDER | SWT.SINGLE); |
Subsets and Splits