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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
* Updates global actions.
* Links to editor (if option enabled)
*/
private void handleSelectionChanged(SelectionChangedEvent event) {
IStructuredSelection sel= (IStructuredSelection) event.getSelection();
fZoomInAction.update();
linkToEditor(sel);
}
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];
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);
}
}
}
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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;
if (selection.size() == 1) {
if (obj instanceof IJavaElement) {
IJavaElement cu= JavaModelUtil.findElementOfKind((IJavaElement)obj, IJavaElement.COMPILATION_UNIT);
if (cu != null)
element= getResourceFor(cu);
if (element == null)
element= JavaModelUtil.findElementOfKind((IJavaElement)obj, IJavaElement.CLASS_FILE);
}
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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) {
IWorkingCopy wc= (IWorkingCopy)element;
IJavaElement original= wc.getOriginalElement();
if (original != null)
element= original;
}
try {
element= ((IJavaElement)element).getUnderlyingResource();
} catch (JavaModelException e) {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
return null;
}
}
if (!(element instanceof IResource) || ((IResource)element).isPhantom()) {
return null;
}
return (IResource)element;
}
public void saveState(IMemento memento) {
if (fViewer == null) {
if (fMemento != null)
memento.putMemento(fMemento);
return;
}
saveExpansionState(memento);
saveSelectionState(memento);
saveScrollState(memento, fViewer.getTree());
savePatternFilterState(memento);
saveFilterState(memento);
saveWorkingSetState(memento);
saveMemberFilterState(memento);
}
protected void saveFilterState(IMemento memento) {
boolean showLibraries= getLibraryFilter().getShowLibraries();
String show= "true";
if (!showLibraries)
show= "false";
memento.putString(TAG_SHOWLIBRARIES, show);
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
boolean showBinaries= getBinaryFilter().getShowBinaries();
String showBinString= "true";
if (!showBinaries)
showBinString= "false";
memento.putString(TAG_SHOWBINARIES, showBinString);
}
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();
if (elements.length > 0) {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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.getExpandedElements();
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());
}
}
}
protected void saveWorkingSetState(IMemento memento) {
IWorkingSet ws= getWorkingSetFilter().getWorkingSet();
if (ws != null) {
memento.putString(TAG_WORKINGSET, ws.getName());
}
}
/**
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
* Saves the state of the filter actions
*/
public void saveMemberFilterState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
}
void restoreState(IMemento memento) {
restoreExpansionState(memento);
restoreSelectionState(memento);
restoreScrollState(memento, fViewer.getTree());
}
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) {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
}
}
}
protected void restoreSelectionState(IMemento memento) {
IMemento childMem;
childMem= memento.getChild(TAG_SELECTION);
if (childMem != null) {
ArrayList list= 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));
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));
elements.add(element);
}
fViewer.setExpandedElements(elements.toArray());
}
}
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
/**
* Create the KeyListener for doing the refresh on the viewer.
*/
private void initKeyListener() {
fViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
doKeyPressed(event);
}
});
}
private void doKeyPressed(KeyEvent event) {
if (event.stateMask != 0)
return;
int key= event.keyCode;
if (key == SWT.F5) {
fRefreshAction.selectionChanged(
(IStructuredSelection) fViewer.getSelection());
if (fRefreshAction.isEnabled())
fRefreshAction.run();
} else if (key == SWT.F4) {
OpenTypeHierarchyUtil.open(getSelection(), getSite().getWorkbenchWindow());
} else if (key == SWT.F3) {
fOpenCUAction.update();
if (fOpenCUAction.isEnabled())
fOpenCUAction.run();
} else if (event.character == SWT.DEL){
fDeleteAction.update();
if (fDeleteAction.isEnabled())
fDeleteAction.run();
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
}
}
void initFrameList() {
fFrameSource= new PackagesFrameSource(this);
fFrameList= new FrameList(fFrameSource);
fFrameSource.connectTo(fFrameList);
}
/**
* 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 IMember) {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
IMember m= (IMember)o;
if (element.equals(m.getCompilationUnit()))
return;
if (element.equals(m.getClassFile()))
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();
if (types.length > 0)
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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)
return ((IClassFileEditorInput)input).getClassFile();
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
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;
}
/**
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
* Returns the working set filter for this view.
* @return the working set filter
*/
WorkingSetFilter getWorkingSetFilter() {
return fWorkingSetFilter;
}
/**
* Returns the Binary filter for this view.
* @return the binary filter
*/
BinaryProjectFilter getBinaryFilter() {
return fBinaryFilter;
}
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
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
initLibraryFilterFromPreferences();
String showbin= fMemento.getString(TAG_SHOWBINARIES);
if (showbin != null)
getBinaryFilter().setShowBinaries(showbin.equals("true"));
else
initBinaryFilterFromPreferences();
String workingSetName= fMemento.getString(TAG_WORKINGSET);
if (workingSetName != null) {
IWorkingSet ws= SearchUI.findWorkingSet(workingSetName);
if (ws != null) {
getWorkingSetFilter().setWorkingSet(ws);
}
}
fMemberFilterActionGroup.restoreState(fMemento);
}
void initFilterFromPreferences() {
initBinaryFilterFromPreferences();
initLibraryFilterFromPreferences();
}
void initLibraryFilterFromPreferences() {
JavaPlugin plugin= JavaPlugin.getDefault();
boolean show= plugin.getPreferenceStore().getBoolean(TAG_SHOWLIBRARIES);
getLibraryFilter().setShowLibraries(show);
}
void initBinaryFilterFromPreferences() {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
JavaPlugin plugin= JavaPlugin.getDefault();
boolean showbin= plugin.getPreferenceStore().getBoolean(TAG_SHOWBINARIES);
getBinaryFilter().setShowBinaries(showbin);
}
/**
* Updates the title text and title tool tip.
* Called whenever the input of the viewer changes.
*/
void updateTitle() {
Object input= getViewer().getInput();
String viewName= getConfigurationElement().getAttribute("name");
if (input == null
|| (input instanceof IJavaModel)) {
setTitle(viewName);
setTitleToolTip("");
} else {
String inputText= JavaElementLabels.getTextLabel(input, StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS);
String title= PackagesMessages.getFormattedString("PackageExplorer.argTitle", new String[] { viewName, inputText });
setTitle(title);
setTitleToolTip(getToolTipText(input));
}
}
/**
* Sets the decorator for the package explorer.
*
* @param decorator a label decorator or <code>null</code> for no decorations.
* @deprecated To be removed
*/
public void setLabelDecorator(ILabelDecorator decorator) {
|
11,109 |
Bug 11109 F1 no longer works in Packages view
|
new context ID?
|
resolved fixed
|
902f54b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T10:32:04Z | 2002-03-11T18:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
if (decorator == null)
fViewer.setLabelProvider(fJavaElementLabelProvider);
else
fViewer.setLabelProvider(new DecoratingLabelProvider(fJavaElementLabelProvider, 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();
fillToolBar(actionBars.getToolBarManager());
actionBars.updateActionBars();
boolean showCUChildren= JavaBasePreferencePage.showCompilationUnitChildren();
((JavaElementContentProvider)fViewer.getContentProvider()).setProvideMembers(showCUChildren);
refreshViewer= true;
}
if (refreshViewer)
fViewer.refresh();
}
}
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.jarpackager;
import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.dialogs.WizardExportResourcesPage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaElementContentProvider;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.packageview.EmptyInnerPackageFilter;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider;
/**
* Page 1 of the JAR Package wizard
*/
public class JarPackageWizardPage extends WizardExportResourcesPage implements IJarPackageWizardPage {
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
private JarPackage fJarPackage;
private IStructuredSelection fInitialSelection;
private CheckboxTreeAndListGroup fInputGroup;
private boolean fFirstTime= true;
private Text fSourceNameField;
private Button fSourceBrowseButton;
private Button fExportClassFilesCheckbox;
private Button fExportJavaFilesCheckbox;
private Combo fDestinationNamesCombo;
private Button fDestinationBrowseButton;
private Button fCompressCheckbox;
private Button fOverwriteCheckbox;
private Composite fDescriptionFileGroup;
private Button fSaveDescriptionCheckbox;
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
private Label fDescriptionFileLabel;
private Text fDescriptionFileText;
private Button fDescriptionFileBrowseButton;
private final static String PAGE_NAME= "JarPackageWizardPage";
private final static String STORE_EXPORT_CLASS_FILES= PAGE_NAME + ".EXPORT_CLASS_FILES";
private final static String STORE_EXPORT_JAVA_FILES= PAGE_NAME + ".EXPORT_JAVA_FILES";
private final static String STORE_DESTINATION_NAMES= PAGE_NAME + ".DESTINATION_NAMES_ID";
private final static String STORE_COMPRESS= PAGE_NAME + ".COMPRESS";
private final static String STORE_OVERWRITE= PAGE_NAME + ".OVERWRITE";
private final static int SIZING_SELECTION_WIDGET_WIDTH= 400;
private final static int SIZING_SELECTION_WIDGET_HEIGHT= 150;
/**
* Create an instance of this class
*/
public JarPackageWizardPage(JarPackage jarPackage, IStructuredSelection selection) {
super(PAGE_NAME, selection);
setTitle(JarPackagerMessages.getString("JarPackageWizardPage.title"));
setDescription(JarPackagerMessages.getString("JarPackageWizardPage.description"));
fJarPackage= jarPackage;
fInitialSelection= selection;
}
/*
* Method declared on IDialogPage.
*/
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
public void createControl(final Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
composite.setLayoutData(
new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.whatToExport.label"));
createInputGroup(composite);
createExportTypeGroup(composite);
new Label(composite, SWT.NONE);
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.whereToExport.label"));
createDestinationGroup(composite);
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.options.label"));
createOptionsGroup(composite);
restoreResourceSpecificationWidgetValues();
restoreWidgetValues();
if (fInitialSelection != null)
BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {
public void run() {
setupBasedOnInitialSelections();
}
});
setControl(composite);
update();
giveFocusToDestination();
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.JARPACKAGER_WIZARD_PAGE);
}
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
/**
* Create the export options specification widgets.
*
* @param parent org.eclipse.swt.widgets.Composite
*/
protected void createOptionsGroup(Composite parent) {
Composite optionsGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
optionsGroup.setLayout(layout);
fCompressCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fCompressCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.compress.text"));
fCompressCheckbox.addListener(SWT.Selection, this);
fOverwriteCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fOverwriteCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.overwrite.text"));
fOverwriteCheckbox.addListener(SWT.Selection, this);
}
/**
* Answer the contents of the destination specification widget. If this
* value does not have the required suffix then add it first.
*
* @return java.lang.String
*/
protected String getDestinationValue() {
String requiredSuffix= getOutputSuffix();
String destinationText= fDestinationNamesCombo.getText().trim();
if (!destinationText.toLowerCase().endsWith(requiredSuffix.toLowerCase()))
destinationText += requiredSuffix;
return destinationText;
}
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
/**
* Answer the string to display in self as the destination type
*
* @return java.lang.String
*/
protected String getDestinationLabel() {
return JarPackagerMessages.getString("JarPackageWizardPage.destination.label");
}
/**
* Answer the suffix that files exported from this wizard must have.
* If this suffix is a file extension (which is typically the case)
* then it must include the leading period character.
*
* @return java.lang.String
*/
protected String getOutputSuffix() {
return "." + JarPackage.EXTENSION;
}
/**
* Returns an iterator over this page's collection of currently-specified
* elements to be exported. This is the primary element selection facility
* accessor for subclasses.
*
* @return an iterator over the collection of elements currently selected for export
*/
protected Iterator getSelectedResourcesIterator() {
return fInputGroup.getAllCheckedListItems();
}
/**
* Persists resource specification control setting that are to be restored
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* in the next instance of this page. Subclasses wishing to persist
* settings for their controls should extend the hook method
* <code>internalSaveWidgetValues</code>.
*/
public final void saveWidgetValues() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
directoryNames= new String[0];
directoryNames= addToHistory(directoryNames, getDestinationValue());
settings.put(STORE_DESTINATION_NAMES, directoryNames);
settings.put(STORE_EXPORT_CLASS_FILES, fJarPackage.areClassFilesExported());
settings.put(STORE_EXPORT_JAVA_FILES, fJarPackage.areJavaFilesExported());
settings.put(STORE_COMPRESS, fJarPackage.isCompressed());
settings.put(STORE_OVERWRITE, fJarPackage.allowOverwrite());
}
internalSaveWidgetValues();
}
/**
* Hook method for subclasses to persist their settings.
*/
protected void internalSaveWidgetValues() {
}
/**
* Hook method for restoring widget values to the values that they held
* last time this wizard was used to completion.
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
*/
protected void restoreWidgetValues() {
if (!fJarPackage.isUsedToInitialize())
initializeJarPackage();
fExportClassFilesCheckbox.setSelection(fJarPackage.areClassFilesExported());
fExportJavaFilesCheckbox.setSelection(fJarPackage.areJavaFilesExported());
if (fJarPackage.getJarLocation().isEmpty())
fDestinationNamesCombo.setText("");
else
fDestinationNamesCombo.setText(fJarPackage.getJarLocation().toOSString());
IDialogSettings settings= getDialogSettings();
if (settings != null) {
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
return;
if (! fDestinationNamesCombo.getText().equals(directoryNames[0]))
fDestinationNamesCombo.add(fDestinationNamesCombo.getText());
for (int i= 0; i < directoryNames.length; i++)
fDestinationNamesCombo.add(directoryNames[i]);
}
fCompressCheckbox.setSelection(fJarPackage.isCompressed());
fOverwriteCheckbox.setSelection(fJarPackage.allowOverwrite());
}
/**
* Initializes the JAR package from last used wizard page values.
*/
protected void initializeJarPackage() {
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
IDialogSettings settings= getDialogSettings();
if (settings != null) {
fJarPackage.setSelectedElements(getSelectedResources());
fJarPackage.setExportClassFiles(settings.getBoolean(STORE_EXPORT_CLASS_FILES));
fJarPackage.setExportJavaFiles(settings.getBoolean(STORE_EXPORT_JAVA_FILES));
fJarPackage.setCompress(settings.getBoolean(STORE_COMPRESS));
fJarPackage.setOverwrite(settings.getBoolean(STORE_OVERWRITE));
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
return;
fJarPackage.setJarLocation(getPathFromString(directoryNames[0]));
}
}
/**
* Stores the widget values in the JAR package.
*/
protected void updateModel() {
if (getControl() == null)
return;
fJarPackage.setSelectedElements(getSelectedResources());
fJarPackage.setExportClassFiles(fExportClassFilesCheckbox.getSelection());
fJarPackage.setExportJavaFiles(fExportJavaFilesCheckbox.getSelection());
fJarPackage.setJarLocation(getPathFromString(fDestinationNamesCombo.getText()));
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
fJarPackage.setCompress(fCompressCheckbox.getSelection());
fJarPackage.setOverwrite(fOverwriteCheckbox.getSelection());
}
protected IPath getPathFromString(String text) {
return new Path(text).makeAbsolute();
}
/**
* Returns a boolean indicating whether the passed File handle is
* is valid and available for use.
*
* @return boolean
*/
protected boolean ensureTargetFileIsValid(File targetFile) {
if (targetFile.exists() && targetFile.isDirectory()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.exportDestinationMustNotBeDirectory"));
fDestinationNamesCombo.setFocus();
return false;
}
if (targetFile.exists()) {
if (!targetFile.canWrite()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.jarFileExistsAndNotWritable"));
fDestinationNamesCombo.setFocus();
return false;
}
}
return true;
}
/*
* Overrides method from WizardExportPage
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
*/
protected void createDestinationGroup(Composite parent) {
initializeDialogUnits(parent);
Composite destinationSelectionGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
destinationSelectionGroup.setLayout(layout);
destinationSelectionGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
new Label(destinationSelectionGroup, SWT.NONE).setText(getDestinationLabel());
fDestinationNamesCombo= new Combo(destinationSelectionGroup, SWT.SINGLE | SWT.BORDER);
fDestinationNamesCombo.addListener(SWT.Modify, this);
fDestinationNamesCombo.addListener(SWT.Selection, this);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= SIZING_TEXT_FIELD_WIDTH;
fDestinationNamesCombo.setLayoutData(data);
fDestinationBrowseButton= new Button(destinationSelectionGroup, SWT.PUSH);
fDestinationBrowseButton.setText(JarPackagerMessages.getString("JarPackageWizardPage.browseButton.text"));
fDestinationBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
SWTUtil.setButtonDimensionHint(fDestinationBrowseButton);
fDestinationBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleDestinationBrowseButtonPressed();
}
});
}
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
/**
* Open an appropriate destination browser so that the user can specify a source
* to import from
*/
protected void handleDescriptionFileBrowseButtonPressed() {
SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell());
dialog.create();
dialog.getShell().setText(JarPackagerMessages.getString("JarPackageWizardPage.saveAsDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarPackageWizardPage.saveAsDialog.message"));
dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation()));
if (dialog.open() == dialog.OK) {
IPath path= dialog.getResult();
path= path.removeFileExtension().addFileExtension(JarPackage.DESCRIPTION_EXTENSION);
fDescriptionFileText.setText(path.toString());
}
}
/**
* Open an appropriate destination browser so that the user can specify a source
* to import from
*/
protected void handleDestinationBrowseButtonPressed() {
FileDialog dialog= new FileDialog(getContainer().getShell(), SWT.SAVE);
dialog.setFilterExtensions(new String[] {"*.jar"});
String currentSourceString= getDestinationValue();
int lastSeparatorIndex= currentSourceString.lastIndexOf(File.separator);
if (lastSeparatorIndex != -1) {
dialog.setFilterPath(currentSourceString.substring(0, lastSeparatorIndex));
dialog.setFileName(currentSourceString.substring(lastSeparatorIndex + 1, currentSourceString.length()));
}
else
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
dialog.setFileName(currentSourceString);
String selectedFileName= dialog.open();
if (selectedFileName != null) {
IPath path= getPathFromString(selectedFileName);
if (path.lastSegment().equals(getOutputSuffix()))
selectedFileName= "";
fDestinationNamesCombo.setText(selectedFileName);
}
}
/**
* Returns the resource for the specified path.
*
* @param path the path for which the resource should be returned
* @return the resource specified by the path or <code>null</code>
*/
protected IResource findResource(IPath path) {
IWorkspace workspace= JavaPlugin.getWorkspace();
IStatus result= workspace.validatePath(
path.toString(),
IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
if (result.isOK() && workspace.getRoot().exists(path))
return workspace.getRoot().findMember(path);
return null;
}
/**
* Creates the checkbox tree and list for selecting resources.
*
* @param parent the parent control
*/
protected void createInputGroup(Composite parent) {
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
int labelFlags= JavaElementLabelProvider.SHOW_BASICS
| JavaElementLabelProvider.SHOW_OVERLAY_ICONS
| JavaElementLabelProvider.SHOW_SMALL_ICONS;
ITreeContentProvider treeContentProvider=
new JavaElementContentProvider() {
public boolean hasChildren(Object element) {
return !(element instanceof IPackageFragment) && super.hasChildren(element);
}
};
fInputGroup= new CheckboxTreeAndListGroup(
parent,
JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot()),
treeContentProvider,
new JavaElementLabelProvider(labelFlags),
new BaseJavaElementContentProvider(),
new JavaElementLabelProvider(labelFlags),
SWT.NONE,
SIZING_SELECTION_WIDGET_WIDTH,
SIZING_SELECTION_WIDGET_HEIGHT);
fInputGroup.addTreeFilter(new EmptyInnerPackageFilter());
fInputGroup.setTreeSorter(new JavaElementSorter());
fInputGroup.setListSorter(new JavaElementSorter());
fInputGroup.addTreeFilter(new ContainerFilter(ContainerFilter.FILTER_NON_CONTAINERS));
fInputGroup.addTreeFilter(new LibraryFilter());
fInputGroup.addListFilter(new ContainerFilter(ContainerFilter.FILTER_CONTAINERS));
fInputGroup.getTree().addListener(SWT.MouseUp, this);
fInputGroup.getTable().addListener(SWT.MouseUp, this);
}
/**
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Creates the export type controls.
*
* @param parent the parent control
*/
protected void createExportTypeGroup(Composite parent) {
Composite optionsGroup= new Composite(parent, SWT.NONE);
GridLayout optionsLayout= new GridLayout();
optionsLayout.marginHeight= 0;
optionsGroup.setLayout(optionsLayout);
fExportClassFilesCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fExportClassFilesCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.exportClassFiles.text"));
fExportClassFilesCheckbox.addListener(SWT.Selection, this);
fExportJavaFilesCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fExportJavaFilesCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.exportJavaFiles.text"));
fExportJavaFilesCheckbox.addListener(SWT.Selection, this);
}
/**
* Updates the enablements of this page's controls. Subclasses may extend.
*/
protected void updateWidgetEnablements() {
}
/*
* Overrides method from IJarPackageWizardPage
*/
public boolean isPageComplete() {
setErrorMessage(null);
return super.determinePageCompletion();
}
/*
* Implements method from Listener
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
*/
public void handleEvent(Event e) {
if (getControl() == null)
return;
update();
}
protected void update() {
updateModel();
updateWidgetEnablements();
updatePageCompletion();
}
/*
* Overrides method from WizardDataTransferPage
*/
protected boolean validateDestinationGroup() {
if (fDestinationNamesCombo.getText().length() == 0) {
return false;
}
if (fJarPackage.getJarLocation().toString().endsWith("/")) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.exportDestinationMustNotBeDirectory"));
fDestinationNamesCombo.setFocus();
return false;
}
return ensureTargetFileIsValid(fJarPackage.getJarLocation().toFile());
}
/*
* Overrides method from WizardDataTransferPage
*/
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
protected boolean validateOptionsGroup() {
return true;
}
/*
* Overrides method from WizardDataTransferPage
*/
protected boolean validateSourceGroup() {
if (!fExportClassFilesCheckbox.getSelection()
&& !fExportJavaFilesCheckbox.getSelection()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.noExportTypeChecked"));
return false;
}
if (getSelectedResources().size() == 0)
return false;
if (fExportClassFilesCheckbox.getSelection() || !fExportJavaFilesCheckbox.getSelection())
return true;
Iterator iter= getSelectedResourcesIterator();
while (iter.hasNext()) {
if (!(iter.next() instanceof IClassFile))
return true;
}
return false;
}
/*
* Overwrides method from WizardExportPage
*/
protected IPath getResourcePath() {
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
return getPathFromText(fSourceNameField);
}
/**
* Creates a file resource handle for the file with the given workspace path.
* This method does not create the file resource; this is the responsibility
* of <code>createFile</code>.
*
* @param filePath the path of the file resource to create a handle for
* @return the new file resource handle
* @see #createFile
*/
protected IFile createFileHandle(IPath filePath) {
if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2)
return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
else
return null;
}
/**
* Set the current input focus to self's destination entry field
*/
protected void giveFocusToDestination() {
fDestinationNamesCombo.setFocus();
}
/*
* Overrides method from WizardExportResourcePage
*/
protected void setupBasedOnInitialSelections() {
Iterator enum= fInitialSelection.iterator();
while (enum.hasNext()) {
Object selectedElement= enum.next();
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
if (selectedElement instanceof ICompilationUnit || selectedElement instanceof IClassFile || selectedElement instanceof IFile)
fInputGroup.initialCheckListItem(selectedElement);
else
fInputGroup.initialCheckTreeItem(selectedElement);
}
TreeItem[] items= fInputGroup.getTree().getItems();
int i= 0;
while (i < items.length && !items[i].getChecked())
i++;
if (i < items.length) {
fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
fInputGroup.getTree().showSelection();
fInputGroup.populateListViewer(items[i].getData());
}
}
/*
* Implements method from IJarPackageWizardPage.
*/
public void finish() {
saveWidgetValues();
}
/*
* Method declared on IWizardPage.
*/
public void setPreviousPage(IWizardPage page) {
super.setPreviousPage(page);
if (getControl() != null)
updatePageCompletion();
}
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
void setSelectedElementsWithoutContainedChildren() {
Set closure= removeContainedChildren(fInputGroup.getWhiteCheckedTreeItems());
closure.addAll(getExportedNonContainers());
fJarPackage.setSelectedElementsClosure(closure);
}
private Set removeContainedChildren(Set elements) {
Set newList= new HashSet(elements.size());
Set javaElementResources= getCorrespondingContainers(elements);
Iterator iter= elements.iterator();
boolean removedOne= false;
while (iter.hasNext()) {
Object element= iter.next();
Object parent;
if (element instanceof IResource)
parent= ((IResource)element).getParent();
else if (element instanceof IJavaElement) {
parent= ((IJavaElement)element).getParent();
if (parent instanceof IPackageFragmentRoot) {
IPackageFragmentRoot pkgRoot= (IPackageFragmentRoot)parent;
try {
if (pkgRoot.getCorrespondingResource() instanceof IProject)
parent= pkgRoot.getJavaProject();
} catch (JavaModelException ex) {
}
}
}
else {
newList.add(element);
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
continue;
}
if (element instanceof IJavaModel || ((!(parent instanceof IJavaModel)) && (elements.contains(parent) || javaElementResources.contains(parent))))
removedOne= true;
else
newList.add(element);
}
if (removedOne)
return removeContainedChildren(newList);
else
return newList;
}
private Set getExportedNonContainers() {
Set whiteCheckedTreeItems= fInputGroup.getWhiteCheckedTreeItems();
Set exportedNonContainers= new HashSet(whiteCheckedTreeItems.size());
Set javaElementResources= getCorrespondingContainers(whiteCheckedTreeItems);
Iterator iter= fInputGroup.getAllCheckedListItems();
while (iter.hasNext()) {
Object element= iter.next();
Object parent= null;
if (element instanceof IResource)
parent= ((IResource)element).getParent();
else if (element instanceof IJavaElement)
parent= ((IJavaElement)element).getParent();
if (!whiteCheckedTreeItems.contains(parent) && !javaElementResources.contains(parent))
exportedNonContainers.add(element);
}
return exportedNonContainers;
}
/*
|
10,593 |
Bug 10593 Jar export should add ".jar" suffix if not specified
|
Build 20020228 - select some files - export them using the jar export - enter "test" as the jar name - it creates a jar file called "test" It should use "test.jar".
|
verified fixed
|
b9806a6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T15:33:51Z | 2002-03-01T16:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Create a list with the folders / projects that correspond
* to the Java elements (Java project, package, package root)
*/
private Set getCorrespondingContainers(Set elements) {
Set javaElementResources= new HashSet(elements.size());
Iterator iter= elements.iterator();
while (iter.hasNext()) {
Object element= iter.next();
if (element instanceof IJavaElement) {
IJavaElement je= (IJavaElement)element;
int type= je.getElementType();
if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT) {
if (!(type == IJavaElement.PACKAGE_FRAGMENT && ((IPackageFragment)element).isDefaultPackage())) {
Object resource;
try {
resource= je.getCorrespondingResource();
} catch (JavaModelException ex) {
resource= null;
}
if (resource != null)
javaElementResources.add(resource);
}
}
}
}
return javaElementResources;
}
}
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
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.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
/*
* The page for setting the organize import settings
*/
public class ImportOrganizePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
private static final String PREF_IMPORTORDER= JavaUI.ID_PLUGIN + ".importorder";
private static final String PREF_ONDEMANDTHRESHOLD= JavaUI.ID_PLUGIN + ".ondemandthreshold";
private static final String PREF_IGNORELOWERCASE= JavaUI.ID_PLUGIN + ".ignorelowercasenames";
private static final String PREF_LASTLOADPATH= JavaUI.ID_PLUGIN + ".importorder.loadpath";
private static final String PREF_LASTSAVEPATH= JavaUI.ID_PLUGIN + ".importorder.savepath";
public static String[] getImportOrderPreference() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
String str= prefs.getString(PREF_IMPORTORDER);
if (str != null) {
return unpackOrderList(str);
}
return new String[0];
}
private static String[] unpackOrderList(String str) {
StringTokenizer tok= new StringTokenizer(str, ";");
int nTokens= tok.countTokens();
String[] res= new String[nTokens];
for (int i= 0; i < nTokens; i++) {
res[i]= tok.nextToken();
}
return res;
}
private static String packOrderList(List orderList) {
StringBuffer buf= new StringBuffer();
for (int i= 0; i < orderList.size(); i++) {
buf.append((String) orderList.get(i));
buf.append(';');
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
}
return buf.toString();
}
public static int getImportNumberThreshold() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
int threshold= prefs.getInt(PREF_ONDEMANDTHRESHOLD);
if (threshold < 0) {
threshold= Integer.MAX_VALUE;
}
return threshold;
}
public static boolean doIgnoreLowerCaseNames() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
return prefs.getBoolean(PREF_IGNORELOWERCASE);
}
/**
* Initializes the default values of this page in the preference bundle.
* Will be called on startup of the JavaPlugin
*/
public static void initDefaults(IPreferenceStore prefs) {
prefs.setDefault(PREF_IMPORTORDER, "java;javax;com");
prefs.setDefault(PREF_ONDEMANDTHRESHOLD, 99);
}
private static class ImportOrganizeLabelProvider extends LabelProvider {
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
private static final Image PCK_ICON= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_PACKAGE);
public Image getImage(Object element) {
return PCK_ICON;
}
}
private class ImportOrganizeAdapter implements IListAdapter, IDialogFieldListener {
public void customButtonPressed(DialogField field, int index) {
doButtonPressed(index);
}
public void selectionChanged(DialogField field) {
doSelectionChanged();
}
public void dialogFieldChanged(DialogField field) {
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
if (field == fThresholdField) {
doThresholdChanged();
}
}
}
private ListDialogField fOrderListField;
private StringDialogField fThresholdField;
private SelectionButtonDialogField fIgnoreLowerCaseTypesField;
public ImportOrganizePreferencePage() {
super();
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("ImportOrganizePreferencePage.description"));
String[] buttonLabels= new String[] {
JavaUIMessages.getString("ImportOrganizePreferencePage.order.add.button"),
JavaUIMessages.getString("ImportOrganizePreferencePage.order.edit.button"),
null,
JavaUIMessages.getString("ImportOrganizePreferencePage.order.up.button"),
JavaUIMessages.getString("ImportOrganizePreferencePage.order.down.button"),
null,
JavaUIMessages.getString("ImportOrganizePreferencePage.order.remove.button"),
null,
JavaUIMessages.getString("ImportOrganizePreferencePage.order.load.button"),
JavaUIMessages.getString("ImportOrganizePreferencePage.order.save.button")
};
ImportOrganizeAdapter adapter= new ImportOrganizeAdapter();
fOrderListField= new ListDialogField(adapter, buttonLabels, new ImportOrganizeLabelProvider());
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
fOrderListField.setDialogFieldListener(adapter);
fOrderListField.setLabelText(JavaUIMessages.getString("ImportOrganizePreferencePage.order.label"));
fOrderListField.setUpButtonIndex(3);
fOrderListField.setDownButtonIndex(4);
fOrderListField.setRemoveButtonIndex(6);
fOrderListField.enableButton(1, false);
fThresholdField= new StringDialogField();
fThresholdField.setDialogFieldListener(adapter);
fThresholdField.setLabelText(JavaUIMessages.getString("ImportOrganizePreferencePage.threshold.label"));
fIgnoreLowerCaseTypesField= new SelectionButtonDialogField(SWT.CHECK);
fIgnoreLowerCaseTypesField.setLabelText(JavaUIMessages.getString("ImportOrganizePreferencePage.ignoreLowerCase.label"));
}
/**
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.ORGANIZE_IMPORTS_PREFERENCE_PAGE);
}
protected Control createContents(Composite parent) {
initialize(getImportOrderPreference(), getImportNumberThreshold(), doIgnoreLowerCaseNames());
Composite composite= new Composite(parent, SWT.NONE);
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
composite.setLayout(layout);
fOrderListField.doFillIntoGrid(composite, 3);
LayoutUtil.setHorizontalSpan(fOrderListField.getLabelControl(null), 2);
LayoutUtil.setHorizontalGrabbing(fOrderListField.getLabelControl(null));
fThresholdField.doFillIntoGrid(composite, 2);
((GridData) fThresholdField.getTextControl(null).getLayoutData()).grabExcessHorizontalSpace= false;
fIgnoreLowerCaseTypesField.doFillIntoGrid(composite, 2);
return composite;
}
private void initialize(String[] importOrder, int threshold, boolean ignoreLowerCase) {
fOrderListField.removeAllElements();
for (int i= 0; i < importOrder.length; i++) {
fOrderListField.addElement(importOrder[i]);
}
fThresholdField.setText(String.valueOf(threshold));
fIgnoreLowerCaseTypesField.setSelection(ignoreLowerCase);
}
private void doThresholdChanged() {
StatusInfo status= new StatusInfo();
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
String thresholdString= fThresholdField.getText();
try {
int threshold= Integer.parseInt(thresholdString);
if (threshold < 0) {
status.setError(JavaUIMessages.getString("ImportOrganizePreferencePage.error.invalidthreshold"));
}
} catch (NumberFormatException e) {
status.setError(JavaUIMessages.getString("ImportOrganizePreferencePage.error.invalidthreshold"));
}
updateStatus(status);
}
private void doButtonPressed(int index) {
if (index == 0) {
List existing= fOrderListField.getElements();
ImportOrganizeInputDialog dialog= new ImportOrganizeInputDialog(getShell(), existing);
if (dialog.open() == dialog.OK) {
fOrderListField.addElement(dialog.getResult());
}
} else if (index == 1) {
List selected= fOrderListField.getSelectedElements();
if (selected.isEmpty()) {
return;
}
String editedEntry= (String) selected.get(0);
List existing= fOrderListField.getElements();
existing.remove(editedEntry);
ImportOrganizeInputDialog dialog= new ImportOrganizeInputDialog(getShell(), existing);
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
dialog.setInitialString(editedEntry);
if (dialog.open() == dialog.OK) {
fOrderListField.replaceElement(editedEntry, dialog.getResult());
}
} else if (index == 8) {
List order= loadImportOrder();
if (order != null) {
fOrderListField.setElements(order);
}
} else if (index == 9) {
saveImportOrder(fOrderListField.getElements());
}
}
private void doSelectionChanged() {
List selected= fOrderListField.getSelectedElements();
fOrderListField.enableButton(1, selected.size() == 1);
}
/**
* The import order file is a property file with keys
* "0", "1" ... last entry.
* values must be valid package names
*/
private List loadFromProperties(Properties properties) {
ArrayList res= new ArrayList();
int nEntries= properties.size();
for (int i= 0 ; i < nEntries; i++) {
String curr= properties.getProperty(String.valueOf(i));
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
if (curr != null) {
if (JavaConventions.validatePackageName(curr).isOK()) {
res.add(curr);
} else {
return null;
}
} else {
return res;
}
}
return res;
}
private List loadImportOrder() {
FileDialog dialog= new FileDialog(getShell(), SWT.OPEN);
dialog.setText(JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.title")); )
dialog.setFilterExtensions(new String[] {"*.importorder", "*.*"});
String lastPath= getPreferenceStore().getString(PREF_LASTLOADPATH);
if (lastPath != null) {
dialog.setFilterPath(lastPath);
}
String fileName= dialog.open();
if (fileName != null) {
getPreferenceStore().putValue(PREF_LASTLOADPATH, dialog.getFilterPath());
Properties properties= new Properties();
FileInputStream fis= null;
try {
fis= new FileInputStream(fileName);
properties.load(fis);
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
List res= loadFromProperties(properties);
if (res != null) {
return res;
}
} catch (IOException e) {
JavaPlugin.log(e);
} finally {
if (fis != null) {
try { fis.close(); } catch (IOException e) {}
}
}
String title= JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.error.title");
String message= JavaUIMessages.getString("ImportOrganizePreferencePage.loadDialog.error.message");
MessageDialog.openError(getShell(), title, message);
}
return null;
}
private void saveImportOrder(List elements) {
FileDialog dialog= new FileDialog(getShell(), SWT.SAVE);
dialog.setText(JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.title")); )
dialog.setFilterExtensions(new String[] {"*.importorder", "*.*"});
dialog.setFileName("example.importorder");
String lastPath= getPreferenceStore().getString(PREF_LASTSAVEPATH);
if (lastPath != null) {
dialog.setFilterPath(lastPath);
}
String fileName= dialog.open();
if (fileName != null) {
getPreferenceStore().putValue(PREF_LASTSAVEPATH, dialog.getFilterPath());
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
Properties properties= new Properties();
for (int i= 0; i < elements.size(); i++) {
properties.setProperty(String.valueOf(i), (String) elements.get(i));
}
FileOutputStream fos= null;
try {
fos= new FileOutputStream(fileName);
properties.store(fos, "Organize Import Order");
} catch (IOException e) {
JavaPlugin.log(e);
String title= JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.error.title");
String message= JavaUIMessages.getString("ImportOrganizePreferencePage.saveDialog.error.message");
MessageDialog.openError(getShell(), title, message);
} finally {
if (fos != null) {
try { fos.close(); } catch (IOException e) {}
}
}
}
}
public void init(IWorkbench workbench) {
}
private void updateStatus(IStatus status) {
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
/**
|
11,172 |
Bug 11172 organize imports pref page - buttons have incorrect sizes
|
20020307 + latest as in the summary: buttons from the organize imports pref page have incorrect sizes
|
verified fixed
|
b312140
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T16:16:39Z | 2002-03-12T13:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java
|
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
String[] order;
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
String str= prefs.getDefaultString(PREF_IMPORTORDER);
if (str != null) {
order= unpackOrderList(str);
} else {
order= new String[0];
}
int threshold= prefs.getDefaultInt(PREF_ONDEMANDTHRESHOLD);
if (threshold < 0) {
threshold= Integer.MAX_VALUE;
}
boolean ignoreLowerCase= prefs.getDefaultBoolean(PREF_IGNORELOWERCASE);
initialize(order, threshold, ignoreLowerCase);
}
/**
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
prefs.setValue(PREF_IMPORTORDER, packOrderList(fOrderListField.getElements()));
prefs.setValue(PREF_ONDEMANDTHRESHOLD, fThresholdField.getText());
prefs.setValue(PREF_IGNORELOWERCASE, fIgnoreLowerCaseTypesField.isSelected());
return true;
}
}
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.jarpackager;
import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.dialogs.WizardExportResourcesPage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaElementContentProvider;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.packageview.EmptyInnerPackageFilter;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider;
/**
* Page 1 of the JAR Package wizard
*/
public class JarPackageWizardPage extends WizardExportResourcesPage implements IJarPackageWizardPage {
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
private JarPackage fJarPackage;
private IStructuredSelection fInitialSelection;
private CheckboxTreeAndListGroup fInputGroup;
private boolean fFirstTime= true;
private Text fSourceNameField;
private Button fSourceBrowseButton;
private Button fExportClassFilesCheckbox;
private Button fExportJavaFilesCheckbox;
private Combo fDestinationNamesCombo;
private Button fDestinationBrowseButton;
private Button fCompressCheckbox;
private Button fOverwriteCheckbox;
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
private Composite fDescriptionFileGroup;
private Button fSaveDescriptionCheckbox;
private Label fDescriptionFileLabel;
private Text fDescriptionFileText;
private Button fDescriptionFileBrowseButton;
private final static String PAGE_NAME= "JarPackageWizardPage";
private final static String STORE_EXPORT_CLASS_FILES= PAGE_NAME + ".EXPORT_CLASS_FILES";
private final static String STORE_EXPORT_JAVA_FILES= PAGE_NAME + ".EXPORT_JAVA_FILES";
private final static String STORE_DESTINATION_NAMES= PAGE_NAME + ".DESTINATION_NAMES_ID";
private final static String STORE_COMPRESS= PAGE_NAME + ".COMPRESS";
private final static String STORE_OVERWRITE= PAGE_NAME + ".OVERWRITE";
private final static int SIZING_SELECTION_WIDGET_WIDTH= 400;
private final static int SIZING_SELECTION_WIDGET_HEIGHT= 150;
/**
* Create an instance of this class
*/
public JarPackageWizardPage(JarPackage jarPackage, IStructuredSelection selection) {
super(PAGE_NAME, selection);
setTitle(JarPackagerMessages.getString("JarPackageWizardPage.title"));
setDescription(JarPackagerMessages.getString("JarPackageWizardPage.description"));
fJarPackage= jarPackage;
fInitialSelection= selection;
}
/*
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Method declared on IDialogPage.
*/
public void createControl(final Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
composite.setLayoutData(
new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.whatToExport.label"));
createInputGroup(composite);
createExportTypeGroup(composite);
new Label(composite, SWT.NONE);
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.whereToExport.label"));
createDestinationGroup(composite);
createPlainLabel(composite, JarPackagerMessages.getString("JarPackageWizardPage.options.label"));
createOptionsGroup(composite);
restoreResourceSpecificationWidgetValues();
restoreWidgetValues();
if (fInitialSelection != null)
BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {
public void run() {
setupBasedOnInitialSelections();
}
});
setControl(composite);
update();
giveFocusToDestination();
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.JARPACKAGER_WIZARD_PAGE);
}
/**
* Create the export options specification widgets.
*
* @param parent org.eclipse.swt.widgets.Composite
*/
protected void createOptionsGroup(Composite parent) {
Composite optionsGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
optionsGroup.setLayout(layout);
fCompressCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fCompressCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.compress.text"));
fCompressCheckbox.addListener(SWT.Selection, this);
fOverwriteCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fOverwriteCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.overwrite.text"));
fOverwriteCheckbox.addListener(SWT.Selection, this);
}
/**
* Answer the contents of the destination specification widget. If this
* value does not have the required suffix then add it first.
*
* @return java.lang.String
*/
protected String getDestinationValue() {
String destinationText= fDestinationNamesCombo.getText().trim();
if (destinationText.indexOf('.') < 0)
destinationText += getOutputSuffix();
return destinationText;
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
}
/**
* Answer the string to display in self as the destination type
*
* @return java.lang.String
*/
protected String getDestinationLabel() {
return JarPackagerMessages.getString("JarPackageWizardPage.destination.label");
}
/**
* Answer the suffix that files exported from this wizard must have.
* If this suffix is a file extension (which is typically the case)
* then it must include the leading period character.
*
* @return java.lang.String
*/
protected String getOutputSuffix() {
return "." + JarPackage.EXTENSION;
}
/**
* Returns an iterator over this page's collection of currently-specified
* elements to be exported. This is the primary element selection facility
* accessor for subclasses.
*
* @return an iterator over the collection of elements currently selected for export
*/
protected Iterator getSelectedResourcesIterator() {
return fInputGroup.getAllCheckedListItems();
}
/**
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Persists resource specification control setting that are to be restored
* in the next instance of this page. Subclasses wishing to persist
* settings for their controls should extend the hook method
* <code>internalSaveWidgetValues</code>.
*/
public final void saveWidgetValues() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
directoryNames= new String[0];
directoryNames= addToHistory(directoryNames, getDestinationValue());
settings.put(STORE_DESTINATION_NAMES, directoryNames);
settings.put(STORE_EXPORT_CLASS_FILES, fJarPackage.areClassFilesExported());
settings.put(STORE_EXPORT_JAVA_FILES, fJarPackage.areJavaFilesExported());
settings.put(STORE_COMPRESS, fJarPackage.isCompressed());
settings.put(STORE_OVERWRITE, fJarPackage.allowOverwrite());
}
internalSaveWidgetValues();
}
/**
* Hook method for subclasses to persist their settings.
*/
protected void internalSaveWidgetValues() {
}
/**
* Hook method for restoring widget values to the values that they held
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* last time this wizard was used to completion.
*/
protected void restoreWidgetValues() {
if (!fJarPackage.isUsedToInitialize())
initializeJarPackage();
fExportClassFilesCheckbox.setSelection(fJarPackage.areClassFilesExported());
fExportJavaFilesCheckbox.setSelection(fJarPackage.areJavaFilesExported());
if (fJarPackage.getJarLocation().isEmpty())
fDestinationNamesCombo.setText("");
else
fDestinationNamesCombo.setText(fJarPackage.getJarLocation().toOSString());
IDialogSettings settings= getDialogSettings();
if (settings != null) {
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
return;
if (! fDestinationNamesCombo.getText().equals(directoryNames[0]))
fDestinationNamesCombo.add(fDestinationNamesCombo.getText());
for (int i= 0; i < directoryNames.length; i++)
fDestinationNamesCombo.add(directoryNames[i]);
}
fCompressCheckbox.setSelection(fJarPackage.isCompressed());
fOverwriteCheckbox.setSelection(fJarPackage.allowOverwrite());
}
/**
* Initializes the JAR package from last used wizard page values.
*/
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
protected void initializeJarPackage() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
fJarPackage.setSelectedElements(getSelectedResources());
fJarPackage.setExportClassFiles(settings.getBoolean(STORE_EXPORT_CLASS_FILES));
fJarPackage.setExportJavaFiles(settings.getBoolean(STORE_EXPORT_JAVA_FILES));
fJarPackage.setCompress(settings.getBoolean(STORE_COMPRESS));
fJarPackage.setOverwrite(settings.getBoolean(STORE_OVERWRITE));
String[] directoryNames= settings.getArray(STORE_DESTINATION_NAMES);
if (directoryNames == null)
return;
fJarPackage.setJarLocation(getPathFromString(directoryNames[0]));
}
}
/**
* Stores the widget values in the JAR package.
*/
protected void updateModel() {
if (getControl() == null)
return;
fJarPackage.setSelectedElements(getSelectedResources());
fJarPackage.setExportClassFiles(fExportClassFilesCheckbox.getSelection());
fJarPackage.setExportJavaFiles(fExportJavaFilesCheckbox.getSelection());
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
IPath path= getPathFromString(fDestinationNamesCombo.getText());
if (path.segmentCount() > 0 && ensureTargetFileIsValid(path.toFile()) && path.getFileExtension() == null)
path= path.addFileExtension(JarPackage.EXTENSION);
fJarPackage.setJarLocation(path);
fJarPackage.setCompress(fCompressCheckbox.getSelection());
fJarPackage.setOverwrite(fOverwriteCheckbox.getSelection());
}
protected IPath getPathFromString(String text) {
return new Path(text).makeAbsolute();
}
/**
* Returns a boolean indicating whether the passed File handle is
* is valid and available for use.
*
* @return boolean
*/
protected boolean ensureTargetFileIsValid(File targetFile) {
if (targetFile.exists() && targetFile.isDirectory()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.exportDestinationMustNotBeDirectory"));
fDestinationNamesCombo.setFocus();
return false;
}
if (targetFile.exists()) {
if (!targetFile.canWrite()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.jarFileExistsAndNotWritable"));
fDestinationNamesCombo.setFocus();
return false;
}
}
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
return true;
}
/*
* Overrides method from WizardExportPage
*/
protected void createDestinationGroup(Composite parent) {
initializeDialogUnits(parent);
Composite destinationSelectionGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
destinationSelectionGroup.setLayout(layout);
destinationSelectionGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
new Label(destinationSelectionGroup, SWT.NONE).setText(getDestinationLabel());
fDestinationNamesCombo= new Combo(destinationSelectionGroup, SWT.SINGLE | SWT.BORDER);
fDestinationNamesCombo.addListener(SWT.Modify, this);
fDestinationNamesCombo.addListener(SWT.Selection, this);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= SIZING_TEXT_FIELD_WIDTH;
fDestinationNamesCombo.setLayoutData(data);
fDestinationBrowseButton= new Button(destinationSelectionGroup, SWT.PUSH);
fDestinationBrowseButton.setText(JarPackagerMessages.getString("JarPackageWizardPage.browseButton.text"));
fDestinationBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
SWTUtil.setButtonDimensionHint(fDestinationBrowseButton);
fDestinationBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
handleDestinationBrowseButtonPressed();
}
});
}
/**
* Open an appropriate destination browser so that the user can specify a source
* to import from
*/
protected void handleDescriptionFileBrowseButtonPressed() {
SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell());
dialog.create();
dialog.getShell().setText(JarPackagerMessages.getString("JarPackageWizardPage.saveAsDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarPackageWizardPage.saveAsDialog.message"));
dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation()));
if (dialog.open() == dialog.OK) {
IPath path= dialog.getResult();
path= path.removeFileExtension().addFileExtension(JarPackage.DESCRIPTION_EXTENSION);
fDescriptionFileText.setText(path.toString());
}
}
/**
* Open an appropriate destination browser so that the user can specify a source
* to import from
*/
protected void handleDestinationBrowseButtonPressed() {
FileDialog dialog= new FileDialog(getContainer().getShell(), SWT.SAVE);
dialog.setFilterExtensions(new String[] {"*.jar", "*.zip"});
String currentSourceString= getDestinationValue();
int lastSeparatorIndex= currentSourceString.lastIndexOf(File.separator);
if (lastSeparatorIndex != -1) {
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
dialog.setFilterPath(currentSourceString.substring(0, lastSeparatorIndex));
dialog.setFileName(currentSourceString.substring(lastSeparatorIndex + 1, currentSourceString.length()));
}
else
dialog.setFileName(currentSourceString);
String selectedFileName= dialog.open();
if (selectedFileName != null)
fDestinationNamesCombo.setText(selectedFileName);
}
/**
* Returns the resource for the specified path.
*
* @param path the path for which the resource should be returned
* @return the resource specified by the path or <code>null</code>
*/
protected IResource findResource(IPath path) {
IWorkspace workspace= JavaPlugin.getWorkspace();
IStatus result= workspace.validatePath(
path.toString(),
IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
if (result.isOK() && workspace.getRoot().exists(path))
return workspace.getRoot().findMember(path);
return null;
}
/**
* Creates the checkbox tree and list for selecting resources.
*
* @param parent the parent control
*/
protected void createInputGroup(Composite parent) {
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
int labelFlags= JavaElementLabelProvider.SHOW_BASICS
| JavaElementLabelProvider.SHOW_OVERLAY_ICONS
| JavaElementLabelProvider.SHOW_SMALL_ICONS;
ITreeContentProvider treeContentProvider=
new JavaElementContentProvider() {
public boolean hasChildren(Object element) {
return !(element instanceof IPackageFragment) && super.hasChildren(element);
}
};
fInputGroup= new CheckboxTreeAndListGroup(
parent,
JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot()),
treeContentProvider,
new JavaElementLabelProvider(labelFlags),
new BaseJavaElementContentProvider(),
new JavaElementLabelProvider(labelFlags),
SWT.NONE,
SIZING_SELECTION_WIDGET_WIDTH,
SIZING_SELECTION_WIDGET_HEIGHT);
fInputGroup.addTreeFilter(new EmptyInnerPackageFilter());
fInputGroup.setTreeSorter(new JavaElementSorter());
fInputGroup.setListSorter(new JavaElementSorter());
fInputGroup.addTreeFilter(new ContainerFilter(ContainerFilter.FILTER_NON_CONTAINERS));
fInputGroup.addTreeFilter(new LibraryFilter());
fInputGroup.addListFilter(new ContainerFilter(ContainerFilter.FILTER_CONTAINERS));
fInputGroup.getTree().addListener(SWT.MouseUp, this);
fInputGroup.getTable().addListener(SWT.MouseUp, this);
}
/**
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Creates the export type controls.
*
* @param parent the parent control
*/
protected void createExportTypeGroup(Composite parent) {
Composite optionsGroup= new Composite(parent, SWT.NONE);
GridLayout optionsLayout= new GridLayout();
optionsLayout.marginHeight= 0;
optionsGroup.setLayout(optionsLayout);
fExportClassFilesCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fExportClassFilesCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.exportClassFiles.text"));
fExportClassFilesCheckbox.addListener(SWT.Selection, this);
fExportJavaFilesCheckbox= new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
fExportJavaFilesCheckbox.setText(JarPackagerMessages.getString("JarPackageWizardPage.exportJavaFiles.text"));
fExportJavaFilesCheckbox.addListener(SWT.Selection, this);
}
/**
* Updates the enablements of this page's controls. Subclasses may extend.
*/
protected void updateWidgetEnablements() {
}
/*
* Overrides method from IJarPackageWizardPage
*/
public boolean isPageComplete() {
setErrorMessage(null);
return super.determinePageCompletion();
}
/*
* Implements method from Listener
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
*/
public void handleEvent(Event e) {
if (getControl() == null)
return;
update();
}
protected void update() {
updateModel();
updateWidgetEnablements();
updatePageCompletion();
}
/*
* Overrides method from WizardDataTransferPage
*/
protected boolean validateDestinationGroup() {
if (fDestinationNamesCombo.getText().length() == 0) {
return false;
}
if (fJarPackage.getJarLocation().toString().endsWith("/")) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.exportDestinationMustNotBeDirectory"));
fDestinationNamesCombo.setFocus();
return false;
}
return ensureTargetFileIsValid(fJarPackage.getJarLocation().toFile());
}
/*
* Overrides method from WizardDataTransferPage
*/
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
protected boolean validateOptionsGroup() {
return true;
}
/*
* Overrides method from WizardDataTransferPage
*/
protected boolean validateSourceGroup() {
if (!fExportClassFilesCheckbox.getSelection()
&& !fExportJavaFilesCheckbox.getSelection()) {
setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.noExportTypeChecked"));
return false;
}
if (getSelectedResources().size() == 0)
return false;
if (fExportClassFilesCheckbox.getSelection() || !fExportJavaFilesCheckbox.getSelection())
return true;
Iterator iter= getSelectedResourcesIterator();
while (iter.hasNext()) {
if (!(iter.next() instanceof IClassFile))
return true;
}
return false;
}
/*
* Overwrides method from WizardExportPage
*/
protected IPath getResourcePath() {
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
return getPathFromText(fSourceNameField);
}
/**
* Creates a file resource handle for the file with the given workspace path.
* This method does not create the file resource; this is the responsibility
* of <code>createFile</code>.
*
* @param filePath the path of the file resource to create a handle for
* @return the new file resource handle
* @see #createFile
*/
protected IFile createFileHandle(IPath filePath) {
if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2)
return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
else
return null;
}
/**
* Set the current input focus to self's destination entry field
*/
protected void giveFocusToDestination() {
fDestinationNamesCombo.setFocus();
}
/*
* Overrides method from WizardExportResourcePage
*/
protected void setupBasedOnInitialSelections() {
Iterator enum= fInitialSelection.iterator();
while (enum.hasNext()) {
Object selectedElement= enum.next();
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
if (selectedElement instanceof ICompilationUnit || selectedElement instanceof IClassFile || selectedElement instanceof IFile)
fInputGroup.initialCheckListItem(selectedElement);
else
fInputGroup.initialCheckTreeItem(selectedElement);
}
TreeItem[] items= fInputGroup.getTree().getItems();
int i= 0;
while (i < items.length && !items[i].getChecked())
i++;
if (i < items.length) {
fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
fInputGroup.getTree().showSelection();
fInputGroup.populateListViewer(items[i].getData());
}
}
/*
* Implements method from IJarPackageWizardPage.
*/
public void finish() {
saveWidgetValues();
}
/*
* Method declared on IWizardPage.
*/
public void setPreviousPage(IWizardPage page) {
super.setPreviousPage(page);
if (getControl() != null)
updatePageCompletion();
}
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
void setSelectedElementsWithoutContainedChildren() {
Set closure= removeContainedChildren(fInputGroup.getWhiteCheckedTreeItems());
closure.addAll(getExportedNonContainers());
fJarPackage.setSelectedElementsClosure(closure);
}
private Set removeContainedChildren(Set elements) {
Set newList= new HashSet(elements.size());
Set javaElementResources= getCorrespondingContainers(elements);
Iterator iter= elements.iterator();
boolean removedOne= false;
while (iter.hasNext()) {
Object element= iter.next();
Object parent;
if (element instanceof IResource)
parent= ((IResource)element).getParent();
else if (element instanceof IJavaElement) {
parent= ((IJavaElement)element).getParent();
if (parent instanceof IPackageFragmentRoot) {
IPackageFragmentRoot pkgRoot= (IPackageFragmentRoot)parent;
try {
if (pkgRoot.getCorrespondingResource() instanceof IProject)
parent= pkgRoot.getJavaProject();
} catch (JavaModelException ex) {
}
}
}
else {
newList.add(element);
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
continue;
}
if (element instanceof IJavaModel || ((!(parent instanceof IJavaModel)) && (elements.contains(parent) || javaElementResources.contains(parent))))
removedOne= true;
else
newList.add(element);
}
if (removedOne)
return removeContainedChildren(newList);
else
return newList;
}
private Set getExportedNonContainers() {
Set whiteCheckedTreeItems= fInputGroup.getWhiteCheckedTreeItems();
Set exportedNonContainers= new HashSet(whiteCheckedTreeItems.size());
Set javaElementResources= getCorrespondingContainers(whiteCheckedTreeItems);
Iterator iter= fInputGroup.getAllCheckedListItems();
while (iter.hasNext()) {
Object element= iter.next();
Object parent= null;
if (element instanceof IResource)
parent= ((IResource)element).getParent();
else if (element instanceof IJavaElement)
parent= ((IJavaElement)element).getParent();
if (!whiteCheckedTreeItems.contains(parent) && !javaElementResources.contains(parent))
exportedNonContainers.add(element);
}
return exportedNonContainers;
}
/*
|
4,121 |
Bug 4121 JarExporter causes out of Sync (1GILQD5)
|
PA (8/17/01 2:03:29 PM) if you export a directory (project) and place the exported jar in the same directory (project) then you will get an out of sync message when you overwrite the exported jar-file the 2nd time. -> maybe the exported jar file should not include itself ? NOTES:
|
resolved fixed
|
5b22f41
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-12T19:47:43Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWizardPage.java
|
* Create a list with the folders / projects that correspond
* to the Java elements (Java project, package, package root)
*/
private Set getCorrespondingContainers(Set elements) {
Set javaElementResources= new HashSet(elements.size());
Iterator iter= elements.iterator();
while (iter.hasNext()) {
Object element= iter.next();
if (element instanceof IJavaElement) {
IJavaElement je= (IJavaElement)element;
int type= je.getElementType();
if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT) {
if (!(type == IJavaElement.PACKAGE_FRAGMENT && ((IPackageFragment)element).isDefaultPackage())) {
Object resource;
try {
resource= je.getCorrespondingResource();
} catch (JavaModelException ex) {
resource= null;
}
if (resource != null)
javaElementResources.add(resource);
}
}
}
}
return javaElementResources;
}
}
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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;
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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;
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
|
private static final int TYPES= 13;
private static final int CONSTRUCTORS= 14;
private static final int STATIC_INIT= 15;
private static final int STATIC_METHODS= 16;
private static final int INIT= 17;
private static final int METHODS= 18;
private static final int STATIC_FIELDS= 19;
private static final int FIELDS= 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()) {
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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) {
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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;
}
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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);
}
|
11,050 |
Bug 11050 Devide Sorting in two main parts: fields and methodes
|
would it be possible for one of the next releases, to adapt the sorting order of VAJ in the Outline view. I mean, first all attributes, which are sorted alphabeticly, and then all methods which are also sorted alphabeticly. At the moment, there will be make no difference between the attributes and methods, so that the sorting is done over them all together and not divided in two parts: attributes and methods. It would be nice, if that could be done. Thanks Daniel
|
resolved fixed
|
f83fa2a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T15:17:25Z | 2002-03-08T20:40:00Z |
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;
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test13/out/B.java
|
package p;
class B{
public static void m(){
new A.Inner();
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test14/out/B.java
|
package p;
class B{
public static void m(){
new A.Inner();
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test17/out/B.java
|
package p;
class B{
public static void m(){
A.Inner[] i;
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test18/out/B.java
|
package p;
class B{
public static void m(){
A.Inner[] i;
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test19/out/B.java
|
package p;
class B{
public static void m(){
A.Inner[][] i;
}
}
|
11,080 |
Bug 11080 Package statements for nested classes not updated properly
|
If a class that contains references to nested classes of another class in the same package is moved into a different package the automatically inserted package statements unnecessarily include the nested classes explicitely. Instead of: import p1.A The following (illegal) statements are inserted: import p1.A; import p1.A$B; import p1.A$B$C; -- Eric Jain
|
resolved fixed
|
896d24c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-13T17:25:55Z | 2002-03-10T14:20:00Z |
org.eclipse.jdt.ui.tests.refactoring/resources/MoveMembers/test20/out/B.java
|
package p;
class B{
public static void m(){
A.F[] y;
A.F[] ff;
A.F[ ] ff1;
A.F[][] fff;
A.F[][] fff1;
p.A.F[ ][ ] fff2;
}
}
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.preferences.WorkInProgressPreferencePage;
public class JavaElementLabels {
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Method names contain parameter types.
* e.g. <code>foo(int)</code>
*/
public final static int M_PARAMETER_TYPES= 1 << 0;
/**
* Method names contain parameter names.
* e.g. <code>foo(index)</code>
*/
public final static int M_PARAMETER_NAMES= 1 << 1;
/**
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
* Method names contain thrown exceptions.
* e.g. <code>foo throws IOException</code>
*/
public final static int M_EXCEPTIONS= 1 << 2;
/**
* Method names contain return type (appended)
* e.g. <code>foo : int</code>
*/
public final static int M_APP_RETURNTYPE= 1 << 3;
/**
* Method names contain return type (appended)
* e.g. <code>int foo</code>
*/
public final static int M_PRE_RETURNTYPE= 1 << 4;
/**
* Method names are fully qualified.
* e.g. <code>java.util.Vector.size</code>
*/
public final static int M_FULLY_QUALIFIED= 1 << 5;
/**
* Method names are post qualified.
* e.g. <code>size - java.util.Vector</code>
*/
public final static int M_POST_QUALIFIED= 1 << 6;
/**
* Initializer names are fully qualified.
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
* e.g. <code>java.util.Vector.{ ... }</code>
*/
public final static int I_FULLY_QUALIFIED= 1 << 7;
/**
* Type names are post qualified.
* e.g. <code>{ ... } - java.util.Map</code>
*/
public final static int I_POST_QUALIFIED= 1 << 8;
/**
* Field names contain the declared type (appended)
* e.g. <code>int fHello</code>
*/
public final static int F_APP_TYPE_SIGNATURE= 1 << 9;
/**
* Field names contain the declared type (prepended)
* e.g. <code>fHello : int</code>
*/
public final static int F_PRE_TYPE_SIGNATURE= 1 << 10;
/**
* Fields names are fully qualified.
* e.g. <code>java.lang.System.out</code>
*/
public final static int F_FULLY_QUALIFIED= 1 << 11;
/**
* Fields names are post qualified.
* e.g. <code>out - java.lang.System</code>
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
*/
public final static int F_POST_QUALIFIED= 1 << 12;
/**
* Type names are fully qualified.
* e.g. <code>java.util.Map.MapEntry</code>
*/
public final static int T_FULLY_QUALIFIED= 1 << 13;
/**
* Type names are type container qualified.
* e.g. <code>Map.MapEntry</code>
*/
public final static int T_CONTAINER_QUALIFIED= 1 << 14;
/**
* Type names are post qualified.
* e.g. <code>MapEntry - java.util.Map</code>
*/
public final static int T_POST_QUALIFIED= 1 << 15;
/**
* Declarations (import container / declarartion, package declarartion) are qualified.
* e.g. <code>java.util.Vector.class/import container</code>
*/
public final static int D_QUALIFIED= 1 << 16;
/**
* Declarations (import container / declarartion, package declarartion) are post qualified.
* e.g. <code>import container - java.util.Vector.class</code>
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
*/
public final static int D_POST_QUALIFIED= 1 << 17;
/**
* Class file names are fully qualified.
* e.g. <code>java.util.Vector.class</code>
*/
public final static int CF_QUALIFIED= 1 << 18;
/**
* Class file names are post qualified.
* e.g. <code>Vector.class - java.util</code>
*/
public final static int CF_POST_QUALIFIED= 1 << 19;
/**
* Compilation unit names are fully qualified.
* e.g. <code>java.util.Vector.java</code>
*/
public final static int CU_QUALIFIED= 1 << 20;
/**
* Compilation unit names are post qualified.
* e.g. <code>Vector.java - java.util</code>
*/
public final static int CU_POST_QUALIFIED= 1 << 21;
/**
* Package names are qualified.
* e.g. <code>MyProject/src/java.util</code>
*/
public final static int P_QUALIFIED= 1 << 22;
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Package names are post qualified.
* e.g. <code>java.util - MyProject/src</code>
*/
public final static int P_POST_QUALIFIED= 1 << 23;
/**
* Package Fragment Roots contain variable name if from a variable.
* e.g. <code>JRE_LIB - c:\java\lib\rt.jar</code>
*/
public final static int ROOT_VARIABLE= 1 << 24;
/**
* Package Fragment Roots contain the project name if not an archive (prepended).
* e.g. <code>MyProject/src</code>
*/
public final static int ROOT_QUALIFIED= 1 << 25;
/**
* Package Fragment Roots contain the project name if not an archive (appended).
* e.g. <code>src - MyProject</code>
*/
public final static int ROOT_POST_QUALIFIED= 1 << 26;
/**
* Add root path to all elements except Package Fragment Roots and Java projects.
* e.g. <code>java.lang.Vector - c:\java\lib\rt.jar</code>
* Option only applies to getElementLabel
*/
public final static int APPEND_ROOT_PATH= 1 << 27;
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Add root path to all elements except Package Fragment Roots and Java projects.
* e.g. <code>java.lang.Vector - c:\java\lib\rt.jar</code>
* Option only applies to getElementLabel
*/
public final static int PREPEND_ROOT_PATH= 1 << 28;
/**
* Package names are compressed.
* e.g. <code>o*.e*.search</code>
*/
public final static int P_COMPRESSED= 1 << 29;
/**
* Qualify all elements
*/
public final static int ALL_FULLY_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED | P_QUALIFIED | ROOT_QUALIFIED;
/**
* Post qualify all elements
*/
public final static int ALL_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED | P_POST_QUALIFIED | ROOT_POST_QUALIFIED;
/**
* Default options (M_PARAMETER_TYPES enabled)
*/
public final static int ALL_DEFAULT= M_PARAMETER_TYPES;
/**
* Default qualify options (All except Root and Package)
*/
public final static int DEFAULT_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED;
/**
* Default post qualify options (All except Root and Package)
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
*/
public final static int DEFAULT_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED;
private final static String CONCAT_STRING= JavaUIMessages.getString("JavaElementLabels.concat_string");
private final static String COMMA_STRING= JavaUIMessages.getString("JavaElementLabels.comma_string");
private final static String DECL_STRING= JavaUIMessages.getString("JavaElementLabels.declseparator_string");
/*
* Package name compression
*/
private static String fgPkgNamePattern= "";
private static String fgPkgNamePrefix;
private static String fgPkgNamePostfix;
private static int fgPkgNameChars;
private JavaElementLabels() {
}
private static boolean getFlag(int flags, int flag) {
return (flags & flag) != 0;
}
public static String getTextLabel(Object obj, int flags) {
if (obj instanceof IJavaElement) {
return getElementLabel((IJavaElement) obj, flags);
} else if (obj instanceof IAdaptable) {
IWorkbenchAdapter wbadapter= (IWorkbenchAdapter) ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
if (wbadapter != null) {
return wbadapter.getLabel(obj);
}
}
return "";
}
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Returns the label for a Java element. Flags as defined above.
*/
public static String getElementLabel(IJavaElement element, int flags) {
StringBuffer buf= new StringBuffer();
getElementLabel(element, flags, buf);
return buf.toString();
}
/**
* Returns the label for a Java element. Flags as defined above.
*/
public static void getElementLabel(IJavaElement element, int flags, StringBuffer buf) {
int type= element.getElementType();
IPackageFragmentRoot root= null;
if (type != IJavaElement.JAVA_MODEL && type != IJavaElement.JAVA_PROJECT && type != IJavaElement.PACKAGE_FRAGMENT_ROOT)
root= JavaModelUtil.getPackageFragmentRoot(element);
if (root != null && getFlag(flags, PREPEND_ROOT_PATH)) {
getPackageFragmentRootLabel(root, ROOT_QUALIFIED, buf);
buf.append(CONCAT_STRING);
}
switch (type) {
case IJavaElement.METHOD:
getMethodLabel((IMethod) element, flags, buf);
break;
case IJavaElement.FIELD:
getFieldLabel((IField) element, flags, buf);
break;
case IJavaElement.INITIALIZER:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.