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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if (iter.next() instanceof IMember) {
setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)});
break;
}
}
super.dragStart(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();
for (int i= 0; i < elements.length; i++) {
Object e= elements[i];
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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) {
Object obj= selection.getFirstElement();
Object element= null;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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) {
if (element instanceof IJavaElement) {
if (element instanceof IWorkingCopy) {
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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);
savePatternFilterState(memento);
saveFilterState(memento);
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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) {
Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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);
fActionSet.restoreState(memento);
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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();
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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);
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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();
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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();
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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)
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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;
}
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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) {
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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.
*
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.viewsupport;
import java.util.*;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.*;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
import org.eclipse.ui.part.FileEditorInput;
/**
* A base content provider for Java elements. It provides access to the
* Java element hierarchy without listening to changes in the Java model.
* Use this class when you want to present the Java elements
* in a modal dialog or wizard.
* <p>
* The following Java element hierarchy is surfaced by this content provider:
* <p>
* <pre>
Java model (<code>IJavaModel</code>)
Java project (<code>IJavaProject</code>)
package fragment root (<code>IPackageFragmentRoot</code>)
package fragment (<code>IPackageFragment</code>)
compilation unit (<code>ICompilationUnit</code>)
binary class file (<code>IClassFile</code>)
* </pre>
* </p>
* <p>
* Note that when the entire Java project is declared to be package fragment root,
* the corresponding package fragment root element that normally appears between the
* Java project and the package fragments is automatically filtered out.
* </p>
*/
public class BaseJavaElementContentProvider implements ITreeContentProvider {
protected static final Object[] NO_CHILDREN= new Object[0];
protected boolean fProvideMembers= false;
protected boolean fProvideWorkingCopy= false;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
public BaseJavaElementContentProvider() {
}
public BaseJavaElementContentProvider(boolean provideMembers, boolean provideWorkingCopy) {
fProvideMembers= provideMembers;
fProvideWorkingCopy= provideWorkingCopy;
}
/**
* Returns whether the members are provided when asking
* for a CU's or ClassFile's children.
*/
public boolean getProvideMembers() {
return fProvideMembers;
}
/**
* Sets whether the members are provided from
* a working copy of a compilation unit
*/
public void setProvideWorkingCopy(boolean b) {
fProvideWorkingCopy= b;
}
/**
* Returns whether the members are provided
* from a working copy a compilation unit.
*/
public boolean getProvideWorkingCopy() {
return fProvideWorkingCopy;
}
/**
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
* Returns whether the members are provided when asking
* for a CU's or ClassFile's children.
*/
public void setProvideMembers(boolean b) {
fProvideMembers= b;
}
/* (non-Javadoc)
* Method declared on IStructuredContentProvider.
*/
public Object[] getElements(Object parent) {
return getChildren(parent);
}
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void dispose() {
}
/* (non-Javadoc)
* Method declared on ITreeContentProvider.
*/
public Object[] getChildren(Object element) {
if (!exists(element))
return NO_CHILDREN;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
try {
if (element instanceof IJavaModel)
return getJavaProjects((IJavaModel)element);
if (element instanceof IJavaProject)
return getPackageFragmentRoots((IJavaProject)element);
if (element instanceof IPackageFragmentRoot)
return getPackageFragments((IPackageFragmentRoot)element);
if (element instanceof IPackageFragment)
return getPackageContents((IPackageFragment)element);
if (element instanceof IFolder)
return getResources((IFolder)element);
if (fProvideMembers &&
element instanceof ISourceReference && element instanceof IParent) {
if (element instanceof ICompilationUnit && fProvideWorkingCopy) {
IWorkingCopy wc= getWorkingCopy((ICompilationUnit)element);
if (wc != null)
return ((IParent)wc).getChildren();
}
return ((IParent)element).getChildren();
}
} catch (JavaModelException e) {
return NO_CHILDREN;
}
return NO_CHILDREN;
}
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
/* (non-Javadoc)
*
* @see ITreeContentProvider
*/
public boolean hasChildren(Object element) {
if (fProvideMembers) {
if (element instanceof ICompilationUnit ||
element instanceof IClassFile) {
return true;
}
} else {
if (element instanceof ICompilationUnit ||
element instanceof IClassFile ||
element instanceof IFile)
return false;
}
if (element instanceof IJavaProject) {
IJavaProject jp= (IJavaProject)element;
if (!jp.getProject().isOpen()) {
return false;
}
}
if (element instanceof IParent) {
try {
if (((IParent)element).hasChildren())
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
return true;
} catch(JavaModelException e) {
return true;
}
}
Object[] children= getChildren(element);
return (children != null) && children.length > 0;
}
/* (non-Javadoc)
* Method declared on ITreeContentProvider.
*/
public Object getParent(Object element) {
if (!exists(element))
return null;
return internalGetParent(element);
}
private Object[] getPackageFragments(IPackageFragmentRoot root) throws JavaModelException {
IJavaElement[] fragments= root.getChildren();
Object[] nonJavaResources= root.getNonJavaResources();
if (nonJavaResources == null)
return fragments;
return concatenate(fragments, nonJavaResources);
}
private Object[] getPackageFragmentRoots(IJavaProject project) throws JavaModelException {
if (!project.getProject().isOpen())
return NO_CHILDREN;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
IPackageFragmentRoot[] roots= project.getPackageFragmentRoots();
List list= new ArrayList(roots.length);
for (int i= 0; i < roots.length; i++) {
IPackageFragmentRoot root= (IPackageFragmentRoot)roots[i];
if (isProjectPackageFragmentRoot(root)) {
Object[] children= root.getChildren();
for (int k= 0; k < children.length; k++)
list.add(children[k]);
}
else if (hasChildren(root)) {
list.add(root);
}
}
return concatenate(list.toArray(), project.getNonJavaResources());
}
private Object[] getJavaProjects(IJavaModel jm) throws JavaModelException {
return jm.getJavaProjects();
}
private Object[] getPackageContents(IPackageFragment fragment) throws JavaModelException {
if (fragment.getKind() == IPackageFragmentRoot.K_SOURCE) {
return concatenate(fragment.getCompilationUnits(), fragment.getNonJavaResources());
}
return concatenate(fragment.getClassFiles(), fragment.getNonJavaResources());
}
IWorkingCopy getWorkingCopy(ICompilationUnit cu) throws JavaModelException {
IFile file= null;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
try {
file= (IFile)cu.getUnderlyingResource();
} catch (JavaModelException e) {
}
if (file != null) {
IWorkingCopyManager wm= JavaPlugin.getDefault().getWorkingCopyManager();
FileEditorInput ei= new FileEditorInput(file);
IWorkingCopy wc= wm.getWorkingCopy(ei);
return wc;
}
return null;
}
private Object[] getResources(IFolder folder) {
try {
Object[] members= folder.members();
List nonJavaResources= new ArrayList();
for (int i= 0; i < members.length; i++) {
Object o= members[i];
if (!(o instanceof IFolder && JavaCore.create((IFolder)o) != null)) {
nonJavaResources.add(o);
}
}
return nonJavaResources.toArray();
} catch(CoreException e) {
return NO_CHILDREN;
}
}
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
protected boolean isClassPathChange(IJavaElementDelta delta) {
int flags= delta.getFlags();
return (delta.getKind() == IJavaElementDelta.CHANGED &&
((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) ||
((flags & IJavaElementDelta.F_CLASSPATH_REORDER) != 0));
}
/**
* Returns parent of the presented hierarchy. Skips over
* project package fragment root nodes.
*/
protected Object skipProjectPackageFragmentRoot(IPackageFragmentRoot root) {
try {
if (isProjectPackageFragmentRoot(root))
return root.getParent();
return root;
} catch(JavaModelException e) {
return root;
}
}
protected boolean isPackageFragmentEmpty(IJavaElement element) throws JavaModelException {
if (element instanceof IPackageFragment) {
IPackageFragment fragment= (IPackageFragment)element;
if (!(fragment.hasChildren() || fragment.getNonJavaResources().length > 0) && fragment.hasSubpackages())
return true;
}
return false;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
}
protected boolean isProjectPackageFragmentRoot(IPackageFragmentRoot root) throws JavaModelException {
IResource resource= root.getUnderlyingResource();
return (resource instanceof IProject);
}
protected boolean exists(Object element) {
if (element == null) {
return false;
}
if (element instanceof IResource) {
return ((IResource)element).exists();
}
if (element instanceof IJavaElement) {
return ((IJavaElement)element).exists();
}
return true;
}
protected Object internalGetParent(Object element) {
if (element instanceof IJavaProject) {
return ((IJavaProject)element).getJavaModel();
}
if (element instanceof IResource) {
IResource parent= ((IResource)element).getParent();
Object packageFragment= JavaCore.create(parent);
if (packageFragment != null)
return packageFragment;
return parent;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
|
}
if (element instanceof IPackageFragment) {
IPackageFragmentRoot parent= (IPackageFragmentRoot)((IPackageFragment)element).getParent();
return skipProjectPackageFragmentRoot(parent);
}
if (element instanceof IJavaElement) {
IJavaElement candidate= ((IJavaElement)element).getParent();
if (candidate != null && candidate.getElementType() == IJavaElement.COMPILATION_UNIT) {
ICompilationUnit unit= (ICompilationUnit)candidate;
if (unit.isWorkingCopy())
candidate= unit.getOriginalElement();
}
return candidate;
}
return null;
}
protected static Object[] concatenate(Object[] a1, Object[] a2) {
int a1Len= a1.length;
int a2Len= a2.length;
Object[] res= new Object[a1Len + a2Len];
System.arraycopy(a1, 0, res, 0, a1Len);
System.arraycopy(a2, 0, res, a1Len, a2Len);
return res;
}
}
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
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.dialogs.MessageDialog;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.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.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
/**
* 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 {
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
private JavaEditor fEditor;
/**
* 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>
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
* 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);
}
/* (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.
*/
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
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.
*/
protected void run(IStructuredSelection selection) {
if (!checkEnabled(selection))
return;
run((IJavaElement)selection.getFirstElement());
}
private void run(IJavaElement element) {
if (element == null)
return;
boolean showMembers= JavaPlugin.getDefault().getPreferenceStore().getBoolean(JavaBasePreferencePage.SHOW_CU_CHILDREN);
PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
if (view != null) {
Object selectedElement= element;
if (showMembers) {
view.selectReveal(new StructuredSelection(element));
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
selectedElement= getSelectedElement(view);
if (!element.equals(selectedElement) && element instanceof IMember) {
IMember member= (IMember)element;
if (!member.getCompilationUnit().isWorkingCopy()) {
try {
element= EditorUtility.getWorkingCopy(member);
view.selectReveal(new StructuredSelection(element));
selectedElement= getSelectedElement(view);
} catch (JavaModelException e) {
}
}
}
}
if (!element.equals(selectedElement)) {
element= getVisibleParent(element);
if (element != null) {
view.selectReveal(new StructuredSelection(element));
selectedElement= getSelectedElement(view);
if (!element.equals(selectedElement)) {
MessageDialog.openInformation(getShell(), getDialogTitle(), "Couldn't reveal the selected element in Packages View. May be the element is filtered out.");
}
}
}
return;
}
}
private Object getSelectedElement(PackageExplorerPart view) {
return ((IStructuredSelection)view.getSite().getSelectionProvider().getSelection()).getFirstElement();
|
15,301 |
Bug 15301 'show in packages view' - does not work fo java files not in source folders
|
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
|
resolved fixed
|
da509ab
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T14:20:49Z | 2002-05-06T10:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
|
}
private IJavaElement getVisibleParent(IJavaElement element) {
switch (element.getElementType()) {
case IJavaElement.IMPORT_DECLARATION:
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;
}
if (element.getElementType() == IJavaElement.COMPILATION_UNIT) {
ICompilationUnit unit= (ICompilationUnit)element;
if (unit.isWorkingCopy())
element= unit.getOriginalElement();
}
return element;
}
private static String getDialogTitle() {
return ActionMessages.getString("ShowInPackageViewAction.dialog.title");
}
}
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaConventions;
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.JavaUIMessages;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
/*
* The page for setting java plugin preferences.
*/
public class JavaBasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
public static final String SHOW_CU_CHILDREN="org.eclipse.jdt.ui.packages.cuchildren";
private static final String LINK_PACKAGES_TO_EDITOR= "org.eclipse.jdt.ui.packages.linktoeditor";
private static final String LINK_TYPEHIERARCHY_TO_EDITOR= "org.eclipse.jdt.ui.packages.linktypehierarchytoeditor";
private static final String SRCBIN_FOLDERS_IN_NEWPROJ= "org.eclipse.jdt.ui.wizards.srcBinFoldersInNewProjects";
private static final String SRCBIN_SRCNAME= "org.eclipse.jdt.ui.wizards.srcBinFoldersSrcName";
private static final String SRCBIN_BINNAME= "org.eclipse.jdt.ui.wizards.srcBinFoldersBinName";
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
private static final String OPEN_TYPE_HIERARCHY= "org.eclipse.jdt.ui.openTypeHierarchy";
private static final String OPEN_TYPE_HIERARCHY_IN_PERSPECTIVE= "perspective";
private static final String OPEN_TYPE_HIERARCHY_IN_VIEW_PART= "viewPart";
private static final String OPEN_TYPE_HIERARCHY_REUSE_PERSPECTIVE="org.eclipse.jdt.ui.typeHierarchy.reusePerspective";
private static final String DOUBLE_CLICK_GOES_INTO= "packageview.gointo";
private static final String RECONCILE_JAVA_VIEWS= "JavaUI.reconcile";
public static boolean useSrcAndBinFolders() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getBoolean(SRCBIN_FOLDERS_IN_NEWPROJ);
}
public static String getSourceFolderName() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getString(SRCBIN_SRCNAME);
}
public static String getOutputLocationName() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getString(SRCBIN_BINNAME);
}
public static boolean linkPackageSelectionToEditor() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getBoolean(LINK_PACKAGES_TO_EDITOR);
}
public static boolean showCompilationUnitChildren() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getBoolean(SHOW_CU_CHILDREN);
}
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
public static boolean linkTypeHierarchySelectionToEditor() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getBoolean(LINK_TYPEHIERARCHY_TO_EDITOR);
}
public static boolean openTypeHierarchyInPerspective() {
return OPEN_TYPE_HIERARCHY_IN_PERSPECTIVE.equals(
JavaPlugin.getDefault().getPreferenceStore().getString(OPEN_TYPE_HIERARCHY));
}
public static boolean openTypeHierarchInViewPart() {
return OPEN_TYPE_HIERARCHY_IN_VIEW_PART.equals(
JavaPlugin.getDefault().getPreferenceStore().getString(OPEN_TYPE_HIERARCHY));
}
public static boolean reusePerspectiveForTypeHierarchy() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(OPEN_TYPE_HIERARCHY_REUSE_PERSPECTIVE);
}
public static boolean doubleClickGoesInto() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
return store.getBoolean(DOUBLE_CLICK_GOES_INTO);
}
public static boolean reconcileJavaViews() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(RECONCILE_JAVA_VIEWS);
}
private ArrayList fCheckBoxes;
private ArrayList fRadioButtons;
private ArrayList fTextControls;
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
private SelectionListener fSelectionListener;
private ModifyListener fModifyListener;
private Button fFolderButton;
private Text fBinFolderNameText;
private Text fSrcFolderNameText;
public JavaBasePreferencePage() {
super();
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("JavaBasePreferencePage.description"));
fRadioButtons= new ArrayList();
fCheckBoxes= new ArrayList();
fTextControls= new ArrayList();
fSelectionListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
controlChanged(e.widget);
}
};
fModifyListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
controlModified(e.widget);
}
};
}
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
public static void initDefaults(IPreferenceStore store) {
store.setDefault(LINK_PACKAGES_TO_EDITOR, true);
store.setDefault(SHOW_CU_CHILDREN, true);
store.setDefault(LINK_TYPEHIERARCHY_TO_EDITOR, false);
store.setDefault(OPEN_TYPE_HIERARCHY, OPEN_TYPE_HIERARCHY_IN_VIEW_PART);
store.setDefault(OPEN_TYPE_HIERARCHY_REUSE_PERSPECTIVE, false);
store.setDefault(SRCBIN_FOLDERS_IN_NEWPROJ, false);
store.setDefault(SRCBIN_SRCNAME, "src");
store.setDefault(SRCBIN_BINNAME, "bin");
store.setDefault(DOUBLE_CLICK_GOES_INTO, false);
store.setDefault(RECONCILE_JAVA_VIEWS, true);
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
/**
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_BASE_PREFERENCE_PAGE);
}
private Button addCheckBox(Composite parent, String label, String key) {
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
Button checkBox= new Button(parent, SWT.CHECK);
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
checkBox.setText(label);
checkBox.setData(key);
checkBox.setLayoutData(gd);
checkBox.setSelection(getPreferenceStore().getBoolean(key));
fCheckBoxes.add(checkBox);
return checkBox;
}
private Button addRadioButton(Composite parent, String label, String key, String value) {
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
Button button= new Button(parent, SWT.RADIO);
button.setText(label);
button.setData(new String[] { key, value });
button.setLayoutData(gd);
button.setSelection(value.equals(getPreferenceStore().getString(key)));
fRadioButtons.add(button);
return button;
}
private Text addTextControl(Composite parent, String label, String key) {
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
Label labelControl= new Label(parent, SWT.NONE);
labelControl.setText(label);
labelControl.setLayoutData(gd);
gd= new GridData();
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
gd.widthHint= convertWidthInCharsToPixels(40);
Text text= new Text(parent, SWT.SINGLE | SWT.BORDER);
text.setText(getPreferenceStore().getString(key));
text.setData(key);
text.setLayoutData(gd);
fTextControls.add(text);
return text;
}
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
composite.setLayout(layout);
addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.linkPackageView"), LINK_PACKAGES_TO_EDITOR);
addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.dblClick"), DOUBLE_CLICK_GOES_INTO);
addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.cuChildren"), SHOW_CU_CHILDREN);
addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.reconcileJavaViews"), RECONCILE_JAVA_VIEWS);
fFolderButton= addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.folders"), SRCBIN_FOLDERS_IN_NEWPROJ);
fFolderButton.addSelectionListener(fSelectionListener);
Composite folders= new Composite(composite, SWT.NONE);
layout= new GridLayout();
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
folders.setLayout(layout);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= convertWidthInCharsToPixels(4);
folders.setLayoutData(gd);
fSrcFolderNameText= addTextControl(folders, JavaUIMessages.getString("JavaBasePreferencePage.folders.src"), SRCBIN_SRCNAME);
fBinFolderNameText= addTextControl(folders, JavaUIMessages.getString("JavaBasePreferencePage.folders.bin"), SRCBIN_BINNAME);
fSrcFolderNameText.addModifyListener(fModifyListener);
fBinFolderNameText.addModifyListener(fModifyListener);
new Label(composite, SWT.NONE);
new Label(composite, SWT.NONE).setText(JavaUIMessages.getString("JavaBasePreferencePage.typeHierarchySettings"));
addCheckBox(composite, JavaUIMessages.getString("JavaBasePreferencePage.linkTypeHierarchy"), LINK_TYPEHIERARCHY_TO_EDITOR);
Label label= new Label(composite, SWT.NONE);
label.setText(JavaUIMessages.getString("JavaBasePreferencePage.openTypeHierarchy"));
Composite radioGroup= new Composite(composite, SWT.NONE);
layout= new GridLayout();
layout.marginHeight= 0;
radioGroup.setLayout(layout);
addRadioButton(radioGroup, JavaUIMessages.getString("JavaBasePreferencePage.inPerspective"), OPEN_TYPE_HIERARCHY, OPEN_TYPE_HIERARCHY_IN_PERSPECTIVE);
addRadioButton(radioGroup, JavaUIMessages.getString("JavaBasePreferencePage.inView"), OPEN_TYPE_HIERARCHY, OPEN_TYPE_HIERARCHY_IN_VIEW_PART);
/* Need support from workbench for this. See http://dev.eclipse.org/bugs/show_bug.cgi?id=3962
final Button reuse= addCheckBox(composite, "&Reuse Type Hierarchy perspective in same window", OPEN_TYPE_HIERARCHY_REUSE_PERSPECTIVE);
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
reuse.setEnabled(perspective.getSelection());
perspective.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
reuse.setEnabled(perspective.getSelection());
}
});
*/
validateFolders();
return composite;
}
private void validateFolders() {
boolean useFolders= fFolderButton.getSelection();
fSrcFolderNameText.setEnabled(useFolders);
fBinFolderNameText.setEnabled(useFolders);
if (useFolders) {
String srcName= fSrcFolderNameText.getText();
String binName= fBinFolderNameText.getText();
if (srcName.length() + binName.length() == 0) {
updateStatus(new StatusInfo(IStatus.ERROR, JavaUIMessages.getString("JavaBasePreferencePage.folders.error.namesempty")));
return;
}
IWorkspace workspace= JavaPlugin.getWorkspace();
IStatus status;
if (srcName.length() != 0) {
status= workspace.validateName(srcName, IResource.FOLDER);
if (!status.isOK()) {
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
String message= JavaUIMessages.getFormattedString("JavaBasePreferencePage.folders.error.invalidsrcname", status.getMessage());
updateStatus(new StatusInfo(IStatus.ERROR, message));
return;
}
}
status= workspace.validateName(binName, IResource.FOLDER);
if (!status.isOK()) {
String message= JavaUIMessages.getFormattedString("JavaBasePreferencePage.folders.error.invalidbinname", status.getMessage());
updateStatus(new StatusInfo(IStatus.ERROR, message));
return;
}
IProject dmy= workspace.getRoot().getProject("dmy");
IClasspathEntry entry= JavaCore.newSourceEntry(dmy.getFullPath().append(srcName));
IPath outputLocation= dmy.getFullPath().append(binName);
status= JavaConventions.validateClasspath(JavaCore.create(dmy), new IClasspathEntry[] { entry }, outputLocation);
if (!status.isOK()) {
updateStatus(status);
return;
}
}
updateStatus(new StatusInfo());
}
private void updateStatus(IStatus status) {
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private void controlChanged(Widget widget) {
if (widget == fFolderButton) {
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
validateFolders();
}
}
private void controlModified(Widget widget) {
if (widget == fSrcFolderNameText || widget == fBinFolderNameText) {
validateFolders();
}
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < fCheckBoxes.size(); i++) {
Button button= (Button) fCheckBoxes.get(i);
String key= (String) button.getData();
button.setSelection(store.getDefaultBoolean(key));
}
for (int i= 0; i < fRadioButtons.size(); i++) {
Button button= (Button) fRadioButtons.get(i);
String[] info= (String[]) button.getData();
button.setSelection(info[1].equals(store.getDefaultString(info[0])));
}
for (int i= 0; i < fTextControls.size(); i++) {
Text text= (Text) fTextControls.get(i);
String key= (String) text.getData();
text.setText(store.getDefaultString(key));
}
|
11,699 |
Bug 11699 Problems with Java Preference Page
|
The Java Preference Page needs a group box around the two radio buttons at the bottom so that assistive technologies can read it. There are other issues as well The use folders option will gray out the text widgets but not thier labels - this means it is not clear that they are disabled If General Settings for Java and Type Hierarchy settings are meant to be titles the should be in a Group box - they look like information now. Type Hierarchy settings doesn't need a title for one radio box. What is the result of deselecting "Action on double clicking on Packages view is Go into?". This looks like it should be two radio buttons instead of a checkbox.
|
resolved fixed
|
02d71bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T15:24:14Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
|
validateFolders();
super.performDefaults();
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < fCheckBoxes.size(); i++) {
Button button= (Button) fCheckBoxes.get(i);
String key= (String) button.getData();
store.setValue(key, button.getSelection());
}
for (int i= 0; i < fRadioButtons.size(); i++) {
Button button= (Button) fRadioButtons.get(i);
if (button.getSelection()) {
String[] info= (String[]) button.getData();
store.setValue(info[0], info[1]);
}
}
for (int i= 0; i < fTextControls.size(); i++) {
Text text= (Text) fTextControls.get(i);
String key= (String) text.getData();
store.setValue(key, text.getText());
}
return super.performOk();
}
}
|
6,819 |
Bug 6819 Problem setting source folder on existing project
|
Build 2001-12-06 Start with the following existing structure on disk (not at default location): MyProject /build /dev/src/com/foo/A.java 1) Open new java project wizard. Enter project name. 2) Select the external directory "MyProject" as the location 3) Hit next. Choose "Use source folders..." 4) Click "Create New Folder", enter "dev/src" 5) Choose /MyProject/build as the output folder 6) Hit finish. In the packages view, it shows the source folder "dev/src", AND the non-source folder "dev". Basically the same folder appears twice. If you try to delete the folder "dev" (which appears to be empty), the content on disk is deleted.
|
closed wontfix
|
6e51fe5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T17:13:24Z | 2001-12-11T22:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteResourcesAction.java
|
package org.eclipse.jdt.internal.ui.reorg;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.actions.DeleteResourceAction;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
import org.eclipse.jdt.internal.corext.refactoring.Assert;
import org.eclipse.jdt.internal.corext.refactoring.base.ChangeContext;
import org.eclipse.jdt.internal.corext.refactoring.base.Refactoring;
import org.eclipse.jdt.internal.corext.refactoring.reorg.DeleteRefactoring;
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation;
import org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
public class DeleteResourcesAction extends SelectionDispatchAction {
|
6,819 |
Bug 6819 Problem setting source folder on existing project
|
Build 2001-12-06 Start with the following existing structure on disk (not at default location): MyProject /build /dev/src/com/foo/A.java 1) Open new java project wizard. Enter project name. 2) Select the external directory "MyProject" as the location 3) Hit next. Choose "Use source folders..." 4) Click "Create New Folder", enter "dev/src" 5) Choose /MyProject/build as the output folder 6) Hit finish. In the packages view, it shows the source folder "dev/src", AND the non-source folder "dev". Basically the same folder appears twice. If you try to delete the folder "dev" (which appears to be empty), the content on disk is deleted.
|
closed wontfix
|
6e51fe5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T17:13:24Z | 2001-12-11T22:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteResourcesAction.java
|
protected DeleteResourcesAction(IWorkbenchSite site) {
super(site);
}
/*
* @see SelectionDispatchAction#run(IStructuredSelection)
*/
protected void run(IStructuredSelection selection) {
if (ClipboardActionUtil.hasOnlyProjects(selection)){
deleteProjects(selection);
return;
|
6,819 |
Bug 6819 Problem setting source folder on existing project
|
Build 2001-12-06 Start with the following existing structure on disk (not at default location): MyProject /build /dev/src/com/foo/A.java 1) Open new java project wizard. Enter project name. 2) Select the external directory "MyProject" as the location 3) Hit next. Choose "Use source folders..." 4) Click "Create New Folder", enter "dev/src" 5) Choose /MyProject/build as the output folder 6) Hit finish. In the packages view, it shows the source folder "dev/src", AND the non-source folder "dev". Basically the same folder appears twice. If you try to delete the folder "dev" (which appears to be empty), the content on disk is deleted.
|
closed wontfix
|
6e51fe5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T17:13:24Z | 2001-12-11T22:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteResourcesAction.java
|
}
DeleteRefactoring refactoring= new DeleteRefactoring(selection.toList());
if (!confirmDelete(selection))
return;
if (hasReadOnlyResources(selection) && !isOkToDeleteReadOnly())
return;
try{
MultiStatus status= ClipboardActionUtil.perform(refactoring);
if (!status.isOK()) {
JavaPlugin.log(status);
ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), ReorgMessages.getString("DeleteResourceAction.delete"), ReorgMessages.getString("DeleteResourceAction.exception"), status);
}
} catch (JavaModelException e){
ExceptionHandler.handle(e, ReorgMessages.getString("DeleteResourceAction.delete"), ReorgMessages.getString("DeleteResourceAction.exception"));
return;
}
}
private void deleteProjects(IStructuredSelection selection){
DeleteResourceAction action= new DeleteResourceAction(JavaPlugin.getActiveWorkbenchShell());
action.selectionChanged(selection);
action.run();
}
private static boolean isOkToDeleteReadOnly(){
String msg= ReorgMessages.getString("deleteAction.confirmReadOnly");
String title= ReorgMessages.getString("deleteAction.checkDeletion");
return MessageDialog.openQuestion(
JavaPlugin.getActiveWorkbenchShell(),
title,
|
6,819 |
Bug 6819 Problem setting source folder on existing project
|
Build 2001-12-06 Start with the following existing structure on disk (not at default location): MyProject /build /dev/src/com/foo/A.java 1) Open new java project wizard. Enter project name. 2) Select the external directory "MyProject" as the location 3) Hit next. Choose "Use source folders..." 4) Click "Create New Folder", enter "dev/src" 5) Choose /MyProject/build as the output folder 6) Hit finish. In the packages view, it shows the source folder "dev/src", AND the non-source folder "dev". Basically the same folder appears twice. If you try to delete the folder "dev" (which appears to be empty), the content on disk is deleted.
|
closed wontfix
|
6e51fe5
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-13T17:13:24Z | 2001-12-11T22:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteResourcesAction.java
|
msg);
}
private boolean hasReadOnlyResources(IStructuredSelection selection){
for (Iterator iter= selection.iterator(); iter.hasNext();){
if (ReorgUtils.shouldConfirmReadOnly(iter.next()))
return true;
}
return false;
}
/*
* @see SelectionDispatchAction#selectionChanged(IStructuredSelection)
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(ClipboardActionUtil.canActivate(new DeleteRefactoring(selection.toList())));
}
private boolean confirmDelete(IStructuredSelection selection) {
Assert.isTrue(ClipboardActionUtil.getSelectedProjects(selection).isEmpty());
String title= ReorgMessages.getString("deleteAction.confirm.title");
String label= ReorgMessages.getString("deleteAction.confirm.message");
Shell parent= JavaPlugin.getActiveWorkbenchShell();
return MessageDialog.openQuestion(parent, title, label);
}
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards.buildpaths;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.zip.ZipFile;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
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.custom.CLabel;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ILabelProvider;
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
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.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.util.PixelConverter;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
import org.eclipse.jdt.internal.ui.wizards.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.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
/**
* UI to set the source attachment archive and root.
* Same implementation for both setting attachments for libraries from
* variable entries and for normal (internal or external) jar.
*/
public class SourceAttachmentBlock {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
private IStatusChangeListener fContext;
private StringButtonDialogField fFileNameField;
private SelectionButtonDialogField fInternalButtonField;
private StringButtonDialogField fPrefixField;
private boolean fIsVariableEntry;
private IStatus fNameStatus;
private IStatus fPrefixStatus;
private IPath fJARPath;
/**
* The file to which the archive path points to.
* Only set when the file exists.
*/
private File fResolvedFile;
/**
* The path to which the archive variable points.
* Null if invalid path or not resolvable. Must not exist.
*/
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
private IPath fFileVariablePath;
private IWorkspaceRoot fRoot;
private Control fSWTWidget;
private CLabel fFullPathResolvedLabel;
private CLabel fPrefixResolvedLabel;
private IClasspathEntry fOldEntry;
public SourceAttachmentBlock(IWorkspaceRoot root, IStatusChangeListener context, IClasspathEntry oldEntry) {
fContext= context;
fRoot= root;
fOldEntry= oldEntry;
fIsVariableEntry= (oldEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE);
fNameStatus= new StatusInfo();
fPrefixStatus= new StatusInfo();
fJARPath= (oldEntry != null) ? oldEntry.getPath() : Path.EMPTY;
SourceAttachmentAdapter adapter= new SourceAttachmentAdapter();
if (fIsVariableEntry) {
fFileNameField= new VariablePathDialogField(adapter);
fFileNameField.setDialogFieldListener(adapter);
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
fFileNameField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.varlabel"));
fFileNameField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.external.varbutton"));
((VariablePathDialogField)fFileNameField).setVariableButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.variable.button"));
fPrefixField= new VariablePathDialogField(adapter);
fPrefixField.setDialogFieldListener(adapter);
fPrefixField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.prefix.varlabel"));
fPrefixField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.varbutton"));
((VariablePathDialogField)fPrefixField).setVariableButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.variable.button"));
} else {
fFileNameField= new StringButtonDialogField(adapter);
fFileNameField.setDialogFieldListener(adapter);
fFileNameField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.label"));
fFileNameField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.filename.external.button"));
fInternalButtonField= new SelectionButtonDialogField(SWT.PUSH);
fInternalButtonField.setDialogFieldListener(adapter);
fInternalButtonField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.filename.internal.button"));
fPrefixField= new StringButtonDialogField(adapter);
fPrefixField.setDialogFieldListener(adapter);
fPrefixField.setLabelText(NewWizardMessages.getString("SourceAttachmentBlock.prefix.label"));
fPrefixField.setButtonLabel(NewWizardMessages.getString("SourceAttachmentBlock.prefix.button"));
}
setDefaults();
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
public void setDefaults() {
if (fOldEntry != null && fOldEntry.getSourceAttachmentPath() != null) {
fFileNameField.setText(fOldEntry.getSourceAttachmentPath().toString());
} else {
fFileNameField.setText("");
}
if (fOldEntry != null && fOldEntry.getSourceAttachmentRootPath() != null) {
fPrefixField.setText(fOldEntry.getSourceAttachmentRootPath().toString());
} else {
fPrefixField.setText("");
}
}
/**
* Gets the source attachment path chosen by the user
*/
public IPath getSourceAttachmentPath() {
if (fFileNameField.getText().length() == 0) {
return null;
}
return new Path(fFileNameField.getText());
}
/**
* Gets the source attachment root chosen by the user
*/
public IPath getSourceAttachmentRootPath() {
if (getSourceAttachmentPath() == null) {
return null;
} else {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
return new Path(fPrefixField.getText());
}
}
/**
* Creates the control
*/
public Control createControl(Composite parent) {
PixelConverter converter= new PixelConverter(parent);
fSWTWidget= parent;
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 4;
composite.setLayout(layout);
int widthHint= converter.convertWidthInCharsToPixels(fIsVariableEntry ? 50 : 60);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 4;
Label message= new Label(composite, SWT.LEFT);
message.setLayoutData(gd);
message.setText(NewWizardMessages.getFormattedString("SourceAttachmentBlock.message", fJARPath.lastSegment()));
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
if (fIsVariableEntry) {
DialogField.createEmptySpace(composite, 1);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.widthHint= widthHint;
gd.horizontalSpan= 2;
Label desc= new Label(composite, SWT.LEFT + SWT.WRAP);
desc.setText(NewWizardMessages.getString("SourceAttachmentBlock.filename.description"));
desc.setLayoutData(gd);
DialogField.createEmptySpace(composite, 1);
}
fFileNameField.doFillIntoGrid(composite, 4);
LayoutUtil.setWidthHint(fFileNameField.getTextControl(null), widthHint);
LayoutUtil.setHorizontalGrabbing(fFileNameField.getTextControl(null));
if (!fIsVariableEntry) {
DialogField.createEmptySpace(composite, 3);
fInternalButtonField.doFillIntoGrid(composite, 1);
} else {
DialogField.createEmptySpace(composite, 1);
fFullPathResolvedLabel= new CLabel(composite, SWT.LEFT);
fFullPathResolvedLabel.setText(getResolvedLabelString(fFileNameField.getText(), true));
fFullPathResolvedLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
DialogField.createEmptySpace(composite, 2);
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
DialogField.createEmptySpace(composite, 1);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.widthHint= widthHint;
gd.horizontalSpan= 2;
Label desc= new Label(composite, SWT.LEFT + SWT.WRAP);
desc.setText(NewWizardMessages.getString("SourceAttachmentBlock.prefix.description"));
desc.setLayoutData(gd);
DialogField.createEmptySpace(composite, 1);
fPrefixField.doFillIntoGrid(composite, 4);
LayoutUtil.setWidthHint(fPrefixField.getTextControl(null), widthHint);
if (fIsVariableEntry) {
DialogField.createEmptySpace(composite, 1);
fPrefixResolvedLabel= new CLabel(composite, SWT.LEFT);
fPrefixResolvedLabel.setText(getResolvedLabelString(fPrefixField.getText(), false));
fPrefixResolvedLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
DialogField.createEmptySpace(composite, 2);
}
fFileNameField.postSetFocusOnDialogField(parent.getDisplay());
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.SOURCE_ATTACHMENT_BLOCK);
return composite;
}
private class SourceAttachmentAdapter implements IStringButtonAdapter, IDialogFieldListener {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
public void changeControlPressed(DialogField field) {
attachmentChangeControlPressed(field);
}
public void dialogFieldChanged(DialogField field) {
attachmentDialogFieldChanged(field);
}
}
private void attachmentChangeControlPressed(DialogField field) {
if (field == fFileNameField) {
IPath jarFilePath= chooseExtJarFile();
if (jarFilePath != null) {
fFileNameField.setText(jarFilePath.toString());
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
} else if (field == fPrefixField) {
IPath prefixPath= choosePrefix();
if (prefixPath != null) {
fPrefixField.setText(prefixPath.toString());
}
}
}
private void attachmentDialogFieldChanged(DialogField field) {
if (field == fFileNameField) {
fNameStatus= updateFileNameStatus();
} else if (field == fInternalButtonField) {
IPath jarFilePath= chooseInternalJarFile(fFileNameField.getText());
if (jarFilePath != null) {
fFileNameField.setText(jarFilePath.toString());
}
return;
} else if (field == fPrefixField) {
fPrefixStatus= updatePrefixStatus();
}
doStatusLineUpdate();
}
private void doStatusLineUpdate() {
fPrefixField.enableButton(canBrowsePrefix());
fFileNameField.enableButton(canBrowseFileName());
if (fFullPathResolvedLabel != null) {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
fFullPathResolvedLabel.setText(getResolvedLabelString(fFileNameField.getText(), true));
}
if (fPrefixResolvedLabel != null) {
fPrefixResolvedLabel.setText(getResolvedLabelString(fPrefixField.getText(), false));
}
IStatus status= StatusUtil.getMostSevere(new IStatus[] { fNameStatus, fPrefixStatus });
fContext.statusChanged(status);
}
private boolean canBrowseFileName() {
if (!fIsVariableEntry) {
return true;
}
if (fFileVariablePath != null) {
return fFileVariablePath.toFile().isDirectory();
}
return false;
}
private boolean canBrowsePrefix() {
if (fResolvedFile != null) {
if (fIsVariableEntry) {
return fPrefixStatus.isOK() && fPrefixField.getText().length() > 0;
}
return true;
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
}
return false;
}
private String getResolvedLabelString(String path, boolean osPath) {
IPath resolvedPath= getResolvedPath(new Path(path));
if (resolvedPath != null) {
if (osPath) {
return resolvedPath.toOSString();
} else {
return resolvedPath.toString();
}
}
return "";
}
private IPath getResolvedPath(IPath path) {
if (path != null) {
String varName= path.segment(0);
if (varName != null) {
IPath varPath= JavaCore.getClasspathVariable(varName);
if (varPath != null) {
return varPath.append(path.removeFirstSegments(1));
}
}
}
return null;
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
private IStatus updatePrefixStatus() {
StatusInfo status= new StatusInfo();
String prefix= fPrefixField.getText();
if (prefix.length() == 0) {
return status;
} else {
if (!Path.EMPTY.isValidPath(prefix)) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.notvalid"));
return status;
}
IPath path= new Path(prefix);
if (fIsVariableEntry) {
IPath resolvedPath= getResolvedPath(path);
if (resolvedPath == null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.varnotexists"));
return status;
}
if (resolvedPath.getDevice() != null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.deviceinvar"));
return status;
}
} else {
if (path.getDevice() != null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.prefix.error.deviceinpath"));
return status;
}
}
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
return status;
}
private IStatus updateFileNameStatus() {
StatusInfo status= new StatusInfo();
fResolvedFile= null;
fFileVariablePath= null;
String fileName= fFileNameField.getText();
if (fileName.length() == 0) {
return status;
} else {
if (!Path.EMPTY.isValidPath(fileName)) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.notvalid"));
return status;
}
IPath filePath= new Path(fileName);
IPath resolvedPath;
if (fIsVariableEntry) {
if (filePath.getDevice() != null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.deviceinpath"));
return status;
}
String varName= filePath.segment(0);
if (varName == null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.notvalid"));
return status;
}
fFileVariablePath= JavaCore.getClasspathVariable(varName);
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
if (fFileVariablePath == null) {
status.setError(NewWizardMessages.getString("SourceAttachmentBlock.filename.error.varnotexists"));
return status;
}
resolvedPath= fFileVariablePath.append(filePath.removeFirstSegments(1));
if (resolvedPath.isEmpty()) {
status.setWarning(NewWizardMessages.getString("SourceAttachmentBlock.filename.warning.varempty"));
return status;
}
File file= resolvedPath.toFile();
if (!file.isFile()) {
String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.filename.error.filenotexists", resolvedPath.toOSString());
status.setWarning(message);
return status;
}
fResolvedFile= file;
} else {
File file= filePath.toFile();
IResource res= fRoot.findMember(filePath);
if (res != null) {
file= res.getLocation().toFile();
}
if (!file.isFile()) {
String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.filename.error.filenotexists", filePath.toString());
status.setError(message);
return status;
}
fResolvedFile= file;
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
}
}
return status;
}
/*
* Opens a dialog to choose a jar from the file system.
*/
private IPath chooseExtJarFile() {
IPath currPath= new Path(fFileNameField.getText());
if (currPath.isEmpty()) {
currPath= fJARPath;
}
IPath resolvedPath= currPath;
if (fIsVariableEntry) {
resolvedPath= getResolvedPath(currPath);
if (resolvedPath == null) {
resolvedPath= Path.EMPTY;
}
}
if (ArchiveFileFilter.isArchivePath(resolvedPath)) {
resolvedPath= resolvedPath.removeLastSegments(1);
}
FileDialog dialog= new FileDialog(getShell());
dialog.setText(NewWizardMessages.getString("SourceAttachmentBlock.extjardialog.text"));
dialog.setFilterExtensions(new String[] {"*.jar;*.zip"});
dialog.setFilterPath(resolvedPath.toOSString());
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
String res= dialog.open();
if (res != null) {
IPath returnPath= new Path(res).makeAbsolute();
if (fIsVariableEntry) {
returnPath= modifyPath(returnPath, currPath.segment(0));
}
return returnPath;
}
return null;
}
/*
* Opens a dialog to choose an internal jar.
*/
private IPath chooseInternalJarFile(String initSelection) {
Class[] acceptedClasses= new Class[] { IFile.class };
TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);
ViewerFilter filter= new ArchiveFileFilter(null);
ILabelProvider lp= new WorkbenchLabelProvider();
ITreeContentProvider cp= new WorkbenchContentProvider();
IResource initSel= fRoot.findMember(new Path(initSelection));
if (initSel == null) {
initSel= fRoot.findMember(fJARPath);
}
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);
dialog.setAllowMultiple(false);
dialog.setValidator(validator);
dialog.addFilter(filter);
dialog.setTitle(NewWizardMessages.getString("SourceAttachmentBlock.intjardialog.title"));
dialog.setMessage(NewWizardMessages.getString("SourceAttachmentBlock.intjardialog.message"));
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
dialog.setInput(fRoot);
dialog.setInitialSelection(initSel);
if (dialog.open() == dialog.OK) {
IFile file= (IFile) dialog.getFirstResult();
return file.getFullPath();
}
return null;
}
/*
* Opens a dialog to choose path in a zip file.
*/
private IPath choosePrefix() {
if (fResolvedFile != null) {
IPath currPath= new Path(fPrefixField.getText());
String initSelection= null;
if (fIsVariableEntry) {
IPath resolvedPath= getResolvedPath(currPath);
if (resolvedPath != null) {
initSelection= resolvedPath.toString();
}
} else {
initSelection= currPath.toString();
}
try {
ZipFile zipFile= new ZipFile(fResolvedFile);
ZipContentProvider contentProvider= new ZipContentProvider();
contentProvider.setInitialInput(zipFile);
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), new ZipLabelProvider(), contentProvider);
dialog.setAllowMultiple(false);
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
dialog.setTitle(NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.title"));
dialog.setMessage(NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.message"));
dialog.setInput(zipFile);
dialog.setInitialSelection(contentProvider.getSelectedNode(initSelection));
if (dialog.open() == dialog.OK) {
Object obj= dialog.getFirstResult();
IPath path= new Path(obj.toString());
if (fIsVariableEntry) {
path= modifyPath(path, currPath.segment(0));
}
return path;
}
} catch (IOException e) {
String title= NewWizardMessages.getString("SourceAttachmentBlock.prefixdialog.error.title");
String message= NewWizardMessages.getFormattedString("SourceAttachmentBlock.prefixdialog.error.message", fResolvedFile.getPath());
MessageDialog.openError(getShell(), title, message);
JavaPlugin.log(e);
}
}
return null;
}
private Shell getShell() {
if (fSWTWidget != null) {
return fSWTWidget.getShell();
}
return JavaPlugin.getActiveWorkbenchShell();
}
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
/**
* Takes a path and replaces the beginning with a variable name
* (if the beginning matches with the variables value)
*/
private IPath modifyPath(IPath path, String varName) {
if (varName == null || path == null) {
return null;
}
if (path.isEmpty()) {
return new Path(varName);
}
IPath varPath= JavaCore.getClasspathVariable(varName);
if (varPath != null) {
if (varPath.isPrefixOf(path)) {
path= path.removeFirstSegments(varPath.segmentCount());
} else {
path= new Path(path.lastSegment());
}
} else {
path= new Path(path.lastSegment());
}
return new Path(varName).append(path);
}
/**
* Creates a runnable that sets the source attachment by modifying the project's classpath.
*/
public IRunnableWithProgress getRunnable(final IJavaProject jproject, final Shell shell) {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
boolean isExported= fOldEntry != null ? fOldEntry.isExported() : false;
IClasspathEntry newEntry;
if (fIsVariableEntry) {
newEntry= JavaCore.newVariableEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), isExported);
} else {
newEntry= JavaCore.newLibraryEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), isExported);
}
IClasspathEntry[] entries= modifyClasspath(jproject, newEntry, shell);
if (entries != null) {
jproject.setRawClasspath(entries, monitor);
}
} catch (JavaModelException e) {
throw new InvocationTargetException(e);
}
}
};
}
private IClasspathEntry[] modifyClasspath(IJavaProject jproject, IClasspathEntry newEntry, Shell shell) throws JavaModelException{
IClasspathEntry[] oldClasspath= jproject.getRawClasspath();
int nEntries= oldClasspath.length;
ArrayList newEntries= new ArrayList(nEntries + 1);
int entryKind= newEntry.getEntryKind();
IPath jarPath= newEntry.getPath();
boolean found= false;
for (int i= 0; i < nEntries; i++) {
IClasspathEntry curr= oldClasspath[i];
if (curr.getEntryKind() == entryKind && curr.getPath().equals(jarPath)) {
|
15,755 |
Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
|
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
|
resolved fixed
|
772e789
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T15:26:00Z | 2002-05-10T17:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
|
newEntries.add(newEntry);
found= true;
} else {
newEntries.add(curr);
}
}
if (!found) {
if (newEntry.getSourceAttachmentPath() == null || !putJarOnClasspathDialog(shell)) {
return null;
}
newEntries.add(newEntry);
}
return (IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]);
}
private boolean putJarOnClasspathDialog(Shell shell) {
final boolean[] result= new boolean[1];
shell.getDisplay().syncExec(new Runnable() {
public void run() {
String title= NewWizardMessages.getString("SourceAttachmentBlock.putoncpdialog.title");
String message= NewWizardMessages.getString("SourceAttachmentBlock.putoncpdialog.message");
result[0]= MessageDialog.openQuestion(JavaPlugin.getActiveWorkbenchShell(), title, message);
}
});
return result[0];
}
}
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.ui;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.ContentViewer;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IField;
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
/**
* Sorter for Java elements. Ordered by element category, then by element name.
* Package fragment roots are sorted as ordered on the classpath.
* @since 2.0
*/
public class JavaElementSorter extends ViewerSorter {
private static final int JAVAPROJECTS= 1;
private static final int PACKAGEFRAGMENTROOTS= 2;
private static final int PACKAGEFRAGMENT= 3;
private static final int RESOURCEPACKAGES= 6;
private static final int COMPILATIONUNITS= 4;
private static final int CLASSFILES= 5;
private static final int RESOURCEFOLDERS= 7;
private static final int RESOURCES= 8;
private static final int STORAGE= 9;
private static final int PACKAGE_DECL= 10;
private static final int IMPORT_CONTAINER= 11;
private static final int IMPORT_DECLARATION= 12;
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
private static final int TYPES= 13;
private static final int STATIC_INIT= 14;
private static final int STATIC_FIELDS= 15;
private static final int STATIC_METHODS= 16;
private static final int FIELDS= 17;
private static final int CONSTRUCTORS= 18;
private static final int INIT= 19;
private static final int METHODS= 20;
private static final int JAVAELEMENTS= 21;
private static final int OTHERS= 22;
public JavaElementSorter() {
}
/*
* @see ViewerSorter#isSorterProperty
*/
public boolean isSorterProperty(Object element, Object property) {
return true;
}
/*
* @see ViewerSorter#category
*/
public int category(Object element) {
if (element instanceof IJavaElement) {
try {
IJavaElement je= (IJavaElement) element;
switch (je.getElementType()) {
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
case IJavaElement.METHOD: {
IMethod method= (IMethod) je;
if (method.isConstructor())
return CONSTRUCTORS;
int flags= method.getFlags();
return Flags.isStatic(flags) ? STATIC_METHODS : METHODS;
}
case IJavaElement.FIELD: {
int flags= ((IField) je).getFlags();
return Flags.isStatic(flags) ? STATIC_FIELDS : FIELDS;
}
case IJavaElement.INITIALIZER: {
int flags= ((IInitializer) je).getFlags();
return Flags.isStatic(flags) ? STATIC_INIT : INIT;
}
case IJavaElement.TYPE:
return TYPES;
case IJavaElement.PACKAGE_DECLARATION:
return PACKAGE_DECL;
case IJavaElement.IMPORT_CONTAINER:
return IMPORT_CONTAINER;
case IJavaElement.IMPORT_DECLARATION:
return IMPORT_DECLARATION;
case IJavaElement.PACKAGE_FRAGMENT:
IPackageFragment pack= (IPackageFragment) je;
if (pack.getParent().getUnderlyingResource() instanceof IProject) {
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
return PACKAGEFRAGMENTROOTS;
}
if (!pack.hasChildren() && pack.getNonJavaResources().length > 0) {
return RESOURCEPACKAGES;
}
return PACKAGEFRAGMENT;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
return PACKAGEFRAGMENTROOTS;
case IJavaElement.JAVA_PROJECT:
return JAVAPROJECTS;
case IJavaElement.CLASS_FILE:
return CLASSFILES;
case IJavaElement.COMPILATION_UNIT:
return COMPILATIONUNITS;
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
return JAVAELEMENTS;
} else if (element instanceof IFile) {
return RESOURCES;
} else if (element instanceof IContainer) {
return RESOURCEFOLDERS;
} else if (element instanceof IStorage) {
return STORAGE;
}
return OTHERS;
}
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
/*
* @see ViewerSorter#compare
*/
public int compare(Viewer viewer, Object e1, Object e2) {
int cat1= category(e1);
int cat2= category(e2);
if (cat1 != cat2)
return cat1 - cat2;
if (cat1 == PACKAGEFRAGMENTROOTS) {
IPackageFragmentRoot root1= JavaModelUtil.getPackageFragmentRoot((IJavaElement)e1);
IPackageFragmentRoot root2= JavaModelUtil.getPackageFragmentRoot((IJavaElement)e2);
if (!root1.getPath().equals(root2.getPath())) {
int p1= getClassPathIndex(root1);
int p2= getClassPathIndex(root2);
if (p1 != p2) {
return p1 - p2;
}
}
}
if (cat1 == RESOURCES || cat1 == RESOURCEFOLDERS || cat1 == STORAGE || cat1 == OTHERS) {
return compareWithLabelProvider(viewer, e1, e2);
}
String name1= JavaElementLabels.getTextLabel(e1, JavaElementLabels.M_PARAMETER_TYPES);
String name2= JavaElementLabels.getTextLabel(e2, JavaElementLabels.M_PARAMETER_TYPES);
return getCollator().compare(name1, name2);
}
|
14,411 |
Bug 14411 Method sorting should put methods with less parameters first
|
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
|
resolved fixed
|
47d20bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:11:58Z | 2002-04-23T13:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
private int compareWithLabelProvider(Viewer viewer, Object e1, Object e2) {
if (viewer == null || !(viewer instanceof ContentViewer)) {
IBaseLabelProvider prov = ((ContentViewer) viewer).getLabelProvider();
if (prov instanceof ILabelProvider) {
ILabelProvider lprov= (ILabelProvider) prov;
String name1 = lprov.getText(e1);
String name2 = lprov.getText(e2);
if (name1 != null && name2 != null) {
return getCollator().compare(name1, name2);
}
}
}
return 0;
}
private int getClassPathIndex(IPackageFragmentRoot root) {
try {
IPath rootPath= root.getPath();
IPackageFragmentRoot[] roots= root.getJavaProject().getPackageFragmentRoots();
for (int i= 0; i < roots.length; i++) {
if (roots[i].getPath().equals(rootPath)) {
return i;
}
}
} catch (JavaModelException e) {
}
return Integer.MAX_VALUE;
}
}
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.lang.reflect.InvocationTargetException;
import java.util.Hashtable;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IncrementalProjectBuilder;
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.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
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.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
public class JavaBuilderPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private StringDialogField fResourceFilterField;
private StatusInfo fResourceFilterStatus;
private SelectionButtonDialogField fAbortInvalidClasspathField;
private Hashtable fWorkingValues;
private static final String PREF_RESOURCE_FILTER= JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER;
private static final String PREF_BUILD_INVALID_CLASSPATH= JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH;
private static final String ABORT= JavaCore.ABORT;
private static final String IGNORE= JavaCore.IGNORE;
private static String[] getAllKeys() {
return new String[] {
PREF_RESOURCE_FILTER, PREF_BUILD_INVALID_CLASSPATH
};
}
public JavaBuilderPreferencePage() {
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
setDescription(JavaUIMessages.getString("JavaBuilderPreferencePage.description"));
fWorkingValues= JavaCore.getOptions();
IDialogFieldListener listener= new IDialogFieldListener() {
public void dialogFieldChanged(DialogField field) {
updateValues();
}
};
fResourceFilterField= new StringDialogField();
fResourceFilterField.setDialogFieldListener(listener);
fResourceFilterField.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.filter.label"));
fAbortInvalidClasspathField= new SelectionButtonDialogField(SWT.CHECK);
fAbortInvalidClasspathField.setDialogFieldListener(listener);
fAbortInvalidClasspathField.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.abortinvalidprojects.label"));
updateControls();
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
Composite composite= new Composite(parent, SWT.NONE);
composite.setLayout(layout);
DialogField resourceFilterLabel= new DialogField();
resourceFilterLabel.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.filter.description"));
resourceFilterLabel.doFillIntoGrid(composite, 2);
LayoutUtil.setWidthHint(resourceFilterLabel.getLabelControl(null), convertWidthInCharsToPixels(80));
fResourceFilterField.doFillIntoGrid(composite, 2);
LayoutUtil.setHorizontalGrabbing(fResourceFilterField.getTextControl(null));
LayoutUtil.setWidthHint(fResourceFilterField.getTextControl(null), convertWidthInCharsToPixels(50));
fAbortInvalidClasspathField.doFillIntoGrid(composite, 2);
return composite;
}
/**
* Initializes the current options (read from preference store)
*/
public static void initDefaults(IPreferenceStore store) {
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
String[] allKeys= getAllKeys();
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
Hashtable actualOptions= JavaCore.getOptions();
boolean hasChanges= false;
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String val= (String) fWorkingValues.get(key);
String oldVal= (String) actualOptions.get(key);
hasChanges= hasChanges | !val.equals(oldVal);
actualOptions.put(key, val);
}
if (hasChanges) {
String title= JavaUIMessages.getString("JavaBuilderPreferencePage.needsbuild.title");
String message= JavaUIMessages.getString("JavaBuilderPreferencePage.needsbuild.message");
MessageDialog dialog= new MessageDialog(getShell(), title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2);
int res= dialog.open();
if (res != 0 && res != 1) {
return false;
}
JavaCore.setOptions(actualOptions);
if (res == 0) {
doFullBuild();
}
}
return super.performOk();
}
private void updateValues() {
IStatus status= validateResourceFilters();
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
fWorkingValues.put(PREF_RESOURCE_FILTER, fAbortInvalidClasspathField.isSelected() ? ABORT : IGNORE);
updateStatus(status);
}
private String[] getFilters(String text) {
StringTokenizer tok= new StringTokenizer(text, ",");
int nTokens= tok.countTokens();
String[] res= new String[nTokens];
for (int i= 0; i < res.length; i++) {
res[i]= tok.nextToken().trim();
}
return res;
}
private IStatus validateResourceFilters() {
IWorkspace workspace= ResourcesPlugin.getWorkspace();
String text= fResourceFilterField.getText();
String[] filters= getFilters(text);
for (int i= 0; i < filters.length; i++) {
String fileName= filters[i].replace('*', 'x');
IStatus status= workspace.validateName(fileName, IResource.FILE);
if (status.matches(IStatus.ERROR)) {
String message= JavaUIMessages.getFormattedString("JavaBuilderPreferencePage.filter.invalidsegment.error", status.getMessage());
return new StatusInfo(IStatus.ERROR, message);
}
}
StringBuffer buf= new StringBuffer();
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
for (int i= 0; i < filters.length; i++) {
if (i > 0) {
buf.append(',');
}
buf.append(filters[i]);
}
fWorkingValues.put(PREF_RESOURCE_FILTER, buf.toString());
return new StatusInfo();
}
private void updateStatus(IStatus status) {
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private void doFullBuild() {
ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
try {
dialog.run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
});
} catch (InterruptedException e) {
} catch (InvocationTargetException e) {
String title= JavaUIMessages.getString("JavaBuilderPreferencePage.builderror.title");
|
15,956 |
Bug 15956 Cannot set Preferences>Builder>Abort build preferences
|
checking the checkbox has no effect
|
resolved fixed
|
49f94d7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:32:27Z | 2002-05-14T18:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
String message= JavaUIMessages.getString("JavaBuilderPreferencePage.builderror.message");
ExceptionHandler.handle(e, getShell(), title, message);
}
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fWorkingValues= JavaCore.getDefaultOptions();
updateControls();
updateValues();
super.performDefaults();
}
private void updateControls() {
String[] filters= getFilters((String) fWorkingValues.get(PREF_RESOURCE_FILTER));
StringBuffer buf= new StringBuffer();
for (int i= 0; i < filters.length; i++) {
if (i > 0) {
buf.append(", ");
}
buf.append(filters[i]);
}
fResourceFilterField.setText(buf.toString());
fAbortInvalidClasspathField.setSelection(ABORT.equals(fWorkingValues.get(PREF_BUILD_INVALID_CLASSPATH)));
}
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.FileDocumentProvider;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.IResourceLocator;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* A document provider for class files. Class files can be either inside
*/
public class ClassFileDocumentProvider extends FileDocumentProvider {
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
/**
* Synchronizes the document with external resource changes.
*/
protected class ClassFileSynchronizer implements IElementChangedListener {
protected IClassFileEditorInput fInput;
protected IPackageFragmentRoot fPackageFragmentRoot;
/**
* Default constructor.
*/
public ClassFileSynchronizer(IClassFileEditorInput input) {
fInput= input;
IJavaElement parent= fInput.getClassFile().getParent();
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
while (parent != null && !(parent instanceof IPackageFragmentRoot)) {
parent= parent.getParent();
}
fPackageFragmentRoot= (IPackageFragmentRoot) parent;
}
/**
* Installs the synchronizer.
*/
public void install() {
JavaCore.addElementChangedListener(this);
}
/**
* Uninstalls the synchronizer.
*/
public void uninstall() {
JavaCore.removeElementChangedListener(this);
}
/*
* @see IElementChangedListener#elementChanged
*/
public void elementChanged(ElementChangedEvent e) {
check(fPackageFragmentRoot, e.getDelta());
}
/**
* Recursively check whether the class file has been deleted.
* Returns true if delta processing can be stopped.
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
*/
protected boolean check(IPackageFragmentRoot input, IJavaElementDelta delta) {
IJavaElement element= delta.getElement();
if ((delta.getKind() & IJavaElementDelta.REMOVED) != 0 || (delta.getFlags() & IJavaElementDelta.F_CLOSED) != 0) {
if (element.equals(input.getJavaProject())) {
handleDeleted(fInput);
return true;
}
}
if (((delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) && input.equals(element)) {
handleDeleted(fInput);
return true;
}
IJavaElementDelta[] subdeltas= delta.getAffectedChildren();
for (int i= 0; i < subdeltas.length; i++) {
if (check(input, subdeltas[i]))
return true;
}
return false;
}
};
/**
* Correcting the visibility of <code>FileSynchronizer</code>.
*/
protected class _FileSynchronizer extends FileSynchronizer {
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
public _FileSynchronizer(IFileEditorInput fileEditorInput) {
super(fileEditorInput);
}
};
/**
* Bundle of all required informations.
*/
protected class ClassFileInfo extends FileInfo {
ClassFileSynchronizer fClassFileSynchronizer= null;
ClassFileInfo(IDocument document, IAnnotationModel model, _FileSynchronizer fileSynchronizer) {
super(document, model, fileSynchronizer);
}
ClassFileInfo(IDocument document, IAnnotationModel model, ClassFileSynchronizer classFileSynchronizer) {
super(document, model, null);
fClassFileSynchronizer= classFileSynchronizer;
}
};
/**
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
* Creates a new document provider.
*/
public ClassFileDocumentProvider() {
super();
}
/*
* @see StorageDocumentProvider#setDocumentContent(IDocument, IEditorInput)
*/
protected boolean setDocumentContent(IDocument document, IEditorInput editorInput, String encoding) throws CoreException {
if (editorInput instanceof IClassFileEditorInput) {
IClassFile classFile= ((IClassFileEditorInput) editorInput).getClassFile();
document.set(classFile.getSource());
return true;
}
return super.setDocumentContent(document, editorInput, encoding);
}
/**
* Creates an annotation model derrived from the given class file editor input.
* @param the editor input from which to query the annotations
* @return the created annotation model
* @exception CoreException if the editor input could not be accessed
*/
protected IAnnotationModel createClassFileAnnotationModel(IClassFileEditorInput classFileEditorInput) throws CoreException {
IResource resource= null;
IClassFile classFile= classFileEditorInput.getClassFile();
IResourceLocator locator= (IResourceLocator) classFile.getAdapter(IResourceLocator.class);
if (locator != null)
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
resource= locator.getContainingResource(classFile);
if (resource != null) {
ClassFileMarkerAnnotationModel model= new ClassFileMarkerAnnotationModel(resource);
model.setClassFile(classFile);
return model;
}
return null;
}
/*
* @see AbstractDocumentProvider#createDocument(Object)
*/
protected IDocument createDocument(Object element) throws CoreException {
IDocument document= super.createDocument(element);
if (document != null) {
JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();
IDocumentPartitioner partitioner= tools.createDocumentPartitioner();
document.setDocumentPartitioner(partitioner);
partitioner.connect(document);
}
return document;
}
/*
* @see AbstractDocumentProvider#createElementInfo(Object)
*/
protected ElementInfo createElementInfo(Object element) throws CoreException {
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
if (element instanceof IClassFileEditorInput) {
IClassFileEditorInput input = (IClassFileEditorInput) element;
ExternalClassFileEditorInput external= null;
if (input instanceof ExternalClassFileEditorInput)
external= (ExternalClassFileEditorInput) input;
if (external != null) {
try {
external.getFile().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException x) {
handleCoreException(x, JavaEditorMessages.getString("ClassFileDocumentProvider.error.createElementInfo"));
}
}
IDocument d= createDocument(input);
IAnnotationModel m= createClassFileAnnotationModel(input);
if (external != null) {
ClassFileInfo info= new ClassFileInfo(d, m, (_FileSynchronizer) null);
info.fModificationStamp= computeModificationStamp(external.getFile());
return info;
} else if (input instanceof InternalClassFileEditorInput) {
ClassFileSynchronizer s= new ClassFileSynchronizer(input);
s.install();
return new ClassFileInfo(d, m, s);
}
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
|
return null;
}
/*
* @see FileDocumentProvider#disposeElementInfo(Object, ElementInfo)
*/
protected void disposeElementInfo(Object element, ElementInfo info) {
ClassFileInfo classFileInfo= (ClassFileInfo) info;
if (classFileInfo.fClassFileSynchronizer != null) {
classFileInfo.fClassFileSynchronizer.uninstall();
classFileInfo.fClassFileSynchronizer= null;
}
super.disposeElementInfo(element, info);
}
/*
* @see AbstractDocumentProvider#doSaveDocument(IProgressMonitor, Object, IDocument)
*/
protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document) throws CoreException {
}
/**
* Handles the deletion of the element underlying the given class file editor input.
* @param input the editor input
*/
protected void handleDeleted(IClassFileEditorInput input) {
fireElementDeleted(input);
}
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModelStatusConstants;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.JavaModelStatus;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Java specific text editor.
*/
public class ClassFileEditor extends JavaEditor {
/**
* A form to attach source to a class file.
*/
private class SourceAttachmentForm implements IPropertyChangeListener {
private final IClassFile fFile;
private ScrolledComposite fScrolledComposite;
private Color fBackgroundColor;
private Color fForegroundColor;
private Color fSeparatorColor;
private List fBannerLabels= new ArrayList();
private List fHeaderLabels= new ArrayList();
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.