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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/** * Indicates an item which has been reused. At the point of * its reuse it has been expanded. This field is used to * communicate between <code>internalExpandToLevel</code> and * <code>reuseTreeItem</code>. */ private Item fReusedExpandedItem; public JavaOutlineViewer(Tree tree) { super(tree); setAutoExpandLevel(ALL_LEVELS); } /** * Investigates the given element change event and if affected incrementally * updates the outline. */ public void reconcile(IJavaElementDelta delta) { if (getSorter() == null) { Widget w= findItem(fInput); if (w != null) update(w, delta); } else { refresh(); } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/* * @see TreeViewer#internalExpandToLevel */ protected void internalExpandToLevel(Widget node, int level) { if (node instanceof Item) { Item i= (Item) node; if (i.getData() instanceof IJavaElement) { IJavaElement je= (IJavaElement) i.getData(); if (je.getElementType() == IJavaElement.IMPORT_CONTAINER || isInnerType(je)) { if (i != fReusedExpandedItem) { setExpanded(i, false); return; } } } } super.internalExpandToLevel(node, level); } protected void reuseTreeItem(Item item, Object element) { Item[] c= getChildren(item); if (c != null && c.length > 0) { if (getExpanded(item)) fReusedExpandedItem= item; for (int k= 0; k < c.length; k++) { if (c[k].getData() != null)
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
disassociate(c[k]); c[k].dispose(); } } updateItem(item, element); updatePlus(item, element); internalExpandToLevel(item, ALL_LEVELS); fReusedExpandedItem= null; } /* * @see TreeViewer#createTreeItem */ protected void createTreeItem(Widget parent, Object element, int ix) { Item[] children= getChildren(parent); boolean expand= (parent instanceof Item && (children == null || children.length == 0)); Item item= newItem(parent, SWT.NULL, ix); updateItem(item, element); updatePlus(item, element); if (expand) setExpanded((Item) parent, true); internalExpandToLevel(item, ALL_LEVELS); } protected boolean mustUpdateParent(IJavaElementDelta delta, IJavaElement element) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if (element instanceof IMethod) { if ((delta.getKind() & IJavaElementDelta.ADDED) != 0) { try { return JavaModelUtil.isMainMethod((IMethod)element); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } return "main".equals(element.getElementName()); } return false; } protected ISourceRange getSourceRange(IJavaElement element) throws JavaModelException { if (element instanceof IMember) return ((IMember) element).getNameRange(); if (element instanceof ISourceReference) return ((ISourceReference) element).getSourceRange(); return null; } protected boolean overlaps(ISourceRange range, int start, int end) { return start <= (range.getOffset() + range.getLength() - 1) && range.getOffset() <= end; } protected boolean filtered(IJavaElement parent, IJavaElement child) { Object[] result= new Object[] { child }; ViewerFilter[] filters= getFilters(); for (int i= 0; i < filters.length; i++) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
result= filters[i].filter(this, parent, result); if (result.length == 0) return true; } return false; } protected void update(Widget w, IJavaElementDelta delta) { Item item; IJavaElement parent= delta.getElement(); IJavaElementDelta[] affected= delta.getAffectedChildren(); Item[] children= getChildren(w); boolean doUpdateParent= false; Vector deletions= new Vector(); Vector additions= new Vector(); for (int i= 0; i < affected.length; i++) { IJavaElementDelta affectedDelta= affected[i]; IJavaElement affectedElement= affectedDelta.getElement(); int status= affected[i].getKind(); int j; for (j= 0; j < children.length; j++) if (affectedElement.equals(children[j].getData())) break; if (j == children.length) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
if ((status & IJavaElementDelta.CHANGED) != 0 && (affectedDelta.getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 && !filtered(parent, affectedElement)) { additions.addElement(affectedDelta); } continue; } item= children[j]; if ((status & IJavaElementDelta.REMOVED) != 0) { deletions.addElement(item); doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement); } else if ((status & IJavaElementDelta.CHANGED) != 0) { int change= affectedDelta.getFlags(); doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement); if ((change & IJavaElementDelta.F_MODIFIERS) != 0) { if (filtered(parent, affectedElement)) deletions.addElement(item); else updateItem(item, affectedElement); } if ((change & IJavaElementDelta.F_CONTENT) != 0) updateItem(item, affectedElement); if ((change & IJavaElementDelta.F_CHILDREN) != 0)
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
update(item, affectedDelta); } } IJavaElementDelta[] add= delta.getAddedChildren(); if (additions.size() > 0) { IJavaElementDelta[] tmp= new IJavaElementDelta[add.length + additions.size()]; System.arraycopy(add, 0, tmp, 0, add.length); for (int i= 0; i < additions.size(); i++) tmp[i + add.length]= (IJavaElementDelta) additions.elementAt(i); add= tmp; } go2: for (int i= 0; i < add.length; i++) { try { IJavaElement e= add[i].getElement(); if (filtered(parent, e)) continue go2; doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e); ISourceRange rng= getSourceRange(e); int start= rng.getOffset(); int end= start + rng.getLength() - 1; Item last= null; item= null;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
children= getChildren(w); for (int j= 0; j < children.length; j++) { item= children[j]; IJavaElement r= (IJavaElement) item.getData(); if (r == null) { continue go2; } try { rng= getSourceRange(r); if (overlaps(rng, start, end)) { reuseTreeItem(item, e); continue go2; } else if (rng.getOffset() > start) { if (last != null && deletions.contains(last)) { deletions.removeElement(last); reuseTreeItem(last, (Object) e); } else { createTreeItem(w, (Object) e, j);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
} continue go2; } } catch (JavaModelException x) { } last= item; } if (last != null && deletions.contains(last)) { deletions.removeElement(last); reuseTreeItem(last, e); } else { createTreeItem(w, e, -1); } } catch (JavaModelException x) { } } Enumeration e= deletions.elements(); while (e.hasMoreElements()) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
item= (Item) e.nextElement(); disassociate(item); item.dispose(); } if (doUpdateParent) updateItem(w, delta.getElement()); } }; class LexicalSortingAction extends Action { private JavaElementSorter fSorter= new JavaElementSorter(); public LexicalSortingAction() { super(); setText(JavaEditorMessages.getString("JavaOutlinePage.Sort.label")); JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean("LexicalSortingAction.isChecked"); valueChanged(checked, false); } public void run() { valueChanged(isChecked(), true); } private void valueChanged(boolean on, boolean store) { setChecked(on); fOutlineViewer.setSorter(on ? fSorter : null);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
setToolTipText(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.unchecked")); setDescription(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.description.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.description.unchecked")); if (store) JavaPlugin.getDefault().getPreferenceStore().setValue("LexicalSortingAction.isChecked", on); } }; private IJavaElement fInput; private String fContextMenuID; private Menu fMenu; private JavaOutlineViewer fOutlineViewer; private JavaEditor fEditor; private MemberFilterActionGroup fMemberFilterActionGroup; private ListenerList fSelectionChangedListeners= new ListenerList(); private Hashtable fActions= new Hashtable(); private ContextMenuGroup[] fActionGroups; public JavaOutlinePage(String contextMenuID, JavaEditor editor) { super(); Assert.isNotNull(editor); fContextMenuID= contextMenuID; fEditor= editor; }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/* * @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener) */ public void addSelectionChangedListener(ISelectionChangedListener listener) { if (fOutlineViewer != null) fOutlineViewer.addSelectionChangedListener(listener); else fSelectionChangedListeners.add(listener); } /* * @see ISelectionProvider#removeSelectionChangedListener(ISelectionChangedListener) */ public void removeSelectionChangedListener(ISelectionChangedListener listener) { if (fOutlineViewer != null) fOutlineViewer.removeSelectionChangedListener(listener); else fSelectionChangedListeners.remove(listener); } /* * @see ISelectionProvider#setSelection(ISelection) */ public void setSelection(ISelection selection) { if (fOutlineViewer != null) fOutlineViewer.setSelection(selection); } /* * @see ISelectionProvider#getSelection()
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
*/ public ISelection getSelection() { if (fOutlineViewer == null) return StructuredSelection.EMPTY; return fOutlineViewer.getSelection(); } private void registerToolbarActions() { IToolBarManager toolBarManager= getSite().getActionBars().getToolBarManager(); if (toolBarManager != null) { Action action= new LexicalSortingAction(); toolBarManager.add(action); fMemberFilterActionGroup= new MemberFilterActionGroup(fOutlineViewer, "JavaOutlineViewer"); fMemberFilterActionGroup.contributeToToolBar(toolBarManager); } } /* * @see IPage#createControl */ public void createControl(Composite parent) { Tree tree= new Tree(parent, SWT.MULTI); StandardJavaUILabelProvider lprovider= new StandardJavaUILabelProvider( StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE, StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS, StandardJavaUILabelProvider.getAdornmentProviders(true, new OverrideAdornmentProvider())
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
); fOutlineViewer= new JavaOutlineViewer(tree); fOutlineViewer.setContentProvider(new ChildrenProvider()); fOutlineViewer.setLabelProvider(new DecoratingLabelProvider( lprovider, fEditor.getSite().getDecoratorManager())); Object[] listeners= fSelectionChangedListeners.getListeners(); for (int i= 0; i < listeners.length; i++) { fSelectionChangedListeners.remove(listeners[i]); fOutlineViewer.addSelectionChangedListener((ISelectionChangedListener) listeners[i]); } MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID); manager.setRemoveAllWhenShown(true); manager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { contextMenuAboutToShow(manager); } }); fMenu= manager.createContextMenu(tree); tree.setMenu(fMenu); getSite().registerContextMenu(JavaPlugin.getDefault().getPluginId() + ".outline", manager, fOutlineViewer); getSite().setSelectionProvider(fOutlineViewer); IStatusLineManager statusLineManager= getSite().getActionBars().getStatusLineManager(); if (statusLineManager != null) { StatusBarUpdater updater= new StatusBarUpdater(statusLineManager); fOutlineViewer.addSelectionChangedListener(updater); }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
registerToolbarActions(); fActionGroups= new ContextMenuGroup[] { new GenerateGroup(), new JavaSearchGroup(), new ReorgGroup() }; ReorgGroup.addGlobalReorgActions(getSite().getActionBars(), fOutlineViewer); fOutlineViewer.setInput(fInput); fOutlineViewer.getControl().addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { handleKeyPressed(e); } }); } public void dispose() { if (fEditor == null) return; fEditor.outlinePageClosed(); fEditor= null; Object[] listeners= fSelectionChangedListeners.getListeners(); for (int i= 0; i < listeners.length; i++) fSelectionChangedListeners.remove(listeners[i]); fSelectionChangedListeners= null; if (fMenu != null && !fMenu.isDisposed()) { fMenu.dispose(); fMenu= null; }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
super.dispose(); } public Control getControl() { if (fOutlineViewer != null) return fOutlineViewer.getControl(); return null; } public void setInput(IJavaElement inputElement) { fInput= inputElement; if (fOutlineViewer != null) fOutlineViewer.setInput(fInput); } public void select(ISourceReference reference) { if (fOutlineViewer != null) { ISelection s= fOutlineViewer.getSelection(); if (s instanceof IStructuredSelection) { IStructuredSelection ss= (IStructuredSelection) s; List elements= ss.toList(); if (!elements.contains(reference)) { s= (reference == null ? StructuredSelection.EMPTY : new StructuredSelection(reference)); fOutlineViewer.setSelection(s, true); } } } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
public void setAction(String actionID, IAction action) { Assert.isNotNull(actionID); if (action == null) fActions.remove(actionID); else fActions.put(actionID, action); } public IAction getAction(String actionID) { Assert.isNotNull(actionID); return (IAction) fActions.get(actionID); } /** * Convenience method to add the action installed under the given actionID to the * specified group of the menu. */ protected void addAction(IMenuManager menu, String group, String actionID) { IAction action= getAction(actionID); if (action != null) { if (action instanceof IUpdate) ((IUpdate) action).update(); if (action.isEnabled()) { IMenuManager subMenu= menu.findMenuUsingPath(group); if (subMenu != null) subMenu.add(action); else menu.appendToGroup(group, action);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
} } } private void addRefactoring(IMenuManager menu){ MenuManager refactoring= new MenuManager(JavaEditorMessages.getString("JavaOutlinePage.ContextMenu.refactoring.label")); ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, fOutlineViewer); if (!refactoring.isEmpty()) menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring); } private void addOpenPerspectiveItem(IMenuManager menu) { ISelection s= getSelection(); if (s.isEmpty() || ! (s instanceof IStructuredSelection)) return; IStructuredSelection selection= (IStructuredSelection)s; if (selection.size() != 1) return; Object element= selection.getFirstElement(); if (!(element instanceof IType)) return; IType[] input= {(IType)element}; IWorkbenchWindow w= getSite().getWorkbenchWindow(); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, new OpenHierarchyAction(w, input)); } protected void contextMenuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); if (OrganizeImportsAction.canActionBeAdded(getSelection())) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "OrganizeImports"); } addAction(menu, IContextMenuConstants.GROUP_OPEN, "OpenImportDeclaration"); addAction(menu, IContextMenuConstants.GROUP_SHOW, "ShowInPackageView"); ContextMenuGroup.add(menu, fActionGroups, fOutlineViewer); addRefactoring(menu); addOpenPerspectiveItem(menu); } /* * @see Page#setFocus() */ public void setFocus() { if (fOutlineViewer != null) fOutlineViewer.getControl().setFocus(); } /** * Checkes whether a given Java element is an inner type. */ private boolean isInnerType(IJavaElement element) { if (element.getElementType() == IJavaElement.TYPE) { IJavaElement parent= element.getParent(); int type= parent.getElementType(); return (type != IJavaElement.COMPILATION_UNIT && type != IJavaElement.CLASS_FILE); }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
return false; } /** * Handles key events in viewer. */ private void handleKeyPressed(KeyEvent event) { if (event.stateMask != 0) return; IAction action= null; if (event.character == SWT.DEL) { action= getAction("DeleteElement"); if (action instanceof IRefactoringAction){ ((IRefactoringAction)action).update(); if (! action.isEnabled()) return; } } else if (event.keyCode == SWT.F4) { OpenTypeHierarchyUtil.open(getSelection(), fEditor.getSite().getWorkbenchWindow()); } if (action != null && action.isEnabled()) action.run(); } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.packageview; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSource; import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tree; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
import org.eclipse.jface.viewers.ILabelDecorator; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeViewerListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeExpansionEvent; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener; import org.eclipse.ui.IViewPart; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.actions.AddBookmarkAction; import org.eclipse.ui.actions.NewWizardMenu; import org.eclipse.ui.actions.OpenPerspectiveMenu; import org.eclipse.ui.actions.OpenWithMenu; import org.eclipse.ui.actions.RefreshAction; import org.eclipse.ui.dialogs.PropertyDialogAction; import org.eclipse.ui.part.ISetSelectionTarget; import org.eclipse.ui.part.ResourceTransfer;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.views.internal.framelist.BackAction; import org.eclipse.ui.views.internal.framelist.ForwardAction; import org.eclipse.ui.views.internal.framelist.FrameList; import org.eclipse.ui.views.internal.framelist.GoIntoAction; import org.eclipse.ui.views.internal.framelist.UpAction; import org.eclipse.search.ui.IWorkingSet; import org.eclipse.search.ui.SearchUI; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModel; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IOpenable; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.IWorkingCopy; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.IPackagesViewPart; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter; import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer; import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter; import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener; import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput; import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput; import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.refactoring.actions.IRefactoringAction; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup; import org.eclipse.jdt.internal.ui.reorg.ReorgGroup; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.JavaUIHelp; import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.MemberFilterActionGroup; import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer; import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; /** * The ViewPart for the ProjectExplorer. It listens to part activation events. * When selection linking with the editor is enabled the view selection tracks * the active editor page. Similarly when a resource is selected in the packages * view the corresponding editor is activated. */ public class PackageExplorerPart extends ViewPart implements ISetSelectionTarget, IMenuListener, IPackagesViewPart, IPropertyChangeListener { public final static String VIEW_ID= JavaUI.ID_PACKAGES;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
static final String TAG_SELECTION= "selection"; static final String TAG_EXPANDED= "expanded"; static final String TAG_ELEMENT= "element"; static final String TAG_PATH= "path"; static final String TAG_VERTICAL_POSITION= "verticalPosition"; static final String TAG_HORIZONTAL_POSITION= "horizontalPosition"; static final String TAG_FILTERS = "filters"; static final String TAG_FILTER = "filter"; static final String TAG_SHOWLIBRARIES = "showLibraries"; static final String TAG_SHOWBINARIES = "showBinaries"; static final String TAG_WORKINGSET = "workingset"; private JavaElementPatternFilter fPatternFilter= new JavaElementPatternFilter(); private LibraryFilter fLibraryFilter= new LibraryFilter(); private BinaryProjectFilter fBinaryFilter= new BinaryProjectFilter(); private WorkingSetFilter fWorkingSetFilter= new WorkingSetFilter(); private MemberFilterActionGroup fMemberFilterActionGroup; private ProblemTreeViewer fViewer; private StandardJavaUILabelProvider fJavaElementLabelProvider; private PackagesFrameSource fFrameSource; private FrameList fFrameList; private ContextMenuGroup[] fStandardGroups; private Menu fContextMenu; private OpenResourceAction fOpenCUAction; private Action fOpenToAction; private Action fShowTypeHierarchyAction; private Action fShowNavigatorAction; private PropertyDialogAction fPropertyDialogAction; private IRefactoringAction fDeleteAction;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
private RefreshAction fRefreshAction; private BackAction fBackAction; private ForwardAction fForwardAction; private GoIntoAction fZoomInAction; private UpAction fUpAction; private GotoTypeAction fGotoTypeAction; private GotoPackageAction fGotoPackageAction; private AddBookmarkAction fAddBookmarkAction; private FilterSelectionAction fFilterAction; private ShowLibrariesAction fShowLibrariesAction; private ShowBinariesAction fShowBinariesAction; private FilterWorkingSetAction fFilterWorkingSetAction; private RemoveWorkingSetFilterAction fRemoveWorkingSetAction; private IMemento fMemento; private ISelectionChangedListener fSelectionListener; private IPartListener fPartListener= new IPartListener() { public void partActivated(IWorkbenchPart part) { if (part instanceof IEditorPart) editorActivated((IEditorPart) part); } public void partBroughtToTop(IWorkbenchPart part) { } public void partClosed(IWorkbenchPart part) { } public void partDeactivated(IWorkbenchPart part) { } public void partOpened(IWorkbenchPart part) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
} }; private ITreeViewerListener fExpansionListener= new ITreeViewerListener() { public void treeCollapsed(TreeExpansionEvent event) { } public void treeExpanded(TreeExpansionEvent event) { Object element= event.getElement(); if (element instanceof ICompilationUnit || element instanceof IClassFile) expandMainType(element); } }; public PackageExplorerPart() { } /* (non-Javadoc) * Method declared on IViewPart. */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); fMemento= memento; } /** * Initializes the default preferences */ public static void initDefaults(IPreferenceStore store) { store.setDefault(TAG_SHOWLIBRARIES, true);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
store.setDefault(TAG_SHOWBINARIES, true); } /** * Returns the package explorer part of the active perspective. If * there isn't any package explorer part <code>null</code> is returned. */ public static PackageExplorerPart getFromActivePerspective() { IViewPart view= JavaPlugin.getActivePage().findView(VIEW_ID); if (view instanceof PackageExplorerPart) return (PackageExplorerPart)view; return null; } /** * Makes the package explorer part visible in the active perspective. If there * isn't a package explorer part registered <code>null</code> is returned. * Otherwise the opened view part is returned. */ public static PackageExplorerPart openInActivePerspective() { try { return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID); } catch(PartInitException pe) { return null; } } public void dispose() { if (fViewer != null) JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fViewer); if (fContextMenu != null && !fContextMenu.isDisposed())
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
fContextMenu.dispose(); getSite().getPage().removePartListener(fPartListener); JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this); if (fViewer != null) fViewer.removeTreeListener(fExpansionListener); super.dispose(); } /** * Implementation of IWorkbenchPart.createPartControl(Composite) */ public void createPartControl(Composite parent) { fViewer= new ProblemTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); boolean showCUChildren= JavaBasePreferencePage.showCompilationUnitChildren(); fViewer.setContentProvider(new JavaElementContentProvider(showCUChildren, false)); JavaPlugin.getDefault().getProblemMarkerManager().addListener(fViewer); JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); fJavaElementLabelProvider= new StandardJavaUILabelProvider( StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED, StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS, StandardJavaUILabelProvider.getAdornmentProviders(true, null) ); fViewer.setLabelProvider(new DecoratingLabelProvider( fJavaElementLabelProvider, getViewSite().getDecoratorManager()) ); fViewer.setSorter(new JavaElementSorter());
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
fViewer.addFilter(new EmptyInnerPackageFilter()); fViewer.setUseHashlookup(true); fViewer.addFilter(fPatternFilter); fViewer.addFilter(fLibraryFilter); fMemberFilterActionGroup= new MemberFilterActionGroup(fViewer, "PackageView"); fViewer.addFilter(fWorkingSetFilter); if(fMemento != null) restoreFilters(); else initFilterFromPreferences(); fViewer.setInput(findInputElement()); initDragAndDrop(); initFrameList(); initKeyListener(); updateTitle(); MenuManager menuMgr= new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(this); fContextMenu= menuMgr.createContextMenu(fViewer.getTree()); fViewer.getTree().setMenu(fContextMenu); getSite().registerContextMenu(menuMgr, fViewer); makeActions();
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
fSelectionListener= new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { handleSelectionChanged(event); } }; fViewer.addSelectionChangedListener(fSelectionListener); fViewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { handleDoubleClick(event); } }); getSite().setSelectionProvider(fViewer); getSite().getPage().addPartListener(fPartListener); IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager(); fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager)); fViewer.addTreeListener(fExpansionListener); if (fMemento != null) restoreState(fMemento); fMemento= null; JavaUIHelp.setHelp(fViewer, IJavaHelpContextIds.PACKAGES_VIEW); fillActionBars(); } private void fillActionBars() { IActionBars actionBars= getViewSite().getActionBars(); IToolBarManager toolBar= actionBars.getToolBarManager(); fillToolBar(toolBar);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
actionBars.updateActionBars(); IMenuManager menu= actionBars.getMenuManager(); menu.add(fFilterAction); menu.add(fShowLibrariesAction); menu.add(fFilterWorkingSetAction); menu.add(fRemoveWorkingSetAction); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end")); } private void fillToolBar(IToolBarManager toolBar) { toolBar.removeAll(); toolBar.add(fBackAction); toolBar.add(fForwardAction); toolBar.add(fUpAction); if (JavaBasePreferencePage.showCompilationUnitChildren()) { toolBar.add(new Separator()); fMemberFilterActionGroup.contributeToToolBar(toolBar); } } private Object findInputElement() { Object input= getSite().getPage().getInput(); if (input instanceof IWorkspace) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
return JavaCore.create(((IWorkspace)input).getRoot()); } else if (input instanceof IContainer) { return JavaCore.create((IContainer)input); } return JavaCore.create(JavaPlugin.getWorkspace().getRoot()); } /** * Answer the property defined by key. */ public Object getAdapter(Class key) { if (key.equals(ISelectionProvider.class)) return fViewer; return super.getAdapter(key); } /** * Returns the tool tip text for the given element. */ String getToolTipText(Object element) { String result; if (!(element instanceof IResource)) { result= JavaElementLabels.getTextLabel(element, StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS); } else { IPath path= ((IResource) element).getFullPath(); if (path.isRoot()) { result= PackagesMessages.getString("PackageExplorer.title"); } else {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
result= path.makeRelative().toString(); } } IWorkingSet ws= fWorkingSetFilter.getWorkingSet(); if (ws == null) return result; String wsstr= "Working Set: "+ws.getName(); if (result.length() == 0) return wsstr; return result + " - " + wsstr; } public String getTitleToolTip() { if (fViewer == null) return super.getTitleToolTip(); return getToolTipText(fViewer.getInput()); } /** * @see IWorkbenchPart#setFocus() */ public void setFocus() { fViewer.getTree().setFocus(); } /** * Sets the working set to be used for filtering this part */ public void setWorkingSet(IWorkingSet ws) { fWorkingSetFilter.setWorkingSet(ws); firePropertyChange(IWorkbenchPart.PROP_TITLE);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
fFilterWorkingSetAction.setChecked(ws != null); fRemoveWorkingSetAction.setEnabled(ws != null); } /** * Returns the shell to use for opening dialogs. * Used in this class, and in the actions. */ private Shell getShell() { return fViewer.getTree().getShell(); } /** * Returns the selection provider. */ private ISelectionProvider getSelectionProvider() { return fViewer; } /** * Returns the current selection. */ private ISelection getSelection() { return fViewer.getSelection(); } /** * Called when the context menu is about to open. Override * to add your own context dependent menu contributions.
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
*/ public void menuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection(); Object element= selection.getFirstElement(); fPropertyDialogAction.selectionChanged(selection); MenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new")); menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false); if (selection.size() == 1 && fViewer.isExpandable(element)) menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, fZoomInAction); addGotoMenu(menu); fOpenCUAction.update(); if (fOpenCUAction.isEnabled()) menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenCUAction); addOpenWithMenu(menu, selection); addOpenToMenu(menu, selection); addRefactoring(menu); ContextMenuGroup.add(menu, fStandardGroups, fViewer); if (onlyFilesSelected(selection)) { menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddBookmarkAction); fAddBookmarkAction.selectionChanged(selection); } menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, fRefreshAction); fRefreshAction.selectionChanged(selection);
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
menu.add(new Separator()); if (fPropertyDialogAction.isApplicableForSelection()) menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fPropertyDialogAction); } void addGotoMenu(IMenuManager menu) { MenuManager gotoMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.gotoTitle")); menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, gotoMenu); gotoMenu.add(fBackAction); gotoMenu.add(fForwardAction); gotoMenu.add(fUpAction); gotoMenu.add(fGotoTypeAction); gotoMenu.add(fGotoPackageAction); } private boolean onlyFilesSelected(IStructuredSelection selection) { if (selection.isEmpty()) return false; for (Iterator enum= selection.iterator(); enum.hasNext();) { Object o= enum.next(); if (o instanceof IFile) continue; if (o instanceof IAdaptable) { Object resource= ((IAdaptable)o).getAdapter(IResource.class); if (!(resource instanceof IFile)) return false; } else { return false; } } return true; }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
private void makeActions() { ISelectionProvider provider= getSelectionProvider(); fOpenCUAction= new OpenResourceAction(provider); fPropertyDialogAction= new PropertyDialogAction(getShell(), provider); fShowNavigatorAction= new ShowInNavigatorAction(provider); fAddBookmarkAction= new AddBookmarkAction(getShell()); fStandardGroups= new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup(), new GenerateGroup(), new JavaSearchGroup() }; fDeleteAction= ReorgGroup.createDeleteAction(provider); fRefreshAction= new RefreshAction(getShell()); fFilterAction = new FilterSelectionAction(getShell(), this, PackagesMessages.getString("PackageExplorer.filters")); fShowLibrariesAction = new ShowLibrariesAction(this, PackagesMessages.getString("PackageExplorer.referencedLibs")); fShowBinariesAction = new ShowBinariesAction(getShell(), this, PackagesMessages.getString("PackageExplorer.binaryProjects")); fFilterWorkingSetAction = new FilterWorkingSetAction(getShell(), this, "Filter Working Set..."); fRemoveWorkingSetAction = new RemoveWorkingSetFilterAction(getShell(), this, "Remove Working Set Filter"); fBackAction= new BackAction(fFrameList); fForwardAction= new ForwardAction(fFrameList); fZoomInAction= new GoIntoAction(fFrameList); fUpAction= new UpAction(fFrameList); fGotoTypeAction= new GotoTypeAction(this); fGotoPackageAction= new GotoPackageAction(this); IActionBars actionService= getViewSite().getActionBars();
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
actionService.setGlobalActionHandler(IWorkbenchActionConstants.DELETE, fDeleteAction); ReorgGroup.addGlobalReorgActions(actionService, getSelectionProvider()); } private void addRefactoring(IMenuManager menu){ MenuManager refactoring= new MenuManager(PackagesMessages.getString("PackageExplorer.refactoringTitle")); ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, fViewer); if (!refactoring.isEmpty()) menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring); } private void addOpenToMenu(IMenuManager menu, IStructuredSelection selection) { if (selection.size() != 1) return; IAdaptable element= (IAdaptable) selection.getFirstElement(); IResource resource= (IResource)element.getAdapter(IResource.class); if ((resource instanceof IContainer)) { MenuManager submenu = new MenuManager(PackagesMessages.getString("PackageExplorer.openPerspective")); submenu.add(new OpenPerspectiveMenu(getSite().getWorkbenchWindow(), resource)); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu); } OpenTypeHierarchyUtil.addToMenu(getSite().getWorkbenchWindow(), menu, element); } private void addOpenWithMenu(IMenuManager menu, IStructuredSelection selection) { if (selection.size() != 1) return;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
IAdaptable element= (IAdaptable)selection.getFirstElement(); Object resource= element.getAdapter(IResource.class); if (!(resource instanceof IFile)) return; MenuManager submenu= new MenuManager(PackagesMessages.getString("PackageExplorer.openWith")); submenu.add(new OpenWithMenu(getSite().getPage(), (IFile) resource)); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu); } private boolean isSelectionOfType(ISelection s, Class clazz, boolean considerUnderlyingResource) { if (! (s instanceof IStructuredSelection) || s.isEmpty()) return false; IStructuredSelection selection= (IStructuredSelection)s; Iterator iter= selection.iterator(); while (iter.hasNext()) { Object o= iter.next(); if (clazz.isInstance(o)) return true; if (considerUnderlyingResource) { if (! (o instanceof IJavaElement)) return false; IJavaElement element= (IJavaElement)o; Object resource= element.getAdapter(IResource.class); if (! clazz.isInstance(resource)) return false; } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
return true; } private void initDragAndDrop() { int ops= DND.DROP_COPY | DND.DROP_MOVE; final LocalSelectionTransfer lt= LocalSelectionTransfer.getInstance(); Transfer[] transfers= new Transfer[] { lt, ResourceTransfer.getInstance(), FileTransfer.getInstance()}; TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] { new SelectionTransferDropAdapter(fViewer), new FileTransferDropAdapter(fViewer) }; fViewer.addDropSupport(ops, transfers, new DelegatingDropAdapter(dropListeners)); Control control= fViewer.getControl(); TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] { new SelectionTransferDragAdapter(fViewer), new ResourceTransferDragAdapter(fViewer), new FileTransferDragAdapter(fViewer) }; DragSource source= new DragSource(control, ops); source.addDragListener(new DelegatingDragAdapter(dragListeners));
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
} /** * Handles double clicks in viewer. * Opens editor if file double-clicked. */ private void handleDoubleClick(DoubleClickEvent event) { IStructuredSelection s= (IStructuredSelection) event.getSelection(); Object element= s.getFirstElement(); if (fOpenCUAction.isEnabled()) { fOpenCUAction.run(); return; } if (fViewer.isExpandable(element)) { if (JavaBasePreferencePage.doubleClickGoesInto()) { if (element instanceof IOpenable && !(element instanceof ICompilationUnit) && !(element instanceof IClassFile)) { fZoomInAction.run(); } } else { fViewer.setExpandedState(element, !fViewer.getExpandedState(element)); } } } /** * Handles selection changed in viewer.
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
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(); } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Table; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IMemento; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.actions.OpenJavaElementAction; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.JavaUIHelp; import org.eclipse.jdt.internal.ui.util.SelectionUtil; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider; import org.eclipse.jdt.internal.ui.viewsupport.MemberFilterActionGroup; import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer; import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider; /** * Method viewer shows a list of methods of a input type. * Offers filter actions. * No dependency to the type hierarchy view */ public class MethodsViewer extends ProblemTableViewer {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
private static final String TAG_SHOWINHERITED= "showinherited"; private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll"; private static final int LABEL_BASEFLAGS= StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS; private MemberFilterActionGroup fMemberFilterActionGroup; private JavaUILabelProvider fLabelProvider; private OpenJavaElementAction fOpen; private ShowInheritedMembersAction fShowInheritedMembersAction; private ContextMenuGroup[] fStandardGroups;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
public MethodsViewer(Composite parent, TypeHierarchyLifeCycle lifeCycle, IWorkbenchPart part) { super(new Table(parent, SWT.MULTI)); fLabelProvider= new StandardJavaUILabelProvider( StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS, StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS, StandardJavaUILabelProvider.getAdornmentProviders(true, new HierarchyAdornmentProvider(lifeCycle)) ); setLabelProvider(new DecoratingLabelProvider(fLabelProvider, part.getSite().getDecoratorManager())); setContentProvider(new MethodsContentProvider(lifeCycle)); fOpen= new OpenJavaElementAction(this); addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { fOpen.run(); } }); fMemberFilterActionGroup= new MemberFilterActionGroup(this, "HierarchyMethodView"); fShowInheritedMembersAction= new ShowInheritedMembersAction(this, false); showInheritedMethods(false); fStandardGroups= new ContextMenuGroup[] { new JavaSearchGroup(), new GenerateGroup() };
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
setSorter(new JavaElementSorter()); JavaUIHelp.setHelp(this, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW); } /** * Show inherited methods */ public void showInheritedMethods(boolean on) { MethodsContentProvider cprovider= (MethodsContentProvider) getContentProvider(); try { getTable().setRedraw(false); cprovider.showInheritedMethods(on); fShowInheritedMembersAction.setChecked(on); if (fLabelProvider != null) { if (on) { fLabelProvider.setTextFlags(fLabelProvider.getTextFlags() | JavaElementLabels.ALL_POST_QUALIFIED); } else { fLabelProvider.setTextFlags(fLabelProvider.getTextFlags() & (-1 ^ JavaElementLabels.ALL_POST_QUALIFIED)); } refresh(); } } catch (JavaModelException e) { ExceptionHandler.handle(e, getControl().getShell(), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.title"), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.message")); } finally { getTable().setRedraw(true); } } /*
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
* @see Viewer#inputChanged(Object, Object) */ protected void inputChanged(Object input, Object oldInput) { super.inputChanged(input, oldInput); } /** * Returns <code>true</code> if inherited methods are shown. */ public boolean isShowInheritedMethods() { return ((MethodsContentProvider) getContentProvider()).isShowInheritedMethods(); } /** * Saves the state of the filter actions */ public void saveState(IMemento memento) { fMemberFilterActionGroup.saveState(memento); memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods())); ScrollBar bar= getTable().getVerticalBar(); int position= bar != null ? bar.getSelection() : 0; memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position)); } /** * Restores the state of the filter actions */ public void restoreState(IMemento memento) { fMemberFilterActionGroup.restoreState(memento); boolean set= Boolean.valueOf(memento.getString(TAG_SHOWINHERITED)).booleanValue();
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
showInheritedMethods(set); ScrollBar bar= getTable().getVerticalBar(); if (bar != null) { Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL); if (vScroll != null) { bar.setSelection(vScroll.intValue()); } } } /** * Attaches a contextmenu listener to the table */ public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getTable()); getTable().setMenu(menu); viewSite.registerContextMenu(popupId, menuMgr, this); } /** * Fills up the context menu with items for the method viewer * Should be called by the creator of the context menu */ public void contributeToContextMenu(IMenuManager menu) { if (fOpen.canActionBeAdded()) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen); } ContextMenuGroup.add(menu, fStandardGroups, this); } /** * Fills up the tool bar with items for the method viewer * Should be called by the creator of the tool bar */ public void contributeToToolBar(ToolBarManager tbm) { tbm.add(fShowInheritedMembersAction); tbm.add(new Separator()); fMemberFilterActionGroup.contributeToToolBar(tbm); } /* * @see StructuredViewer#handleInvalidSelection(ISelection, ISelection) */ protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection) { List oldSelections= SelectionUtil.toList(invalidSelection); List newSelections= SelectionUtil.toList(newSelection); if (!oldSelections.isEmpty()) { ArrayList newSelectionElements= new ArrayList(newSelections); try { Object[] currElements= getFilteredChildren(getInput()); for (int i= 0; i < oldSelections.size(); i++) { Object curr= oldSelections.get(i); if (curr instanceof IMethod && !newSelections.contains(curr)) { IMethod method= (IMethod) curr; if (method.exists()) {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java
IMethod similar= findSimilarMethod(method, currElements); if (similar != null) { newSelectionElements.add(similar); } } } } newSelection= new StructuredSelection(newSelectionElements); } catch (JavaModelException e) { JavaPlugin.log(e); } } setSelection(newSelection); updateSelection(newSelection); } private IMethod findSimilarMethod(IMethod meth, Object[] elements) throws JavaModelException { String name= meth.getElementName(); String[] paramTypes= meth.getParameterTypes(); boolean isConstructor= meth.isConstructor(); for (int i= 0; i < elements.length; i++) { Object curr= elements[i]; if (curr instanceof IMethod && JavaModelUtil.isSameMethodSignature(name, paramTypes, isConstructor, (IMethod) curr)) { return (IMethod) curr; } } return null; } }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import org.eclipse.swt.SWT;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Tree; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.actions.GenerateGroup; import org.eclipse.jdt.internal.ui.actions.OpenJavaElementAction; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.JavaUIHelp; import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer; import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider; import org.eclipse.jdt.internal.ui.wizards.NewGroup; public abstract class TypeHierarchyViewer extends ProblemTreeViewer {
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
private OpenJavaElementAction fOpen; private ContextMenuGroup[] fStandardGroups; public TypeHierarchyViewer(Composite parent, IContentProvider contentProvider, TypeHierarchyLifeCycle lifeCycle, IWorkbenchPart part) { super(new Tree(parent, SWT.SINGLE)); ILabelProvider baseLProvider= new StandardJavaUILabelProvider( StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS, StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS, StandardJavaUILabelProvider.getAdornmentProviders(true, new HierarchyAdornmentProvider(lifeCycle)) ); setLabelProvider(new DecoratingLabelProvider(baseLProvider, part.getSite().getDecoratorManager())); setContentProvider(contentProvider); setSorter(new ViewerSorter() { public boolean isSorterProperty(Object element, Object property) { return true; } public int category(Object element) { if (element instanceof IType) { try { return (((IType)element).isInterface()) ? 2 : 1; } catch (JavaModelException e) { } } else if (element instanceof IMember) { return 0; } return 3;
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
} }); fOpen= new OpenJavaElementAction(this); addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { fOpen.run(); } }); fStandardGroups= new ContextMenuGroup[] { new JavaSearchGroup(), new NewGroup(), new GenerateGroup() }; JavaUIHelp.setHelp(this, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW); } /** * Attaches a contextmenu listener to the tree */ public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getTree()); getTree().setMenu(menu); viewSite.registerContextMenu(popupId, menuMgr, this); } /** * Fills up the context menu with items for the hierarchy viewer * Should be called by the creator of the context menu
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
*/ public void contributeToContextMenu(IMenuManager menu) { if (fOpen.canActionBeAdded()) { menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen); } ContextMenuGroup.add(menu, fStandardGroups, this); } /** * Set the member filter */ public void setMemberFilter(IMember[] memberFilter) { TypeHierarchyContentProvider contentProvider= getHierarchyContentProvider(); if (contentProvider != null) { contentProvider.setMemberFilter(memberFilter); } } /** * Returns if method filtering is enabled. */ public boolean isMethodFiltering() { TypeHierarchyContentProvider contentProvider= getHierarchyContentProvider(); if (contentProvider != null) { return contentProvider.getMemberFilter() != null; } return false; } /**
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
* Returns true if the hierarchy contains elements. Returns one of them * With member filtering it is possible that no elements are visible */ public Object containsElements() { TypeHierarchyContentProvider contentProvider= getHierarchyContentProvider(); if (contentProvider != null) { Object[] elements= contentProvider.getElements(null); if (elements.length > 0) { return elements[0]; } } return null; } /** * Returns true if the hierarchy contains elements. Returns one of them * With member filtering it is possible that no elements are visible */ public IType getTreeRootType() { TypeHierarchyContentProvider contentProvider= getHierarchyContentProvider(); if (contentProvider != null) { Object[] elements= contentProvider.getElements(null); if (elements.length > 0 && elements[0] instanceof IType) { return (IType) elements[0]; } } return null; }
11,748
Bug 11748 switch to new DecoratorManager API
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
resolved fixed
1035d37
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T16:58:55Z
2002-03-19T23:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
/** * Returns true if the hierarchy contains element the element. */ public boolean isElementShown(Object element) { return findItem(element) != null; } /** * Updates the content of this viewer: refresh and expanding the tree in the way wanted. */ public abstract void updateContent(); /** * Returns the title for the current view */ public abstract String getTitle(); /* * @see StructuredViewer#setContentProvider * Content provider must be of type TypeHierarchyContentProvider */ public void setContentProvider(IContentProvider cp) { Assert.isTrue(cp instanceof TypeHierarchyContentProvider); super.setContentProvider(cp); } protected TypeHierarchyContentProvider getHierarchyContentProvider() { return (TypeHierarchyContentProvider)getContentProvider(); } }
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.jarpackager; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.Manifest; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IncrementalProjectBuilder;
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.operation.ModalContext; import org.eclipse.jface.util.Assert; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.xml.sax.SAXException; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; 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.JavaStatusConstants; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; /** * Operation for exporting a resource and its children to a new JAR file. */ public class JarFileExportOperation implements IRunnableWithProgress { private JarWriter fJarWriter;
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
private JarPackage fJarPackage; private IFile[] fDescriptionFiles; private Shell fParentShell; private Map fJavaNameToClassFilesMap; private IContainer fClassFilesMapContainer; private MultiStatus fProblems; /** * Creates an instance of this class. * * @param jarPackage the JAR package specification * @param parent the parent for the dialog, * or <code>null</code> if no dialog should be presented */ public JarFileExportOperation(JarPackage jarPackage, Shell parent) { this(parent); fJarPackage= jarPackage; } /** * Creates an instance of this class. * * @param descriptions an array with JAR package descriptions * @param parent the parent for the dialog, * or <code>null</code> if no dialog should be presented */ public JarFileExportOperation(IFile[] descriptions, Shell parent) { this(parent); fDescriptionFiles= descriptions; } /**
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* Adds a new warning to the list with the passed information. * Normally the export operation continues after a warning. * @param message the message * @param exception the throwable that caused the warning, or <code>null</code> */ private JarFileExportOperation(Shell parent) { fParentShell= parent; fProblems= new MultiStatus(JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, JarPackagerMessages.getString("JarFileExportOperation.exportFinishedWithWarnings"), null); } protected void addWarning(String message, Throwable error) { if (fJarPackage == null || fJarPackage.logWarnings()) fProblems.add(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, message, error)); } /** * Adds a new error to the list with the passed information. * Normally an error terminates the export operation. * @param message the message * @param exception the throwable that caused the error, or <code>null</code> */ protected void addError(String message, Throwable error) { if (fJarPackage == null || fJarPackage.logErrors()) fProblems.add(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, message, error)); } /** * Answers the number of file resources specified by the JAR package. * * @return int */ protected int countSelectedElements() { int count= 0;
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
Iterator iter= fJarPackage.getSelectedElements().iterator(); while (iter.hasNext()) { Object element= iter.next(); IResource resource= null; if (element instanceof IJavaElement) { IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return count; } } else resource= (IResource)element; if (resource.getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)resource); } return count; } private int getTotalChildCount(IContainer container) { IResource[] members; try { members= container.members(); } catch (CoreException ex) { return 0; }
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
int count= 0; for (int i= 0; i < members.length; i++) { if (members[i].getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)members[i]); } return count; } /** * Exports the passed resource to the JAR file * * @param element the resource or JavaElement to export */ protected void exportElement(Object element, IProgressMonitor progressMonitor) throws InterruptedException { int leadSegmentsToRemove= 1; IPackageFragmentRoot pkgRoot= null; boolean isInJavaProject= false; IResource resource= null; IJavaProject jProject= null; if (element instanceof IJavaElement) { isInJavaProject= true; IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return; } jProject= je.getJavaProject();
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
pkgRoot= JavaModelUtil.getPackageFragmentRoot(je); } else resource= (IResource)element; if (!resource.isAccessible()) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotFound", resource.getFullPath()), null); return; } if (resource.getType() == IResource.FILE) { if (!resource.isLocal(IResource.DEPTH_ZERO)) try { resource.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotLocal", resource.getFullPath()), ex); return; } if (!isInJavaProject) { try { isInJavaProject= resource.getProject().hasNature(JavaCore.NATURE_ID); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.projectNatureNotDeterminable", resource.getFullPath()), ex); return; } if (isInJavaProject) { jProject= JavaCore.create(resource.getProject()); try { IPackageFragment pkgFragment= jProject.findPackageFragment(resource.getFullPath().removeLastSegments(1)); if (pkgFragment != null) pkgRoot= JavaModelUtil.getPackageFragmentRoot(pkgFragment);
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
else pkgRoot= jProject.findPackageFragmentRoot(resource.getFullPath().removeLastSegments(1)); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.javaPackageNotDeterminable", resource.getFullPath()), ex); return; } } } if (pkgRoot != null) { leadSegmentsToRemove= pkgRoot.getPath().segmentCount(); if (fJarPackage.useSourceFolderHierarchy()&& !pkgRoot.getElementName().equals(pkgRoot.DEFAULT_PACKAGEROOT_PATH)) leadSegmentsToRemove--; } IPath destinationPath= resource.getFullPath().removeFirstSegments(leadSegmentsToRemove); boolean isInOutputFolder= false; if (isInJavaProject) { try { isInOutputFolder= jProject.getOutputLocation().isPrefixOf(resource.getFullPath()); } catch (JavaModelException ex) { isInOutputFolder= false; } } exportClassFiles(progressMonitor, pkgRoot, resource, jProject, destinationPath); exportResource(progressMonitor, pkgRoot, isInJavaProject, resource, destinationPath, isInOutputFolder); progressMonitor.worked(1); ModalContext.checkCanceled(progressMonitor);
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} else if (element instanceof IPackageFragment) exportPackageFragment(progressMonitor, (IPackageFragment)element); else exportContainer(progressMonitor, resource); } private void exportPackageFragment(IProgressMonitor progressMonitor, IPackageFragment pkgFragment) throws java.lang.InterruptedException { Object[] children; try { children= pkgFragment.getChildren(); for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); children= pkgFragment.getNonJavaResources(); for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); } catch (CoreException e) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringExport", pkgFragment.toString()), e); } } private void exportContainer(IProgressMonitor progressMonitor, IResource resource) throws java.lang.InterruptedException { IResource[] children= null; try { children= ((IContainer) resource).members(); } catch (CoreException e) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringExport", resource.getFullPath()), e); } for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); }
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
private void exportResource(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, boolean isInJavaProject, IResource resource, IPath destinationPath, boolean isInOutputFolder) { boolean isNonJavaResource= !isInJavaProject || (pkgRoot == null && !isInOutputFolder); boolean isInClassFolder= false; try { isInClassFolder= pkgRoot != null && !pkgRoot.isArchive() && pkgRoot.getKind() == pkgRoot.K_BINARY; } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.cantGetRootKind", resource.getFullPath()), ex); } if ((fJarPackage.areClassFilesExported() && ((isNonJavaResource || (pkgRoot != null && !isJavaFile(resource) && !isClassFile(resource))) || isInClassFolder && isClassFile(resource))) || (fJarPackage.areJavaFilesExported() && (isNonJavaResource || (pkgRoot != null && !isClassFile(resource))))) { try { progressMonitor.subTask(JarPackagerMessages.getFormattedString("JarFileExportOperation.exporting", destinationPath.toString())); fJarWriter.write((IFile) resource, destinationPath); } catch (IOException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringExport", resource.getFullPath()); addWarning(message , ex); } catch (CoreException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.coreErrorDuringExport", resource.getFullPath()); addWarning(message, ex); } } } private void exportClassFiles(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, IResource resource, IJavaProject jProject, IPath destinationPath) { if (fJarPackage.areClassFilesExported() && isJavaFile(resource) && pkgRoot != null) {
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
try { Iterator iter= filesOnClasspath((IFile)resource, destinationPath, jProject, progressMonitor); IPath baseDestinationPath= destinationPath.removeLastSegments(1); while (iter.hasNext()) { IFile file= (IFile)iter.next(); if (!resource.isLocal(IResource.DEPTH_ZERO)) file.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); IPath classFilePath= baseDestinationPath.append(file.getName()); progressMonitor.subTask(JarPackagerMessages.getFormattedString("JarFileExportOperation.exporting", classFilePath.toString())); fJarWriter.write(file, classFilePath); } } catch (IOException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringExport", resource.getFullPath()); addWarning(message , ex); } catch (CoreException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.coreErrorDuringExport", resource.getFullPath()); addWarning(message, ex); } } } /** * Exports the resources as specified by the JAR package. */ protected void exportSelectedElements(IProgressMonitor progressMonitor) throws InterruptedException { Iterator iter= fJarPackage.getSelectedElements().iterator();
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
while (iter.hasNext()) exportElement(iter.next(), progressMonitor); } /** * Returns an iterator on a list with files that correspond to the * passed file and that are on the classpath of its project. * * @param file the file for which to find the corresponding classpath resources * @param pathInJar the path that the file has in the JAR (i.e. project and source folder segments removed) * @param javaProject the javaProject that contains the file * @return the iterator over the corresponding classpath files for the given file */ protected Iterator filesOnClasspath(IFile file, IPath pathInJar, IJavaProject javaProject, IProgressMonitor progressMonitor) throws CoreException { IPath outputPath= javaProject.getOutputLocation(); IContainer outputContainer; if (javaProject.getProject().getFullPath().equals(outputPath)) outputContainer= javaProject.getProject(); else { outputContainer= createFolderHandle(outputPath); if (outputContainer == null || !outputContainer.isAccessible()) { String msg= JarPackagerMessages.getString("JarFileExportOperation.outputContainerNotAccessible"); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } } if (isJavaFile(file)) { boolean hasErrors= fJarPackage.hasCompileErrors(file); boolean hasWarnings= fJarPackage.hasCompileWarnings(file); boolean canBeExported= canBeExported(hasErrors, hasWarnings); if (!canBeExported)
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
return Collections.EMPTY_LIST.iterator(); reportPossibleCompileProblems(file, hasErrors, hasWarnings, canBeExported); IContainer classContainer= outputContainer; if (pathInJar.segmentCount() > 1) classContainer= outputContainer.getFolder(pathInJar.removeLastSegments(1)); if (fClassFilesMapContainer == null || !fClassFilesMapContainer.equals(classContainer)) { fJavaNameToClassFilesMap= buildJavaToClassMap(classContainer); fClassFilesMapContainer= classContainer; } ArrayList classFiles= (ArrayList)fJavaNameToClassFilesMap.get(file.getName()); if (classFiles == null || classFiles.isEmpty()) { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileOnClasspathNotAccessible", file.getFullPath()); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } return classFiles.iterator(); } else { List binaryFiles= new ArrayList(1); IFile cpFile= outputContainer.getFile(pathInJar); if (cpFile.isAccessible()) { if (!cpFile.isLocal(IResource.DEPTH_ZERO)) cpFile.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); binaryFiles.add(cpFile); } else { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceOnCasspathNotAccessible", cpFile.getFullPath()); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } return binaryFiles.iterator();
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} } /** * Answers whether the given resource is a Java file. * The resource must be a file whose file name ends with ".java". * * @return a <code>true<code> if the given resource is a Java file */ boolean isJavaFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("java"); } /** * Answers whether the given resource is a class file. * The resource must be a file whose file name ends with ".class". * * @return a <code>true<code> if the given resource is a class file */ boolean isClassFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("class"); } /* * Builds and returns a map that has the class files * for each java file in a given directory */
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
private Map buildJavaToClassMap(IContainer container) throws CoreException { if (container == null || !container.isAccessible()) return new HashMap(0); /* * XXX: Bug 6584: Need a way to get class files for a java file (or CU) */ org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfReader; IResource[] members= container.members(); Map map= new HashMap(members.length); for (int i= 0; i < members.length; i++) { if (isClassFile(members[i])) { IFile classFile= (IFile)members[i]; try { cfReader= org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(classFile.getLocation().toFile()); } catch (org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.invalidClassFileFormat", classFile.getLocation().toFile()), ex); continue; } catch (IOException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringClassFileLookup", classFile.getLocation().toFile()), ex); continue; } if (cfReader != null) { if (cfReader.sourceFileName() == null) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileWithoutSourceFileAttribute", classFile.getLocation().toFile()), null); continue; } String javaName= new String(cfReader.sourceFileName()); Object classFiles= map.get(javaName); if (classFiles == null) { classFiles= new ArrayList(3);
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
map.put(javaName, classFiles); } ((ArrayList)classFiles).add(classFile); } } } return map; } /** * Creates a file resource handle for the file with the given workspace path. * This method does not create the file resource; this is the responsibility * of <code>createFile</code>. * * @param filePath the path of the file resource to create a handle for * @return the new file resource handle * @see #createFile */ protected IFile createFileHandle(IPath filePath) { if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(filePath); else return null; } /** * Creates a folder resource handle for the folder with the given workspace path. * * @param folderPath the path of the folder to create a handle for * @return the new folder resource handle */ protected IFolder createFolderHandle(IPath folderPath) {
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
if (folderPath.isValidPath(folderPath.toString()) && folderPath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFolder(folderPath); else return null; } /** * Returns the status of this operation. * If there were any errors, the result is a status object containing * individual status objects for each error. * If there were no errors, the result is a status object with error code <code>OK</code>. * * @return the status of this operation */ public IStatus getStatus() { if (fProblems.getSeverity() == IStatus.ERROR) { String message= null; if (fDescriptionFiles != null && fDescriptionFiles.length > 1) message= JarPackagerMessages.getString("JarFileExportOperation.creationOfSomeJARsFailed"); else message= JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailed"); return new MultiStatus(JavaPlugin.getPluginId(), 0, fProblems.getChildren(), message, null); } return fProblems; } /** * Answer a boolean indicating whether the passed child is a descendant * of one or more members of the passed resources collection * * @param resources a List contain potential parents
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* @param child the resource to test * @return a <code>boolean</code> indicating if the child is a descendant */ protected boolean isDescendant(List resources, IResource child) { if (child.getType() == IResource.PROJECT) return false; IResource parent= child.getParent(); if (resources.contains(parent)) return true; return isDescendant(resources, parent); } protected boolean canBeExported(boolean hasErrors, boolean hasWarnings) throws CoreException { return (!hasErrors && !hasWarnings) || (hasErrors && fJarPackage.exportErrors()) || (hasWarnings && fJarPackage.exportWarnings()); } protected void reportPossibleCompileProblems(IFile file, boolean hasErrors, boolean hasWarnings, boolean canBeExported) { if (hasErrors) { if (canBeExported) addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileErrors", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileErrors", file.getFullPath()), null); } if (hasWarnings) { if (canBeExported) addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileWarnings", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileWarnings", file.getFullPath()), null); } }
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
/** * Exports the resources as specified by the JAR package. * * @param progressMonitor the progress monitor that displays the progress * @see #getStatus() */ public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { if (fJarPackage != null) singleRun(progressMonitor); else { int jarCount= fDescriptionFiles.length; progressMonitor.beginTask("", jarCount); try { for (int i= 0; i < jarCount; i++) { SubProgressMonitor subProgressMonitor= new SubProgressMonitor(progressMonitor, 1); fJarPackage= readJarPackage(fDescriptionFiles[i]); if (fJarPackage != null) singleRun(subProgressMonitor); } } finally { progressMonitor.done(); } } } public void singleRun(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { try { if (!preconditionsOK()) throw new InvocationTargetException(null, JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailedSeeDetails")); int totalWork= countSelectedElements(); if (!isAutoBuilding() && fJarPackage.isBuildingIfNeeded()) {
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
int subMonitorTicks= totalWork/10; totalWork += subMonitorTicks; progressMonitor.beginTask("", totalWork); SubProgressMonitor subProgressMonitor= new SubProgressMonitor(progressMonitor, subMonitorTicks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK); buildProjects(subProgressMonitor); } else progressMonitor.beginTask("", totalWork); fJarWriter= new JarWriter(fJarPackage, fParentShell); exportSelectedElements(progressMonitor); if (getStatus().getSeverity() != IStatus.ERROR) { progressMonitor.subTask(JarPackagerMessages.getString("JarFileExportOperation.savingFiles")); saveFiles(); } } catch (IOException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFle", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message); } catch (CoreException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFileDueToInvalidManifest", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message); } finally { try { if (fJarWriter != null) fJarWriter.close(); } catch (IOException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCloseJarFile", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message);
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} progressMonitor.done(); } } protected boolean preconditionsOK() { if (!fJarPackage.areClassFilesExported() && !fJarPackage.areJavaFilesExported()) { addError(JarPackagerMessages.getString("JarFileExportOperation.noExportTypeChosen"), null); return false; } if (fJarPackage.getSelectedElements() == null || fJarPackage.getSelectedElements().size() == 0) { addError(JarPackagerMessages.getString("JarFileExportOperation.noResourcesSelected"), null); return false; } if (fJarPackage.getJarLocation() == null) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidJarLocation"), null); return false; } if (!fJarPackage.doesManifestExist()) { addError(JarPackagerMessages.getString("JarFileExportOperation.manifestDoesNotExist"), null); return false; } if (!fJarPackage.isMainClassValid(new BusyIndicatorRunnableContext())) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidMainClass"), null); return false; } IEditorPart[] dirtyEditors= JavaPlugin.getDirtyEditors(); if (dirtyEditors.length > 0) { List unsavedFiles= new ArrayList(dirtyEditors.length); List selection= fJarPackage.getSelectedResources();
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
for (int i= 0; i < dirtyEditors.length; i++) { if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile= ((IFileEditorInput)dirtyEditors[i].getEditorInput()).getFile(); if (selection.contains(dirtyFile)) { unsavedFiles.add(dirtyFile); addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.fileUnsaved", dirtyFile.getFullPath()), null); } } } if (!unsavedFiles.isEmpty()) return false; } return true; } protected void saveFiles() { if (fJarPackage.isManifestSaved()) { try { saveManifest(); } catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } } if (fJarPackage.isDescriptionSaved()) { try { saveDescription();
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } } } protected void saveDescription() throws CoreException, IOException { if (fJarPackage.isManifestReused()) fJarPackage.setGenerateManifest(false); ByteArrayOutputStream objectStreamOutput= new ByteArrayOutputStream(); JarPackageWriter objectStream= new JarPackageWriter(objectStreamOutput); ByteArrayInputStream fileInput= null; try { objectStream.writeXML(fJarPackage); fileInput= new ByteArrayInputStream(objectStreamOutput.toByteArray()); if (fJarPackage.getDescriptionFile().isAccessible()) { if (fJarPackage.canOverwriteDescription(fParentShell)) fJarPackage.getDescriptionFile().setContents(fileInput, true, true, null); } else { fJarPackage.getDescriptionFile().create(fileInput, true, null); } } finally { if (fileInput != null) fileInput.close(); if (objectStream != null) objectStream.close(); }
11,317
Bug 11317 Won't export some files to .jar.
Create a new java project called "Foo". In the file system, create a folder named "Foo scripts", and in this folder create a file named "foo.txt". Drag this folder into the eclipse packages view and add it to the "Foo" project. Now try to export the project "Foo" to a .jar file. Only the manifest file shows up, even if the file "foo.txt" is checked!
resolved fixed
5f546fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-20T18:10:50Z
2002-03-13T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} protected void saveManifest() throws CoreException, IOException { ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream(); ByteArrayInputStream fileInput= null; try { Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage); manifest.write(manifestOutput); fileInput= new ByteArrayInputStream(manifestOutput.toByteArray()); if (fJarPackage.getManifestFile().isAccessible()) { if (fJarPackage.canOverwriteManifest(fParentShell)) fJarPackage.getManifestFile().setContents(fileInput, true, true, null); } else { fJarPackage.getManifestFile().create(fileInput, true, null); } } finally { if (manifestOutput != null) manifestOutput.close(); if (fileInput != null) fileInput.close(); } } /** * Reads the JAR package spec from file. */ protected JarPackage readJarPackage(IFile description) { Assert.isLegal(description.isAccessible()); Assert.isNotNull(description.getFileExtension()); Assert.isLegal(description.getFileExtension().equals(JarPackage.DESCRIPTION_EXTENSION)); JarPackage jarPackage= null;