issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
} } private void setDefaultAttributes() { String projPath= ""; try { IProject[] projects= fWorkspaceRoot.getProjects(); for (int i= 0; i < projects.length; i++) { IProject proj= projects[i]; if (proj.hasNature(JavaCore.NATURE_ID)) { projPath= proj.getFullPath().makeRelative().toString(); break; } } } catch (CoreException e) { } fProjectField.setText(projPath); fRootDialogField.setText(""); } /** * @see WizardPage#createControl */ public void createControl(Composite parent) { initializeDialogUnits(parent);
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginWidth= 0; layout.marginHeight= 0; layout.numColumns= 3; composite.setLayout(layout); fProjectField.doFillIntoGrid(composite, 3); fRootDialogField.doFillIntoGrid(composite, 3); fRootDialogField.setFocus(); int maxFieldWidth= convertWidthInCharsToPixels(40); LayoutUtil.setWidthHint(fProjectField.getTextControl(null), maxFieldWidth); LayoutUtil.setHorizontalGrabbing(fProjectField.getTextControl(null)); LayoutUtil.setWidthHint(fRootDialogField.getTextControl(null), maxFieldWidth); (new Separator()).doFillIntoGrid(composite, 3); fEditClassPathField.doFillIntoGrid(composite, 3); Control control= fEditClassPathField.getSelectionButton(null); GridData gd= (GridData) control.getLayoutData(); gd.verticalAlignment= GridData.END; gd.horizontalAlignment= GridData.BEGINNING; setControl(composite); WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.NEW_PACKAGEROOT_WIZARD_PAGE); } private class RootFieldAdapter implements IStringButtonAdapter, IDialogFieldListener {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
public void changeControlPressed(DialogField field) { packRootChangeControlPressed(field); } public void dialogFieldChanged(DialogField field) { packRootDialogFieldChanged(field); } } private void packRootChangeControlPressed(DialogField field) { if (field == fRootDialogField) { IFolder folder= chooseFolder(); if (folder != null) { IPath path= folder.getFullPath().removeFirstSegments(1); fRootDialogField.setText(path.toString()); } } else if (field == fProjectField) { IJavaProject jproject= chooseProject(); if (jproject != null) { IPath path= jproject.getProject().getFullPath().makeRelative(); fProjectField.setText(path.toString()); } } } private void packRootDialogFieldChanged(DialogField field) { if (field == fRootDialogField) { updateRootStatus();
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
} else if (field == fProjectField) { updateProjectStatus(); updateRootStatus(); } else if (field == fEditClassPathField) { if (showClassPathPropertyPage()) { updateProjectStatus(); updateRootStatus(); } } updateStatus(new IStatus[] { fProjectStatus, fRootStatus }); } private void updateProjectStatus() { fCurrJProject= null; String str= fProjectField.getText(); if (str.length() == 0) { fProjectStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.EnterProjectName")); return; } IPath path= new Path(str); if (path.segmentCount() != 1) { fProjectStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.InvalidProjectPath")); return; } IProject project= fWorkspaceRoot.getProject(path.toString()); if (!project.exists()) { fProjectStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.ProjectNotExists")); return;
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
} try { if (project.hasNature(JavaCore.NATURE_ID)) { fCurrJProject= JavaCore.create(project); fEntries= fCurrJProject.getRawClasspath(); fOutputLocation= fCurrJProject.getOutputLocation(); fProjectStatus.setOK(); return; } } catch (CoreException e) { JavaPlugin.log(e); fCurrJProject= null; } fProjectStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.NotAJavaProject")); } private void updateRootStatus() { fRootDialogField.enableButton(fCurrJProject != null); if (fCurrJProject == null) { return; } String str= fRootDialogField.getText(); if (str.length() == 0) { fRootStatus.setError(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.error.EnterRootName", fCurrJProject.getProject().getFullPath().toString())); } else { IPath path= fCurrJProject.getProject().getFullPath().append(str); if (!fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) { fRootStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.InvalidRootName")); } else {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
IResource res= fWorkspaceRoot.findMember(path); if (res != null) { if (res.getType() != IResource.FOLDER) { fRootStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.NotAFolder")); return; } } IClasspathEntry[] newEntries= new IClasspathEntry[fEntries.length + 1]; for (int i= 0; i < fEntries.length; i++) { IClasspathEntry curr= fEntries[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (path.equals(curr.getPath())) { fRootStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.AlreadyExisting")); return; } } newEntries[i]= curr; } newEntries[fEntries.length]= JavaCore.newSourceEntry(path); IStatus status= JavaConventions.validateClasspath(fCurrJProject, newEntries, fOutputLocation); if (!status.isOK()) { fRootStatus.setError(status.getMessage()); return; } fRootStatus.setOK(); } } }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
/** * @see NewElementWizardPage#getRunnable */ public IRunnableWithProgress getRunnable() { return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { fCreatedRoot= createPackageFragmentRoot(monitor, getShell()); } catch (CoreException e) { throw new InvocationTargetException(e); } } }; } protected IPackageFragmentRoot getNewPackageFragmentRoot() { return fCreatedRoot; } protected IPackageFragmentRoot createPackageFragmentRoot(IProgressMonitor monitor, Shell shell) throws CoreException { String relPath= fRootDialogField.getText(); IFolder folder= fCurrJProject.getProject().getFolder(relPath); IPath path= folder.getFullPath(); if (!folder.exists()) { CoreUtility.createFolder(folder, true, true, monitor); }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
IClasspathEntry[] entries= fCurrJProject.getRawClasspath(); IClasspathEntry[] newEntries= new IClasspathEntry[entries.length + 1]; for (int i= entries.length - 1, k= entries.length; i >= 0; i--) { IClasspathEntry curr= entries[i]; if (k > i && curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) { newEntries[k--]= JavaCore.newSourceEntry(path); } newEntries[k--]= curr; } fCurrJProject.setRawClasspath(newEntries, monitor); return fCurrJProject.getPackageFragmentRoot(folder); } private IFolder chooseFolder() { Class[] acceptedClasses= new Class[] { IFolder.class }; ISelectionStatusValidator validator= new TypedElementSelectionValidator(acceptedClasses, false); Object[] notWanted= getFilteredExistingContainerEntries(); ViewerFilter filter= new TypedViewerFilter(acceptedClasses, notWanted); ILabelProvider lp= new WorkbenchLabelProvider(); ITreeContentProvider cp= new WorkbenchContentProvider(); ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); dialog.setValidator(validator); dialog.setTitle(NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.title")); dialog.setMessage(NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.description")); dialog.addFilter(filter); dialog.setInput(fCurrJProject.getProject());
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
IResource res= fWorkspaceRoot.findMember(new Path(fRootDialogField.getText())); if (res != null) { dialog.setInitialSelection(res); } if (dialog.open() == dialog.OK) { return (IFolder) dialog.getFirstResult(); } return null; } private IJavaProject chooseProject() { IJavaProject[] projects; try { projects= JavaCore.create(fWorkspaceRoot).getJavaProjects(); } catch (JavaModelException e) { JavaPlugin.log(e); projects= new IJavaProject[0]; } ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider); dialog.setTitle(NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseProjectDialog.title")); dialog.setMessage(NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseProjectDialog.description")); dialog.setElements(projects); dialog.setInitialSelections(new Object[] { fCurrJProject }); if (dialog.open() == dialog.OK) { return (IJavaProject) dialog.getFirstResult(); } return null; }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
private class EditClassPathDialog extends StatusDialog implements IStatusChangeListener { private BuildPathsBlock fBuildPathsBlock; public EditClassPathDialog(Shell parent) { super(parent); fBuildPathsBlock= new BuildPathsBlock(fWorkspaceRoot, this, false); } public void create() { super.create(); fBuildPathsBlock.init(fCurrJProject, null, null); } protected Control createDialogArea(Composite parent) { Composite composite= (Composite)super.createDialogArea(parent); Control inner= fBuildPathsBlock.createControl(composite); inner.setLayoutData(new org.eclipse.swt.layout.GridData(org.eclipse.swt.layout.GridData.FILL_BOTH)); return composite; } public void statusChanged(IStatus status) { updateStatus(status); } protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
IRunnableWithProgress runnable= fBuildPathsBlock.getRunnable(fBuildPathsBlock.getRemoveOldBinariesQuery(getShell())); if (invokeRunnable(runnable)) { setReturnCode(OK); } else { setReturnCode(CANCEL); } } close(); } private boolean invokeRunnable(IRunnableWithProgress runnable) { IRunnableWithProgress op= new WorkspaceModifyDelegatingOperation(runnable); try { getWizard().getContainer().run(false, true, op); } catch (InvocationTargetException e) { Shell shell= getShell(); String title= NewWizardMessages.getString("NewSourceFolderWizardPage.op_error.title"); String message= NewWizardMessages.getString("NewSourceFolderWizardPage.op_error.message"); ExceptionHandler.handle(e, shell, title, message); return false; } catch (InterruptedException e) { return false; } return true; } } private boolean showClassPathPropertyPage() { EditClassPathDialog dialog= new EditClassPathDialog(getShell()); dialog.setTitle(NewWizardMessages.getString("NewSourceFolderWizardPage.EditClassPathDialog.title"));
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
return (dialog.open() == EditClassPathDialog.OK); } private IContainer[] getFilteredExistingContainerEntries() { if (fCurrJProject == null) { return new IContainer[0]; } List res= new ArrayList(); try { IResource container= fWorkspaceRoot.findMember(fCurrJProject.getOutputLocation()); if (container != null) { res.add(container); } } catch (JavaModelException e) { JavaPlugin.log(e); } for (int i= 0; i < fEntries.length; i++) { IClasspathEntry elem= fEntries[i]; if (elem.getEntryKind() == IClasspathEntry.CPE_SOURCE) { IResource container= fWorkspaceRoot.findMember(elem.getPath()); if (container != null) { res.add(container); } } } return (IContainer[]) res.toArray(new IContainer[res.size()]); } }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.buildpaths; import java.lang.reflect.InvocationTargetException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.CoreException;
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; import org.eclipse.swt.widgets.Widget; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.ui.dialogs.ISelectionStatusValidator; import org.eclipse.ui.dialogs.ListSelectionDialog;
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.model.WorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.launching.JavaRuntime; import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations; 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.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.util.CoreUtility; import org.eclipse.jdt.internal.ui.util.PixelConverter; import org.eclipse.jdt.internal.ui.util.TabFolderLayout; import org.eclipse.jdt.internal.ui.viewsupport.ImageDisposer; import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator; import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.CheckedListDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField; public class BuildPathsBlock {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
public static interface IRemoveOldBinariesQuery { public static int YES= 0; public static int NO= 1; public static int CANCEL= 2; /** * Do the callback. Returns YES, NO, CANCEL to decide if .class files should be removed from the * old output location. */ int doQuery(IPath oldOutputLocation); } private IWorkspaceRoot fWorkspaceRoot; private CheckedListDialogField fClassPathList; private StringButtonDialogField fBuildPathDialogField;
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
private StatusInfo fClassPathStatus; private StatusInfo fBuildPathStatus; private IJavaProject fCurrJProject; private IPath fOutputLocationPath; private IStatusChangeListener fContext; private Control fSWTWidget; private boolean fShowSourceFolderPage; private SourceContainerWorkbookPage fSourceContainerPage; private ProjectsWorkbookPage fProjectsPage; private LibrariesWorkbookPage fLibrariesPage; private BuildPathBasePage fCurrPage; public BuildPathsBlock(IWorkspaceRoot root, IStatusChangeListener context, boolean showSourceFolders) { fWorkspaceRoot= root; fContext= context; fShowSourceFolderPage= showSourceFolders; fSourceContainerPage= null; fLibrariesPage= null; fProjectsPage= null; fCurrPage= null; BuildPathAdapter adapter= new BuildPathAdapter();
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
String[] buttonLabels= new String[] { NewWizardMessages.getString("BuildPathsBlock.classpath.up.button"), NewWizardMessages.getString("BuildPathsBlock.classpath.down.button"), null, NewWizardMessages.getString("BuildPathsBlock.classpath.checkall.button"), NewWizardMessages.getString("BuildPathsBlock.classpath.uncheckall.button") }; fClassPathList= new CheckedListDialogField(null, buttonLabels, new CPListLabelProvider()); fClassPathList.setDialogFieldListener(adapter); fClassPathList.setLabelText(NewWizardMessages.getString("BuildPathsBlock.classpath.label")); fClassPathList.setUpButtonIndex(0); fClassPathList.setDownButtonIndex(1); fClassPathList.setCheckAllButtonIndex(3); fClassPathList.setUncheckAllButtonIndex(4); fBuildPathDialogField= new StringButtonDialogField(adapter); fBuildPathDialogField.setButtonLabel(NewWizardMessages.getString("BuildPathsBlock.buildpath.button")); fBuildPathDialogField.setDialogFieldListener(adapter); fBuildPathDialogField.setLabelText(NewWizardMessages.getString("BuildPathsBlock.buildpath.label")); fBuildPathStatus= new StatusInfo(); fClassPathStatus= new StatusInfo(); fCurrJProject= null; }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
public Control createControl(Composite parent) { fSWTWidget= parent; PixelConverter converter= new PixelConverter(parent); Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginWidth= 0; layout.numColumns= 1; composite.setLayout(layout); TabFolder folder= new TabFolder(composite, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); folder.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { tabChanged(e.item); } }); ImageRegistry imageRegistry= JavaPlugin.getDefault().getImageRegistry(); TabItem item; fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField); item= new TabItem(folder, SWT.NONE); item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.source")); item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT)); item.setData(fSourceContainerPage);
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
item.setControl(fSourceContainerPage.getControl(folder)); IWorkbench workbench= JavaPlugin.getDefault().getWorkbench(); Image projectImage= workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT); fProjectsPage= new ProjectsWorkbookPage(fClassPathList); item= new TabItem(folder, SWT.NONE); item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.projects")); item.setImage(projectImage); item.setData(fProjectsPage); item.setControl(fProjectsPage.getControl(folder)); fLibrariesPage= new LibrariesWorkbookPage(fWorkspaceRoot, fClassPathList); item= new TabItem(folder, SWT.NONE); item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.libraries")); item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_LIBRARY)); item.setData(fLibrariesPage); item.setControl(fLibrariesPage.getControl(folder)); Image cpoImage= JavaPluginImages.DESC_TOOL_CLASSPATH_ORDER.createImage(); composite.addDisposeListener(new ImageDisposer(cpoImage)); ClasspathOrderingWorkbookPage ordpage= new ClasspathOrderingWorkbookPage(fClassPathList); item= new TabItem(folder, SWT.NONE); item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.order")); item.setImage(cpoImage); item.setData(ordpage); item.setControl(ordpage.getControl(folder));
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
if (fCurrJProject != null) { fSourceContainerPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject); } Composite editorcomp= new Composite(composite, SWT.NONE); DialogField[] editors= new DialogField[] { fBuildPathDialogField }; LayoutUtil.doDefaultLayout(editorcomp, editors, true, 0, 0); int maxFieldWidth= converter.convertWidthInCharsToPixels(40); LayoutUtil.setWidthHint(fBuildPathDialogField.getTextControl(null), maxFieldWidth); LayoutUtil.setHorizontalGrabbing(fBuildPathDialogField.getTextControl(null)); editorcomp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); if (fShowSourceFolderPage) { folder.setSelection(0); fCurrPage= fSourceContainerPage; } else { folder.setSelection(3); fCurrPage= ordpage; fClassPathList.selectFirstElement(); } WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.BUILD_PATH_BLOCK); return composite; } private Shell getShell() {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
if (fSWTWidget != null) { return fSWTWidget.getShell(); } return JavaPlugin.getActiveWorkbenchShell(); } /** * Initializes the classpath for the given project. Multiple calls to init are allowed, * but all existing settings will be cleared and replace by the given or default paths. * @param project The java project to configure. Does not have to exist. * @param outputLocation The output location to be set in the page. If <code>null</code> * is passed, jdt default settings are used, or - if the project is an existing Java project- the * output location of the existing project * @param classpathEntries The classpath entries to be set in the page. If <code>null</code> * is passed, jdt default settings are used, or - if the project is an existing Java project - the * classpath entries of the existing project */ public void init(IJavaProject jproject, IPath outputLocation, IClasspathEntry[] classpathEntries) { fCurrJProject= jproject; boolean projectExists= false; try { IProject project= fCurrJProject.getProject(); projectExists= (project.exists() && project.getFile(".classpath").exists()); if (projectExists) { if (outputLocation == null) { outputLocation= fCurrJProject.getOutputLocation(); } if (classpathEntries == null) { classpathEntries= fCurrJProject.getRawClasspath();
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
} } } catch (CoreException e) { JavaPlugin.log(e.getStatus()); } if (outputLocation == null) { outputLocation= getDefaultBuildPath(jproject); } List newClassPath; if (classpathEntries == null) { newClassPath= getDefaultClassPath(jproject); } else { newClassPath= new ArrayList(); for (int i= 0; i < classpathEntries.length; i++) { IClasspathEntry curr= classpathEntries[i]; int entryKind= curr.getEntryKind(); IPath path= curr.getPath(); boolean isExported= curr.isExported(); IResource res= null; boolean isMissing= false; IPath resolvedPath= path; if (entryKind == IClasspathEntry.CPE_VARIABLE) { resolvedPath= JavaCore.getResolvedVariablePath(path); } res= fWorkspaceRoot.findMember(resolvedPath); if (res == null) {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
if (entryKind == IClasspathEntry.CPE_LIBRARY) { isMissing= !resolvedPath.toFile().isFile(); if (!ArchiveFileFilter.isArchivePath(resolvedPath)) { if (fWorkspaceRoot.getWorkspace().validatePath(resolvedPath.toString(), IResource.FOLDER).isOK()) { res= fWorkspaceRoot.getFolder(resolvedPath); } } } else if (entryKind == IClasspathEntry.CPE_SOURCE) { isMissing= true; if (fWorkspaceRoot.getWorkspace().validatePath(resolvedPath.toString(), IResource.FOLDER).isOK()) { res= fWorkspaceRoot.getFolder(resolvedPath); } } } CPListElement elem= new CPListElement(entryKind, path, res, curr.getSourceAttachmentPath(), curr.getSourceAttachmentRootPath(), isExported); if (projectExists) { elem.setIsMissing(isMissing); } newClassPath.add(elem); } } List exportedEntries = new ArrayList(); for (int i= 0; i < newClassPath.size(); i++) { CPListElement curr= (CPListElement) newClassPath.get(i); if (curr.isExported() || curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) { exportedEntries.add(curr); } }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
fBuildPathDialogField.setText(outputLocation.makeRelative().toString()); fClassPathList.setElements(newClassPath); fClassPathList.setCheckedElements(exportedEntries); if (fSourceContainerPage != null) { fSourceContainerPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject); } doStatusLineUpdate(); } /** * Returns the Java project. Can return <code>null<code> if the page has not * been initialized. */ public IJavaProject getJavaProject() { return fCurrJProject; } /** * Returns the current output location. Note that the path returned must not be valid. */ public IPath getOutputLocation() { return new Path(fBuildPathDialogField.getText()).makeAbsolute(); }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
/** * Returns the current class path (raw). Note that the entries returned must not be valid. */ public IClasspathEntry[] getRawClassPath() { List elements= fClassPathList.getElements(); int nElements= elements.size(); IClasspathEntry[] entries= new IClasspathEntry[elements.size()]; for (int i= 0; i < nElements; i++) { CPListElement currElement= (CPListElement) elements.get(i); entries[i]= currElement.getClasspathEntry(); } return entries; } private List getDefaultClassPath(IJavaProject jproj) { List list= new ArrayList(); IResource srcFolder; if (JavaBasePreferencePage.useSrcAndBinFolders()) { String sourceFolderName= JavaBasePreferencePage.getSourceFolderName(); srcFolder= jproj.getProject().getFolder(sourceFolderName); } else { srcFolder= jproj.getProject(); } list.add(new CPListElement(IClasspathEntry.CPE_SOURCE, srcFolder.getFullPath(), srcFolder)); IPath libPath= new Path(JavaRuntime.JRELIB_VARIABLE); IPath attachPath= new Path(JavaRuntime.JRESRC_VARIABLE); IPath attachRoot= new Path(JavaRuntime.JRESRCROOT_VARIABLE);
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
CPListElement elem= new CPListElement(IClasspathEntry.CPE_VARIABLE, libPath, null, attachPath, attachRoot, false); list.add(elem); return list; } private IPath getDefaultBuildPath(IJavaProject jproj) { if (JavaBasePreferencePage.useSrcAndBinFolders()) { String outputLocationName= JavaBasePreferencePage.getOutputLocationName(); return jproj.getProject().getFullPath().append(outputLocationName); } else { return jproj.getProject().getFullPath(); } } private class BuildPathAdapter implements IStringButtonAdapter, IDialogFieldListener { public void changeControlPressed(DialogField field) { buildPathChangeControlPressed(field); } public void dialogFieldChanged(DialogField field) { buildPathDialogFieldChanged(field); } } private void buildPathChangeControlPressed(DialogField field) { if (field == fBuildPathDialogField) { IContainer container= chooseContainer(); if (container != null) {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
fBuildPathDialogField.setText(container.getFullPath().toString()); } } } private void buildPathDialogFieldChanged(DialogField field) { if (field == fClassPathList) { updateClassPathStatus(); updateBuildPathStatus(); } else if (field == fBuildPathDialogField) { updateBuildPathStatus(); } doStatusLineUpdate(); } private void doStatusLineUpdate() { IStatus res= findMostSevereStatus(); fContext.statusChanged(res); } private IStatus findMostSevereStatus() { return StatusUtil.getMoreSevere(fClassPathStatus, fBuildPathStatus); } /** * Validates the build path.
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
*/ private void updateClassPathStatus() { fClassPathStatus.setOK(); List elements= fClassPathList.getElements(); boolean entryMissing= false; IClasspathEntry[] entries= new IClasspathEntry[elements.size()]; for (int i= elements.size()-1 ; i >= 0 ; i--) { CPListElement currElement= (CPListElement)elements.get(i); boolean isChecked= fClassPathList.isChecked(currElement); if (currElement.getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (!isChecked) { fClassPathList.setCheckedWithoutUpdate(currElement, true); } } else { currElement.setExported(isChecked); } entries[i]= currElement.getClasspathEntry(); entryMissing= entryMissing || currElement.isMissing(); } if (entryMissing) { fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.EntryMissing")); } if (fCurrJProject.hasClasspathCycle(entries)) { fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.CycleInClassPath")); } }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
/** * Validates output location & build path. */ private void updateBuildPathStatus() { fOutputLocationPath= null; String text= fBuildPathDialogField.getText(); if ("".equals(text)) { fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.EnterBuildPath")); return; } IPath path= getOutputLocation(); IResource res= fWorkspaceRoot.findMember(path); if (res != null) { if (res.getType() == IResource.FILE) { fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.InvalidBuildPath")); return; } } fOutputLocationPath= path; List elements= fClassPathList.getElements(); IClasspathEntry[] entries= new IClasspathEntry[elements.size()]; for (int i= elements.size()-1 ; i >= 0 ; i--) { CPListElement currElement= (CPListElement)elements.get(i); entries[i]= currElement.getClasspathEntry(); }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
IStatus status= JavaConventions.validateClasspath(fCurrJProject, entries, path); if (!status.isOK()) { fBuildPathStatus.setError(status.getMessage()); return; } if (res != null && res.exists() && fCurrJProject.exists()) { try { IPath oldOutputLocation= fCurrJProject.getOutputLocation(); if (!oldOutputLocation.equals(fOutputLocationPath)) { if (((IContainer)res).members().length > 0) { fBuildPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.OutputFolderNotEmpty")); return; } } } catch (CoreException e) { JavaPlugin.log(e); } } fBuildPathStatus.setOK(); } /** * Creates a runnable that sets the configured build paths. */ public IRunnableWithProgress getRunnable(final IRemoveOldBinariesQuery reorgQuery) { final List classPathEntries= fClassPathList.getElements();
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
final IPath path= getOutputLocation(); return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(NewWizardMessages.getString("BuildPathsBlock.operationdesc"), 10); try { createJavaProject(classPathEntries, path, reorgQuery, monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } finally { monitor.done(); } } }; } public IRemoveOldBinariesQuery getRemoveOldBinariesQuery(final Shell shell) { return new IRemoveOldBinariesQuery() { public int doQuery(final IPath oldOutputLocation) { final int[] res= new int[] { IRemoveOldBinariesQuery.NO }; shell.getDisplay().syncExec(new Runnable() { public void run() { String title= NewWizardMessages.getString("BuildPathsBlock.RemoveBinariesDialog.title"); String message= NewWizardMessages.getFormattedString("BuildPathsBlock.RemoveBinariesDialog.description", oldOutputLocation.toString()); MessageDialog dialog= new MessageDialog(getShell(), title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2); int returnVal= dialog.open(); if (returnVal == 0) {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
res[0]= IRemoveOldBinariesQuery.YES; } else if (returnVal == 1) { res[0]= IRemoveOldBinariesQuery.NO; } else { res[0]= IRemoveOldBinariesQuery.CANCEL; } } }); return res[0]; } }; } /** * Creates the Java project and sets the configured build path and output location. * If the project already exists only build paths are updated. */ private void createJavaProject(List classPathEntries, IPath outputLocation, IRemoveOldBinariesQuery reorgQuery, IProgressMonitor monitor) throws CoreException, InterruptedException { if (reorgQuery != null) { IPath oldOutputLocation= fCurrJProject.getOutputLocation(); if (!outputLocation.equals(oldOutputLocation)) { IResource res= fWorkspaceRoot.findMember(oldOutputLocation); if (res instanceof IContainer && hasClassfiles(res)) { int result= reorgQuery.doQuery(oldOutputLocation); if (result == reorgQuery.CANCEL) { throw new InterruptedException(); } else if (result == reorgQuery.YES) { removeOldClassfiles(res);
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
} } } } if (!fWorkspaceRoot.exists(outputLocation)) { IFolder folder= fWorkspaceRoot.getFolder(outputLocation); CoreUtility.createFolder(folder, true, true, null); } monitor.worked(2); int nEntries= classPathEntries.size(); IClasspathEntry[] classpath= new IClasspathEntry[nEntries]; for (int i= 0; i < nEntries; i++) { CPListElement entry= ((CPListElement)classPathEntries.get(i)); IResource res= entry.getResource(); if ((res instanceof IFolder) && !res.exists()) { CoreUtility.createFolder((IFolder)res, true, true, null); } classpath[i]= entry.getClasspathEntry(); URL javadocLocation= entry.getJavadocLocation(); if (javadocLocation != null) { IPath path= entry.getPath();
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
if (entry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) { path= JavaCore.getResolvedVariablePath(path); } if (path != null) { JavaDocLocations.setLibraryJavadocLocation(path, javadocLocation); } } } monitor.worked(1); fCurrJProject.setRawClasspath(classpath, outputLocation, new SubProgressMonitor(monitor, 7)); } private boolean hasClassfiles(IResource resource) throws CoreException { if (resource.isDerived() && "class".equals(resource.getFileExtension())) { return true; } if (resource instanceof IContainer) { IResource[] members= ((IContainer) resource).members(); for (int i= 0; i < members.length; i++) { if (hasClassfiles(members[i])) { return true; } } } return false; } private void removeOldClassfiles(IResource resource) throws CoreException { if (resource.isDerived() && "class".equals(resource.getFileExtension())) {
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
resource.delete(false, null); } if (resource instanceof IContainer) { IResource[] members= ((IContainer) resource).members(); for (int i= 0; i < members.length; i++) { removeOldClassfiles(members[i]); } } } private IContainer chooseContainer() { Class[] acceptedClasses= new Class[] { IProject.class, IFolder.class }; ISelectionStatusValidator validator= new TypedElementSelectionValidator(acceptedClasses, false); IProject[] allProjects= fWorkspaceRoot.getProjects(); ArrayList rejectedElements= new ArrayList(allProjects.length); IProject currProject= fCurrJProject.getProject(); for (int i= 0; i < allProjects.length; i++) { if (!allProjects[i].equals(currProject)) { rejectedElements.add(allProjects[i]); } } ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray()); ILabelProvider lp= new WorkbenchLabelProvider(); ITreeContentProvider cp= new WorkbenchContentProvider(); IResource initSelection= null; if (fOutputLocationPath != null) { initSelection= fWorkspaceRoot.findMember(fOutputLocationPath); }
13,034
Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
resolved fixed
1986114
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-02T16:39:00Z
2002-04-08T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); dialog.setTitle(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.title")); dialog.setValidator(validator); dialog.setMessage(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.description")); dialog.addFilter(filter); dialog.setInput(fWorkspaceRoot); dialog.setInitialSelection(initSelection); if (dialog.open() == dialog.OK) { return (IContainer)dialog.getFirstResult(); } return null; } private void tabChanged(Widget widget) { if (widget instanceof TabItem) { BuildPathBasePage newPage= (BuildPathBasePage) ((TabItem) widget).getData(); if (fCurrPage != null) { List selection= fCurrPage.getSelection(); if (!selection.isEmpty()) { newPage.setSelection(selection); } } fCurrPage= newPage; } } }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
package org.eclipse.jdt.internal.ui.javaeditor; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog;
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.dialogs.ElementListSelectionDialog; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.IUpdate; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchConstants; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.ITypeNameRequestor; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.internal.corext.codemanipulation.AddImportsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.corext.util.TypeInfo; import org.eclipse.jdt.internal.corext.util.TypeInfoRequestor; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; public class AddImportOnSelectionAction extends Action implements IUpdate {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
private ITextEditor fEditor; public AddImportOnSelectionAction(ITextEditor editor) { super(JavaEditorMessages.getString("AddImportOnSelection.label")); setToolTipText(JavaEditorMessages.getString("AddImportOnSelection.tooltip")); setDescription(JavaEditorMessages.getString("AddImportOnSelection.description")); fEditor= editor; WorkbenchHelp.setHelp(this, IJavaHelpContextIds.ADD_IMPORT_ON_SELECTION_ACTION); } public AddImportOnSelectionAction() { this(null); } public void setContentEditor(ITextEditor editor) {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
fEditor= editor; } public void update() { boolean isEnabled= false; try { ISelection selection= fEditor.getSelectionProvider().getSelection(); isEnabled= (selection instanceof ITextSelection && JavaModelUtil.isEditable(getCompilationUnit())); } catch(JavaModelException e) { } setEnabled(isEnabled); } private ICompilationUnit getCompilationUnit () { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(fEditor.getEditorInput()); } /** * @see IAction#actionPerformed */ public void run() { ICompilationUnit cu= getCompilationUnit(); if (cu != null) { ISelection s= fEditor.getSelectionProvider().getSelection(); IDocument doc= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput()); ITextSelection selection= (ITextSelection) s; if (doc != null) { try {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
int nameStart= getNameStart(doc, selection.getOffset()); int nameEnd= getNameEnd(doc, selection.getOffset() + selection.getLength()); int len= nameEnd - nameStart; String name= doc.get(nameStart, len).trim(); String simpleName= Signature.getSimpleName(name); String containerName= Signature.getQualifier(name); IImportDeclaration existingImport= JavaModelUtil.findImport(cu, simpleName); if (existingImport != null) { if (!existingImport.getElementName().equals(name)) { getShell().getDisplay().beep(); } return; } IJavaSearchScope searchScope= SearchEngine.createJavaSearchScope(new IJavaElement[] { cu.getJavaProject() }); TypeInfo[] types= findAllTypes(simpleName, searchScope, null); if (types.length== 0) { getShell().getDisplay().beep(); return; } TypeInfo chosen= selectResult(types, containerName, getShell()); if (chosen == null) { return; } IType type= chosen.resolveType(searchScope);
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
if (type == null) { JavaPlugin.logErrorMessage("AddImportOnSelectionAction: Failed to resolve TypeRef: " + chosen.toString()); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), JavaEditorMessages.getString("AddImportOnSelection.error.notresolved.message")); return; } removeQualification(doc, nameStart, chosen); CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); AddImportsOperation op= new AddImportsOperation(cu, new IJavaElement[] { type }, settings, false); ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); try { dialog.run(false, true, new WorkbenchRunnableAdapter(op)); } catch (InvocationTargetException e) { JavaPlugin.log(e); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getTargetException().getMessage()); } catch (InterruptedException e) { } return; } catch (CoreException e) { JavaPlugin.log(e); ErrorDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), null, e.getStatus()); } catch (BadLocationException e) { JavaPlugin.log(e); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getMessage()); } } } }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
private int getNameStart(IDocument doc, int pos) throws BadLocationException { while (pos > 0) { char ch= doc.getChar(pos - 1); if (!Character.isJavaIdentifierPart(ch) && ch != '.') { return pos; } pos--; } return pos; } private int getNameEnd(IDocument doc, int pos) throws BadLocationException { int len= doc.getLength(); while (pos < len) { char ch= doc.getChar(pos); if (!Character.isJavaIdentifierPart(ch)) { return pos; } pos++; } return pos; } private void removeQualification(IDocument doc, int nameStart, TypeInfo typeInfo) throws BadLocationException { String containerName= typeInfo.getTypeContainerName(); int containerLen= containerName.length(); if (containerLen > 0) { for (int k= 0; k < containerLen; k++) { if (doc.getChar(nameStart + k) != containerName.charAt(k)) { return;
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
} } doc.replace(nameStart, containerLen + 1, ""); } } /** * Finds a type by the simple name. */ private static TypeInfo[] findAllTypes(String simpleTypeName, IJavaSearchScope searchScope, IProgressMonitor monitor) throws CoreException { SearchEngine searchEngine= new SearchEngine(); ArrayList typeRefsFound= new ArrayList(10); ITypeNameRequestor requestor= new TypeInfoRequestor(typeRefsFound); searchEngine.searchAllTypeNames( JavaPlugin.getWorkspace(), null, simpleTypeName.toCharArray(), IJavaSearchConstants.EXACT_MATCH, IJavaSearchConstants.CASE_SENSITIVE, IJavaSearchConstants.TYPE, searchScope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, monitor); return (TypeInfo[]) typeRefsFound.toArray(new TypeInfo[typeRefsFound.size()]); } private Shell getShell() { return fEditor.getSite().getShell();
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
} private TypeInfo selectResult(TypeInfo[] results, String containerName, Shell shell) { int nResults= results.length; if (nResults == 0) { return null; } else if (nResults == 1) { return results[0]; } if (containerName.length() != 0) { for (int i= 0; i < nResults; i++) { TypeInfo curr= (TypeInfo) results[i]; if (containerName.equals(curr.getTypeContainerName())) { return curr; } } } ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED)); dialog.setTitle(JavaEditorMessages.getString("AddImportOnSelection.dialog.title")); dialog.setMessage(JavaEditorMessages.getString("AddImportOnSelection.dialog.message")); dialog.setElements(results); if (dialog.open() == dialog.OK) { return (TypeInfo) dialog.getFirstResult(); } return null; } }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
package org.eclipse.jdt.ui.actions; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.HashSet; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IEditorActionBarContributor;
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.part.EditorActionBarContributor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.IChooseImportQuery; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.corext.util.TypeInfo; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.ActionMessages; import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter; import org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ProblemDialog; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; public class OrganizeImportsAction extends SelectionDispatchAction {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
private JavaEditor fEditor; /* (non-Javadoc) * Class implements IObjectActionDelegate */ public static class ObjectDelegate implements IObjectActionDelegate {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
private OrganizeImportsAction fAction; public void setActivePart(IAction action, IWorkbenchPart targetPart) { fAction= new OrganizeImportsAction(targetPart.getSite()); } public void run(IAction action) { fAction.run(); } public void selectionChanged(IAction action, ISelection selection) { if (fAction == null) action.setEnabled(false); } } public OrganizeImportsAction(IWorkbenchSite site) { super(site); setText(ActionMessages.getString("OrganizeImportsAction.label")); setToolTipText(ActionMessages.getString("OrganizeImportsAction.tooltip")); setDescription(ActionMessages.getString("OrganizeImportsAction.description")); WorkbenchHelp.setHelp(this, IJavaHelpContextIds.ORGANIZE_IMPORTS_ACTION); } /** * Creates a new <code>OrganizeImportsAction</code>. * <p> * Note: This constructor is for internal use only. Clients should not call this constructor. * </p>
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
*/ public OrganizeImportsAction(JavaEditor editor) { this(editor.getEditorSite()); fEditor= editor; } /* (non-Javadoc) * Method declared on SelectionDispatchAction. */ protected void selectionChanged(ITextSelection selection) { boolean isEnabled= false; try { if (fEditor != null) { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput()); isEnabled= JavaModelUtil.isEditable(cu); } } catch (JavaModelException e) { } setEnabled(isEnabled); } /* (non-Javadoc) * Method declared on SelectionDispatchAction. */ protected void selectionChanged(IStructuredSelection selection) { ICompilationUnit[] cus= getCompilationUnits(selection); boolean isEnabled= cus.length > 0; try { for (int i= 0; i < cus.length; i++) {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
if (!JavaModelUtil.isEditable(cus[i])) { isEnabled= false; break; } } } catch (JavaModelException e) { JavaPlugin.log(e); } setEnabled(isEnabled); } private ICompilationUnit[] getCompilationUnits(IStructuredSelection selection) { HashSet result= new HashSet(); Object[] selected= selection.toArray(); for (int i= 0; i < selected.length; i++) { try { if (selected[i] instanceof IJavaElement) { IJavaElement elem= (IJavaElement) selected[i]; switch (elem.getElementType()) { case IJavaElement.COMPILATION_UNIT: result.add(elem); break; case IJavaElement.IMPORT_CONTAINER: result.add(elem.getParent()); break; case IJavaElement.PACKAGE_FRAGMENT: IPackageFragment pack= (IPackageFragment) elem; result.addAll(Arrays.asList(pack.getCompilationUnits())); break; }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
} } catch (JavaModelException e) { JavaPlugin.log(e); } } return (ICompilationUnit[]) result.toArray(new ICompilationUnit[result.size()]); } /* (non-Javadoc) * Method declared on SelectionDispatchAction. */ protected void run(ITextSelection selection) { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput()); runOnSingle(cu, true); } /* (non-Javadoc) * Method declared on SelectionDispatchAction. */ protected void run(IStructuredSelection selection) { ICompilationUnit[] cus= getCompilationUnits(selection); if (cus.length == 1) { runOnSingle(cus[0], true); } else { runOnMultiple(cus, true); } } private void runOnMultiple(final ICompilationUnit[] cus, final boolean doResolve) { try { String message= ActionMessages.getString("OrganizeImportsAction.multi.status.description");
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
final MultiStatus status= new MultiStatus(JavaUI.ID_PLUGIN, Status.OK, message, null); ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); dialog.run(false, true, new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { doRunOnMultiple(cus, status, doResolve, monitor); } }); if (!status.isOK()) { String title= ActionMessages.getString("OrganizeImportsAction.multi.status.title"); ProblemDialog.open(getShell(), title, null, status); } } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), ActionMessages.getString("OrganizeImportsAction.error.title"), ActionMessages.getString("OrganizeImportsAction.error.message")); } catch (InterruptedException e) { } } private void doRunOnMultiple(ICompilationUnit[] cus, MultiStatus status, boolean doResolve, IProgressMonitor monitor) throws InterruptedException { final class OrganizeImportError extends Error { } if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(ActionMessages.getString("OrganizeImportsAction.multi.op.description"), cus.length); try {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference(); int threshold= ImportOrganizePreferencePage.getImportNumberThreshold(); boolean ignoreLowerCaseNames= ImportOrganizePreferencePage.doIgnoreLowerCaseNames(); IChooseImportQuery query= new IChooseImportQuery() { public TypeInfo[] chooseImports(TypeInfo[][] openChoices, ISourceRange[] ranges) { throw new OrganizeImportError(); } }; for (int i= 0; i < cus.length; i++) { ICompilationUnit cu= cus[i]; try { if (!cu.isWorkingCopy()) { ICompilationUnit workingCopy= EditorUtility.getWorkingCopy(cu); if (workingCopy != null) { cu= workingCopy; } } OrganizeImportsOperation op= new OrganizeImportsOperation(cu, prefOrder, threshold, ignoreLowerCaseNames, !cu.isWorkingCopy(), doResolve, query); op.run(new SubProgressMonitor(monitor, 1)); ISourceRange errorRange= op.getErrorSourceRange(); if (errorRange != null) { String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.parse", cu.getElementName()); status.add(new Status(Status.INFO, JavaUI.ID_PLUGIN, Status.ERROR, message, null)); } } catch (OrganizeImportError e) { String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.unresolvable", cu.getElementName()); status.add(new Status(Status.INFO, JavaUI.ID_PLUGIN, Status.ERROR, message, null)); } catch (CoreException e) {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
JavaPlugin.log(e); String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.unexpected", e.getMessage()); status.add(new Status(Status.ERROR, JavaUI.ID_PLUGIN, Status.ERROR, message, null)); } catch (OperationCanceledException e) { throw new InterruptedException(); } } } finally { monitor.done(); } } private void runOnSingle(ICompilationUnit cu, boolean doResolve) { try { String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference(); int threshold= ImportOrganizePreferencePage.getImportNumberThreshold(); boolean ignoreLowerCaseNames= ImportOrganizePreferencePage.doIgnoreLowerCaseNames(); if (!cu.isWorkingCopy()) { IEditorPart editor= EditorUtility.openInEditor(cu); if (editor instanceof JavaEditor) { fEditor= (JavaEditor) editor; } ICompilationUnit workingCopy= EditorUtility.getWorkingCopy(cu); if (workingCopy != null) { cu= workingCopy; } }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
OrganizeImportsOperation op= new OrganizeImportsOperation(cu, prefOrder, threshold, ignoreLowerCaseNames, !cu.isWorkingCopy(), doResolve, createChooseImportQuery()); BusyIndicatorRunnableContext context= new BusyIndicatorRunnableContext(); context.run(false, true, new WorkbenchRunnableAdapter(op)); ISourceRange errorRange= op.getErrorSourceRange(); if (errorRange != null) { MessageDialog.openInformation(getShell(), ActionMessages.getString("OrganizeImportsAction.error.title"), ActionMessages.getString("OrganizeImportsAction.single.error.parse")); if (fEditor != null) { fEditor.selectAndReveal(errorRange.getOffset(), errorRange.getLength()); } } else { if (fEditor != null) { setStatusBarMessage(getOrganizeInfo(op)); } } } catch (CoreException e) { ExceptionHandler.handle(e, getShell(), ActionMessages.getString("OrganizeImportsAction.error.title"), ActionMessages.getString("OrganizeImportsAction.error.message")); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), ActionMessages.getString("OrganizeImportsAction.error.title"), ActionMessages.getString("OrganizeImportsAction.error.message")); } catch (InterruptedException e) { } } private String getOrganizeInfo(OrganizeImportsOperation op) { int nImportsAdded= op.getNumberOfImportsAdded(); if (nImportsAdded >= 0) { return ActionMessages.getFormattedString("OrganizeImportsAction.summary_added", String.valueOf(nImportsAdded)); } else { return ActionMessages.getFormattedString("OrganizeImportsAction.summary_removed", String.valueOf(-nImportsAdded)); }
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
} private IChooseImportQuery createChooseImportQuery() { return new IChooseImportQuery() { public TypeInfo[] chooseImports(TypeInfo[][] openChoices, ISourceRange[] ranges) { return doChooseImports(openChoices, ranges); } }; } private TypeInfo[] doChooseImports(TypeInfo[][] openChoices, final ISourceRange[] ranges) { ISelection sel= fEditor.getSelectionProvider().getSelection(); TypeInfo[] result= null;; ILabelProvider labelProvider= new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED); MultiElementListSelectionDialog dialog= new MultiElementListSelectionDialog(getShell(), labelProvider) { protected void handleSelectionChanged() { super.handleSelectionChanged(); doListSelectionChanged(getCurrentPage(), ranges); } }; dialog.setTitle(ActionMessages.getString("OrganizeImportsAction.selectiondialog.title")); dialog.setMessage(ActionMessages.getString("OrganizeImportsAction.selectiondialog.message")); dialog.setElements(openChoices); if (dialog.open() == dialog.OK) { Object[] res= dialog.getResult(); result= new TypeInfo[res.length]; for (int i= 0; i < res.length; i++) {
15,152
Bug 15152 Java Editor no longer displays external source
When I set a source lookup path to lookup source for a Junit test in "junit3.7src.zip", the java editor is not properly created: To recreate: (1) Create a launch config for "VectorTests" (2) On the "Source" tab of the launch config, remove the "JUnit" project and add an external jar. Select "junit3.7src.zip" in the file system. (3) Debug to a breakpoint - get the following error: !MESSAGE Problems occurred when invoking code from plug-in: org.eclipse.ui. !STACK java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.JavaModelUtil.isEditable (JavaModelUtil.java:461) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.selectionChanged (OrganizeImportsAction.java:114) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged (SelectionDispatchAction.java:125) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.update (SelectionDispatchAction.java:118) at org.eclipse.jdt.ui.actions.GenerateActionGroup.<init> (GenerateActionGroup.java:74) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions (CompilationUnitEditor.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl (AbstractTextEditor.java:1265) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl (CompilationUnitEditor.java:1105) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:791) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:126) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:168) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:229) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:84) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1617) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1587) at org.eclipse.debug.internal.ui.views.LaunchView.openEditor (LaunchView.java:589) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:564) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE Failed to execute runnable (java.lang.NullPointerException) !STACK org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16) !ENTRY org.eclipse.core.resources 1 4 Thu May 02 16:45:57 CDT 2002 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Thu May 02 16:45:57 CDT 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2749) at org.eclipse.ui.texteditor.AbstractTextEditor.gotoMarker (AbstractTextEditor.java:2633) at org.eclipse.debug.internal.ui.views.LaunchView.openEditorAndSetMarker (LaunchView.java:583) at org.eclipse.debug.internal.ui.views.LaunchView.showMarkerForCurrentSelection (LaunchView.java:458) at org.eclipse.debug.internal.ui.views.LaunchView.selectionChanged (LaunchView.java:295) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1064) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:813) at org.eclipse.debug.internal.ui.views.LaunchView.autoExpand (LaunchView.java:729) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendThread Event(LaunchViewEventHandler.java:220) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleSuspendEvent (LaunchViewEventHandler.java:175) at org.eclipse.debug.internal.ui.views.LaunchViewEventHandler.doHandleDebugEvents (LaunchViewEventHandler.java:95) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run (AbstractDebugEventHandler.java:49) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:883) at org.eclipse.ui.internal.Workbench.run(Workbench.java:866) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:733) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
resolved fixed
e5eda0b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:19:50Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
Object[] array= (Object[]) res[i]; if (array.length > 0) result[i]= (TypeInfo) array[0]; } } if (sel instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection) sel; fEditor.selectAndReveal(textSelection.getOffset(), textSelection.getLength()); } return result; } private void doListSelectionChanged(int page, ISourceRange[] ranges) { if (page >= 0 && page < ranges.length) { ISourceRange range= ranges[page]; fEditor.selectAndReveal(range.getOffset(), range.getLength()); } } private void setStatusBarMessage(String message) { IEditorActionBarContributor contributor= fEditor.getEditorSite().getActionBarContributor(); if (contributor instanceof EditorActionBarContributor) { IStatusLineManager manager= ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager(); manager.setMessage(message); } } }
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
/* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.jarpackager; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.Manifest; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
import org.eclipse.core.resources.IWorkspaceDescription; import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.operation.ModalContext; import org.eclipse.jface.util.Assert; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModelMarker; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.jarpackager.IJarDescriptionWriter; import org.eclipse.jdt.ui.jarpackager.IJarExportRunnable; import org.eclipse.jdt.ui.jarpackager.JarPackageData; import org.eclipse.jdt.ui.jarpackager.JarWriter;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaStatusConstants; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; /** * Operation for exporting a resource and its children to a new JAR file. */ public class JarFileExportOperation implements IJarExportRunnable { private static class MessageMultiStatus extends MultiStatus { MessageMultiStatus(String pluginId, int code, String message, Throwable exception) { super(pluginId, code, message, exception); } /* * allows to change the message */ protected void setMessage(String message) { super.setMessage(message); } } private static final String COMPILER_SOURCE_FILE_ATTR = "org.eclipse.jdt.core.compiler.debug.sourceFile"; private JarWriter fJarWriter; private JarPackageData fJarPackage; private JarPackageData[] fJarPackages; private Shell fParentShell; private Map fJavaNameToClassFilesMap; private IContainer fClassFilesMapContainer; private Set fExportedClassContainers; private MessageMultiStatus fStatus; /**
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* Creates an instance of this class. * * @param jarPackage the JAR package specification * @param parent the parent for the dialog, * or <code>null</code> if no dialog should be presented */ public JarFileExportOperation(JarPackageData jarPackage, Shell parent) { this(new JarPackageData[] {jarPackage}, parent); } /** * Creates an instance of this class. * * @param jarPackages an array with JAR package data objects * @param parent the parent for the dialog, * or <code>null</code> if no dialog should be presented */ public JarFileExportOperation(JarPackageData[] jarPackages, Shell parent) { this(parent); fJarPackages= jarPackages; } private JarFileExportOperation(Shell parent) { fParentShell= parent; fStatus= new MessageMultiStatus(JavaPlugin.getPluginId(), IStatus.OK, "", null); } protected void addToStatus(CoreException ex) { IStatus status= ex.getStatus(); String message= ex.getLocalizedMessage(); if (message == null || message.length() < 1) { message= JarPackagerMessages.getString("JarFileExportOperation.coreErrorDuringExport"); status= new Status(status.getSeverity(), status.getPlugin(), status.getCode(), message, ex);
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} fStatus.add(status); } /** * Adds a new warning to the list with the passed information. * Normally the export operation continues after a warning. * @param message the message * @param exception the throwable that caused the warning, or <code>null</code> */ protected void addWarning(String message, Throwable error) { fStatus.add(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, message, error)); } /** * Adds a new error to the list with the passed information. * Normally an error terminates the export operation. * @param message the message * @param exception the throwable that caused the error, or <code>null</code> */ protected void addError(String message, Throwable error) { fStatus.add(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, message, error)); } /** * Answers the number of file resources specified by the JAR package. * * @return int */ protected int countSelectedElements() { int count= 0; int n= fJarPackage.getElements().length;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
for (int i= 0; i < n; i++) { Object element= fJarPackage.getElements()[i]; IResource resource= null; if (element instanceof IJavaElement) { IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return count; } } else resource= (IResource)element; if (resource.getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)resource); } return count; } private int getTotalChildCount(IContainer container) { IResource[] members; try { members= container.members(); } catch (CoreException ex) { return 0; } int count= 0;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
for (int i= 0; i < members.length; i++) { if (members[i].getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)members[i]); } return count; } /** * Exports the passed resource to the JAR file * * @param element the resource or JavaElement to export */ protected void exportElement(Object element, IProgressMonitor progressMonitor) throws InterruptedException { int leadSegmentsToRemove= 1; IPackageFragmentRoot pkgRoot= null; boolean isInJavaProject= false; IResource resource= null; IJavaProject jProject= null; if (element instanceof IJavaElement) { isInJavaProject= true; IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return; } jProject= je.getJavaProject(); pkgRoot= JavaModelUtil.getPackageFragmentRoot(je);
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} else resource= (IResource)element; if (!resource.isAccessible()) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotFound", resource.getFullPath()), null); return; } if (resource.getType() == IResource.FILE) { if (!resource.isLocal(IResource.DEPTH_ZERO)) try { resource.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotLocal", resource.getFullPath()), ex); return; } if (!isInJavaProject) { try { isInJavaProject= resource.getProject().hasNature(JavaCore.NATURE_ID); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.projectNatureNotDeterminable", resource.getFullPath()), ex); return; } if (isInJavaProject) { jProject= JavaCore.create(resource.getProject()); try { IPackageFragment pkgFragment= jProject.findPackageFragment(resource.getFullPath().removeLastSegments(1)); if (pkgFragment != null) pkgRoot= JavaModelUtil.getPackageFragmentRoot(pkgFragment); else
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
pkgRoot= findPackageFragmentRoot(jProject, resource.getFullPath().removeLastSegments(1)); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.javaPackageNotDeterminable", resource.getFullPath()), ex); return; } } } if (pkgRoot != null) { leadSegmentsToRemove= pkgRoot.getPath().segmentCount(); if (mustUseSourceFolderHierarchy() && !pkgRoot.getElementName().equals(pkgRoot.DEFAULT_PACKAGEROOT_PATH)) leadSegmentsToRemove--; } IPath destinationPath= resource.getFullPath().removeFirstSegments(leadSegmentsToRemove); boolean isInOutputFolder= false; if (isInJavaProject) { try { isInOutputFolder= jProject.getOutputLocation().isPrefixOf(resource.getFullPath()); } catch (JavaModelException ex) { isInOutputFolder= false; } } exportClassFiles(progressMonitor, pkgRoot, resource, jProject, destinationPath); exportResource(progressMonitor, pkgRoot, isInJavaProject, resource, destinationPath, isInOutputFolder); progressMonitor.worked(1); ModalContext.checkCanceled(progressMonitor); } else if (element instanceof IPackageFragment)
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
exportPackageFragment(progressMonitor, (IPackageFragment)element); else exportContainer(progressMonitor, (IContainer)resource); } private void exportPackageFragment(IProgressMonitor progressMonitor, IPackageFragment pkgFragment) throws java.lang.InterruptedException { Object[] children; try { children= pkgFragment.getChildren(); for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); children= pkgFragment.getNonJavaResources(); for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); } catch (CoreException e) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringExport", pkgFragment.toString()), e); } } private void exportContainer(IProgressMonitor progressMonitor, IContainer container) throws java.lang.InterruptedException { if (container.getType() == IResource.FOLDER && isOutputFolder((IFolder)container)) return; IResource[] children= null; try { children= container.members(); } catch (CoreException e) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringExport", container.getFullPath()), e); } for (int i= 0; i < children.length; i++)
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
exportElement(children[i], progressMonitor); } private IPackageFragmentRoot findPackageFragmentRoot(IJavaProject jProject, IPath path) throws JavaModelException { if (jProject == null || path == null || path.segmentCount() <= 0) return null; IPackageFragmentRoot pkgRoot= jProject.findPackageFragmentRoot(path); if (pkgRoot != null) return pkgRoot; else return findPackageFragmentRoot(jProject, path.removeLastSegments(1)); } private void exportResource(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, boolean isInJavaProject, IResource resource, IPath destinationPath, boolean isInOutputFolder) { boolean isNonJavaResource= !isInJavaProject || pkgRoot == null; boolean isInClassFolder= false; try { isInClassFolder= pkgRoot != null && !pkgRoot.isArchive() && pkgRoot.getKind() == pkgRoot.K_BINARY; } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.cantGetRootKind", resource.getFullPath()), ex); } if ((fJarPackage.areClassFilesExported() && ((isNonJavaResource || (pkgRoot != null && !isJavaFile(resource) && !isClassFile(resource))) || isInClassFolder && isClassFile(resource))) || (fJarPackage.areJavaFilesExported() && (isNonJavaResource || (pkgRoot != null && !isClassFile(resource))))) { try { progressMonitor.subTask(JarPackagerMessages.getFormattedString("JarFileExportOperation.exporting", destinationPath.toString())); fJarWriter.write((IFile) resource, destinationPath); } catch (CoreException ex) { addToStatus(ex); } }
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} private boolean isOutputFolder(IFolder folder) { try { IJavaProject javaProject= JavaCore.create(folder.getProject()); IPath outputFolderPath= javaProject.getOutputLocation(); return folder.getFullPath().equals(outputFolderPath); } catch (JavaModelException ex) { return false; } } private void exportClassFiles(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, IResource resource, IJavaProject jProject, IPath destinationPath) { if (fJarPackage.areClassFilesExported() && isJavaFile(resource) && pkgRoot != null) { try { Iterator iter= filesOnClasspath((IFile)resource, destinationPath, jProject, progressMonitor); IPath baseDestinationPath= destinationPath.removeLastSegments(1); while (iter.hasNext()) { IFile file= (IFile)iter.next(); if (!resource.isLocal(IResource.DEPTH_ZERO)) file.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); IPath classFilePath= baseDestinationPath.append(file.getName()); progressMonitor.subTask(JarPackagerMessages.getFormattedString("JarFileExportOperation.exporting", classFilePath.toString())); fJarWriter.write(file, classFilePath); } } catch (CoreException ex) { addToStatus(ex); } } } /**
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* Exports the resources as specified by the JAR package. */ protected void exportSelectedElements(IProgressMonitor progressMonitor) throws InterruptedException { fExportedClassContainers= new HashSet(10); int n= fJarPackage.getElements().length; for (int i= 0; i < n; i++) exportElement(fJarPackage.getElements()[i], progressMonitor); } /** * Returns an iterator on a list with files that correspond to the * passed file and that are on the classpath of its project. * * @param file the file for which to find the corresponding classpath resources * @param pathInJar the path that the file has in the JAR (i.e. project and source folder segments removed) * @param javaProject the javaProject that contains the file * @return the iterator over the corresponding classpath files for the given file */ protected Iterator filesOnClasspath(IFile file, IPath pathInJar, IJavaProject javaProject, IProgressMonitor progressMonitor) throws CoreException { IFile[] classFiles= fJarPackage.findClassfilesFor(file); if (classFiles != null) return Arrays.asList(classFiles).iterator(); if (!isJavaFile(file)) return Collections.EMPTY_LIST.iterator(); IPath outputPath= javaProject.getOutputLocation(); IContainer outputContainer; if (javaProject.getProject().getFullPath().equals(outputPath)) outputContainer= javaProject.getProject(); else {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
outputContainer= createFolderHandle(outputPath); if (outputContainer == null || !outputContainer.isAccessible()) { String msg= JarPackagerMessages.getString("JarFileExportOperation.outputContainerNotAccessible"); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } } boolean hasErrors= hasCompileErrors(file); boolean hasWarnings= hasCompileWarnings(file); boolean canBeExported= canBeExported(hasErrors, hasWarnings); if (!canBeExported) return Collections.EMPTY_LIST.iterator(); reportPossibleCompileProblems(file, hasErrors, hasWarnings, canBeExported); IContainer classContainer= outputContainer; if (pathInJar.segmentCount() > 1) classContainer= outputContainer.getFolder(pathInJar.removeLastSegments(1)); if (fExportedClassContainers.contains(classContainer)) return Collections.EMPTY_LIST.iterator(); if (fClassFilesMapContainer == null || !fClassFilesMapContainer.equals(classContainer)) { fJavaNameToClassFilesMap= buildJavaToClassMap(classContainer); if (fJavaNameToClassFilesMap == null) { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.missingSourceFileAttributeExportedAll", classContainer.getLocation().toFile()); addWarning(msg, null); fExportedClassContainers.add(classContainer); return getClassesIn(classContainer); } fClassFilesMapContainer= classContainer;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} ArrayList classFileList= (ArrayList)fJavaNameToClassFilesMap.get(file.getName()); if (classFileList == null || classFileList.isEmpty()) { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileOnClasspathNotAccessible", file.getFullPath()); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } return classFileList.iterator(); } private Iterator getClassesIn(IContainer classContainer) throws CoreException { IResource[] resources= classContainer.members(); List files= new ArrayList(resources.length); for (int i= 0; i < resources.length; i++) if (resources[i].getType() == IResource.FILE && isClassFile(resources[i])) files.add(resources[i]); return files.iterator(); } /** * Answers whether the given resource is a Java file. * The resource must be a file whose file name ends with ".java". * * @return a <code>true<code> if the given resource is a Java file */ boolean isJavaFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("java"); } /** * Answers whether the given resource is a class file.
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* The resource must be a file whose file name ends with ".class". * * @return a <code>true<code> if the given resource is a class file */ boolean isClassFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("class"); } /* * Builds and returns a map that has the class files * for each java file in a given directory */ private Map buildJavaToClassMap(IContainer container) throws CoreException { if (!isCompilerGeneratingSourceFileAttribute()) return null; if (container == null || !container.isAccessible()) return new HashMap(0); /* * XXX: Bug 6584: Need a way to get class files for a java file (or CU) */ org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfReader; IResource[] members= container.members(); Map map= new HashMap(members.length); for (int i= 0; i < members.length; i++) { if (isClassFile(members[i])) { IFile classFile= (IFile)members[i]; try {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
cfReader= org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(classFile.getLocation().toFile()); } catch (org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.invalidClassFileFormat", classFile.getLocation().toFile()), ex); continue; } catch (IOException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringClassFileLookup", classFile.getLocation().toFile()), ex); continue; } if (cfReader != null) { if (cfReader.sourceFileName() == null) { /* * Can't fully build the map because one or more * class file does not contain the name of its * source file. */ addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileWithoutSourceFileAttribute", classFile.getLocation().toFile()), null); return null; } String javaName= new String(cfReader.sourceFileName()); Object classFiles= map.get(javaName); if (classFiles == null) { classFiles= new ArrayList(3); map.put(javaName, classFiles); } ((ArrayList)classFiles).add(classFile); } } } return map; }
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
/** * Creates a file resource handle for the file with the given workspace path. * This method does not create the file resource; this is the responsibility * of <code>createFile</code>. * * @param filePath the path of the file resource to create a handle for * @return the new file resource handle * @see #createFile */ protected IFile createFileHandle(IPath filePath) { if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(filePath); else return null; } /** * Creates a folder resource handle for the folder with the given workspace path. * * @param folderPath the path of the folder to create a handle for * @return the new folder resource handle */ protected IFolder createFolderHandle(IPath folderPath) { if (folderPath.isValidPath(folderPath.toString()) && folderPath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFolder(folderPath); else return null; } /** * Returns the status of this operation. * The result is a status object containing individual
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* status objects. * * @return the status of this operation */ public IStatus getStatus() { String message= null; switch (fStatus.getSeverity()) { case IStatus.OK: message= ""; break; case IStatus.INFO: message= JarPackagerMessages.getString("JarFileExportOperation.exportFinishedWithInfo"); break; case IStatus.WARNING: message= JarPackagerMessages.getString("JarFileExportOperation.exportFinishedWithWarnings"); break; case IStatus.ERROR: if (fJarPackages.length > 1) message= JarPackagerMessages.getString("JarFileExportOperation.creationOfSomeJARsFailed"); else message= JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailed"); break; default: message= ""; break; } fStatus.setMessage(message); return fStatus; }
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
/** * Answer a boolean indicating whether the passed child is a descendant * of one or more members of the passed resources collection * * @param resources a List contain potential parents * @param child the resource to test * @return a <code>boolean</code> indicating if the child is a descendant */ protected boolean isDescendant(List resources, IResource child) { if (child.getType() == IResource.PROJECT) return false; IResource parent= child.getParent(); if (resources.contains(parent)) return true; return isDescendant(resources, parent); } protected boolean canBeExported(boolean hasErrors, boolean hasWarnings) throws CoreException { return (!hasErrors && !hasWarnings) || (hasErrors && fJarPackage.areErrorsExported()) || (hasWarnings && fJarPackage.exportWarnings()); } protected void reportPossibleCompileProblems(IFile file, boolean hasErrors, boolean hasWarnings, boolean canBeExported) { if (hasErrors) { if (canBeExported) addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileErrors", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileErrors", file.getFullPath()), null); } if (hasWarnings) { if (canBeExported)
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileWarnings", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileWarnings", file.getFullPath()), null); } } /** * Exports the resources as specified by the JAR package. * * @param progressMonitor the progress monitor that displays the progress * @see #getStatus() */ public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { int count= fJarPackages.length; progressMonitor.beginTask("", count); try { for (int i= 0; i < count; i++) { SubProgressMonitor subProgressMonitor= new SubProgressMonitor(progressMonitor, 1); fJarPackage= fJarPackages[i]; if (fJarPackage != null) singleRun(subProgressMonitor); } } finally { progressMonitor.done(); } } public void singleRun(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { try { if (!preconditionsOK()) throw new InvocationTargetException(null, JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailedSeeDetails")); int totalWork= countSelectedElements();
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
if (!isAutoBuilding() && fJarPackage.isBuildingIfNeeded()) { int subMonitorTicks= totalWork/10; totalWork += subMonitorTicks; progressMonitor.beginTask("", totalWork); SubProgressMonitor subProgressMonitor= new SubProgressMonitor(progressMonitor, subMonitorTicks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK); buildProjects(subProgressMonitor); } else progressMonitor.beginTask("", totalWork); fJarWriter= fJarPackage.createJarWriter(fParentShell); exportSelectedElements(progressMonitor); if (getStatus().getSeverity() != IStatus.ERROR) { progressMonitor.subTask(JarPackagerMessages.getString("JarFileExportOperation.savingFiles")); saveFiles(); } } catch (CoreException ex) { addToStatus(ex); } finally { try { if (fJarWriter != null) fJarWriter.close(); } catch (CoreException ex) { addToStatus(ex); } progressMonitor.done(); } } protected boolean preconditionsOK() { if (!fJarPackage.areClassFilesExported() && !fJarPackage.areJavaFilesExported()) {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
addError(JarPackagerMessages.getString("JarFileExportOperation.noExportTypeChosen"), null); return false; } if (fJarPackage.getElements() == null || fJarPackage.getElements().length == 0) { addError(JarPackagerMessages.getString("JarFileExportOperation.noResourcesSelected"), null); return false; } if (fJarPackage.getJarLocation() == null) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidJarLocation"), null); return false; } if (!fJarPackage.isManifestAccessible()) { addError(JarPackagerMessages.getString("JarFileExportOperation.manifestDoesNotExist"), null); return false; } if (!fJarPackage.isMainClassValid(new BusyIndicatorRunnableContext())) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidMainClass"), null); return false; } IFile[] unsavedFiles= getUnsavedFiles(); if (unsavedFiles.length > 0) return saveModifiedResourcesIfUserConfirms(unsavedFiles); return true; } /** * Returns the files which are not saved and which are * part of the files being exported. * * @return an array of unsaved files
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
*/ private IFile[] getUnsavedFiles() { IEditorPart[] dirtyEditors= getDirtyEditors(fParentShell); Set unsavedFiles= new HashSet(dirtyEditors.length); if (dirtyEditors.length > 0) { List selection= JarPackagerUtil.asResources(fJarPackage.getElements()); for (int i= 0; i < dirtyEditors.length; i++) { if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile= ((IFileEditorInput)dirtyEditors[i].getEditorInput()).getFile(); if (JarPackagerUtil.contains(selection, dirtyFile)) { unsavedFiles.add(dirtyFile); } } } } return (IFile[])unsavedFiles.toArray(new IFile[unsavedFiles.size()]); } /** * Asks the user to confirm to save the modified resources. * * @return true if user pressed OK. */ private boolean confirmSaveModifiedResources(IFile[] dirtyFiles) { if (dirtyFiles == null || dirtyFiles.length == 0) return true; Display display= fParentShell.getDisplay(); if (display == null || display.isDisposed()) return false;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
final ConfirmSaveModifiedResourcesDialog dlg= new ConfirmSaveModifiedResourcesDialog(fParentShell, dirtyFiles); final int[] intResult= new int[1]; Runnable runnable= new Runnable() { public void run() { intResult[0]= dlg.open(); } }; display.syncExec(runnable); return intResult[0] == IDialogConstants.OK_ID; } /** * Asks to confirm to save the modified resources * and save them if OK is pressed. * * @return true if user pressed OK and save was successful. */ private boolean saveModifiedResourcesIfUserConfirms(IFile[] dirtyFiles) { if (confirmSaveModifiedResources(dirtyFiles)) return saveModifiedResources(dirtyFiles); for (int i= 0; i < dirtyFiles.length; i++) addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.fileUnsaved", dirtyFiles[i].getFullPath()), null); return false; } /** * Save all of the editors in the workbench. * * @return true if successful. */ private boolean saveModifiedResources(final IFile[] dirtyFiles) {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
Display display= fParentShell.getDisplay(); if (display == null || display.isDisposed()) return false; final boolean[] retVal= new boolean[1]; Runnable runnable= new Runnable() { public void run() { IWorkspace workspace= ResourcesPlugin.getWorkspace(); IWorkspaceDescription description= workspace.getDescription(); boolean autoBuild= description.isAutoBuilding(); description.setAutoBuilding(false); try { workspace.setDescription(description); try { new ProgressMonitorDialog(fParentShell).run(false, false, createSaveModifiedResourcesRunnable(dirtyFiles)); retVal[0]= true; } finally { description.setAutoBuilding(autoBuild); workspace.setDescription(description); } } catch (InvocationTargetException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingModifiedResources"), ex); JavaPlugin.log(ex); retVal[0]= false; } catch (InterruptedException ex) { Assert.isTrue(false); retVal[0]= false;
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingModifiedResources"), ex); JavaPlugin.log(ex); retVal[0]= false; } } }; display.syncExec(runnable); return retVal[0]; } private IRunnableWithProgress createSaveModifiedResourcesRunnable(final IFile[] dirtyFiles) { return new IRunnableWithProgress() { public void run(final IProgressMonitor pm) { IEditorPart[] editorsToSave= getDirtyEditors(fParentShell); pm.beginTask(JarPackagerMessages.getString("JarFileExportOperation.savingModifiedResources"), editorsToSave.length); try { List dirtyFilesList= Arrays.asList(dirtyFiles); for (int i= 0; i < editorsToSave.length; i++) { if (editorsToSave[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile= ((IFileEditorInput)editorsToSave[i].getEditorInput()).getFile(); if (dirtyFilesList.contains((dirtyFile))) editorsToSave[i].doSave(new SubProgressMonitor(pm, 1)); } pm.worked(1); } } finally { pm.done(); } } };
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} protected void saveFiles() { if (fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) { try { saveManifest(); } catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } } if (fJarPackage.isDescriptionSaved()) { try { saveDescription(); } catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } } } private IEditorPart[] getDirtyEditors(Shell parent) { Display display= parent.getDisplay(); final Object[] result= new Object[1]; display.syncExec( new Runnable() { public void run() {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
result[0]= JavaPlugin.getDirtyEditors(); } } ); return (IEditorPart[])result[0]; } protected void saveDescription() throws CoreException, IOException { if (fJarPackage.isManifestReused()) fJarPackage.setGenerateManifest(false); ByteArrayOutputStream objectStreamOutput= new ByteArrayOutputStream(); IJarDescriptionWriter writer= fJarPackage.createJarDescriptionWriter(objectStreamOutput); ByteArrayInputStream fileInput= null; try { writer.write(fJarPackage); fileInput= new ByteArrayInputStream(objectStreamOutput.toByteArray()); IFile descriptionFile= fJarPackage.getDescriptionFile(); if (descriptionFile.isAccessible()) { if (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, descriptionFile.getFullPath().toString())) descriptionFile.setContents(fileInput, true, true, null); } else descriptionFile.create(fileInput, true, null); } finally { if (fileInput != null) fileInput.close(); if (writer != null) writer.close(); } } protected void saveManifest() throws CoreException, IOException {
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream(); ByteArrayInputStream fileInput= null; try { Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage); manifest.write(manifestOutput); fileInput= new ByteArrayInputStream(manifestOutput.toByteArray()); IFile manifestFile= fJarPackage.getManifestFile(); if (manifestFile.isAccessible()) { if (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, manifestFile.getFullPath().toString())) manifestFile.setContents(fileInput, true, true, null); } else manifestFile.create(fileInput, true, null); } finally { if (manifestOutput != null) manifestOutput.close(); if (fileInput != null) fileInput.close(); } } private boolean isAutoBuilding() { return ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding(); } private boolean isCompilerGeneratingSourceFileAttribute() { Object value= JavaCore.getOptions().get(COMPILER_SOURCE_FILE_ATTR); if (value instanceof String) return "generate".equalsIgnoreCase((String)value); else return true; }
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
private void buildProjects(IProgressMonitor progressMonitor) { Set builtProjects= new HashSet(10); Object[] elements= fJarPackage.getElements(); for (int i= 0; i < elements.length; i++) { IProject project= null; Object element= elements[i]; if (element instanceof IResource) project= ((IResource)element).getProject(); else if (element instanceof IJavaElement) project= ((IJavaElement)element).getJavaProject().getProject(); if (project != null && !builtProjects.contains(project)) { try { project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, progressMonitor); } catch (CoreException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringProjectBuild", project.getFullPath()); addError(message, ex); } finally { builtProjects.add(project); } } } } /** * Tells whether the given resource (or its children) have compile errors. * The method acts on the current build state and does not recompile. * * @param resource the resource to check for errors * @return <code>true</code> if the resource (and its children) are error free * @throws import org.eclipse.core.runtime.CoreException if there's a marker problem
14,531
Bug 14531 Unable to use JarPackager headless
Beginning with the 04/23 Integration build, I am unable to utilize the JarPackager in a headless environment. Specifically, I have defined my own Ant tasks which perform operations including jar packaging. The problem is in JarFileExportOperation.getDirtyEditors(Shell parent). Is it possible to accept null for parent and have the method just return an empty array?
resolved fixed
5188c99
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:26:44Z
2002-04-24T17:40:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
*/ private boolean hasCompileErrors(IResource resource) throws CoreException { IMarker[] problemMarkers= resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE); for (int i= 0; i < problemMarkers.length; i++) { if (problemMarkers[i].getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR) return true; } return false; } /** * Tells whether the given resource (or its children) have compile errors. * The method acts on the current build state and does not recompile. * * @param resource the resource to check for errors * @return <code>true</code> if the resource (and its children) are error free * @throws import org.eclipse.core.runtime.CoreException if there's a marker problem */ private boolean hasCompileWarnings(IResource resource) throws CoreException { IMarker[] problemMarkers= resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE); for (int i= 0; i < problemMarkers.length; i++) { if (problemMarkers[i].getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_WARNING) return true; } return false; } private boolean mustUseSourceFolderHierarchy() { return fJarPackage.useSourceFolderHierarchy() && fJarPackage.areJavaFilesExported() && !fJarPackage.areClassFilesExported(); } }
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
package org.eclipse.jdt.internal.ui.javaeditor; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog;
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.dialogs.ElementListSelectionDialog; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.IUpdate; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchConstants; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.ITypeNameRequestor; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.internal.corext.codemanipulation.AddImportsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.corext.util.TypeInfo; import org.eclipse.jdt.internal.corext.util.TypeInfoRequestor; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; public class AddImportOnSelectionAction extends Action implements IUpdate {
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
private ITextEditor fEditor; public AddImportOnSelectionAction(ITextEditor editor) { super(JavaEditorMessages.getString("AddImportOnSelection.label")); setToolTipText(JavaEditorMessages.getString("AddImportOnSelection.tooltip")); setDescription(JavaEditorMessages.getString("AddImportOnSelection.description")); fEditor= editor; WorkbenchHelp.setHelp(this, IJavaHelpContextIds.ADD_IMPORT_ON_SELECTION_ACTION); } public AddImportOnSelectionAction() { this(null); } public void setContentEditor(ITextEditor editor) { fEditor= editor; }
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
public void update() { boolean isEnabled= false; try { ISelection selection= fEditor.getSelectionProvider().getSelection(); if (selection instanceof ITextSelection) { ICompilationUnit cu= getCompilationUnit(); isEnabled= (cu != null) && JavaModelUtil.isEditable(cu); } } catch(JavaModelException e) { } setEnabled(isEnabled); } private ICompilationUnit getCompilationUnit () { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(fEditor.getEditorInput()); } /** * @see IAction#actionPerformed */ public void run() { ICompilationUnit cu= getCompilationUnit(); if (cu != null) { ISelection s= fEditor.getSelectionProvider().getSelection(); IDocument doc= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput()); ITextSelection selection= (ITextSelection) s; if (doc != null) { try {
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
int nameStart= getNameStart(doc, selection.getOffset()); int nameEnd= getNameEnd(doc, selection.getOffset() + selection.getLength()); int len= nameEnd - nameStart; String name= doc.get(nameStart, len).trim(); String simpleName= Signature.getSimpleName(name); String containerName= Signature.getQualifier(name); IImportDeclaration existingImport= JavaModelUtil.findImport(cu, simpleName); if (existingImport != null) { if (!existingImport.getElementName().equals(name)) { getShell().getDisplay().beep(); } return; } IJavaSearchScope searchScope= SearchEngine.createJavaSearchScope(new IJavaElement[] { cu.getJavaProject() }); TypeInfo[] types= findAllTypes(simpleName, searchScope, null); if (types.length== 0) { getShell().getDisplay().beep(); return; } TypeInfo chosen= selectResult(types, containerName, getShell()); if (chosen == null) { return; } IType type= chosen.resolveType(searchScope);
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
if (type == null) { JavaPlugin.logErrorMessage("AddImportOnSelectionAction: Failed to resolve TypeRef: " + chosen.toString()); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), JavaEditorMessages.getString("AddImportOnSelection.error.notresolved.message")); return; } removeQualification(doc, nameStart, chosen); CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); AddImportsOperation op= new AddImportsOperation(cu, new IJavaElement[] { type }, settings, false); ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); try { dialog.run(false, true, new WorkbenchRunnableAdapter(op)); } catch (InvocationTargetException e) { JavaPlugin.log(e); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getTargetException().getMessage()); } catch (InterruptedException e) { } return; } catch (CoreException e) { JavaPlugin.log(e); ErrorDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), null, e.getStatus()); } catch (BadLocationException e) { JavaPlugin.log(e); MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getMessage()); } } } }
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
private int getNameStart(IDocument doc, int pos) throws BadLocationException { while (pos > 0) { char ch= doc.getChar(pos - 1); if (!Character.isJavaIdentifierPart(ch) && ch != '.') { return pos; } pos--; } return pos; } private int getNameEnd(IDocument doc, int pos) throws BadLocationException { int len= doc.getLength(); while (pos < len) { char ch= doc.getChar(pos); if (!Character.isJavaIdentifierPart(ch)) { return pos; } pos++; } return pos; } private void removeQualification(IDocument doc, int nameStart, TypeInfo typeInfo) throws BadLocationException { String containerName= typeInfo.getTypeContainerName(); int containerLen= containerName.length(); if (containerLen > 0) { for (int k= 0; k < containerLen; k++) { if (doc.getChar(nameStart + k) != containerName.charAt(k)) { return;
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
} } doc.replace(nameStart, containerLen + 1, ""); } } /** * Finds a type by the simple name. */ private static TypeInfo[] findAllTypes(String simpleTypeName, IJavaSearchScope searchScope, IProgressMonitor monitor) throws CoreException { SearchEngine searchEngine= new SearchEngine(); ArrayList typeRefsFound= new ArrayList(10); ITypeNameRequestor requestor= new TypeInfoRequestor(typeRefsFound); searchEngine.searchAllTypeNames( JavaPlugin.getWorkspace(), null, simpleTypeName.toCharArray(), IJavaSearchConstants.EXACT_MATCH, IJavaSearchConstants.CASE_SENSITIVE, IJavaSearchConstants.TYPE, searchScope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, monitor); return (TypeInfo[]) typeRefsFound.toArray(new TypeInfo[typeRefsFound.size()]); } private Shell getShell() { return fEditor.getSite().getShell();
15,108
Bug 15108 Add import deletes code
Build 20020501 1) Create a class "TestingFoo" in package "Testing". 2) In another package, create a class and method and type "TestingFoo". 3) With the cursor at the end of "TestingFoo", hit Ctrl+Shift+M to add the import. It deletes part of the class name, and all that's left is "oo". I guess it does a match against the package name, and since the package name is a prefix of the class name, it incorrectly deletes part of the class name.
resolved fixed
b8eeaa0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T07:29:34Z
2002-05-02T14:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
} private TypeInfo selectResult(TypeInfo[] results, String containerName, Shell shell) { int nResults= results.length; if (nResults == 0) { return null; } else if (nResults == 1) { return results[0]; } if (containerName.length() != 0) { for (int i= 0; i < nResults; i++) { TypeInfo curr= (TypeInfo) results[i]; if (containerName.equals(curr.getTypeContainerName())) { return curr; } } } ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED)); dialog.setTitle(JavaEditorMessages.getString("AddImportOnSelection.dialog.title")); dialog.setMessage(JavaEditorMessages.getString("AddImportOnSelection.dialog.message")); dialog.setElements(results); if (dialog.open() == dialog.OK) { return (TypeInfo) dialog.getFirstResult(); } return null; } }