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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
|
private JavaEditor fEditor;
/* (non-Javadoc)
* Class implements IObjectActionDelegate
*/
public static class ObjectDelegate implements IObjectActionDelegate {
private OpenSuperImplementationAction fAction;
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
fAction= new OpenSuperImplementationAction(targetPart.getSite());
}
public void run(IAction action) {
fAction.run();
}
public void selectionChanged(IAction action, ISelection selection) {
if (fAction == null)
action.setEnabled(false);
}
}
/**
* Creates a new <code>OpenSuperImplementationAction</code>.
*
* @param site the site providing context information for this action
*/
public OpenSuperImplementationAction(IWorkbenchSite site) {
super(site);
setText(ActionMessages.getString("OpenSuperImplementationAction.label"));
setDescription(ActionMessages.getString("OpenSuperImplementationAction.description"));
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
|
setToolTipText(ActionMessages.getString("OpenSuperImplementationAction.tooltip"));
}
/**
* Creates a new <code>OpenSuperImplementationAction</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public OpenSuperImplementationAction(JavaEditor editor) {
this(editor.getEditorSite());
fEditor= editor;
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(ITextSelection selection) {
setEnabled(fEditor != null && getMethod(selection) != null);
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(getMethod(selection) != null);
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
|
protected void run(ITextSelection selection) {
run(getMethod(selection));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void run(IStructuredSelection selection) {
run(getMethod(selection));
}
private void run(IMethod method) {
if (method == null)
return;
try {
IType declaringType= method.getDeclaringType();
IType workingCopyType= (IType) EditorUtility.getWorkingCopy(declaringType);
if (workingCopyType != null) {
declaringType= workingCopyType;
}
IMethod impl= findSuperImplementation(declaringType, method.getElementName(), method.getParameterTypes(), method.isConstructor());
if (impl != null) {
OpenActionUtil.open(impl);
}
} catch (CoreException e) {
JavaPlugin.log(e);
String message= ActionMessages.getString("OpenSuperImplementationAction.error.message");
ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
}
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
|
}
private IMethod findSuperImplementation(IType declaringType, String name, String[] paramTypes, boolean isConstructor) throws JavaModelException {
ITypeHierarchy hierarchy= SuperTypeHierarchyCache.getTypeHierarchy(declaringType);
IMethod impl= JavaModelUtil.findMethodImplementationInHierarchy(hierarchy, declaringType, name, paramTypes, isConstructor);
if (impl == null) {
impl= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, declaringType, name, paramTypes, isConstructor);
}
return impl;
}
private IMethod getMethod(IStructuredSelection selection) {
if (selection.size() != 1)
return null;
Object element= selection.getFirstElement();
return checkMethod(element);
}
private IMethod getMethod(ITextSelection selection) {
return checkMethod(elementAtOffset());
}
private IMethod checkMethod(Object element) {
try {
if (element instanceof IMethod) {
IMethod method= (IMethod) element;
if (method.exists()) {
int flags= method.getFlags();
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
|
if (!Flags.isStatic(flags) && !Flags.isPrivate(flags)) {
IType declaringType= method.getDeclaringType();
if (SuperTypeHierarchyCache.hasInCache(declaringType)) {
if (findSuperImplementation(declaringType, method.getElementName(), method.getParameterTypes(), method.isConstructor()) == null) {
return null;
}
}
return method;
}
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
return null;
}
private Object elementAtOffset() {
try {
return SelectionConverter.getElementAtOffset(fEditor);
} catch(JavaModelException e) {
}
return null;
}
private static String getDialogTitle() {
return ActionMessages.getString("OpenSuperImplementationAction.error.title");
}
}
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelection;
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.OpenWithMenu;
import org.eclipse.ui.dialogs.PropertyDialogAction;
import org.eclipse.ui.part.Page;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group that adds the actions that open a new Jdt view part or
* an external viewer to the context menu and the action bar's navigate
* menu.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class OpenViewActionGroup extends ActionGroup {
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
private boolean fEditorIsOwner;
private boolean fIsTypeHiararchyViewerOwner;
private IWorkbenchSite fSite;
private OpenSuperImplementationAction fOpenSuperImplementation;
private OpenExternalJavadocAction fOpenExternalJavadoc;
private OpenTypeHierarchyAction fOpenTypeHierarchy;
private PropertyDialogAction fOpenPropertiesDialog;
/**
* Creates a new <code>OpenActionGroup</code>.
*
* @param page the page that owns this action group
*/
public OpenViewActionGroup(Page page) {
createSiteActions(page.getSite());
}
/**
* Creates a new <code>OpenActionGroup</code>.
*
* @param part the view part that owns this action group
*/
public OpenViewActionGroup(IViewPart part) {
createSiteActions(part.getSite());
fIsTypeHiararchyViewerOwner= part instanceof TypeHierarchyViewPart;
}
/**
* Creates a new <code>OpenActionGroup</code>.
* <p>
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public OpenViewActionGroup(JavaEditor part) {
fEditorIsOwner= true;
fOpenSuperImplementation= new OpenSuperImplementationAction(part);
fOpenExternalJavadoc= new OpenExternalJavadocAction(part);
fOpenTypeHierarchy= new OpenTypeHierarchyAction(part);
initialize(part.getEditorSite());
}
private void createSiteActions(IWorkbenchSite site) {
fSite= site;
fOpenSuperImplementation= new OpenSuperImplementationAction(site);
fOpenExternalJavadoc= new OpenExternalJavadocAction(site);
fOpenTypeHierarchy= new OpenTypeHierarchyAction(site);
fOpenPropertiesDialog= new PropertyDialogAction(site.getShell(), site.getSelectionProvider());
initialize(site);
}
private void initialize(IWorkbenchSite site) {
fSite= site;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fOpenSuperImplementation.update(selection);
fOpenExternalJavadoc.update(selection);
fOpenTypeHierarchy.update(selection);
if (!fEditorIsOwner) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection)selection;
fOpenPropertiesDialog.selectionChanged(ss);
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
} else {
fOpenPropertiesDialog.selectionChanged(selection);
}
provider.addSelectionChangedListener(fOpenSuperImplementation);
provider.addSelectionChangedListener(fOpenExternalJavadoc);
provider.addSelectionChangedListener(fOpenTypeHierarchy);
}
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillActionBars(IActionBars actionBar) {
super.fillActionBars(actionBar);
setGlobalActionHandlers(actionBar);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
if (!fIsTypeHiararchyViewerOwner)
appendToGroup(menu, fOpenTypeHierarchy);
appendToGroup(menu, fOpenSuperImplementation);
IStructuredSelection selection= getStructuredSelection();
if (fOpenPropertiesDialog != null && fOpenPropertiesDialog.isEnabled() && selection != null &&fOpenPropertiesDialog.isApplicableForSelection(selection))
menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fOpenPropertiesDialog);
}
/*
|
7,330 |
Bug 7330 Make more actions available on text selection
|
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
|
resolved fixed
|
08af42f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T09:32:54Z | 2002-01-08T08:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
|
* @see ActionGroup#dispose()
*/
public void dispose() {
ISelectionProvider provider= fSite.getSelectionProvider();
provider.removeSelectionChangedListener(fOpenSuperImplementation);
provider.removeSelectionChangedListener(fOpenExternalJavadoc);
provider.removeSelectionChangedListener(fOpenTypeHierarchy);
super.dispose();
}
private void setGlobalActionHandlers(IActionBars actionBars) {
actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_SUPER_IMPLEMENTATION, fOpenSuperImplementation);
actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_EXTERNAL_JAVA_DOC, fOpenExternalJavadoc);
actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_TYPE_HIERARCHY, fOpenTypeHierarchy);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PROPERTIES, fOpenPropertiesDialog);
}
private void appendToGroup(IMenuManager menu, IAction action) {
if (action.isEnabled())
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, action);
}
private IStructuredSelection getStructuredSelection() {
ISelection selection= getContext().getSelection();
if (selection instanceof IStructuredSelection)
return (IStructuredSelection)selection;
return null;
}
}
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenActionUtil.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.actions;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
public class OpenActionUtil {
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenActionUtil.java
|
private OpenActionUtil() {
}
/**
* Opens the editor on the given element and subsequently selects it.
*/
public static void open(Object element) throws JavaModelException, PartInitException {
IEditorPart part= EditorUtility.openInEditor(element);
if (element instanceof IJavaElement)
EditorUtility.revealInEditor(part, (IJavaElement)element);
}
/**
* Filters out source references from the given code resolve results.
* A utility method that can be called by subclassers.
*/
public static List filterResolveResults(IJavaElement[] codeResolveResults) {
int nResults= codeResolveResults.length;
List refs= new ArrayList(nResults);
for (int i= 0; i < nResults; i++) {
if (codeResolveResults[i] instanceof ISourceReference)
refs.add(codeResolveResults[i]);
}
return refs;
}
/**
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenActionUtil.java
|
* Shows a dialog for resolving an ambigous java element.
* Utility method that can be called by subclassers.
*/
public static IJavaElement selectJavaElement(List elements, Shell shell, String title, String message) {
int nResults= elements.size();
if (nResults == 0)
return null;
if (nResults == 1)
return (IJavaElement) elements.get(0);
int flags= JavaElementLabelProvider.SHOW_DEFAULT
| JavaElementLabelProvider.SHOW_QUALIFIED
| JavaElementLabelProvider.SHOW_ROOT;
ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags));
dialog.setTitle(title);
dialog.setMessage(message);
dialog.setElements(elements.toArray());
if (dialog.open() == dialog.OK) {
Object[] selection= dialog.getResult();
if (selection != null && selection.length > 0) {
nResults= selection.length;
for (int i= 0; i < nResults; i++) {
Object current= selection[i];
if (current instanceof IJavaElement)
return (IJavaElement) current;
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenActionUtil.java
|
}
}
}
return null;
}
public static IJavaElement getElementToShow(IJavaElement element) throws JavaModelException {
if (element == null)
return null;
switch (element.getElementType()) {
case IJavaElement.PACKAGE_DECLARATION:
element= element.getAncestor(IJavaElement.PACKAGE_FRAGMENT);
break;
default:
element= getElementToOpen(element);
}
return element;
}
public static IJavaElement getElementToOpen(IJavaElement element) throws JavaModelException {
if (element == null)
return null;
switch (element.getElementType()) {
case IJavaElement.IMPORT_DECLARATION:
IImportDeclaration declaration= (IImportDeclaration) element;
if (declaration.isOnDemand()) {
element= JavaModelUtil.findTypeContainer(element.getJavaProject(), Signature.getQualifier(element.getElementName()));
} else {
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenActionUtil.java
|
element= element.getJavaProject().findType(element.getElementName());
}
if (element instanceof IType) {
element= (IJavaElement)element.getOpenable();
}
break;
case IJavaElement.PACKAGE_DECLARATION:
case IJavaElement.IMPORT_CONTAINER:
case IJavaElement.TYPE:
case IJavaElement.METHOD:
case IJavaElement.FIELD:
case IJavaElement.INITIALIZER:
element= (IJavaElement)element.getOpenable();
break;
case IJavaElement.JAVA_MODEL:
element= null;
break;
default:
}
if (element instanceof ICompilationUnit) {
ICompilationUnit cu= (ICompilationUnit) element;
if (cu.isWorkingCopy()) {
element= cu.getOriginalElement();
}
}
return element;
}
}
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
/*******************************************************************************
* Copyright (c) 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.actions;
import java.util.Arrays;
import java.util.Iterator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.ui.IWorkingCopyManager;
public class SelectionConverter {
private static final IJavaElement[] EMPTY_RESULT= new IJavaElement[0];
private SelectionConverter() {
}
/**
* Converts the selection provided by the given part into a structured selection.
* The following conversion rules are used:
* <ul>
* <li><code>part instanceof JavaEditor</code>: returns a structured selection
* using code resolve to convert the editor's text selection.</li>
* <li><code>part instanceof IWorkbenchPart</code>: returns the part's selection
* if it is a structured selection.</li>
* <li><code>default</code>: returns an empty structured selection.</li>
* </ul>
*/
public static IStructuredSelection getStructuredSelection(IWorkbenchPart part) throws JavaModelException {
if (part instanceof JavaEditor)
return new StructuredSelection(codeResolve((JavaEditor)part));
ISelectionProvider provider= part.getSite().getSelectionProvider();
if (provider != null) {
ISelection selection= provider.getSelection();
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
if (selection instanceof IStructuredSelection)
return (IStructuredSelection)selection;
}
return StructuredSelection.EMPTY;
}
/**
* Converts the given structured selection into an array of Java elements.
* An empty array is returned if one of the elements stored in the structured
* selection is not of tupe <code>IJavaElement</code>
*/
public static IJavaElement[] getElements(IStructuredSelection selection) {
if (!selection.isEmpty()) {
IJavaElement[] result= new IJavaElement[selection.size()];
int i= 0;
for (Iterator iter= selection.iterator(); iter.hasNext(); i++) {
Object element= (Object) iter.next();
if (!(element instanceof IJavaElement))
return EMPTY_RESULT;
result[i]= (IJavaElement)element;
}
return result;
}
return EMPTY_RESULT;
}
/**
* Converts the text selection provided by the given editor into an array of
* Java elements. If the selection doesn't cover a Java element and the selection's
* length is greater than 0 the methods returns the editor's input element.
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
*/
public static IJavaElement[] codeResolveOrInput(JavaEditor editor) throws JavaModelException {
IJavaElement input= getInput(editor);
ITextSelection selection= (ITextSelection)editor.getSelectionProvider().getSelection();
IJavaElement[] result= codeResolve(input, selection);
if (result.length == 0 && selection.getLength() == 0) {
result= new IJavaElement[] {input};
}
return result;
}
public static IJavaElement[] codeResolveOrInputHandled(JavaEditor editor, Shell shell, String title) {
try {
return codeResolveOrInput(editor);
} catch(JavaModelException e) {
ExceptionHandler.handle(e, shell, title, ActionMessages.getString("SelectionConverter.converstion_failed"));
}
return null;
}
/**
* Converts the text selection provided by the given editor a Java element by
* asking the user if code reolve returned more than one result. If the selection
* doesn't cover a Java element and the selection's length is greater than 0 the
* methods returns the editor's input element.
*/
public static IJavaElement codeResolveOrInput(JavaEditor editor, Shell shell, String title, String message) throws JavaModelException {
IJavaElement[] elements= codeResolveOrInput(editor);
if (elements == null || elements.length == 0)
return null;
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
IJavaElement candidate= elements[0];
if (elements.length > 1) {
candidate= OpenActionUtil.selectJavaElement(Arrays.asList(elements), shell, title, message);
}
return candidate;
}
public static IJavaElement codeResolveOrInputHandled(JavaEditor editor, Shell shell, String title, String message) {
try {
return codeResolveOrInput(editor, shell, title, message);
} catch (JavaModelException e) {
ExceptionHandler.handle(e, shell, title, ActionMessages.getString("SelectionConverter.codeResolveOrInput_failed"));
}
return null;
}
public static IJavaElement[] codeResolve(JavaEditor editor) throws JavaModelException {
return codeResolve(getInput(editor), (ITextSelection)editor.getSelectionProvider().getSelection());
}
public static IJavaElement[] codeResolveHandled(JavaEditor editor, Shell shell, String title) {
try {
return codeResolve(editor);
} catch (JavaModelException e) {
ExceptionHandler.handle(e, shell, title, ActionMessages.getString("SelectionConverter.codeResolve_failed"));
}
return null;
}
public static IJavaElement getElementAtOffset(JavaEditor editor) throws JavaModelException {
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
return getElementAtOffset(getInput(editor), (ITextSelection)editor.getSelectionProvider().getSelection());
}
public static IType getTypeAtOffset(JavaEditor editor) throws JavaModelException {
IJavaElement element= SelectionConverter.getElementAtOffset(editor);
IType type= (IType)element.getAncestor(IJavaElement.TYPE);
if (type == null) {
ICompilationUnit unit= SelectionConverter.getInputAsCompilationUnit(editor);
if (unit != null)
type= unit.findPrimaryType();
}
return type;
}
public static IJavaElement getInput(JavaEditor editor) {
IEditorInput input= editor.getEditorInput();
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
public static ICompilationUnit getInputAsCompilationUnit(JavaEditor editor) {
Object editorInput= SelectionConverter.getInput(editor);
if (editorInput instanceof ICompilationUnit)
return (ICompilationUnit)editorInput;
else
return null;
}
private static IJavaElement[] codeResolve(IJavaElement input, ITextSelection selection) throws JavaModelException {
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
|
if (input instanceof ICodeAssist) {
IJavaElement[] elements= ((ICodeAssist)input).codeSelect(selection.getOffset(), selection.getLength());
if (elements != null && elements.length > 0)
return elements;
}
return EMPTY_RESULT;
}
private static IJavaElement getElementAtOffset(IJavaElement input, ITextSelection selection) throws JavaModelException {
if (input instanceof ICompilationUnit) {
ICompilationUnit cunit= (ICompilationUnit)input;
if (cunit.isWorkingCopy()) {
synchronized (cunit) {
cunit.reconcile();
}
}
IJavaElement ref= cunit.getElementAt(selection.getOffset());
if (ref != null) {
return ref;
}
} else if (input instanceof IClassFile) {
IJavaElement ref= ((IClassFile)input).getElementAt(selection.getOffset());
if (ref != null) {
return ref;
}
}
return null;
}
}
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
/*******************************************************************************
* Copyright (c) 2000, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.IStructuredSelection;
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.OpenActionUtil;
import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart;
/**
* This action reveals the currently selected Java element in the packages
* view. The Java element can be represeented by either
* <ul>
* <li>a text selection inside a Java editor, or </li>
* <li>a structured selection of a view part showing Java elements</li>
* </ul>
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class ShowInPackageViewAction extends SelectionDispatchAction {
private JavaEditor fEditor;
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
/**
* Creates a new <code>ShowInPackageViewAction</code>.
*
* @param site the site providing context information for this action
*/
public ShowInPackageViewAction(IWorkbenchSite site) {
super(site);
setText(ActionMessages.getString("ShowInPackageViewAction.label"));
setDescription(ActionMessages.getString("ShowInPackageViewAction.description"));
setToolTipText(ActionMessages.getString("ShowInPackageViewAction.tooltip"));
WorkbenchHelp.setHelp(this, IJavaHelpContextIds.SHOW_IN_PACKAGEVIEW_ACTION);
}
/**
* Creates a new <code>ShowInPackageViewAction</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public ShowInPackageViewAction(JavaEditor editor) {
this(editor.getEditorSite());
fEditor= editor;
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(ITextSelection selection) {
setEnabled(fEditor != null);
}
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(checkEnabled(selection));
}
private boolean checkEnabled(IStructuredSelection selection) {
if (selection.size() != 1)
return false;
return selection.getFirstElement() instanceof IJavaElement;
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void run(ITextSelection selection) {
try {
IJavaElement element= SelectionConverter.getElementAtOffset(fEditor);
if (element != null)
run(element);
} catch (JavaModelException e) {
JavaPlugin.log(e);
String message= ActionMessages.getString("ShowInPackageViewAction.error.message");
ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
}
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
|
13,981 |
Bug 13981 Show In Packages view not precise
|
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
|
resolved fixed
|
3c9f82a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:06:11Z | 2002-04-17T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
*/
protected void run(IStructuredSelection selection) {
if (!checkEnabled(selection))
return;
run((IJavaElement)selection.getFirstElement());
}
private void run(IJavaElement element) {
if (element == null)
return;
try {
element= OpenActionUtil.getElementToShow(element);
if (element == null)
return;
PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
if (view != null) {
view.selectReveal(new StructuredSelection(element));
return;
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
String message= ActionMessages.getString("ShowInPackageViewAction.error.message");
ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
}
}
private static String getDialogTitle() {
return ActionMessages.getString("ShowInPackageViewAction.dialog.title");
}
}
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
/*******************************************************************************
* Copyright (c) 2000, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.Iterator;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaStatusConstants;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
import org.eclipse.jdt.internal.ui.actions.OpenActionUtil;
import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.packageview.PackagesMessages;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* This action opens a java editor on an element represented by either
* <ul>
* <li>a text selection inside a Java editor, or </li>
* <li>a structured selection of a view part showing Java elements</li>
* </ul>
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class OpenAction extends SelectionDispatchAction {
private JavaEditor fEditor;
/**
* Creates a new <code>OpenAction</code>.
*
* @param site the site providing context information for this action
*/
public OpenAction(IWorkbenchSite site) {
super(site);
setText(ActionMessages.getString("OpenAction.label"));
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
setToolTipText(ActionMessages.getString("OpenAction.tooltip"));
setDescription(ActionMessages.getString("OpenAction.description"));
}
/**
* Creates a new <code>OpenAction</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public OpenAction(JavaEditor editor) {
this(editor.getEditorSite());
fEditor= editor;
setText(ActionMessages.getString("OpenAction.declaration.label"));
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(ITextSelection selection) {
setEnabled(fEditor != null);
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(checkEnabled(selection));
}
private boolean checkEnabled(IStructuredSelection selection) {
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
if (selection.isEmpty())
return false;
for (Iterator iter= selection.iterator(); iter.hasNext();) {
Object element= (Object)iter.next();
if (element instanceof IImportDeclaration && !((IImportDeclaration)element).isOnDemand())
continue;
if (element instanceof ISourceReference)
continue;
if (element instanceof IResource)
continue;
if (element instanceof IStorage)
continue;
return false;
}
return true;
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void run(ITextSelection selection) {
try {
IJavaElement[] elements= SelectionConverter.codeResolveOrInput(fEditor);
IJavaElement input= SelectionConverter.getInput(fEditor);
for (int i= 0; i < elements.length; i++) {
int type= elements[i].getElementType();
if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT)
elements[i]= input;
}
run(elements);
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
} catch (JavaModelException e) {
showError(e);
}
}
/* (non-Javadoc)
* Method declared on SelectionDispatchAction.
*/
protected void run(IStructuredSelection selection) {
if (!checkEnabled(selection))
return;
run(selection.toArray());
}
private void run(Object[] elements) {
if (elements == null)
return;
for (int i= 0; i < elements.length; i++) {
Object element= elements[i];
try {
OpenActionUtil.open(element);
} catch (JavaModelException e) {
JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(),
JavaStatusConstants.INTERNAL_ERROR, ActionMessages.getString("OpenAction.error.message"), e));
ErrorDialog.openError(getShell(),
getDialogTitle(),
ActionMessages.getString("OpenAction.error.messageProblems"),
e.getStatus());
|
15,473 |
Bug 15473 F3 opening more than one class
|
build 20020502 1) Get JDT Core from HEAD. 2) Add antadapter as a source folder 3) Create a package under antadapter called org.eclipse.jdt.core 4) Move the JDTCompilerAdapter class from default to the new package 5) Add ant.jar to the classpath 6) There are error indicating the class Util cannot be resolved 7) Highlight a Util reference and press F3 8) 8 Util classes open in the editor view
|
resolved fixed
|
c95c7c0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T11:24:37Z | 2002-05-07T19:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAction.java
|
} catch (PartInitException x) {
String name= null;
if (element instanceof IJavaElement) {
name= ((IJavaElement) element).getElementName();
} else if (element instanceof IStorage) {
name= ((IStorage) element).getName();
} else if (element instanceof IResource) {
name= ((IResource) element).getName();
}
if (name != null) {
MessageDialog.openError(getShell(),
ActionMessages.getString("OpenAction.error.messageProblems"),
ActionMessages.getFormattedString("OpenAction.error.messageArgs",
new String[] { name, x.getMessage() } ));
}
}
}
}
private String getDialogTitle() {
return ActionMessages.getString("OpenAction.error.title");
}
private void showError(CoreException e) {
ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.getString("OpenAction.error.message"));
}
}
|
15,586 |
Bug 15586 Warn the user when a project without the Java nature is opened
|
When opening a closed project that doesn't have the Java nature when opened, then we should inform the user that the opened project will not appear in the packages view.
|
verified fixed
|
a397d8e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T17:33:27Z | 2002-05-08T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenProjectAction.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.Dialog;
|
15,586 |
Bug 15586 Warn the user when a project without the Java nature is opened
|
When opening a closed project that doesn't have the Java nature when opened, then we should inform the user that the opened project will not appear in the packages view.
|
verified fixed
|
a397d8e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T17:33:27Z | 2002-05-08T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenProjectAction.java
|
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.util.Assert;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
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.MultiStatus;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
/**
* Action to open a closed project. Action presents a dialog from which the
* user can select the projects to be opened.
*
* @since 2.0
*/
public class OpenProjectAction extends Action implements IResourceChangeListener {
private IWorkbenchSite fSite;
/**
* Creates a new <code>OpenProjectAction</code>.
|
15,586 |
Bug 15586 Warn the user when a project without the Java nature is opened
|
When opening a closed project that doesn't have the Java nature when opened, then we should inform the user that the opened project will not appear in the packages view.
|
verified fixed
|
a397d8e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T17:33:27Z | 2002-05-08T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenProjectAction.java
|
*
* @param site the site providing context information for this action
*/
public OpenProjectAction(IWorkbenchSite site) {
Assert.isNotNull(site);
fSite= site;
setEnabled(hasCloseProjects());
}
/*
* @see IAction#run()
*/
public void run() {
ElementListSelectionDialog dialog= new ElementListSelectionDialog(fSite.getShell(), new JavaElementLabelProvider());
dialog.setTitle(ActionMessages.getString("OpenProjectAction.dialog.title"));
dialog.setMessage(ActionMessages.getString("OpenProjectAction.dialog.message"));
dialog.setElements(getClosedProjects());
dialog.setMultipleSelection(true);
int result= dialog.open();
if (result != Dialog.OK)
return;
final Object[] projects= dialog.getResult();
IRunnableWithProgress runnable= new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitor.beginTask("", projects.length);
MultiStatus errorStatus= null;
for (int i = 0; i < projects.length; i++) {
IProject project= (IProject)projects[i];
try {
project.open(new SubProgressMonitor(monitor, 1));
|
15,586 |
Bug 15586 Warn the user when a project without the Java nature is opened
|
When opening a closed project that doesn't have the Java nature when opened, then we should inform the user that the opened project will not appear in the packages view.
|
verified fixed
|
a397d8e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T17:33:27Z | 2002-05-08T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenProjectAction.java
|
} catch (CoreException e) {
if (errorStatus == null)
errorStatus = new MultiStatus(JavaPlugin.getPluginId(), IStatus.ERROR, ActionMessages.getString("OpenProjectAction.error.message"), e);
errorStatus.merge(e.getStatus());
}
}
monitor.done();
if (errorStatus != null)
throw new InvocationTargetException(new CoreException(errorStatus));
}
};
ProgressMonitorDialog pd= new ProgressMonitorDialog(fSite.getShell());
try {
pd.run(true, true, runnable);
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e, fSite.getShell(),
ActionMessages.getString("OpenProjectAction.dialog.title"),
ActionMessages.getString("OpenProjectAction.error.message"));
} catch (InterruptedException e) {
}
}
/*
* @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
*/
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta delta = event.getDelta();
if (delta != null) {
IResourceDelta[] projDeltas = delta.getAffectedChildren(IResourceDelta.CHANGED);
for (int i = 0; i < projDeltas.length; ++i) {
|
15,586 |
Bug 15586 Warn the user when a project without the Java nature is opened
|
When opening a closed project that doesn't have the Java nature when opened, then we should inform the user that the opened project will not appear in the packages view.
|
verified fixed
|
a397d8e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T17:33:27Z | 2002-05-08T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenProjectAction.java
|
IResourceDelta projDelta = projDeltas[i];
if ((projDelta.getFlags() & IResourceDelta.OPEN) != 0) {
setEnabled(hasCloseProjects());
return;
}
}
}
}
private Object[] getClosedProjects() {
IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects();
List result= new ArrayList(5);
for (int i = 0; i < projects.length; i++) {
IProject project= projects[i];
if (!project.isOpen())
result.add(project);
}
return result.toArray();
}
private boolean hasCloseProjects() {
IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < projects.length; i++) {
if (!projects[i].isOpen())
return true;
}
return false;
}
}
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.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 implementation
******************************************************************************/
package org.eclipse.jdt.internal.ui.packageview;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.FileTransfer;
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;
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
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.ITreeViewerListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeExpansionEvent;
import org.eclipse.jface.viewers.TreeViewer;
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;
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.eclipse.ui.part.ResourceTransfer;
import org.eclipse.ui.part.ViewPart;
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.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.IWorkingCopy;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jdt.ui.JavaElementContentProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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.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.ProblemTreeViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
/**
* The ViewPart for the ProjectExplorer. It listens to part activation events.
* When selection linking with the editor is enabled the view selection tracks
* the active editor page. Similarly when a resource is selected in the packages
* view the corresponding editor is activated.
*/
public class PackageExplorerPart extends ViewPart implements ISetSelectionTarget, IMenuListener, IPackagesViewPart, IPropertyChangeListener {
public final static String VIEW_ID= JavaUI.ID_PACKAGES;
static final String TAG_SELECTION= "selection";
static final String TAG_EXPANDED= "expanded";
static final String TAG_ELEMENT= "element";
static final String TAG_PATH= "path";
static final String TAG_VERTICAL_POSITION= "verticalPosition";
static final String TAG_HORIZONTAL_POSITION= "horizontalPosition";
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
static final String TAG_FILTERS = "filters";
static final String TAG_FILTER = "filter";
static final String TAG_SHOWLIBRARIES = "showLibraries";
static final String TAG_SHOWBINARIES = "showBinaries";
private JavaElementPatternFilter fPatternFilter= new JavaElementPatternFilter();
private LibraryFilter fLibraryFilter= new LibraryFilter();
private PackageExplorerActionGroup fActionSet;
private ProblemTreeViewer fViewer;
private Menu fContextMenu;
private IMemento fMemento;
private ISelectionChangedListener fSelectionListener;
private String fWorkingSetName;
private IPartListener fPartListener= new IPartListener() {
public void partActivated(IWorkbenchPart part) {
if (part instanceof IEditorPart)
editorActivated((IEditorPart) part);
}
public void partBroughtToTop(IWorkbenchPart part) {
}
public void partClosed(IWorkbenchPart part) {
}
public void partDeactivated(IWorkbenchPart part) {
}
public void partOpened(IWorkbenchPart part) {
}
};
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
private ITreeViewerListener fExpansionListener= new ITreeViewerListener() {
public void treeCollapsed(TreeExpansionEvent event) {
}
public void treeExpanded(TreeExpansionEvent event) {
Object element= event.getElement();
if (element instanceof ICompilationUnit ||
element instanceof IClassFile)
expandMainType(element);
}
};
public PackageExplorerPart() {
}
/* (non-Javadoc)
* Method declared on IViewPart.
*/
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
}
/**
* Initializes the default preferences
*/
public static void initDefaults(IPreferenceStore store) {
store.setDefault(TAG_SHOWLIBRARIES, true);
store.setDefault(TAG_SHOWBINARIES, true);
}
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
/**
* Returns the package explorer part of the active perspective. If
* there isn't any package explorer part <code>null</code> is returned.
*/
public static PackageExplorerPart getFromActivePerspective() {
IViewPart view= JavaPlugin.getActivePage().findView(VIEW_ID);
if (view instanceof PackageExplorerPart)
return (PackageExplorerPart)view;
return null;
}
/**
* Makes the package explorer part visible in the active perspective. If there
* isn't a package explorer part registered <code>null</code> is returned.
* Otherwise the opened view part is returned.
*/
public static PackageExplorerPart openInActivePerspective() {
try {
return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID);
} catch(PartInitException pe) {
return null;
}
}
public void dispose() {
if (fContextMenu != null && !fContextMenu.isDisposed())
fContextMenu.dispose();
getSite().getPage().removePartListener(fPartListener);
JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
if (fViewer != null)
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
fViewer.removeTreeListener(fExpansionListener);
if (fActionSet != null)
fActionSet.dispose();
super.dispose();
}
/**
* Implementation of IWorkbenchPart.createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
fViewer= new ProblemTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
boolean showCUChildren= JavaBasePreferencePage.showCompilationUnitChildren();
boolean reconcile= JavaBasePreferencePage.reconcileJavaViews();
fViewer.setContentProvider(new JavaElementContentProvider(showCUChildren, reconcile));
JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
ILabelProvider labelProvider=
new AppearanceAwareLabelProvider(
AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS,
AppearanceAwareLabelProvider.getDecorators(true, null)
);
fViewer.setLabelProvider(new DecoratingLabelProvider(
labelProvider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())
);
fViewer.setSorter(new JavaElementSorter());
fViewer.addFilter(new EmptyInnerPackageFilter());
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
fViewer.setUseHashlookup(true);
fViewer.addFilter(fPatternFilter);
fViewer.addFilter(fLibraryFilter);
MenuManager menuMgr= new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(this);
fContextMenu= menuMgr.createContextMenu(fViewer.getTree());
fViewer.getTree().setMenu(fContextMenu);
IWorkbenchPartSite site= getSite();
site.registerContextMenu(menuMgr, fViewer);
site.setSelectionProvider(fViewer);
site.getPage().addPartListener(fPartListener);
if(fMemento != null)
restoreFilters();
else
initFilterFromPreferences();
makeActions();
fViewer.setInput(findInputElement());
initDragAndDrop();
initKeyListener();
fSelectionListener= new ISelectionChangedListener() {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
public void selectionChanged(SelectionChangedEvent event) {
handleSelectionChanged(event);
}
};
fViewer.addSelectionChangedListener(fSelectionListener);
fViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
handleDoubleClick(event);
}
});
IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager();
fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager));
fViewer.addTreeListener(fExpansionListener);
if (fMemento != null)
restoreState(fMemento);
fMemento= null;
JavaUIHelp.setHelp(fViewer, IJavaHelpContextIds.PACKAGES_VIEW);
fillActionBars();
updateTitle();
}
private void fillActionBars() {
IActionBars actionBars= getViewSite().getActionBars();
fActionSet.fillActionBars(actionBars);
}
private Object findInputElement() {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
Object input= getSite().getPage().getInput();
if (input instanceof IWorkspace) {
return JavaCore.create(((IWorkspace)input).getRoot());
} else if (input instanceof IContainer) {
return JavaCore.create((IContainer)input);
}
return JavaCore.create(JavaPlugin.getWorkspace().getRoot());
}
/**
* Answer the property defined by key.
*/
public Object getAdapter(Class key) {
if (key.equals(ISelectionProvider.class))
return fViewer;
return super.getAdapter(key);
}
/**
* Returns the tool tip text for the given element.
*/
String getToolTipText(Object element) {
String result;
if (!(element instanceof IResource)) {
result= JavaElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
} else {
IPath path= ((IResource) element).getFullPath();
if (path.isRoot()) {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
result= PackagesMessages.getString("PackageExplorer.title");
} else {
result= path.makeRelative().toString();
}
}
if (fWorkingSetName == null)
return result;
String wsstr= PackagesMessages.getFormattedString("PackageExplorer.toolTip", new String[] { fWorkingSetName });
if (result.length() == 0)
return wsstr;
return PackagesMessages.getFormattedString("PackageExplorer.toolTip2", new String[] { result, fWorkingSetName });
}
public String getTitleToolTip() {
if (fViewer == null)
return super.getTitleToolTip();
return getToolTipText(fViewer.getInput());
}
/**
* @see IWorkbenchPart#setFocus()
*/
public void setFocus() {
fViewer.getTree().setFocus();
}
/**
* Returns the shell to use for opening dialogs.
* Used in this class, and in the actions.
*/
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
private Shell getShell() {
return fViewer.getTree().getShell();
}
/**
* Returns the selection provider.
*/
private ISelectionProvider getSelectionProvider() {
return fViewer;
}
/**
* Returns the current selection.
*/
private ISelection getSelection() {
return fViewer.getSelection();
}
/**
* Called when the context menu is about to open. Override
* to add your own context dependent menu contributions.
*/
public void menuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
fActionSet.setContext(new ActionContext(getSelection()));
fActionSet.fillContextMenu(menu);
fActionSet.setContext(null);
}
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
private void makeActions() {
fActionSet= new PackageExplorerActionGroup(this);
}
private boolean isSelectionOfType(ISelection s, Class clazz, boolean considerUnderlyingResource) {
if (! (s instanceof IStructuredSelection) || s.isEmpty())
return false;
IStructuredSelection selection= (IStructuredSelection)s;
Iterator iter= selection.iterator();
while (iter.hasNext()) {
Object o= iter.next();
if (clazz.isInstance(o))
return true;
if (considerUnderlyingResource) {
if (! (o instanceof IJavaElement))
return false;
IJavaElement element= (IJavaElement)o;
Object resource= element.getAdapter(IResource.class);
if (! clazz.isInstance(resource))
return false;
}
}
return true;
}
private void initDragAndDrop() {
int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
final LocalSelectionTransfer lt= LocalSelectionTransfer.getInstance();
Transfer[] transfers= new Transfer[] {
lt,
ResourceTransfer.getInstance(),
FileTransfer.getInstance()};
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new SelectionTransferDropAdapter(fViewer),
new FileTransferDropAdapter(fViewer)
};
fViewer.addDropSupport(ops, transfers, new DelegatingDropAdapter(dropListeners));
Control control= fViewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(fViewer),
new ResourceTransferDragAdapter(fViewer),
new FileTransferDragAdapter(fViewer)
};
DragSource source= new DragSource(control, ops);
source.addDragListener(new DelegatingDragAdapter(dragListeners) {
public void dragStart(DragSourceEvent event) {
IStructuredSelection selection= (IStructuredSelection)getSelection();
for (Iterator iter= selection.iterator(); iter.hasNext(); ) {
if (iter.next() instanceof IMember) {
setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)});
break;
}
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
}
super.dragStart(event);
}
});
}
/**
* Handles double clicks in viewer.
* Opens editor if file double-clicked.
*/
private void handleDoubleClick(DoubleClickEvent event) {
fActionSet.handleDoubleClick(event);
}
/**
* Handles selection changed in viewer.
* Updates global actions.
* Links to editor (if option enabled)
*/
private void handleSelectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection= (IStructuredSelection) event.getSelection();
fActionSet.handleSelectionChanged(event);
linkToEditor(selection);
}
public void selectReveal(ISelection selection) {
ISelection javaSelection= convertSelection(selection);
fViewer.setSelection(javaSelection, true);
}
private ISelection convertSelection(ISelection s) {
List converted= new ArrayList();
if (s instanceof StructuredSelection) {
Object[] elements= ((StructuredSelection)s).toArray();
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
for (int i= 0; i < elements.length; i++) {
Object e= elements[i];
if (e instanceof IJavaElement)
converted.add(e);
else if (e instanceof IResource) {
IJavaElement element= JavaCore.create((IResource)e);
if (element != null)
converted.add(element);
else
converted.add(e);
}
}
}
return new StructuredSelection(converted.toArray());
}
public void selectAndReveal(Object element) {
selectReveal(new StructuredSelection(element));
}
/**
* Returns whether the preference to link selection to active editor is enabled.
*/
boolean isLinkingEnabled() {
return JavaBasePreferencePage.linkPackageSelectionToEditor();
}
/**
* Links to editor (if option enabled)
*/
private void linkToEditor(IStructuredSelection selection) {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
Object obj= selection.getFirstElement();
Object element= null;
if (selection.size() == 1) {
if (obj instanceof IJavaElement) {
IJavaElement cu= ((IJavaElement)obj).getAncestor(IJavaElement.COMPILATION_UNIT);
if (cu != null)
element= getResourceFor(cu);
if (element == null)
element= ((IJavaElement)obj).getAncestor(IJavaElement.CLASS_FILE);
}
else if (obj instanceof IFile)
element= obj;
if (element == null)
return;
IWorkbenchPage page= getSite().getPage();
IEditorPart editorArray[]= page.getEditors();
for (int i= 0; i < editorArray.length; ++i) {
IEditorPart editor= editorArray[i];
Object input= getElementOfInput(editor.getEditorInput());
if (input != null && input.equals(element)) {
page.bringToTop(editor);
if (obj instanceof IJavaElement)
EditorUtility.revealInEditor(editor, (IJavaElement) obj);
return;
}
}
}
}
private IResource getResourceFor(Object element) {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if (element instanceof IJavaElement) {
if (element instanceof IWorkingCopy) {
IWorkingCopy wc= (IWorkingCopy)element;
IJavaElement original= wc.getOriginalElement();
if (original != null)
element= original;
}
try {
element= ((IJavaElement)element).getUnderlyingResource();
} catch (JavaModelException e) {
return null;
}
}
if (!(element instanceof IResource) || ((IResource)element).isPhantom()) {
return null;
}
return (IResource)element;
}
public void saveState(IMemento memento) {
if (fViewer == null) {
if (fMemento != null)
memento.putMemento(fMemento);
return;
}
saveExpansionState(memento);
saveSelectionState(memento);
saveScrollState(memento, fViewer.getTree());
savePatternFilterState(memento);
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
saveFilterState(memento);
fActionSet.saveState(memento);
}
protected void saveFilterState(IMemento memento) {
boolean showLibraries= getLibraryFilter().getShowLibraries();
String show= "true";
if (!showLibraries)
show= "false";
memento.putString(TAG_SHOWLIBRARIES, show);
}
protected void savePatternFilterState(IMemento memento) {
String filters[] = getPatternFilter().getPatterns();
if(filters.length > 0) {
IMemento filtersMem = memento.createChild(TAG_FILTERS);
for (int i = 0; i < filters.length; i++){
IMemento child = filtersMem.createChild(TAG_FILTER);
child.putString(TAG_ELEMENT,filters[i]);
}
}
}
protected void saveScrollState(IMemento memento, Tree tree) {
ScrollBar bar= tree.getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
bar= tree.getHorizontalBar();
position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
}
protected void saveSelectionState(IMemento memento) {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();
if (elements.length > 0) {
IMemento selectionMem= memento.createChild(TAG_SELECTION);
for (int i= 0; i < elements.length; i++) {
IMemento elementMem= selectionMem.createChild(TAG_ELEMENT);
Object o= elements[i];
if (o instanceof IJavaElement)
elementMem.putString(TAG_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());
}
}
}
protected void saveExpansionState(IMemento memento) {
Object expandedElements[]= fViewer.getVisibleExpandedElements();
if (expandedElements.length > 0) {
IMemento expandedMem= memento.createChild(TAG_EXPANDED);
for (int i= 0; i < expandedElements.length; i++) {
IMemento elementMem= expandedMem.createChild(TAG_ELEMENT);
Object o= expandedElements[i];
if (o instanceof IJavaElement)
elementMem.putString(TAG_PATH, ((IJavaElement) expandedElements[i]).getHandleIdentifier());
}
}
}
void restoreState(IMemento memento) {
restoreExpansionState(memento);
restoreSelectionState(memento);
restoreScrollState(memento, fViewer.getTree());
fActionSet.restoreState(memento);
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
}
protected void restoreScrollState(IMemento memento, Tree tree) {
ScrollBar bar= tree.getVerticalBar();
if (bar != null) {
try {
String posStr= memento.getString(TAG_VERTICAL_POSITION);
int position;
position= new Integer(posStr).intValue();
bar.setSelection(position);
} catch (NumberFormatException e) {
}
}
bar= tree.getHorizontalBar();
if (bar != null) {
try {
String posStr= memento.getString(TAG_HORIZONTAL_POSITION);
int position;
position= new Integer(posStr).intValue();
bar.setSelection(position);
} catch (NumberFormatException e) {
}
}
}
protected void restoreSelectionState(IMemento memento) {
IMemento childMem;
childMem= memento.getChild(TAG_SELECTION);
if (childMem != null) {
ArrayList list= new ArrayList();
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
for (int i= 0; i < elementMem.length; i++) {
Object element= JavaCore.create(elementMem[i].getString(TAG_PATH));
if (element != null)
list.add(element);
}
fViewer.setSelection(new StructuredSelection(list));
}
}
protected void restoreExpansionState(IMemento memento) {
IMemento childMem= memento.getChild(TAG_EXPANDED);
if (childMem != null) {
ArrayList elements= new ArrayList();
IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
for (int i= 0; i < elementMem.length; i++) {
Object element= JavaCore.create(elementMem[i].getString(TAG_PATH));
if (element != null)
elements.add(element);
}
fViewer.setExpandedElements(elements.toArray());
}
}
/**
* Create the KeyListener for doing the refresh on the viewer.
*/
private void initKeyListener() {
fViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
fActionSet.handleKeyEvent(event);
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
}
});
}
/**
* An editor has been activated. Set the selection in this Packages Viewer
* to be the editor's input, if linking is enabled.
*/
void editorActivated(IEditorPart editor) {
if (!isLinkingEnabled())
return;
Object input= getElementOfInput(editor.getEditorInput());
Object element= null;
if (input instanceof IFile)
element= JavaCore.create((IFile)input);
if (element == null)
element= input;
if (element != null) {
IStructuredSelection oldSelection= (IStructuredSelection)getSelection();
if (oldSelection.size() == 1) {
Object o= oldSelection.getFirstElement();
if (o instanceof IJavaElement) {
ICompilationUnit cu= (ICompilationUnit)((IJavaElement)o).getAncestor(IJavaElement.COMPILATION_UNIT);
if (cu != null) {
if (cu.isWorkingCopy())
cu= (ICompilationUnit)cu.getOriginalElement();
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if ( element.equals(cu))
return;
}
IClassFile cf= (IClassFile)((IJavaElement)o).getAncestor(IJavaElement.CLASS_FILE);
if (cf != null && element.equals(cf))
return;
}
}
ISelection newSelection= new StructuredSelection(element);
if (!fViewer.getSelection().equals(newSelection)) {
try {
fViewer.removeSelectionChangedListener(fSelectionListener);
fViewer.setSelection(newSelection);
} finally {
fViewer.addSelectionChangedListener(fSelectionListener);
}
}
}
}
/**
* A compilation unit or class was expanded, expand
* the main type.
*/
void expandMainType(Object element) {
try {
IType type= null;
if (element instanceof ICompilationUnit) {
ICompilationUnit cu= (ICompilationUnit)element;
IType[] types= cu.getTypes();
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if (types.length > 0)
type= types[0];
}
else if (element instanceof IClassFile) {
IClassFile cf= (IClassFile)element;
type= cf.getType();
}
if (type != null) {
final IType type2= type;
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.expandToLevel(type2, 1);
}
});
}
}
} catch(JavaModelException e) {
}
}
/**
* Returns the element contained in the EditorInput
*/
Object getElementOfInput(IEditorInput input) {
if (input instanceof IClassFileEditorInput)
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
return ((IClassFileEditorInput)input).getClassFile();
else if (input instanceof IFileEditorInput)
return ((IFileEditorInput)input).getFile();
else if (input instanceof JarEntryEditorInput)
return ((JarEntryEditorInput)input).getStorage();
return null;
}
/**
* Returns the Viewer.
*/
TreeViewer getViewer() {
return fViewer;
}
/**
* Returns the pattern filter for this view.
* @return the pattern filter
*/
JavaElementPatternFilter getPatternFilter() {
return fPatternFilter;
}
/**
* Returns the library filter for this view.
* @return the library filter
*/
LibraryFilter getLibraryFilter() {
return fLibraryFilter;
}
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
void restoreFilters() {
IMemento filtersMem= fMemento.getChild(TAG_FILTERS);
if(filtersMem != null) {
IMemento children[]= filtersMem.getChildren(TAG_FILTER);
String filters[]= new String[children.length];
for (int i = 0; i < children.length; i++) {
filters[i]= children[i].getString(TAG_ELEMENT);
}
getPatternFilter().setPatterns(filters);
} else {
getPatternFilter().setPatterns(new String[0]);
}
String show= fMemento.getString(TAG_SHOWLIBRARIES);
if (show != null)
getLibraryFilter().setShowLibraries(show.equals("true"));
else
initLibraryFilterFromPreferences();
}
void initFilterFromPreferences() {
initLibraryFilterFromPreferences();
}
void initLibraryFilterFromPreferences() {
JavaPlugin plugin= JavaPlugin.getDefault();
boolean show= plugin.getPreferenceStore().getBoolean(TAG_SHOWLIBRARIES);
getLibraryFilter().setShowLibraries(show);
}
boolean isExpandable(Object element) {
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if (fViewer == null)
return false;
return fViewer.isExpandable(element);
}
void setWorkingSetName(String workingSetName) {
fWorkingSetName= workingSetName;
}
/**
* Updates the title text and title tool tip.
* Called whenever the input of the viewer changes.
*/
void updateTitle() {
Object input= fViewer.getInput();
String viewName= getConfigurationElement().getAttribute("name");
if (input == null
|| (input instanceof IJavaModel)) {
setTitle(viewName);
setTitleToolTip("");
} else {
String inputText= JavaElementLabels.getTextLabel(input, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
String title= PackagesMessages.getFormattedString("PackageExplorer.argTitle", new String[] { viewName, inputText });
setTitle(title);
setTitleToolTip(getToolTipText(input));
}
}
/**
* Sets the decorator for the package explorer.
*
|
4,676 |
Bug 4676 [Navigator] Tree scroll bar out of sync with top item (1GEJYGD)
|
The Tree scroll bar can get out of sync with the top item on Linux. To reproduce in Eclipse: 1. Open a standard SWT development workspace with the UIMain launcher loaded (org.eclipse.core.launcher should be the first project in the tree). 2. Expand the project to display the UIMain class and select it. 3. Exit Eclipse and restart. ->UIMain is selected and the top item. The scroll bar is also at the top/position 0. When you click the scroll bar the tree gets in sync with the scroll bar and shows the first tree item as the top item (the launcher project). NOTES: McQ (01/06/2001 9:02:42 AM) - Scrollbar needs to be forced to update its position. Is this a Tree problem or an ITPUI bug? KR (6/1/01 11:39:31 AM) It's the tree - only happens on Linux. KR (6/1/01 2:02:13 PM) Note that this is only reproducable when there are no editors open. It seems that the selected item is the top item and that the scroll bar is set as if the top item from the last Eclipse session was still the top item. McQ (01/06/2001 4:18:41 PM) - Re "It's the tree - only happens on Linux.": We have already had several cases where they assumed that by working with the scroll bar directly they could get widgets to position their contents, which works some places and not others (and thus is not supported). This could be a similar case. KR (6/4/01 11:42:26 AM) After debugging this for a while I noticed that a bunch of viewers call Tree.getVerticalBar() to restore the old ui state. This is one of the cases where this doesn't work. Tree.setSelection is called to select the previously selected item (at index 10). This automatically sets the top index and the scroll bar selection to 10. Someone (PackageExplorerPart.restoreState) then gets the vertical scroll bar and sets its selection to 9. For some reason the Tree doesn't always update the top index accordingly. KR (6/4/01 12:30:28 PM) It seems that the Tree sometimes gets a selection event for the programmatic scroll bar selection but most of the time doesn't. McQ (05/06/2001 11:04:29 AM) - No further action for June. McQ (26/06/2001 2:19:17 PM) - Time to take another look at this.
|
resolved fixed
|
cc534da
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-10T21:19:15Z | 2001-10-11T17:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
* @param decorator a label decorator or <code>null</code> for no decorations.
* @deprecated To be removed
*/
public void setLabelDecorator(ILabelDecorator decorator) {
}
/*
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
if (fViewer == null)
return;
boolean refreshViewer= false;
if (event.getProperty() == JavaBasePreferencePage.SHOW_CU_CHILDREN) {
IActionBars actionBars= getViewSite().getActionBars();
fActionSet.fillToolBar(actionBars.getToolBarManager());
actionBars.updateActionBars();
boolean showCUChildren= JavaBasePreferencePage.showCompilationUnitChildren();
((JavaElementContentProvider)fViewer.getContentProvider()).setProvideMembers(showCUChildren);
refreshViewer= true;
}
if (refreshViewer)
fViewer.refresh();
}
}
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.packageview.EmptyInnerPackageFilter;
import org.eclipse.jdt.internal.ui.packageview.JavaElementPatternFilter;
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.LibraryFilter;
public class PackagesView extends JavaBrowsingPart {
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
|
/**
* Adds filters the viewer of this part.
*/
protected void addFilters() {
super.addFilters();
getViewer().addFilter(new EmptyInnerPackageFilter());
getViewer().addFilter(new NonJavaElementFilter());
getViewer().addFilter(new LibraryFilter());
JavaElementPatternFilter patternFilter= new JavaElementPatternFilter();
patternFilter.setPatterns(new String[] {"CVS", "*.CVS"});
getViewer().addFilter(patternFilter);
}
protected ILabelProvider createLabelProvider() {
return new AppearanceAwareLabelProvider(
AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS,
AppearanceAwareLabelProvider.getDecorators(true, null)
);
}
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
|
/**
* Returns the context ID for the Help system
*
* @return the string used as ID for the Help context
*/
protected String getHelpContextId() {
return IJavaHelpContextIds.PACKAGES_BROWSING_VIEW;
}
/**
* Answers if the given <code>element</code> is a valid
* input for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid input
*/
protected boolean isValidInput(Object element) {
return element instanceof IJavaProject
|| (element instanceof IPackageFragmentRoot && ((IJavaElement)element).getElementName() != IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
}
/*
* Gets suitable input.
*/
/**
* Answers if the given <code>element</code> is a valid
* element for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid element
*/
protected boolean isValidElement(Object element) {
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
|
if (element instanceof IPackageFragment) {
IJavaElement parent= ((IPackageFragment)element).getParent();
if (parent != null)
return super.isValidElement(parent) || super.isValidElement(parent.getJavaProject());
}
return false;
}
/**
* Finds the element which has to be selected in this part.
*
* @param je the Java element which has the focus
*/
protected IJavaElement findElementToSelect(IJavaElement je) {
if (je == null)
return null;
switch (je.getElementType()) {
case IJavaElement.PACKAGE_FRAGMENT:
return je;
case IJavaElement.COMPILATION_UNIT:
return ((ICompilationUnit)je).getParent();
case IJavaElement.CLASS_FILE:
return ((IClassFile)je).getParent();
case IJavaElement.TYPE:
return ((IType)je).getPackageFragment();
default:
return findElementToSelect(je.getParent());
}
}
}
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
import org.eclipse.jdt.ui.actions.ProjectActionGroup;
public class ProjectsView extends JavaBrowsingPart {
/**
* Creates the the viewer of this part.
*
* @param parent the parent for the viewer
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
*/
protected StructuredViewer createViewer(Composite parent) {
return new ProblemTreeViewer(parent, SWT.MULTI);
}
/**
* Creates the the content provider of this part.
*/
protected BaseJavaElementContentProvider createContentProvider() {
return new ProjectAndSourceFolderContentProvider(this);
}
/**
* Returns the context ID for the Help system.
*
* @return the string used as ID for the Help context
*/
protected String getHelpContextId() {
return IJavaHelpContextIds.PROJECTS_VIEW;
}
/**
* Adds additional listeners to this view.
*/
protected void hookViewerListeners() {
}
protected void setInitialInput() {
IJavaElement root= JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot());
getViewer().setInput(root);
updateTitle();
}
/**
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
* Answers if the given <code>element</code> is a valid
* input for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid input
*/
protected boolean isValidInput(Object element) {
return element instanceof IJavaModel;
}
/**
* Answers if the given <code>element</code> is a valid
* element for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid element
*/
protected boolean isValidElement(Object element) {
return element instanceof IJavaProject || element instanceof IPackageFragmentRoot;
}
/**
* Finds the element which has to be selected in this part.
*
* @param je the Java element which has the focus
*/
protected IJavaElement findElementToSelect(IJavaElement je) {
if (je == null)
return null;
switch (je.getElementType()) {
case IJavaElement.JAVA_MODEL :
|
15,656 |
Bug 15656 Two differerent Views are called "packages"
|
There are two different views called Packages - one in the Java Browsing perspective and one in the Java Perspective. This is very confusing for someone trying to get one of the using Show V
|
resolved fixed
|
f683a9c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T09:17:43Z | 2002-05-09T18:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
return null;
case IJavaElement.JAVA_PROJECT:
return je;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (je.getElementName().equals(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH))
return je.getParent();
else
return je;
default :
return findElementToSelect(je.getParent());
}
}
/*
* @see JavaBrowsingPart#setInput(Object)
*/
protected void setInput(Object input) {
if (input != null)
super.setInput(input);
else
getViewer().setSelection(null);
}
protected void createActions() {
super.createActions();
fActionGroups.addGroup(new ProjectActionGroup(this));
}
}
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.resources.IStorage;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jdt.ui.ProblemsLabelDecorator;
import org.eclipse.jdt.internal.ui.JavaPlugin;
public class JavaUILabelProvider extends LabelProvider {
private JavaElementImageProvider fImageLabelProvider;
private StorageLabelProvider fStorageLabelProvider;
private ILabelDecorator[] fLabelDecorators;
private int fImageFlags;
private int fTextFlags;
/**
* Creates a new label provider with default flags.
*/
public JavaUILabelProvider() {
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
this(JavaElementLabels.M_PARAMETER_TYPES, JavaElementImageProvider.OVERLAY_ICONS, null);
}
/**
* @param textFlags Flags defined in <code>JavaElementLabels</code>.
* @param imageFlags Flags defined in <code>JavaElementImageProvider</code>.
*/
public JavaUILabelProvider(int textFlags, int imageFlags, ILabelDecorator[] labelDecorators) {
fImageLabelProvider= new JavaElementImageProvider();
fLabelDecorators= labelDecorators;
fStorageLabelProvider= new StorageLabelProvider();
fImageFlags= imageFlags;
fTextFlags= textFlags;
}
/**
* Sets the textFlags.
* @param textFlags The textFlags to set
*/
public final void setTextFlags(int textFlags) {
fTextFlags= textFlags;
}
/**
* Sets the imageFlags
* @param imageFlags The imageFlags to set
*/
public final void setImageFlags(int imageFlags) {
fImageFlags= imageFlags;
}
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
/**
* Gets the image flags.
* Can be overwriten by super classes.
* @return Returns a int
*/
public final int getImageFlags() {
return fImageFlags;
}
/**
* Gets the text flags.
* @return Returns a int
*/
public final int getTextFlags() {
return fTextFlags;
}
/**
* Evaluates the image flags for a element.
* Can be overwriten by super classes.
* @return Returns a int
*/
protected int evaluateImageFlags(Object element) {
return getTextFlags();
}
/**
* Evaluates the text flags for a element. Can be overwriten by super classes.
* @return Returns a int
*/
protected int evaluateTextFlags(Object element) {
return getImageFlags();
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
}
/* (non-Javadoc)
* @see ILabelProvider#getImage
*/
public Image getImage(Object element) {
Image result= fImageLabelProvider.getImageLabel(element, evaluateImageFlags(element));
if (result == null && (element instanceof IStorage)) {
result= fStorageLabelProvider.getImage(element);
}
if (fLabelDecorators != null && result != null) {
for (int i= 0; i < fLabelDecorators.length; i++) {
result= fLabelDecorators[i].decorateImage(result, element);
}
}
return result;
}
/* (non-Javadoc)
* @see ILabelProvider#getText
*/
public String getText(Object element) {
String result= JavaElementLabels.getTextLabel(element, evaluateTextFlags(element));
if (result.length() == 0 && (element instanceof IStorage)) {
result= fStorageLabelProvider.getText(element);
}
if (fLabelDecorators != null && result.length() > 0) {
for (int i= 0; i < fLabelDecorators.length; i++) {
result= fLabelDecorators[i].decorateText(result, element);
}
}
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
return result;
}
/* (non-Javadoc)
* @see IBaseLabelProvider#dispose
*/
public void dispose() {
if (fLabelDecorators != null) {
for (int i= 0; i < fLabelDecorators.length; i++) {
fLabelDecorators[i].dispose();
}
fLabelDecorators= null;
}
fStorageLabelProvider.dispose();
fImageLabelProvider.dispose();
}
/* (non-Javadoc)
* @see IBaseLabelProvider#addListener(ILabelProviderListener)
*/
public void addListener(ILabelProviderListener listener) {
if (fLabelDecorators != null) {
for (int i= 0; i < fLabelDecorators.length; i++) {
fLabelDecorators[i].addListener(listener);
}
}
super.addListener(listener);
}
/* (non-Javadoc)
* @see IBaseLabelProvider#isLabelProperty(Object, String)
*/
|
15,790 |
Bug 15790 Java file icons too fat in editor tabs
|
Eclipse 20020508 All platforms 1) Open a .txt file. 2) Open a .java file Look at the space between the edge of the tab and the image and the edge of the image and the start of the text. The image used for *.java has extra space on the left and right edges. This is using up pixels that would be better used for displaying the file name.
|
resolved fixed
|
4cfac82
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:22:40Z | 2002-05-10T19:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
public boolean isLabelProperty(Object element, String property) {
return true;
}
/* (non-Javadoc)
* @see IBaseLabelProvider#removeListener(ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener listener) {
if (fLabelDecorators != null) {
for (int i= 0; i < fLabelDecorators.length; i++) {
fLabelDecorators[i].removeListener(listener);
}
}
super.removeListener(listener);
}
public static ILabelDecorator[] getDecorators(boolean errortick, ILabelDecorator extra) {
if (errortick) {
if (extra == null) {
return new ILabelDecorator[] { new ProblemsLabelDecorator(null) };
} else {
return new ILabelDecorator[] { new ProblemsLabelDecorator(null), extra };
}
}
if (extra != null) {
return new ILabelDecorator[] { extra };
}
return null;
}
}
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
import java.util.Iterator;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock;
/**
* As addition to the JavaCapabilityConfigurationPage, the wizard checks if an existing external
* location was specified and offers to do an early project creation so that classpath can be detected.
*/
public class NewProjectCreationWizardPage extends JavaCapabilityConfigurationPage {
private WizardNewProjectCreationPage fMainPage;
private IPath fCurrProjectLocation;
/**
* Constructor for ProjectWizardPage.
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
*/
public NewProjectCreationWizardPage(WizardNewProjectCreationPage mainPage) {
super();
fMainPage= mainPage;
fCurrProjectLocation= fMainPage.getLocationPath();
}
private boolean canDetectExistingClassPath(IPath projLocation) {
return projLocation.toFile().exists() && !Platform.getLocation().equals(projLocation);
}
private void update() {
IPath projLocation= fMainPage.getLocationPath();
if (!projLocation.equals(fCurrProjectLocation) && canDetectExistingClassPath(projLocation)) {
String title= NewWizardMessages.getString("NewProjectCreationWizardPage.EarlyCreationDialog.title");
String description= NewWizardMessages.getString("NewProjectCreationWizardPage.EarlyCreationDialog.description");
if (MessageDialog.openQuestion(getShell(), title, description)) {
createAndDetect();
}
}
fCurrProjectLocation= projLocation;
IJavaProject prevProject= getJavaProject();
IProject currProject= fMainPage.getProjectHandle();
if ((prevProject == null) || !currProject.equals(prevProject.getProject())) {
init(JavaCore.create(currProject), null, null, false);
}
}
private void createAndDetect() {
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
IRunnableWithProgress op= new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (monitor == null)
monitor= new NullProgressMonitor();
monitor.beginTask(NewWizardMessages.getString("NewProjectCreationWizardPage.EarlyCreationOperation.desc"), 3);
try {
createProject(new SubProgressMonitor(monitor, 1));
initFromExistingStructures(new SubProgressMonitor(monitor, 2));
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
};
try {
getContainer().run(false, true, op);
} catch (InvocationTargetException e) {
String title= NewWizardMessages.getString("NewProjectCreationWizardPage.EarlyCreationOperation.error.title");
String message= NewWizardMessages.getString("NewProjectCreationWizardPage.EarlyCreationOperation.error.desc");
ExceptionHandler.handle(e, getShell(), title, message);
} catch (InterruptedException e) {
}
}
/* (non-Javadoc)
* @see IDialogPage#setVisible(boolean)
*/
public void setVisible(boolean visible) {
if (visible) {
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
update();
}
super.setVisible(visible);
}
private boolean doesProjectExist() {
return fMainPage.getProjectHandle().exists();
}
/* (non-Javadoc)
* @see IWizardPage#getPreviousPage()
*/
public IWizardPage getPreviousPage() {
if (doesProjectExist()) {
return null;
}
return super.getPreviousPage();
}
public IRunnableWithProgress getRunnable() {
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (monitor == null)
monitor= new NullProgressMonitor();
monitor.beginTask(NewWizardMessages.getString("NewProjectCreationWizardPage.NormalCreationOperation.desc"), 4);
try {
createProject(new SubProgressMonitor(monitor, 1));
if (getJavaProject() == null) {
initFromExistingStructures(new SubProgressMonitor(monitor, 1));
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
} else {
monitor.worked(1);
}
configureJavaProject(new SubProgressMonitor(monitor, 2));
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
monitor.done();
}
}
};
}
private void createProject(IProgressMonitor monitor) throws CoreException {
IProject project= fMainPage.getProjectHandle();
IPath projectLocation= fMainPage.getLocationPath();
BuildPathsBlock.createProject(project, projectLocation, monitor);
}
private void initFromExistingStructures(IProgressMonitor monitor) throws CoreException {
if (monitor == null)
monitor= new NullProgressMonitor();
monitor.beginTask(NewWizardMessages.getString("NewProjectCreationWizardPage.DetectingClasspathOperation.desc"), 2);
try {
IProject project= fMainPage.getProjectHandle();
if (project.getFile(".classpath").exists()) {
init(JavaCore.create(project), null, null, false);
monitor.worked(2);
} else{
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
final HashSet sourceFolders= new HashSet();
IResourceVisitor visitor= new IResourceVisitor() {
public boolean visit(IResource resource) throws CoreException {
return doVisit(resource, sourceFolders);
}
};
project.accept(visitor);
monitor.worked(1);
IClasspathEntry[] entries= null;
IPath outputLocation= null;
if (!sourceFolders.isEmpty()) {
int nSourceFolders= sourceFolders.size();
entries= new IClasspathEntry[nSourceFolders + 1];
Iterator iter = sourceFolders.iterator();
for (int i = 0; i < nSourceFolders; i++) {
entries[i]= JavaCore.newSourceEntry((IPath) iter.next());
}
entries[nSourceFolders]= JavaRuntime.getJREVariableEntry();
IPath projPath= project.getFullPath();
if (nSourceFolders == 1 && entries[0].getPath().equals(projPath)) {
outputLocation= projPath;
} else {
outputLocation= projPath.append(JavaBasePreferencePage.getOutputLocationName());
}
if (!JavaConventions.validateClasspath(JavaCore.create(project), entries, outputLocation).isOK()) {
outputLocation= null;
entries= null;
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
}
}
init(JavaCore.create(project), outputLocation, entries, false);
monitor.worked(1);
}
} finally {
monitor.done();
}
}
private boolean doVisit(IResource resource, HashSet sourceFolders) throws JavaModelException {
if (!sourceFolders.isEmpty()) {
IResource curr= resource;
while (curr.getType() != IResource.ROOT) {
if (sourceFolders.contains(curr.getFullPath())) {
return false;
}
curr= curr.getParent();
}
}
if (resource.getType() == IResource.FILE) {
if ("java".equals(resource.getFileExtension())) {
ICompilationUnit cu= JavaCore.createCompilationUnitFrom((IFile) resource);
if (cu != null) {
IPath packPath= resource.getParent().getFullPath();
IPackageDeclaration[] decls= cu.getPackageDeclarations();
if (decls.length == 0) {
sourceFolders.add(packPath);
} else {
|
15,797 |
Bug 15797 IllegalArg exception when canceling Java project creation
|
20020508+ 1) New 2) Java> Project 3) cancel ->get an IllegalArgumentException. Problem does not occur for a Simple project. !STACK java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject (WorkspaceRoot.java:96) at org.eclipse.ui.dialogs.WizardNewProjectCreationPage.getProjectHandle (WizardNewProjectCreationPage.java:251) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.doesProjectExis t(NewProjectCreationWizardPage.java:125) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performCancel (NewProjectCreationWizardPage.java:262) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performCancel (NewProjectCreationWizard.java:83) at org.eclipse.jface.wizard.WizardDialog.okToClose (WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:361) at org.eclipse.jface.wizard.WizardDialog.cancelPressed (WizardDialog.java:352) at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected (WizardDialog.java:231) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.jface.window.Window.runEventLoop(Window.java:548) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:420) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)
|
resolved fixed
|
4b05452
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T12:26:29Z | 2002-05-11T06:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
|
IPath relpath= new Path(decls[0].getElementName().replace('.', '/'));
int remainingSegments= packPath.segmentCount() - relpath.segmentCount();
if (remainingSegments >= 0) {
IPath prefix= packPath.uptoSegment(remainingSegments);
IPath common= packPath.removeFirstSegments(remainingSegments);
if (common.equals(relpath)) {
sourceFolders.add(prefix);
}
}
}
}
}
}
return true;
}
/**
* Called from the wizard on cancel.
*/
public void performCancel() {
if (doesProjectExist()) {
try {
fMainPage.getProjectHandle().delete(false, false, null);
} catch (CoreException e) {
JavaPlugin.log(e);
}
}
}
}
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.wizards.NewElementWizardPage;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
import org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
public class NewSourceFolderWizardPage extends NewElementWizardPage {
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
private static final String PAGE_NAME= "NewSourceFolderWizardPage";
private StringButtonDialogField fProjectField;
private StatusInfo fProjectStatus;
private StringButtonDialogField fRootDialogField;
private StatusInfo fRootStatus;
private IWorkspaceRoot fWorkspaceRoot;
private IJavaProject fCurrJProject;
private IClasspathEntry[] fEntries;
private IPath fOutputLocation;
private boolean fIsProjectAsSourceFolder;
private IPackageFragmentRoot fCreatedRoot;
public NewSourceFolderWizardPage() {
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
super(PAGE_NAME);
setTitle(NewWizardMessages.getString("NewSourceFolderWizardPage.title"));
setDescription(NewWizardMessages.getString("NewSourceFolderWizardPage.description"));
fWorkspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
RootFieldAdapter adapter= new RootFieldAdapter();
fProjectField= new StringButtonDialogField(adapter);
fProjectField.setDialogFieldListener(adapter);
fProjectField.setLabelText(NewWizardMessages.getString("NewSourceFolderWizardPage.project.label"));
fProjectField.setButtonLabel(NewWizardMessages.getString("NewSourceFolderWizardPage.project.button"));
fRootDialogField= new StringButtonDialogField(adapter);
fRootDialogField.setDialogFieldListener(adapter);
fRootDialogField.setLabelText(NewWizardMessages.getString("NewSourceFolderWizardPage.root.label"));
fRootDialogField.setButtonLabel(NewWizardMessages.getString("NewSourceFolderWizardPage.root.button"));
fRootStatus= new StatusInfo();
fProjectStatus= new StatusInfo();
}
public void init(IStructuredSelection selection) {
if (selection == null || selection.isEmpty()) {
setDefaultAttributes();
return;
}
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
Object selectedElement= selection.getFirstElement();
if (selectedElement == null) {
selectedElement= EditorUtility.getActiveEditorJavaInput();
}
String projPath= null;
if (selectedElement instanceof IResource) {
IProject proj= ((IResource)selectedElement).getProject();
if (proj != null) {
projPath= proj.getFullPath().makeRelative().toString();
}
} else if (selectedElement instanceof IJavaElement) {
IJavaProject jproject= ((IJavaElement)selectedElement).getJavaProject();
if (jproject != null) {
projPath= jproject.getProject().getFullPath().makeRelative().toString();
}
}
if (projPath != null) {
fProjectField.setText(projPath);
fRootDialogField.setText("");
} else {
setDefaultAttributes();
}
}
private void setDefaultAttributes() {
String projPath= "";
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
try {
IProject[] projects= fWorkspaceRoot.getProjects();
for (int i= 0; i < projects.length; i++) {
IProject proj= projects[i];
if (proj.hasNature(JavaCore.NATURE_ID)) {
projPath= proj.getFullPath().makeRelative().toString();
break;
}
}
} catch (CoreException e) {
}
fProjectField.setText(projPath);
fRootDialogField.setText("");
}
/**
* @see WizardPage#createControl
*/
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
layout.marginHeight= 0;
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
layout.numColumns= 3;
composite.setLayout(layout);
fProjectField.doFillIntoGrid(composite, 3);
fRootDialogField.doFillIntoGrid(composite, 3);
fRootDialogField.setFocus();
int maxFieldWidth= convertWidthInCharsToPixels(40);
LayoutUtil.setWidthHint(fProjectField.getTextControl(null), maxFieldWidth);
LayoutUtil.setHorizontalGrabbing(fProjectField.getTextControl(null));
LayoutUtil.setWidthHint(fRootDialogField.getTextControl(null), maxFieldWidth);
setControl(composite);
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.NEW_PACKAGEROOT_WIZARD_PAGE);
}
private class RootFieldAdapter implements IStringButtonAdapter, IDialogFieldListener {
public void changeControlPressed(DialogField field) {
packRootChangeControlPressed(field);
}
public void dialogFieldChanged(DialogField field) {
packRootDialogFieldChanged(field);
}
}
private void packRootChangeControlPressed(DialogField field) {
if (field == fRootDialogField) {
|
15,801 |
Bug 15801 NPE New class wizard opened on non-Java project
|
1) create a simple project ZZZ 2) new>Java>class 3) next NPE !ENTRY org.eclipse.ui 4 0 Sat May 11 13:10:22 GMT+02:00 2002 !MESSAGE java.lang.NullPointerException !STACK java.lang.NullPointerException at org.eclipse.jface.wizard.WizardPage.getShell(WizardPage.java:196) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.setFocus (NewTypeWizardPage.java:421) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createControl (NewClassWizardPage.java:148) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:164) at org.eclipse.jface.wizard.WizardDialog.createPageControls (WizardDialog.java:505) at org.eclipse.jface.wizard.WizardDialog.setWizard (WizardDialog.java:840) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:875) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:653) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:535) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:86) at org.eclipse.ui.internal.NewWizardDropDownAction.run (NewWizardDropDownAction.java:88) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:174) at org.eclipse.core.launcher.Main.run(Main.java:605) at org.eclipse.core.launcher.Main.main(Main.java:449)
|
resolved fixed
|
55fc4a5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-11T13:54:02Z | 2002-05-11T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
|
IPath initialPath= new Path(fRootDialogField.getText());
String title= NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.title");
String message= NewWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.description");
IFolder folder= chooseFolder(title, message, initialPath);
if (folder != null) {
IPath path= folder.getFullPath().removeFirstSegments(1);
fRootDialogField.setText(path.toString());
}
} else if (field == fProjectField) {
IJavaProject jproject= chooseProject();
if (jproject != null) {
IPath path= jproject.getProject().getFullPath().makeRelative();
fProjectField.setText(path.toString());
}
}
}
private void packRootDialogFieldChanged(DialogField field) {
if (field == fRootDialogField) {
updateRootStatus();
} else if (field == fProjectField) {
updateProjectStatus();
updateRootStatus();
}
updateStatus(new IStatus[] { fProjectStatus, fRootStatus });
}
private void updateProjectStatus() {
fCurrJProject= null;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.