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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18,486
|
Bug 18486 Need documentation for startup extension point.
| null |
resolved fixed
|
2c72018
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:19:01Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingContentProvider.java
|
}
}
if (element instanceof IPackageFragmentRoot && fBrowsingPart.isValidElement(element)) {
postRefresh(skipProjectPackageFragmentRoot((IPackageFragmentRoot)element));
return;
}
}
for (int i= 0; i < affectedChildren.length; i++) {
processDelta(affectedChildren[i]);
}
}
/**
* Updates the package icon
*/
private void updatePackageIcon(final IJavaElement element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
}
});
}
private void postRefresh(final Object root) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
|
18,486
|
Bug 18486 Need documentation for startup extension point.
| null |
resolved fixed
|
2c72018
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:19:01Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingContentProvider.java
|
if (ctrl != null && !ctrl.isDisposed())
fViewer.refresh(root);
}
});
}
private void postAdd(final Object parent, final Object element) {
postAdd(parent, new Object[] {element});
}
private void postAdd(final Object parent, final Object[] elements) {
if (elements.length <= 0)
return;
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.setRedraw(false);
if (fViewer instanceof AbstractTreeViewer) {
if (fViewer.testFindItem(parent) == null) {
Object root= ((AbstractTreeViewer)fViewer).getInput();
if (root != null)
((AbstractTreeViewer)fViewer).add(root, elements);
}
else
((AbstractTreeViewer)fViewer).add(parent, elements);
}
else if (fViewer instanceof ListViewer)
((ListViewer)fViewer).add(elements);
else if (fViewer instanceof TableViewer)
|
18,486
|
Bug 18486 Need documentation for startup extension point.
| null |
resolved fixed
|
2c72018
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:19:01Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingContentProvider.java
|
((TableViewer)fViewer).add(elements);
if (fViewer.testFindItem(elements[0]) != null)
fBrowsingPart.adjustInputAndSetSelection((IJavaElement)elements[0]);
ctrl.setRedraw(true);
}
}
});
}
private void postRemove(final Object element) {
postRemove(new Object[] {element});
}
private void postRemove(final Object[] elements) {
if (elements.length <= 0)
return;
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.setRedraw(false);
if (fViewer instanceof AbstractTreeViewer)
((AbstractTreeViewer)fViewer).remove(elements);
else if (fViewer instanceof ListViewer)
((ListViewer)fViewer).remove(elements);
else if (fViewer instanceof TableViewer)
((TableViewer)fViewer).remove(elements);
ctrl.setRedraw(true);
}
}
});
|
18,486
|
Bug 18486 Need documentation for startup extension point.
| null |
resolved fixed
|
2c72018
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:19:01Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingContentProvider.java
|
}
private void postAdjustInputAndSetSelection(final Object element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.setRedraw(false);
fBrowsingPart.adjustInputAndSetSelection((IJavaElement)element);
ctrl.setRedraw(true);
}
}
});
}
private void postRunnable(final Runnable r) {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
fBrowsingPart.setProcessSelectionEvents(false);
try {
Display currentDisplay= ctrl.getDisplay().getCurrent();
if (currentDisplay != null && currentDisplay.equals(ctrl.getDisplay()))
ctrl.getDisplay().syncExec(r);
else
ctrl.getDisplay().asyncExec(r);
} finally {
fBrowsingPart.setProcessSelectionEvents(true);
}
}
}
/**
* Returns the parent for the element.
|
18,486
|
Bug 18486 Need documentation for startup extension point.
| null |
resolved fixed
|
2c72018
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:19:01Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingContentProvider.java
|
* <p>
* Note: This method will return a working copy if the
* parent is a working copy. The super class implementation
* returns the original element instead.
* </p>
*/
protected Object internalGetParent(Object element) {
if (element instanceof IJavaProject) {
return ((IJavaProject)element).getJavaModel();
}
if (element instanceof IResource) {
IResource parent= ((IResource)element).getParent();
Object jParent= JavaCore.create(parent);
if (jParent != null)
return jParent;
return parent;
}
if (element instanceof IPackageFragment) {
IPackageFragmentRoot parent= (IPackageFragmentRoot)((IPackageFragment)element).getParent();
return skipProjectPackageFragmentRoot(parent);
}
if (element instanceof IJavaElement)
return ((IJavaElement)element).getParent();
return null;
}
}
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
package org.eclipse.jdt.internal.junit.launcher;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugUIConstants;
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
import org.eclipse.debug.ui.ILaunchShortcut;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.debug.ui.JavaUISourceLocator;
import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
public class JUnitLaunchShortcut implements ILaunchShortcut {
protected void searchAndLaunch(Object[] search, String mode) {
IType[] types= null;
if (search != null) {
try {
types= findLaunchTypes(search);
} catch (InterruptedException e) {
JUnitPlugin.log(e);
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
return;
} catch (InvocationTargetException e) {
JUnitPlugin.log(e);
return;
}
IType type= null;
if (types.length == 0) {
MessageDialog.openInformation(getShell(), JUnitMessages.getString("LaunchTestAction.dialog.title"), JUnitMessages.getString("LaunchTestAction.message.notests"));
} else if (types.length > 1) {
type= chooseType(types, mode);
} else {
type= types[0];
}
if (type != null) {
launch(type, mode);
}
}
}
private IType[] findLaunchTypes(Object[] search) throws InvocationTargetException, InterruptedException {
return TestSearchEngine.findTests(new ProgressMonitorDialog(getShell()), search);
}
/**
* @see ILaunchShortcut#launch(IEditorPart, String)
*/
public void launch(IEditorPart editor, String mode) {
IEditorInput input = editor.getEditorInput();
IJavaElement je = (IJavaElement) input.getAdapter(IJavaElement.class);
if (je != null) {
searchAndLaunch(new Object[] {je}, mode);
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
}
}
/**
* @see ILaunchShortcut#launch(ISelection, String)
*/
public void launch(ISelection selection, String mode) {
if (selection instanceof IStructuredSelection) {
searchAndLaunch(((IStructuredSelection)selection).toArray(), mode);
}
}
/**
* Prompts the user to select a type
*
* @return the selected type or <code>null</code> if none.
*/
protected IType chooseType(IType[] types, String mode) {
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider());
dialog.setElements(types);
dialog.setTitle(JUnitMessages.getString("LaunchTestAction.dialog.title2"));
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectTestToRun"));
} else {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectTestToDebug"));
}
dialog.setMultipleSelection(false);
if (dialog.open() == dialog.OK) {
return (IType)dialog.getFirstResult();
}
return null;
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
}
/**
* Launches a configuration for the given type
*/
protected void launch(IType type, String mode) {
try {
ILaunchConfiguration config = findLaunchConfiguration(type, mode);
if (config != null) {
config.launch(mode, null);
}
} catch (CoreException e) {
ErrorDialog.openError(getShell(), JUnitMessages.getString("LaunchTestAction.message.launchFailed"), e.getMessage(), e.getStatus());
}
}
/**
* Locate a configuration to relaunch for the given type. If one cannot be found, create one.
*
* @return a re-useable config or <code>null</code> if none
*/
protected ILaunchConfiguration findLaunchConfiguration(IType type, String mode) {
ILaunchConfigurationType configType= getJUnitLaunchConfigType();
List candidateConfigs= Collections.EMPTY_LIST;
try {
ILaunchConfiguration[] configs= DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
candidateConfigs= new ArrayList(configs.length);
for (int i= 0; i < configs.length; i++) {
ILaunchConfiguration config= configs[i];
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "").equals(type.getFullyQualifiedName())) {
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(type.getJavaProject().getElementName())) {
candidateConfigs.add(config);
}
}
}
} catch (CoreException e) {
JUnitPlugin.log(e);
}
int candidateCount= candidateConfigs.size();
if (candidateCount < 1) {
return createConfiguration(type);
} else if (candidateCount == 1) {
return (ILaunchConfiguration) candidateConfigs.get(0);
} else {
ILaunchConfiguration config= chooseConfiguration(candidateConfigs, mode);
if (config != null) {
return config;
}
}
return null;
}
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
/**
* Show a selection dialog that allows the user to choose one of the specified
* launch configurations. Return the chosen config, or <code>null</code> if the
* user cancelled the dialog.
*/
protected ILaunchConfiguration chooseConfiguration(List configList, String mode) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle(JUnitMessages.getString("LaunchTestAction.message.selectConfiguration"));
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectDebugConfiguration"));
} else {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectRunConfiguration"));
}
dialog.setMultipleSelection(false);
int result= dialog.open();
labelProvider.dispose();
if (result == dialog.OK) {
return (ILaunchConfiguration)dialog.getFirstResult();
}
return null;
}
/**
* Create & return a new configuration based on the specified <code>IType</code>.
*/
protected ILaunchConfiguration createConfiguration(IType type) {
ILaunchConfiguration config = null;
try {
|
18,159
|
Bug 18159 JUnit and Java App shortcuts overwrite each other
|
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
|
resolved fixed
|
824aca9
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T17:32:02Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
ILaunchConfigurationType configType= getJUnitLaunchConfigType();
ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, type.getElementName() + " [" + type.getJavaProject().getElementName() + "]");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
wc.setAttribute(IDebugUIConstants.ATTR_TARGET_DEBUG_PERSPECTIVE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
wc.setAttribute(IDebugUIConstants.ATTR_TARGET_RUN_PERSPECTIVE, (String)null);
wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, JavaUISourceLocator.ID_PROMPTING_JAVA_SOURCE_LOCATOR);
config= wc.doSave();
} catch (CoreException ce) {
JUnitPlugin.log(ce);
}
return config;
}
/**
* Returns the local java launch config type
*/
protected ILaunchConfigurationType getJUnitLaunchConfigType() {
ILaunchManager lm= DebugPlugin.getDefault().getLaunchManager();
return lm.getLaunchConfigurationType(JUnitLaunchConfiguration.ID_JUNIT_APPLICATION);
}
/**
* Convenience method to get the window that owns this action's Shell.
*/
protected Shell getShell() {
return JUnitPlugin.getActiveWorkbenchShell();
}
}
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import java.lang.reflect.InvocationTargetException;
import java.util.ResourceBundle;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.ui.*;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
import org.eclipse.jdt.internal.corext.codemanipulation.MemberEdit;
import org.eclipse.jdt.internal.corext.textmanipulation.*;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.compare.JavaHistoryAction.JavaTextBufferNode;
import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.compare.*;
import org.eclipse.compare.internal.TimeoutContext;
/**
* Provides "Replace from local history" for Java elements.
*/
public class JavaReplaceWithEditionAction extends JavaHistoryAction {
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.ReplaceWithEditionAction";
private boolean fPrevious= false;
public JavaReplaceWithEditionAction() {
super(true);
}
public JavaReplaceWithEditionAction(boolean previous) {
this();
fPrevious= previous;
}
protected ITypedElement[] buildEditions(ITypedElement target, IFile file, IFileState[] states) {
ITypedElement[] editions= new ITypedElement[states.length+1];
editions[0]= new ResourceNode(file);
for (int i= 0; i < states.length; i++)
editions[i+1]= new HistoryItem(target, states[i]);
return editions;
}
/*
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
String errorTitle= CompareMessages.getString("ReplaceFromHistory.title");
String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage");
Shell shell= JavaPlugin.getActiveWorkbenchShell();
ISelection selection= getSelection();
IMember input= getEditionElement(selection);
if (input == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
IFile file= getFile(input);
if (file == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
boolean inEditor= beingEdited(file);
if (inEditor)
input= (IMember) getWorkingCopy(input);
TextBuffer buffer= null;
try {
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
buffer= TextBuffer.acquire(file);
ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle);
ITypedElement target= new JavaTextBufferNode(buffer, inEditor);
ITypedElement[] editions= buildEditions(target, file);
ITypedElement ti= null;
if (fPrevious)
ti= d.selectPreviousEdition(target, editions, input);
else
ti= d.selectEdition(target, editions, input);
if (ti instanceof IStreamContentAccessor) {
String[] lines= null;
try {
lines= JavaCompareUtilities.readLines(((IStreamContentAccessor) ti).getContents());
} catch (CoreException ex) {
JavaPlugin.log(ex);
}
if (lines == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
MemberEdit edit= new MemberEdit(input, MemberEdit.REPLACE, lines,
CodeFormatterPreferencePage.getTabSize());
edit.setAddLineSeparators(false);
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
IProgressMonitor nullProgressMonitor= new NullProgressMonitor();
TextBufferEditor editor= new TextBufferEditor(buffer);
editor.add(edit);
editor.performEdits(nullProgressMonitor);
final TextBuffer bb= buffer;
IRunnableWithProgress r= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) throws InvocationTargetException {
try {
TextBuffer.commitChanges(bb, false, pm);
} catch (CoreException ex) {
throw new InvocationTargetException(ex);
}
}
};
if (inEditor) {
JavaEditor je= getEditor(file);
if (je != null)
je.setFocus();
r.run(nullProgressMonitor);
} else {
ProgressMonitorDialog pd= new ProgressMonitorDialog(shell);
pd.run(true, false, r);
}
}
} catch(InvocationTargetException ex) {
|
17,463
|
Bug 17463 Replace with previous element from local history should ignore unparseable versions
|
Build F1 If the previous version of a file can't be parsed, then 'Replace with previous element from local history' replaces the element with the entire contents of the previous edition. I believe that this behaviour is incorrect. It should either continue searching in older versions until it finds a version with the element, or do nothing. Create the following Java file and save it: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Replace the contents with the following and save: dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg Replace the contents with the following and save: public class Hello { public Hello() { super(); System.out.println("Hello world"); } } Now select the constructor in the Outline view. Choose 'Replace with previous element from local history'. The resulting file is: public class Hello { dfjlkfdjklnbv dfbdfjhkfldbf f dbfdsjlgvbsdb fdsgkldfsg }
|
verified fixed
|
6f03597
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:33:23Z
| 2002-05-23T18:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} catch(InterruptedException ex) {
} catch(CoreException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} finally {
if (buffer != null)
TextBuffer.release(buffer);
}
}
private JavaEditor getEditor(IFile file) {
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
for (int i= 0; i < windows.length; i++) {
IWorkbenchPage[] pages= windows[i].getPages();
for (int x= 0; x < pages.length; x++) {
IEditorPart[] editors= pages[x].getDirtyEditors();
for (int z= 0; z < editors.length; z++) {
IEditorPart ep= editors[z];
if (ep instanceof JavaEditor)
return (JavaEditor) ep;
}
}
}
return null;
}
}
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemPosition.java
|
/*******************************************************************************
* Copyright (c) 2000, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.internal.ui.text.correction;
import org.eclipse.jface.text.Position;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.internal.ui.javaeditor.IProblemAnnotation;
public class ProblemPosition extends Position {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemPosition.java
|
private IProblemAnnotation fAnnotation;
private ICompilationUnit fCompilationUnit;
public ProblemPosition(Position position, IProblemAnnotation annotation, ICompilationUnit cu) {
super(position.getOffset(), position.getLength());
fAnnotation= annotation;
fCompilationUnit= cu;
}
public String getMessage() {
return fAnnotation.getMessage();
}
public int getId() {
return fAnnotation.getId();
}
public String[] getArguments() {
return fAnnotation.getArguments();
}
/**
* Gets the compilationUnit.
* @return Returns a ICompilationUnit
*/
public ICompilationUnit getCompilationUnit() {
return fCompilationUnit;
}
}
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
package org.eclipse.jdt.internal.ui.text.correction;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.core.dom.AST;
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ClassInstanceCreation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.ConstructorInvocation;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.IBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.Name;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
import org.eclipse.jdt.core.dom.SuperMethodInvocation;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.codemanipulation.ImportEdit;
import org.eclipse.jdt.internal.corext.dom.Binding2JavaModel;
import org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange;
import org.eclipse.jdt.internal.corext.textmanipulation.SimpleTextEdit;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
public class UnresolvedElementsSubProcessor {
public static void getVariableProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
if (!(selectedNode instanceof SimpleName)) {
return;
}
SimpleName node= (SimpleName) selectedNode;
SimilarElement[] elements= SimilarElementsRequestor.findSimilarElement(cu, node, SimilarElementsRequestor.VARIABLES);
for (int i= 0; i < elements.length; i++) {
SimilarElement curr= elements[i];
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changevariable.description", curr.getName());
proposals.add(new ReplaceCorrectionProposal(label, problemPos, curr.getName(), 3));
}
IJavaElement elem= cu.getElementAt(problemPos.getOffset());
if (elem instanceof IMember) {
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createfield.description", node.getIdentifier());
proposals.add(new NewVariableCompletionProposal(label, NewVariableCompletionProposal.FIELD, node, (IMember) elem, 2));
}
if (elem instanceof IMethod) {
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createlocal.description", node.getIdentifier());
proposals.add(new NewVariableCompletionProposal(label, NewVariableCompletionProposal.LOCAL, node, (IMember) elem, 1));
label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createparameter.description", node.getIdentifier());
proposals.add(new NewVariableCompletionProposal(label, NewVariableCompletionProposal.PARAM, node, (IMember) elem, 1));
}
if (node.getParent().getNodeType() == ASTNode.METHOD_INVOCATION) {
MethodInvocation invocation= (MethodInvocation) node.getParent();
if (node.equals(invocation.getExpression())) {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
getTypeProposals(problemPos, SimilarElementsRequestor.REF_TYPES, proposals);
}
}
}
public static void getTypeProposals(ProblemPosition problemPos, int kind, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
String typeName= cu.getBuffer().getText(problemPos.getOffset(), problemPos.getLength());
int bracketIndex= typeName.indexOf('[');
if (bracketIndex != -1) {
typeName= typeName.substring(0, bracketIndex);
}
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
SimilarElement[] elements= SimilarElementsRequestor.findSimilarElement(cu, problemPos.getOffset(), typeName, kind);
for (int i= 0; i < elements.length; i++) {
String curr= elements[i].getName();
String simpleName= Signature.getSimpleName(curr);
String replaceName= simpleName;
ImportEdit importEdit= new ImportEdit(cu, settings);
IImportDeclaration existingImport= JavaModelUtil.findImport(cu, simpleName);
if (existingImport != null) {
if (!existingImport.getElementName().equals(curr)) {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
replaceName= curr;
}
} else {
importEdit.addImport(curr);
}
importEdit.addImport(curr);
boolean importOnly= replaceName.equals(typeName);
CUCorrectionProposal proposal= new CUCorrectionProposal("", cu, 0);
proposals.add(proposal);
CompilationUnitChange change= proposal.getCompilationUnitChange();
if (!importEdit.isEmpty()) {
change.addTextEdit("import", importEdit);
}
if (!importOnly) {
change.addTextEdit("change", SimpleTextEdit.createReplace(problemPos.getOffset(), typeName.length(), replaceName));
proposal.setDisplayName(CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetype.description", replaceName));
proposal.setRelevance(3);
} else {
proposal.setDisplayName(CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.importtype.description", curr));
proposal.setRelevance(5);
}
}
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
String addedCUName= typeName + ".java";
if (!JavaConventions.validateCompilationUnitName(addedCUName).matches(IStatus.ERROR)) {
IPackageFragment pack= (IPackageFragment) cu.getParent();
final ICompilationUnit addedCU= pack.getCompilationUnit(addedCUName);
if (!addedCU.exists()) {
if ((kind & SimilarElementsRequestor.CLASSES) != 0) {
String[] superTypes= (problemPos.getId() != IProblem.ExceptionTypeNotFound) ? null : new String[] { "java.lang.Exception" };
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createclass.description", typeName);
proposals.add(new NewCUCompletionProposal(label, addedCU, true, superTypes, 0));
}
if ((kind & SimilarElementsRequestor.INTERFACES) != 0) {
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createinterface.description", typeName);
proposals.add(new NewCUCompletionProposal(label, addedCU, false, null, 0));
}
}
}
}
public static void getMethodProposals(ProblemPosition problemPos, boolean needsNewName, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
if (!(selectedNode instanceof SimpleName)) {
return;
}
SimpleName nameNode= (SimpleName) selectedNode;
if (!(selectedNode.getParent() instanceof MethodInvocation)) {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
return;
}
MethodInvocation invocationNode= (MethodInvocation) nameNode.getParent();
String methodName= nameNode.getIdentifier();
SimilarElement[] elements= SimilarElementsRequestor.findSimilarElement(cu, nameNode, SimilarElementsRequestor.METHODS);
for (int i= 0; i < elements.length; i++) {
String curr= elements[i].getName();
if (curr.equals(methodName) && needsNewName) {
continue;
}
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changemethod.description", curr);
proposals.add(new ReplaceCorrectionProposal(label, problemPos, curr, 2));
}
IType type= null;
Expression sender= invocationNode.getExpression();
if (sender != null) {
ITypeBinding binding= sender.resolveTypeBinding();
if (binding != null && binding.isFromSource()) {
type= Binding2JavaModel.find(binding, cu.getJavaProject());
if (type != null) {
ICompilationUnit changedCU= type.getCompilationUnit();
if (!changedCU.isWorkingCopy()) {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
changedCU= EditorUtility.getWorkingCopy(changedCU);
if (changedCU != null) {
type= (IType) JavaModelUtil.findMemberInCompilationUnit(changedCU, type);
}
}
}
}
} else {
IJavaElement elem= cu.getElementAt(problemPos.getOffset());
if (elem != null) {
type= (IType) elem.getAncestor(IJavaElement.TYPE);
}
}
if (type != null) {
String label;
if (cu.equals(type.getCompilationUnit())) {
label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createmethod.description", methodName);
} else {
label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createmethod.other.description", new Object[] { methodName, type.getElementName() } );
}
proposals.add(new NewMethodCompletionProposal(label, invocationNode, cu, type, 1));
}
}
public static void getConstructorProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
if (selectedNode == null) {
return;
}
int type= selectedNode.getNodeType();
if (type == ASTNode.CLASS_INSTANCE_CREATION) {
ClassInstanceCreation creation= (ClassInstanceCreation) selectedNode;
IBinding binding= creation.getName().resolveBinding();
if (binding != null && binding.getKind() == IBinding.TYPE) {
getConstructorProposals((ITypeBinding) binding, creation.arguments(), cu, proposals);
}
} else if (type == ASTNode.SUPER_CONSTRUCTOR_INVOCATION) {
ASTNode node= selectedNode.getParent();
while (node != null && node.getNodeType() != ASTNode.TYPE_DECLARATION) {
node= node.getParent();
}
if (node != null) {
TypeDeclaration decl= (TypeDeclaration) node;
Name name= decl.getSuperclass();
if (name != null) {
IBinding binding= name.resolveBinding();
if (binding != null && binding.getKind() == IBinding.TYPE) {
getConstructorProposals((ITypeBinding) binding, ((SuperConstructorInvocation) selectedNode).arguments(), cu, proposals);
}
}
}
} else if (type == ASTNode.CONSTRUCTOR_INVOCATION) {
ASTNode node= selectedNode.getParent();
while (node != null && node.getNodeType() != ASTNode.TYPE_DECLARATION) {
|
16,230
|
Bug 16230 Quick Fix: no "create field" when prefixed with "this."
|
class Example { public Example(Object object) { this.object = object; } } Quick Fix doesn't provide a solution for "this.object" - "create field" would be appropriate.
|
resolved fixed
|
289d8d4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T18:45:04Z
| 2002-05-17T10:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
|
node= node.getParent();
}
if (node != null) {
TypeDeclaration decl= (TypeDeclaration) node;
IBinding binding= decl.getName().resolveBinding();
if (binding != null && binding.getKind() == IBinding.TYPE) {
getConstructorProposals((ITypeBinding) binding, ((ConstructorInvocation) selectedNode).arguments(), cu, proposals);
}
}
}
}
private static void getConstructorProposals(ITypeBinding typeBinding, List arguments, ICompilationUnit cu, ArrayList proposals) throws CoreException {
if (typeBinding.isFromSource() && typeBinding.isTopLevel()|| typeBinding.isMember()) {
IType type= Binding2JavaModel.find(typeBinding, cu.getJavaProject());
if (type == null) {
return;
}
IType workingCopyType= (IType) EditorUtility.getWorkingCopy(type);
if (workingCopyType != null) {
type= workingCopyType;
}
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createconstructor.description", type.getElementName());
proposals.add(new NewConstructorCompletionProposal(label, cu, type, arguments, 1));
}
}
}
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
package org.eclipse.jdt.internal.junit.launcher;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.io.File;
import java.text.MessageFormat;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
import org.eclipse.jdt.internal.junit.util.SocketUtil;
import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
import org.eclipse.jdt.launching.ExecutionArguments;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.IVMRunner;
import org.eclipse.jdt.launching.VMRunnerConfiguration;
import org.eclipse.jdt.launching.sourcelookup.JavaSourceLocator;
/**
* Abstract launch configuration delegate for a JUnit test.
*/
public abstract class JUnitBaseLaunchConfiguration extends AbstractJavaLaunchConfigurationDelegate {
public static final String PORT_ATTR= JUnitPlugin.PLUGIN_ID+".PORT";
public static final String TESTTYPE_ATTR= JUnitPlugin.PLUGIN_ID+".TESTTYPE";
public static final String ATTR_KEEPRUNNING = JUnitPlugin.PLUGIN_ID+ ".KEEPRUNNING_ATTR";
/**
* @see ILaunchConfigurationDelegate#launch(ILaunchConfiguration, String)
*/
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor pm) throws CoreException {
IJavaProject javaProject= getJavaProject(configuration);
if ((javaProject == null) || !javaProject.exists()) {
abort(JUnitMessages.getString("JUnitBaseLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
}
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
IType testType = getTestType(configuration, javaProject);
IVMInstallType type = getVMInstallType(configuration);
IVMInstall install= getVMInstall(configuration);
IVMRunner runner = install.getVMRunner(mode);
if (runner == null) {
abort(MessageFormat.format(JUnitMessages.getString("JUnitBaseLaunchConfiguration.error.novmrunner"), new String[]{install.getId()}), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
}
File workingDir = verifyWorkingDirectory(configuration);
String workingDirName = null;
if (workingDir != null)
workingDirName = workingDir.getAbsolutePath();
String vmArgs= getVMArguments(configuration);
ExecutionArguments execArgs = new ExecutionArguments(vmArgs, "");
IType types[]= { testType };
int port= SocketUtil.findUnusedLocalPort("", 5000, 15000);
VMRunnerConfiguration runConfig= createVMRunner(configuration, types, port, mode);
runConfig.setVMArguments(execArgs.getVMArgumentsArray());
runConfig.setWorkingDirectory(workingDirName);
String[] bootpath= getBootpath(configuration);
if (bootpath.length > 0)
runConfig.setBootClassPath(bootpath);
String id= configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
if (id == null) {
ISourceLocator sourceLocator = new JavaSourceLocator(javaProject);
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
launch.setSourceLocator(sourceLocator);
}
launch.setAttribute(PORT_ATTR, Integer.toString(port));
launch.setAttribute(TESTTYPE_ATTR, testType.getHandleIdentifier());
runner.run(runConfig, launch, pm);
}
public IType getTestType(ILaunchConfiguration configuration, IJavaProject javaProject) throws CoreException {
String testTypeName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, (String)null);
if ((testTypeName == null) || (testTypeName.trim().length() < 1)) {
abort("No test type specified", null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
}
IType testType = null;
try {
testType = findType(javaProject, testTypeName);
} catch (JavaModelException jme) {
abort("Test type does not exist", null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
}
if (testType == null) {
abort("Test type does not exist", null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
}
return testType;
}
/**
* Throws a core exception with the given message and optional
* exception. The exception's status code will indicate an error.
*
* @param message error message
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
* @param exception cause of the error, or <code>null</code>
* @exception CoreException with the given message and underlying
* exception
*/
protected void abort(String message, Throwable exception, int code) throws CoreException {
throw new CoreException(new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, code, message, exception));
}
/**
* Find the specified (fully-qualified) type name in the specified java project.
*/
private IType findType(IJavaProject javaProject, String mainTypeName) throws JavaModelException {
String pathStr= mainTypeName.replace('.', '/') + ".java";
IJavaElement javaElement= javaProject.findElement(new Path(pathStr));
if (javaElement == null) {
String qualifier= Signature.getQualifier(mainTypeName);
if (qualifier.length() > 0) {
IType type= findType(javaProject, qualifier);
if (type != null) {
IType res= type.getType(Signature.getSimpleName(mainTypeName));
if (res.exists()) {
return res;
}
}
}
} else if (javaElement.getElementType() == IJavaElement.COMPILATION_UNIT) {
String simpleName= Signature.getSimpleName(mainTypeName);
return ((ICompilationUnit) javaElement).getType(simpleName);
} else if (javaElement.getElementType() == IJavaElement.CLASS_FILE) {
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java
|
return ((IClassFile) javaElement).getType();
}
return null;
}
/**
* Convenience method to get the java model.
*/
private IJavaModel getJavaModel() {
return JavaCore.create(getWorkspaceRoot());
}
/**
* Convenience method to get the workspace root.
*/
private IWorkspaceRoot getWorkspaceRoot() {
return ResourcesPlugin.getWorkspace().getRoot();
}
/**
* Override to create a custom VMRunnerConfiguration for a launch configuration.
*/
protected abstract VMRunnerConfiguration createVMRunner(ILaunchConfiguration configuration, IType[] testTypes, int port, String runMode) throws CoreException;
protected boolean keepAlive(ILaunchConfiguration config) {
try {
return config.getAttribute(ATTR_KEEPRUNNING, false);
} catch(CoreException e) {
}
return false;
}
}
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
package org.eclipse.jdt.internal.junit.launcher;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.ILaunchShortcut;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.debug.ui.JavaUISourceLocator;
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
public class JUnitLaunchShortcut implements ILaunchShortcut {
protected void searchAndLaunch(Object[] search, String mode) {
IType[] types= null;
if (search != null) {
try {
types= findLaunchTypes(search);
} catch (InterruptedException e) {
JUnitPlugin.log(e);
return;
} catch (InvocationTargetException e) {
JUnitPlugin.log(e);
return;
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
}
IType type= null;
if (types.length == 0) {
MessageDialog.openInformation(getShell(), JUnitMessages.getString("LaunchTestAction.dialog.title"), JUnitMessages.getString("LaunchTestAction.message.notests"));
} else if (types.length > 1) {
type= chooseType(types, mode);
} else {
type= types[0];
}
if (type != null) {
launch(type, mode);
}
}
}
private IType[] findLaunchTypes(Object[] search) throws InvocationTargetException, InterruptedException {
return TestSearchEngine.findTests(new ProgressMonitorDialog(getShell()), search);
}
/**
* @see ILaunchShortcut#launch(IEditorPart, String)
*/
public void launch(IEditorPart editor, String mode) {
IEditorInput input = editor.getEditorInput();
IJavaElement je = (IJavaElement) input.getAdapter(IJavaElement.class);
if (je != null) {
searchAndLaunch(new Object[] {je}, mode);
}
}
/**
* @see ILaunchShortcut#launch(ISelection, String)
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
*/
public void launch(ISelection selection, String mode) {
if (selection instanceof IStructuredSelection) {
searchAndLaunch(((IStructuredSelection)selection).toArray(), mode);
}
}
/**
* Prompts the user to select a type
*
* @return the selected type or <code>null</code> if none.
*/
protected IType chooseType(IType[] types, String mode) {
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider());
dialog.setElements(types);
dialog.setTitle(JUnitMessages.getString("LaunchTestAction.dialog.title2"));
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectTestToRun"));
} else {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectTestToDebug"));
}
dialog.setMultipleSelection(false);
if (dialog.open() == dialog.OK) {
return (IType)dialog.getFirstResult();
}
return null;
}
/**
* Launches a configuration for the given type
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
*/
protected void launch(IType type, String mode) {
try {
ILaunchConfiguration config = findLaunchConfiguration(type, mode);
if (config != null) {
config.launch(mode, null);
}
} catch (CoreException e) {
ErrorDialog.openError(getShell(), JUnitMessages.getString("LaunchTestAction.message.launchFailed"), e.getMessage(), e.getStatus());
}
}
/**
* Locate a configuration to relaunch for the given type. If one cannot be found, create one.
*
* @return a re-useable config or <code>null</code> if none
*/
protected ILaunchConfiguration findLaunchConfiguration(IType type, String mode) {
ILaunchConfigurationType configType= getJUnitLaunchConfigType();
List candidateConfigs= Collections.EMPTY_LIST;
try {
ILaunchConfiguration[] configs= getLaunchManager().getLaunchConfigurations(configType);
candidateConfigs= new ArrayList(configs.length);
for (int i= 0; i < configs.length; i++) {
ILaunchConfiguration config= configs[i];
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "").equals(type.getFullyQualifiedName())) {
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(type.getJavaProject().getElementName())) {
candidateConfigs.add(config);
}
}
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
}
} catch (CoreException e) {
JUnitPlugin.log(e);
}
int candidateCount= candidateConfigs.size();
if (candidateCount < 1) {
return createConfiguration(type);
} else if (candidateCount == 1) {
return (ILaunchConfiguration) candidateConfigs.get(0);
} else {
ILaunchConfiguration config= chooseConfiguration(candidateConfigs, mode);
if (config != null) {
return config;
}
}
return null;
}
/**
* Show a selection dialog that allows the user to choose one of the specified
* launch configurations. Return the chosen config, or <code>null</code> if the
* user cancelled the dialog.
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
*/
protected ILaunchConfiguration chooseConfiguration(List configList, String mode) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle(JUnitMessages.getString("LaunchTestAction.message.selectConfiguration"));
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectDebugConfiguration"));
} else {
dialog.setMessage(JUnitMessages.getString("LaunchTestAction.message.selectRunConfiguration"));
}
dialog.setMultipleSelection(false);
int result= dialog.open();
labelProvider.dispose();
if (result == dialog.OK) {
return (ILaunchConfiguration)dialog.getFirstResult();
}
return null;
}
/**
* Create & return a new configuration based on the specified <code>IType</code>.
*/
protected ILaunchConfiguration createConfiguration(IType type) {
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType= getJUnitLaunchConfigType();
ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(type.getElementName()));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
|
wc.setAttribute(IDebugUIConstants.ATTR_TARGET_DEBUG_PERSPECTIVE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
wc.setAttribute(IDebugUIConstants.ATTR_TARGET_RUN_PERSPECTIVE, (String)null);
wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, JavaUISourceLocator.ID_PROMPTING_JAVA_SOURCE_LOCATOR);
config= wc.doSave();
} catch (CoreException ce) {
JUnitPlugin.log(ce);
}
return config;
}
/**
* Returns the local java launch config type
*/
protected ILaunchConfigurationType getJUnitLaunchConfigType() {
ILaunchManager lm= DebugPlugin.getDefault().getLaunchManager();
return lm.getLaunchConfigurationType(JUnitLaunchConfiguration.ID_JUNIT_APPLICATION);
}
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
/**
* Convenience method to get the window that owns this action's Shell.
*/
protected Shell getShell() {
return JUnitPlugin.getActiveWorkbenchShell();
}
}
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitTabGroup.java
|
package org.eclipse.jdt.internal.junit.launcher;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.CommonTab;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
public class JUnitTabGroup extends AbstractLaunchConfigurationTabGroup {
|
18,496
|
Bug 18496 Launch config: getting asked to save changes when there where no changes
|
1) execute Run As>JUnit test on a test case 2) open the launch config dialog -> the newly created config is selected 3) click on another config ->you get prompted whether you want to save changes Verified that the same attributes are set. What is special about the JUnit launch config is that the tab group initializes the default run perspective to "null", i.e. no change. However, when doing the compare only values supplied by the tabs are taken into consideration. See LaunchConfigurationDialog.updateWorkingCopyFromPages(); The defaults set by the tabgroup itself are not considered. Hence there is a difference. The launch configs compared are (without the qualifcation) MAIN_TYPE=junit.samples.VectorTest, PROJECT_ATTR=JUnit, KEEPRUNNING_ATTR=false, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default} MAIN_TYPE=junit.samples.VectorTest, KEEPRUNNING_ATTR=false, PROJECT_ATTR=JUnit, target_run_perspective=perspective_none, source_locator_id=org.eclipse.jdt.debug.ui.javaSourceLocator, target_debug_perspective=perspective_default As you can see the run perspective is missing in one config.
|
resolved fixed
|
7ba65c1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T19:02:47Z
| 2002-05-31T18:33:20Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitTabGroup.java
|
/**
* @see ILaunchConfigurationTabGroup#createTabs(ILaunchConfigurationDialog, String)
*/
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs= new ILaunchConfigurationTab[] {
new JUnitMainTab(),
new JavaArgumentsTab(),
new JavaClasspathTab(),
new JavaJRETab(),
new CommonTab()
};
setTabs(tabs);
}
/**
* @see ILaunchConfigurationTabGroup#setDefaults(ILaunchConfigurationWorkingCopy)
*/
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
super.setDefaults(config);
config.setAttribute(IDebugUIConstants.ATTR_TARGET_RUN_PERSPECTIVE, (String)null);
}
}
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelListener;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Highlights the temporary problems.
*/
public class ProblemPainter implements IPainter, PaintListener, IAnnotationModelListener {
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
private boolean fIsActive= false;
private boolean fIsPainting= false;
private boolean fIsSettingModel= false;
private Color fColor;
private ITextEditor fTextEditor;
private ISourceViewer fSourceViewer;
private StyledText fTextWidget;
private IAnnotationModel fModel;
private List fProblemPositions= new ArrayList();
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
public ProblemPainter(ITextEditor textEditor, ISourceViewer sourceViewer) {
fTextEditor= textEditor;
fSourceViewer= sourceViewer;
fTextWidget= sourceViewer.getTextWidget();
}
private boolean hasProblems() {
return !fProblemPositions.isEmpty();
}
private void enablePainting() {
if (!fIsPainting && hasProblems()) {
fIsPainting= true;
fTextWidget.addPaintListener(this);
handleDrawRequest(null);
}
}
private void disablePainting(boolean redraw) {
if (fIsPainting) {
fIsPainting= false;
fTextWidget.removePaintListener(this);
if (redraw && hasProblems())
handleDrawRequest(null);
}
}
private void setModel(IAnnotationModel model) {
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
if (fModel != model) {
if (fModel != null)
fModel.removeAnnotationModelListener(this);
fModel= model;
if (fModel != null) {
try {
fIsSettingModel= true;
fModel.addAnnotationModelListener(this);
} finally {
fIsSettingModel= false;
}
}
}
}
private void catchupWithModel() {
if (fProblemPositions != null) {
fProblemPositions.clear();
if (fModel != null) {
Iterator e= new ProblemAnnotationIterator(fModel, true);
while (e.hasNext()) {
IProblemAnnotation pa= (IProblemAnnotation) e.next();
if (pa.isProblem()) {
Annotation a= (Annotation) pa;
Position p= fModel.getPosition(a);
fProblemPositions.add(p);
}
}
}
}
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
}
private void updatePainting() {
disablePainting(true);
catchupWithModel();
enablePainting();
}
/*
* @see IAnnotationModelListener#modelChanged(IAnnotationModel)
*/
public void modelChanged(final IAnnotationModel model) {
if (fTextWidget != null && !fTextWidget.isDisposed()) {
if (fIsSettingModel) {
updatePainting();
} else {
Display d= fTextWidget.getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
if (fTextWidget != null && !fTextWidget.isDisposed())
updatePainting();
}
});
}
}
}
}
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
public void setHighlightColor(Color color) {
fColor= color;
}
/*
* @see IPainter#dispose()
*/
public void dispose() {
fColor= null;
fTextWidget= null;
fModel= null;
fProblemPositions= null;
}
/*
* @see PaintListener#paintControl(PaintEvent)
*/
public void paintControl(PaintEvent event) {
if (fTextWidget != null)
handleDrawRequest(event.gc);
}
private void handleDrawRequest(GC gc) {
int vOffset= fSourceViewer.getTopIndexStartOffset();
int vLength= fSourceViewer.getBottomIndexEndOffset();
IRegion region= fSourceViewer.getVisibleRegion();
int offset= region.getOffset();
int length= region.getLength();
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
for (Iterator e = fProblemPositions.iterator(); e.hasNext();) {
Position p = (Position) e.next();
if (p.overlapsWith(vOffset, vLength) && p.overlapsWith(offset , length)) {
int p1= Math.max(offset, p.getOffset());
int p2= Math.min(offset + length, p.getOffset() + p.getLength());
draw(gc, p1 - offset, p2 - p1);
}
}
}
private int[] computePolyline(Point left, Point right, int height) {
final int WIDTH= 4;
final int HEIGHT= 2;
int leftX= left.x;
int peeks= (right.x - left.x) / WIDTH;
int length= ((2 * peeks) + 1) * 2;
if (length < 0)
return new int[0];
int[] coordinates= new int[length];
int bottom= left.y + height - 1;
int top= bottom - HEIGHT;
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
for (int i= 0; i < peeks; i++) {
int index= 4 * i;
coordinates[index]= leftX + (WIDTH * i);
coordinates[index+1]= bottom;
coordinates[index+2]= coordinates[index] + WIDTH/2;
coordinates[index+3]= top;
}
coordinates[length-2]= left.x + (WIDTH * peeks);
coordinates[length-1]= bottom;
return coordinates;
}
private void draw(GC gc, int offset, int length) {
if (gc != null) {
Point left= fTextWidget.getLocationAtOffset(offset);
Point right= fTextWidget.getLocationAtOffset(offset + length);
gc.setForeground(fColor);
int[] polyline= computePolyline(left, right, gc.getFontMetrics().getHeight());
gc.drawPolyline(polyline);
} else {
fTextWidget.redrawRange(offset, length, true);
}
}
|
17,365
|
Bug 17365 Text Editor: icons in vert. ruler disappear for partial top line
|
- open Java text editor on file that is larger as view (so that you can scroll) - generate any kind of icon in vertical ruler (e.g. a breakpoint) - use the thumb to carefully scroll pixel wise so that a top line is half visible - now scroll with the scrollbar buttons (not the thumb!) until a line with an icon is at the top (half visible) Observe: as soon as a line is only partially visible its icon is no longer drawn.
|
verified fixed
|
68b7260
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-31T21:48:39Z
| 2002-05-23T16:06:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
/*
* @see IPainter#deactivate(boolean)
*/
public void deactivate(boolean redraw) {
if (fIsActive) {
fIsActive= false;
disablePainting(redraw);
setModel(null);
catchupWithModel();
}
}
/*
* @see IPainter#paint(int)
*/
public void paint(int reason) {
if (!fIsActive) {
fIsActive= true;
IDocumentProvider provider= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
setModel(provider.getAnnotationModel(fTextEditor.getEditorInput()));
}
}
/*
* @see IPainter#setPositionManager(IPositionManager)
*/
public void setPositionManager(IPositionManager manager) {
}
}
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import org.eclipse.core.resources.*;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.internal.ui.*;
import org.eclipse.jdt.internal.ui.viewsupport.*;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.*;
/**
* A ContentProvider for the PackageExplorer
*
* @see StandardJavaElementContentProvider
*/
public class PackageExplorerContentProvider extends StandardJavaElementContentProvider implements ITreeContentProvider, IElementChangedListener {
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
protected TreeViewer fViewer;
protected Object fInput;
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void dispose() {
super.dispose();
JavaCore.removeElementChangedListener(this);
}
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
fViewer= (TreeViewer)viewer;
if (oldInput == null && newInput != null) {
JavaCore.addElementChangedListener(this);
} else if (oldInput != null && newInput == null) {
JavaCore.removeElementChangedListener(this);
}
fInput= newInput;
}
/**
* Creates a new content provider for Java elements.
*/
public PackageExplorerContentProvider() {
}
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
/**
* Creates a new content provider for Java elements.
*/
public PackageExplorerContentProvider(boolean provideMembers, boolean provideWorkingCopy) {
super(provideMembers, provideWorkingCopy);
}
/* (non-Javadoc)
* Method declared on IElementChangedListener.
*/
public void elementChanged(final ElementChangedEvent event) {
try {
processDelta(event.getDelta());
} catch(JavaModelException e) {
JavaPlugin.log(e);
}
}
/**
* Processes a delta recursively. When more than two children are affected the
* tree is fully refreshed starting at this node. The delta is processed in the
* current thread but the viewer updates are posted to the UI thread.
*/
protected void processDelta(IJavaElementDelta delta) throws JavaModelException {
int kind= delta.getKind();
int flags= delta.getFlags();
IJavaElement element= delta.getElement();
if (!getProvideWorkingCopy() && isWorkingCopy(element))
return;
if (element != null && element.getElementType() == IJavaElement.COMPILATION_UNIT && !element.getJavaProject().isOnClasspath(element))
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
return;
if (((flags & IJavaElementDelta.F_CLOSED) != 0) || ((flags & IJavaElementDelta.F_OPENED) != 0)) {
postRefresh(element);
return;
}
if (kind == IJavaElementDelta.REMOVED) {
if (isWorkingCopy(element)) {
refreshWorkingCopy((IWorkingCopy)element);
return;
}
Object parent= internalGetParent(element);
postRemove(element);
if (parent instanceof IPackageFragment)
updatePackageIcon((IPackageFragment)parent);
if (isPackageFragmentEmpty(element.getParent())) {
if (fViewer.testFindItem(parent) != null)
postRefresh(internalGetParent(parent));
}
return;
}
if (kind == IJavaElementDelta.ADDED) {
if (isWorkingCopy(element)) {
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
refreshWorkingCopy((IWorkingCopy)element);
return;
}
Object parent= internalGetParent(element);
if (parent instanceof IPackageFragment) {
Object grandparent= internalGetParent(parent);
if (parent.equals(fInput)) {
postRefresh(parent);
} else {
if (fViewer.testFindItem(parent) == null)
postRefresh(grandparent);
else {
postRefresh(parent);
}
}
} else {
postAdd(parent, element);
}
}
if (element instanceof ICompilationUnit) {
if (getProvideWorkingCopy()) {
IJavaElement original= ((IWorkingCopy)element).getOriginalElement();
if (original != null)
element= original;
}
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
if (kind == IJavaElementDelta.CHANGED) {
postRefresh(element);
return;
}
}
if ((element instanceof ICompilationUnit) || (element instanceof IClassFile))
return;
if (element instanceof IPackageFragmentRoot && ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0))
postRefresh(element);
if (isClassPathChange(delta)) {
postRefresh(element.getJavaProject());
}
if (delta.getResourceDeltas() != null) {
IResourceDelta[] rd= delta.getResourceDeltas();
for (int i= 0; i < rd.length; i++) {
processResourceDelta(rd[i], element);
}
}
IJavaElementDelta[] affectedChildren= delta.getAffectedChildren();
if (affectedChildren.length > 1) {
if (element instanceof IPackageFragment) {
IJavaElement parent= (IJavaElement)internalGetParent(element);
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
if (element.equals(fInput)) {
postRefresh(element);
} else {
postRefresh(parent);
}
return;
}
if (element instanceof IPackageFragmentRoot)
postRefresh(skipProjectPackageFragmentRoot((IPackageFragmentRoot)element));
else
postRefresh(element);
return;
}
for (int i= 0; i < affectedChildren.length; i++) {
processDelta(affectedChildren[i]);
}
}
/**
* Refreshes the Compilation unit corresponding to the workging copy
* @param iWorkingCopy
*/
private void refreshWorkingCopy(IWorkingCopy workingCopy) {
IJavaElement original= workingCopy.getOriginalElement();
if (original != null)
postRefresh(original);
}
private boolean isWorkingCopy(IJavaElement element) {
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
return (element instanceof IWorkingCopy) && ((IWorkingCopy)element).isWorkingCopy();
}
/**
* Updates the package icon
*/
private void updatePackageIcon(final IJavaElement element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
}
});
}
/**
* Process resource deltas
*/
private void processResourceDelta(IResourceDelta delta, Object parent) {
int status= delta.getKind();
IResource resource= delta.getResource();
if (resource == null)
return;
if ((status & IResourceDelta.REMOVED) != 0) {
if (parent instanceof IPackageFragment)
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
postRefresh(internalGetParent(parent));
else
postRemove(resource);
}
if ((status & IResourceDelta.ADDED) != 0) {
if (parent instanceof IPackageFragment)
postRefresh(internalGetParent(parent));
else
postAdd(parent, resource);
}
IResourceDelta[] affectedChildren= delta.getAffectedChildren();
if (affectedChildren.length > 1) {
postRefresh(resource);
return;
}
for (int i= 0; i < affectedChildren.length; i++)
processResourceDelta(affectedChildren[i], resource);
}
private void postRefresh(final Object root) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.refresh(root);
}
|
17,921
|
Bug 17921 packages view: looses the selection on reconciling
| null |
resolved fixed
|
80f77cc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T10:15:47Z
| 2002-05-27T14:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
});
}
private void postAdd(final Object parent, final Object element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.add(parent, element);
}
});
}
private void postRemove(final Object element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.remove(element);
}
});
}
private void postRunnable(final Runnable r) {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(r);
}
}
}
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModelStatusConstants;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.ToolFactory;
import org.eclipse.jdt.core.util.IClassFileDisassembler;
import org.eclipse.jdt.core.util.IClassFileReader;
import org.eclipse.jdt.internal.core.JavaModelStatus;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
* Java specific text editor.
*/
public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProvider.InputChangeListener {
private static final int HORIZONTAL_SCROLL_INCREMENT= 10;
private static final int VERTICAL_SCROLL_INCREMENT= 10;
/**
* A form to attach source to a class file.
*/
private class SourceAttachmentForm implements IPropertyChangeListener {
private final IClassFile fFile;
private ScrolledComposite fScrolledComposite;
private Color fBackgroundColor;
private Color fForegroundColor;
private Color fSeparatorColor;
private List fBannerLabels= new ArrayList();
private List fHeaderLabels= new ArrayList();
private Font fFont;
/**
* Creates a source attachment form for a class file.
*/
public SourceAttachmentForm(IClassFile file) {
fFile= file;
}
/**
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
* Returns the package fragment root of this file.
*/
private IPackageFragmentRoot getPackageFragmentRoot(IClassFile file) {
IJavaElement element= file.getParent();
while (element != null && element.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
element= element.getParent();
return (IPackageFragmentRoot) element;
}
/**
* Creates the control of the source attachment form.
*/
public Control createControl(Composite parent) {
Display display= parent.getDisplay();
fBackgroundColor= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
fForegroundColor= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
fSeparatorColor= new Color(display, 152, 170, 203);
JFaceResources.getFontRegistry().addListener(this);
fScrolledComposite= new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
fScrolledComposite.setAlwaysShowScrollBars(false);
fScrolledComposite.setExpandHorizontal(true);
fScrolledComposite.setExpandVertical(true);
fScrolledComposite.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
JFaceResources.getFontRegistry().removeListener(SourceAttachmentForm.this);
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
fScrolledComposite= null;
fSeparatorColor.dispose();
fSeparatorColor= null;
fBannerLabels.clear();
fHeaderLabels.clear();
if (fFont != null) {
fFont.dispose();
fFont= null;
}
}
});
fScrolledComposite.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {}
public void controlResized(ControlEvent e) {
Rectangle clientArea = fScrolledComposite.getClientArea();
ScrollBar verticalBar= fScrolledComposite.getVerticalBar();
verticalBar.setIncrement(VERTICAL_SCROLL_INCREMENT);
verticalBar.setPageIncrement(clientArea.height - verticalBar.getIncrement());
ScrollBar horizontalBar= fScrolledComposite.getHorizontalBar();
horizontalBar.setIncrement(HORIZONTAL_SCROLL_INCREMENT);
horizontalBar.setPageIncrement(clientArea.width - horizontalBar.getIncrement());
}
});
Composite composite= createComposite(fScrolledComposite);
composite.setLayout(new GridLayout());
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
Label titleLabel= createTitleLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.title"));
createLabel(composite, null);
createLabel(composite, null);
createHeadingLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.heading"));
Composite separator= createCompositeSeparator(composite);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
data.heightHint= 2;
separator.setLayoutData(data);
try {
final IPackageFragmentRoot root= getPackageFragmentRoot(fFile);
if (root != null) {
IClasspathEntry entry= root.getRawClasspathEntry();
if (!root.isArchive()) {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSource", fFile.getElementName()));
} else if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
IClasspathContainer container= JavaCore.getClasspathContainer(entry.getPath(), root.getJavaProject());
String containerName= container == null ? entry.getPath().toString() : container.getDescription();
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.containerEntry", containerName));
} else {
Button button;
IPath path= root.getSourceAttachmentPath();
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
if (path == null) {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSourceAttachment", root.getElementName()));
createLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.message.pressButtonToAttach"));
createLabel(composite, null);
button= createButton(composite, JavaEditorMessages.getString("SourceAttachmentForm.button.attachSource"));
} else {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSourceInAttachment", fFile.getElementName()));
createLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.message.pressButtonToChange"));
createLabel(composite, null);
button= createButton(composite, JavaEditorMessages.getString("SourceAttachmentForm.button.changeAttachedSource"));
}
button.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent event) {
try {
SourceAttachmentDialog dialog= new SourceAttachmentDialog(fScrolledComposite.getShell(), root);
if (dialog.open() == SourceAttachmentDialog.OK)
verifyInput(getEditorInput());
} catch (CoreException e) {
String title= JavaEditorMessages.getString("SourceAttachmentForm.error.title");
String message= JavaEditorMessages.getString("SourceAttachmentForm.error.message");
ExceptionHandler.handle(e, fScrolledComposite.getShell(), title, message);
}
}
public void widgetDefaultSelected(SelectionEvent e) {}
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
});
}
}
} catch (JavaModelException e) {
String title= JavaEditorMessages.getString("SourceAttachmentForm.error.title");
String message= JavaEditorMessages.getString("SourceAttachmentForm.error.message");
ExceptionHandler.handle(e, fScrolledComposite.getShell(), title, message);
}
separator= createCompositeSeparator(composite);
data= new GridData(GridData.FILL_HORIZONTAL);
data.heightHint= 2;
separator.setLayoutData(data);
StyledText styledText= createCodeView(composite);
data= new GridData(GridData.FILL_BOTH);
styledText.setLayoutData(data);
updateCodeView(styledText, fFile);
fScrolledComposite.setContent(composite);
fScrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return fScrolledComposite;
}
/*
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
for (Iterator iterator = fBannerLabels.iterator(); iterator.hasNext();) {
Label label = (Label) iterator.next();
label.setFont(JFaceResources.getBannerFont());
}
for (Iterator iterator = fHeaderLabels.iterator(); iterator.hasNext();) {
Label label = (Label) iterator.next();
label.setFont(JFaceResources.getHeaderFont());
}
Control control= fScrolledComposite.getContent();
fScrolledComposite.setMinSize(control.computeSize(SWT.DEFAULT, SWT.DEFAULT));
fScrolledComposite.setContent(control);
fScrolledComposite.layout(true);
fScrolledComposite.redraw();
}
private Composite createComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(fBackgroundColor);
return composite;
}
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
private Composite createCompositeSeparator(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(fSeparatorColor);
return composite;
}
private StyledText createCodeView(Composite parent) {
int styles= SWT.MULTI | SWT.FULL_SELECTION;
StyledText styledText= new StyledText(parent, styles);
styledText.setBackground(fBackgroundColor);
styledText.setForeground(fForegroundColor);
styledText.setEditable(false);
setFont(styledText);
return styledText;
}
private void setFont(StyledText styledText) {
IPreferenceStore store= getPreferenceStore();
if (store != null) {
FontData data= null;
if (store.contains(PREFERENCE_FONT) && !store.isDefault(PREFERENCE_FONT))
data= PreferenceConverter.getFontData(store, PREFERENCE_FONT);
else
data= PreferenceConverter.getDefaultFontData(store, PREFERENCE_FONT);
if (data != null) {
Font font= new Font(styledText.getDisplay(), data);
styledText.setFont(font);
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
if (fFont != null)
fFont.dispose();
fFont= font;
}
}
}
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
private Label createTitleLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getHeaderFont());
fHeaderLabels.add(label);
return label;
}
private Label createHeadingLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getBannerFont());
fBannerLabels.add(label);
return label;
}
private Button createButton(Composite parent, String text) {
Button button = new Button(parent, SWT.FLAT);
button.setBackground(fBackgroundColor);
button.setForeground(fForegroundColor);
if (text != null)
button.setText(text);
return button;
}
private void updateCodeView(StyledText styledText, IClassFile classFile) {
String content= null;
int flags= IClassFileReader.FIELD_INFOS | IClassFileReader.METHOD_INFOS | IClassFileReader.SUPER_INTERFACES;
IClassFileReader classFileReader= ToolFactory.createDefaultClassFileReader(classFile, flags);
if (classFileReader != null) {
IClassFileDisassembler disassembler= ToolFactory.createDefaultClassFileDisassembler();
content= disassembler.disassemble(classFileReader, "\n");
}
styledText.setText(content == null ? "" : content);
}
};
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
private StackLayout fStackLayout;
private Composite fParent;
private Composite fViewerComposite;
private Control fSourceAttachmentForm;
/**
* Default constructor.
*/
public ClassFileEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getClassFileDocumentProvider());
setEditorContextMenuId("#ClassFileEditorContext");
setRulerContextMenuId("#ClassFileRulerContext");
setOutlinerContextMenuId("#ClassFileOutlinerContext");
}
/*
* @see AbstractTextEditor#createActions()
*/
protected void createActions() {
super.createActions();
setAction(ITextEditorActionConstants.SAVE, null);
setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null);
/*
* 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to classfile
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
*
* // replace default action with class file specific ones
*
* setAction(ITextEditorActionConstants.BOOKMARK, new AddClassFileMarkerAction("AddBookmark.", this, IMarker.BOOKMARK, true));
* setAction(ITextEditorActionConstants.ADD_TASK, new AddClassFileMarkerAction("AddTask.", this, IMarker.TASK, false));
* setAction(ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS, new ClassFileMarkerRulerAction("ManageBookmarks.", getVerticalRuler(), this, IMarker.BOOKMARK, true));
* setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true));
*/
setAction(ITextEditorActionConstants.BOOKMARK, null);
setAction(ITextEditorActionConstants.ADD_TASK, null);
}
/*
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementAt(int offset) {
if (getEditorInput() instanceof IClassFileEditorInput) {
try {
IClassFileEditorInput input= (IClassFileEditorInput) getEditorInput();
return input.getClassFile().getElementAt(offset);
} catch (JavaModelException x) {
}
}
return null;
}
/*
* @see JavaEditor#getCorrespondingElement(IJavaElement)
*/
protected IJavaElement getCorrespondingElement(IJavaElement element) {
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
if (getEditorInput() instanceof IClassFileEditorInput) {
IClassFileEditorInput input= (IClassFileEditorInput) getEditorInput();
IJavaElement parent= element.getAncestor(IJavaElement.CLASS_FILE);
if (input.getClassFile().equals(parent))
return element;
}
return null;
}
/*
* @see IEditorPart#saveState(IMemento)
*/
public void saveState(IMemento memento) {
}
/*
* @see JavaEditor#setOutlinePageInput(JavaOutlinePage, IEditorInput)
*/
protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) {
if (page != null && input instanceof IClassFileEditorInput) {
IClassFileEditorInput cfi= (IClassFileEditorInput) input;
page.setInput(cfi.getClassFile());
}
}
/*
* 1GEPKT5: ITPJUI:Linux - Source in editor for external classes is editable
* Removed methods isSaveOnClosedNeeded and isDirty.
* Added method isEditable.
*/
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/*
* @see org.eclipse.ui.texteditor.AbstractTextEditor#isEditable()
*/
public boolean isEditable() {
return false;
}
/**
* Translates the given editor input into an <code>ExternalClassFileEditorInput</code>
* if it is a file editor input representing an external class file.
*
* @param input the editor input to be transformed if necessary
* @return the transformed editor input
*/
protected IEditorInput transformEditorInput(IEditorInput input) {
if (input instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput) input).getFile();
IClassFileEditorInput classFileInput= new ExternalClassFileEditorInput(file);
if (classFileInput.getClassFile() != null)
input= classFileInput;
}
return input;
}
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/
protected void doSetInput(IEditorInput input) throws CoreException {
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
input= transformEditorInput(input);
if (!(input instanceof IClassFileEditorInput))
throw new CoreException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_RESOURCE_TYPE, JavaEditorMessages.getString("ClassFileEditor.error.invalid_input_message")));
IDocumentProvider documentProvider= getDocumentProvider();
if (documentProvider instanceof ClassFileDocumentProvider)
((ClassFileDocumentProvider) documentProvider).removeInputChangeListener(this);
super.doSetInput(input);
documentProvider= getDocumentProvider();
if (documentProvider instanceof ClassFileDocumentProvider)
((ClassFileDocumentProvider) documentProvider).addInputChangeListener(this);
verifyInput(getEditorInput());
}
/*
* @see IWorkbenchPart#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
fParent= new Composite(parent, SWT.NONE);
fStackLayout= new StackLayout();
fParent.setLayout(fStackLayout);
fViewerComposite= new Composite(fParent, SWT.NONE);
fViewerComposite.setLayout(new FillLayout());
super.createPartControl(fViewerComposite);
fStackLayout.topControl= fViewerComposite;
fParent.layout();
try {
verifyInput(getEditorInput());
} catch (CoreException e) {
String title= JavaEditorMessages.getString("ClassFileEditor.error.title");
String message= JavaEditorMessages.getString("ClassFileEditor.error.message");
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
ExceptionHandler.handle(e, fParent.getShell(), title, message);
}
}
/**
* Returns the package fragment root corresponding to the class file.
*/
private static IPackageFragmentRoot getPackageFragmentRoot(IClassFile file) {
IJavaElement element= file.getParent();
while (element != null && element.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
element= element.getParent();
return (IPackageFragmentRoot) element;
}
/**
* Checks if the class file input has no source attached. If so, a source attachment form is shown.
*/
private void verifyInput(IEditorInput input) throws CoreException {
if (fParent == null || input == null)
return;
IClassFileEditorInput classFileEditorInput= (IClassFileEditorInput) input;
IClassFile file= classFileEditorInput.getClassFile();
if (file.getSourceRange() == null) {
if (fSourceAttachmentForm != null)
fSourceAttachmentForm.dispose();
SourceAttachmentForm form= new SourceAttachmentForm(file);
fSourceAttachmentForm= form.createControl(fParent);
fStackLayout.topControl= fSourceAttachmentForm;
fParent.layout();
|
18,039
|
Bug 18039 Opening .class file fails
|
- build 20020528 - I have loaded a number of classes from the cvs repository at org.eclipse.dev (HEAD stream). Among them are org.eclipse.core.runtime and org.eclipse.core.boot - Search->File - fill in "findResource(" in the 'Containing Text' field - leave everything else as default (searching the workspace and for file name patterns '*') - do the search - I get 2 hits: DelegatingURLClassLoader.class (org.eclipse.core.boot/bin/org/eclipse/core/internal/boot) and DelegatingURLClassLoader.java (org.eclipse.core.boot/src/org/eclipse/core/internal/boot) - 10 matches - try to open the first file in the search result (which doesn't really make sense since it is a .class file) - you get the error: Could not open the editor Reason: bin/org/eclipse/core/internal/boot does not exist - But it does exist and there is a DelegatingURLClassLoader.class there. - Now try to redo the search - Search->File - in the 'Containing Text' field you find "findResource(_x0008__x0001_u_x000C__x0001_6_x0001_7" (i.e added garbage to the end of my search string).
|
verified fixed
|
4426409
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T11:11:54Z
| 2002-05-28T12:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
} else {
if (fSourceAttachmentForm != null) {
fSourceAttachmentForm.dispose();
fSourceAttachmentForm= null;
fStackLayout.topControl= fViewerComposite;
fParent.layout();
}
}
}
/*
* @see ClassFileDocumentProvider.InputChangeListener#inputChanged(IClassFileEditorInput)
*/
public void inputChanged(final IClassFileEditorInput input) {
if (input != null && input.equals(getEditorInput())) {
ISourceViewer viewer= getSourceViewer();
if (viewer != null) {
StyledText textWidget= viewer.getTextWidget();
if (textWidget != null && !textWidget.isDisposed()) {
textWidget.getDisplay().asyncExec(new Runnable() {
public void run() {
setInput(input);
}
});
}
}
}
}
}
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelListener;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Highlights the temporary problems.
*/
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
public class ProblemPainter implements IPainter, PaintListener, IAnnotationModelListener {
private boolean fIsActive= false;
private boolean fIsPainting= false;
private boolean fIsSettingModel= false;
private Color fColor;
private ITextEditor fTextEditor;
private ISourceViewer fSourceViewer;
private StyledText fTextWidget;
private IAnnotationModel fModel;
private List fProblemPositions= new ArrayList();
public ProblemPainter(ITextEditor textEditor, ISourceViewer sourceViewer) {
fTextEditor= textEditor;
fSourceViewer= sourceViewer;
fTextWidget= sourceViewer.getTextWidget();
}
private boolean hasProblems() {
return !fProblemPositions.isEmpty();
}
private void enablePainting() {
if (!fIsPainting && hasProblems()) {
fIsPainting= true;
fTextWidget.addPaintListener(this);
handleDrawRequest(null);
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
}
}
private void disablePainting(boolean redraw) {
if (fIsPainting) {
fIsPainting= false;
fTextWidget.removePaintListener(this);
if (redraw && hasProblems())
handleDrawRequest(null);
}
}
private void setModel(IAnnotationModel model) {
if (fModel != model) {
if (fModel != null)
fModel.removeAnnotationModelListener(this);
fModel= model;
if (fModel != null) {
try {
fIsSettingModel= true;
fModel.addAnnotationModelListener(this);
} finally {
fIsSettingModel= false;
}
}
}
}
private void catchupWithModel() {
if (fProblemPositions != null) {
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
fProblemPositions.clear();
if (fModel != null) {
Iterator e= new ProblemAnnotationIterator(fModel, true);
while (e.hasNext()) {
IProblemAnnotation pa= (IProblemAnnotation) e.next();
if (pa.isProblem()) {
Annotation a= (Annotation) pa;
Position p= fModel.getPosition(a);
fProblemPositions.add(p);
}
}
}
}
}
private void updatePainting() {
disablePainting(true);
catchupWithModel();
enablePainting();
}
/*
* @see IAnnotationModelListener#modelChanged(IAnnotationModel)
*/
public void modelChanged(final IAnnotationModel model) {
if (fTextWidget != null && !fTextWidget.isDisposed()) {
if (fIsSettingModel) {
updatePainting();
} else {
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
Display d= fTextWidget.getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
if (fTextWidget != null && !fTextWidget.isDisposed())
updatePainting();
}
});
}
}
}
}
public void setHighlightColor(Color color) {
fColor= color;
}
/*
* @see IPainter#dispose()
*/
public void dispose() {
fColor= null;
fTextWidget= null;
fModel= null;
fProblemPositions= null;
}
/*
* Returns the document offset of the upper left corner of the widgets viewport,
* possibly including partially visible lines.
*/
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
private static int getInclusiveTopIndexStartOffset(StyledText text, IDocument document, int visibleRegionOffset) {
if (text != null) {
int top= text.getTopIndex();
if ((text.getTopPixel() % text.getLineHeight()) != 0)
top--;
try {
top= document.getLineOffset(top - visibleRegionOffset);
return top + visibleRegionOffset;
} catch (BadLocationException ex) {
}
}
return -1;
}
/*
* @see PaintListener#paintControl(PaintEvent)
*/
public void paintControl(PaintEvent event) {
if (fTextWidget != null)
handleDrawRequest(event.gc);
}
private void handleDrawRequest(GC gc) {
IRegion region= fSourceViewer.getVisibleRegion();
int offset= region.getOffset();
int length= region.getLength();
int vOffset= getInclusiveTopIndexStartOffset(fTextWidget, fSourceViewer.getDocument(), offset);
int vLength= fSourceViewer.getBottomIndexEndOffset();
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
for (Iterator e = fProblemPositions.iterator(); e.hasNext();) {
Position p = (Position) e.next();
if (p.overlapsWith(vOffset, vLength) && p.overlapsWith(offset , length)) {
int p1= Math.max(offset, p.getOffset());
int p2= Math.min(offset + length, p.getOffset() + p.getLength());
draw(gc, p1 - offset, p2 - p1);
}
}
}
private int[] computePolyline(Point left, Point right, int height) {
final int WIDTH= 4;
final int HEIGHT= 2;
int leftX= left.x;
int peeks= (right.x - left.x) / WIDTH;
int length= ((2 * peeks) + 1) * 2;
if (length < 0)
return new int[0];
int[] coordinates= new int[length];
int bottom= left.y + height - 1;
int top= bottom - HEIGHT;
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
for (int i= 0; i < peeks; i++) {
int index= 4 * i;
coordinates[index]= leftX + (WIDTH * i);
coordinates[index+1]= bottom;
coordinates[index+2]= coordinates[index] + WIDTH/2;
coordinates[index+3]= top;
}
coordinates[length-2]= left.x + (WIDTH * peeks);
coordinates[length-1]= bottom;
return coordinates;
}
private void draw(GC gc, int offset, int length) {
if (gc != null) {
Point left= fTextWidget.getLocationAtOffset(offset);
Point right= fTextWidget.getLocationAtOffset(offset + length);
gc.setForeground(fColor);
int[] polyline= computePolyline(left, right, gc.getFontMetrics().getHeight());
gc.drawPolyline(polyline);
} else {
fTextWidget.redrawRange(offset, length, true);
}
}
|
18,581
|
Bug 18581 Single element view - markers from other elements shown
|
0) set some breakpoints in two methods, a, b 1) switch to the single element view in the editor 2) select a ->you can see the breakpoint on method b as a ghost (i.e. they do not update as user edits)
|
verified fixed
|
8c7b90d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-01T12:47:34Z
| 2002-06-01T11:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ProblemPainter.java
|
/*
* @see IPainter#deactivate(boolean)
*/
public void deactivate(boolean redraw) {
if (fIsActive) {
fIsActive= false;
disablePainting(redraw);
setModel(null);
catchupWithModel();
}
}
/*
* @see IPainter#paint(int)
*/
public void paint(int reason) {
if (!fIsActive) {
fIsActive= true;
IDocumentProvider provider= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
setModel(provider.getAnnotationModel(fTextEditor.getEditorInput()));
}
}
/*
* @see IPainter#setPositionManager(IPositionManager)
*/
public void setPositionManager(IPositionManager manager) {
}
}
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.IWorkingCopy;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
import org.eclipse.jdt.internal.ui.packageview.PackagesMessages;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.JavaUIHelp;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
import org.eclipse.jdt.ui.actions.BuildActionGroup;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.CustomFiltersActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.ImportActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.jdt.ui.actions.OpenEditorActionGroup;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jdt.ui.actions.ShowActionGroup;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.NewWizardMenu;
import org.eclipse.ui.part.ResourceTransfer;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.search.ui.ISearchResultView;
abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener {
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
private ILabelProvider fLabelProvider;
private ILabelProvider fTitleProvider;
private StructuredViewer fViewer;
private IMemento fMemento;
private JavaElementTypeComparator fTypeComparator;
private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup;
private boolean fHasWorkingSetFilter= true;
private boolean fHasCustomFilter= true;
private OpenEditorActionGroup fOpenEditorGroup;
private CCPActionGroup fCCPActionGroup;
private BuildActionGroup fBuildActionGroup;
protected CompositeActionGroup fActionGroups;
private CustomFiltersActionGroup fCustomFiltersActionGroup;
private Menu fContextMenu;
private IWorkbenchPart fPreviousSelectionProvider;
private Object fPreviousSelectedElement;
/*
* Ensure selection changed events being processed only if
* initiated by user interaction with this part.
*/
private boolean fProcessSelectionEvents= true;
|
18,067
|
Bug 18067 Packages View filters not applied when eclipse restarted
|
Eclipse F1 1) Create a java project with a .classpath file 2) In the packages view open the filter dialog and uncheck "Hide .* files". 3) Notice that the .classpath file is visible 4) Exit eclipse 5) Launch eclipse again. 6) Notice that the .classpath file is not visible in the packages view 7) Open the filter dialog for the Packages view. Notice that "Hide .* files" is still unchecked.
|
verified fixed
|
a34ac66
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-06-06T10:14:23Z
| 2002-05-28T15:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
private IPartListener fPartListener= new IPartListener() {
public void partActivated(IWorkbenchPart part) {
setSelectionFromEditor(part);
}
public void partBroughtToTop(IWorkbenchPart part) {
}
public void partClosed(IWorkbenchPart part) {
}
public void partDeactivated(IWorkbenchPart part) {
}
public void partOpened(IWorkbenchPart part) {
}
};
/*
* Implements method from IViewPart.
*/
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
}
/*
* Implements method from IViewPart.
*/
public void saveState(IMemento memento) {
if (fViewer == null) {
if (fMemento != null)
memento.putMemento(fMemento);
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.