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
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HistoryListAction.java
}; IListAdapter adapter= new IListAdapter() { public void customButtonPressed(DialogField field, int index) { } public void selectionChanged(DialogField field) { doSelectionChanged(); } }; JavaElementLabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT); fHistoryList= new ListDialogField(adapter, buttonLabels, labelProvider); fHistoryList.setLabelText(TypeHierarchyMessages.getString("HistoryListDialog.label")); fHistoryList.setRemoveButtonIndex(0); fHistoryList.setElements(Arrays.asList(elements)); ISelection sel; if (elements.length > 0) { sel= new StructuredSelection(elements[0]); } else { sel= new StructuredSelection(); } fHistoryList.selectElements(sel); } /* * @see Dialog#createDialogArea(Composite) */
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HistoryListAction.java
protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); int minimalWidth= convertWidthInCharsToPixels(80); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fHistoryList }, true, minimalWidth, 0, SWT.DEFAULT, SWT.DEFAULT); fHistoryList.getTableViewer().addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { if (fHistoryStatus.isOK()) { okPressed(); } } }); return composite; } private void doSelectionChanged() { StatusInfo status= new StatusInfo(); List selected= fHistoryList.getSelectedElements(); if (selected.size() != 1) { status.setError(""); fResult= null; } else { fResult= (IJavaElement) selected.get(0); } fHistoryStatus= status; updateStatus(status); } public IJavaElement getResult() { return fResult; }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HistoryListAction.java
public IJavaElement[] getRemaining() { List elems= fHistoryList.getElements(); return (IJavaElement[]) elems.toArray(new IJavaElement[elems.size()]); } } private TypeHierarchyViewPart fView; public HistoryListAction(TypeHierarchyViewPart view) { fView= view; setText(TypeHierarchyMessages.getString("HistoryListAction.label")); JavaPluginImages.setLocalImageDescriptors(this, "history_list.gif"); } /* * @see IAction#run() */ public void run() { IJavaElement[] historyEntries= fView.getHistoryEntries(); HistoryListDialog dialog= new HistoryListDialog(JavaPlugin.getActiveWorkbenchShell(), historyEntries); if (dialog.open() == dialog.OK) { fView.setHistoryEntries(dialog.getRemaining()); fView.setInputElement(dialog.getResult()); } } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.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.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.custom.ViewForm; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSource; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.ToolBar; import org.eclipse.jface.action.IMenuListener;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
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.action.ToolBarManager; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.IBasicPropertyConstants; import org.eclipse.jface.viewers.IInputSelectionProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.actions.OpenWithMenu; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.part.PageBook; import org.eclipse.ui.part.ViewPart; import org.eclipse.jdt.core.IClassFile;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.ITypeHierarchyViewPart; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.AddMethodStubAction; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.compare.JavaReplaceWithEditionAction; import org.eclipse.jdt.internal.ui.dnd.BasicSelectionTransferDragAdapter; import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.packageview.BuildGroup; import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup; import org.eclipse.jdt.internal.ui.reorg.ReorgGroup; import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil; import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.MarkerErrorTickProvider; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; /** * view showing the supertypes/subtypes of its input. */ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyViewPart {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
public static final int VIEW_ID_TYPE= 2; public static final int VIEW_ID_SUPER= 0; public static final int VIEW_ID_SUB= 1;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
public static final int VIEW_ORIENTATION_VERTICAL= 0; public static final int VIEW_ORIENTATION_HORIZONTAL= 1; public static final int VIEW_ORIENTATION_SINGLE= 2; private static final String DIALOGSTORE_HIERARCHYVIEW= "TypeHierarchyViewPart.hierarchyview"; private static final String DIALOGSTORE_VIEWORIENTATION= "TypeHierarchyViewPart.orientation"; private static final String TAG_INPUT= "input"; private static final String TAG_VIEW= "view"; private static final String TAG_ORIENTATION= "orientation"; private static final String TAG_RATIO= "ratio"; private static final String TAG_SELECTION= "selection"; private static final String TAG_VERTICAL_SCROLL= "vertical_scroll"; private IType fSelectedType; private IJavaElement fInputElement; private ArrayList fInputHistory; private IMemento fMemento; private IProblemChangedListener fHierarchyProblemListener; private TypeHierarchyLifeCycle fHierarchyLifeCycle; private ITypeHierarchyLifeCycleListener fTypeHierarchyLifeCycleListener; private MethodsViewer fMethodsViewer; private int fCurrentViewerIndex;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private TypeHierarchyViewer[] fAllViewers; private SelectionProviderMediator fSelectionProviderMediator; private ISelectionChangedListener fSelectionChangedListener; private boolean fIsEnableMemberFilter; private SashForm fTypeMethodsSplitter; private PageBook fViewerbook; private PageBook fPagebook; private Label fNoHierarchyShownLabel; private Label fEmptyTypesViewer; private ViewForm fTypeViewerViewForm; private ViewForm fMethodViewerViewForm; private CLabel fMethodViewerPaneLabel; private JavaElementLabelProvider fPaneLabelProvider; private IDialogSettings fDialogSettings; private ToggleViewAction[] fViewActions; private HistoryDropDownAction fHistoryDropDownAction; private ToggleOrientationAction[] fToggleOrientationActions; private int fCurrentOrientation; private EnableMemberFilterAction fEnableMemberFilterAction;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private AddMethodStubAction fAddStubAction; private FocusOnTypeAction fFocusOnTypeAction; private FocusOnSelectionAction fFocusOnSelectionAction; private IPartListener fPartListener; public TypeHierarchyViewPart() { fSelectedType= null; fInputElement= null; fHierarchyLifeCycle= new TypeHierarchyLifeCycle(); fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() { public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes) { doTypeHierarchyChanged(typeHierarchy, changedTypes); } }; fHierarchyLifeCycle.addChangedListener(fTypeHierarchyLifeCycleListener); fHierarchyProblemListener= null; fIsEnableMemberFilter= false; fInputHistory= new ArrayList(); fAllViewers= null; fViewActions= new ToggleViewAction[] { new ToggleViewAction(this, VIEW_ID_TYPE), new ToggleViewAction(this, VIEW_ID_SUPER), new ToggleViewAction(this, VIEW_ID_SUB) };
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fDialogSettings= JavaPlugin.getDefault().getDialogSettings(); fHistoryDropDownAction= new HistoryDropDownAction(this); fToggleOrientationActions= new ToggleOrientationAction[] { new ToggleOrientationAction(this, VIEW_ORIENTATION_VERTICAL), new ToggleOrientationAction(this, VIEW_ORIENTATION_HORIZONTAL), new ToggleOrientationAction(this, VIEW_ORIENTATION_SINGLE) }; fEnableMemberFilterAction= new EnableMemberFilterAction(this, false); fFocusOnTypeAction= new FocusOnTypeAction(this); fPaneLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS); fPaneLabelProvider.setErrorTickManager(new MarkerErrorTickProvider()); fAddStubAction= new AddMethodStubAction(); fFocusOnSelectionAction= new FocusOnSelectionAction(this); 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) {}
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
}; fSelectionChangedListener= new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { doSelectionChanged(event); } }; } /** * Adds the entry if new. Inserted at the beginning of the history entries list. */ private void addHistoryEntry(IJavaElement entry) { if (fInputHistory.contains(entry)) { fInputHistory.remove(entry); } fInputHistory.add(0, entry); } private void updateHistoryEntries() { for (int i= fInputHistory.size() - 1; i >= 0; i--) { IJavaElement type= (IJavaElement) fInputHistory.get(i); if (!type.exists()) { fInputHistory.remove(i); } } } /**
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
* Goes to the selected entry, without updating the order of history entries. */ public void gotoHistoryEntry(IJavaElement entry) { if (fInputHistory.contains(entry)) { updateInput(entry); } } /** * Gets all history entries. */ public IJavaElement[] getHistoryEntries() { updateHistoryEntries(); return (IJavaElement[]) fInputHistory.toArray(new IJavaElement[fInputHistory.size()]); } /** * Sets the history entries */ public void setHistoryEntries(IJavaElement[] elems) { fInputHistory.clear(); for (int i= 0; i < elems.length; i++) { fInputHistory.add(elems[i]); } updateHistoryEntries(); } /** * Selects an member in the methods list */
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
public void selectMember(IMember member) { ICompilationUnit cu= member.getCompilationUnit(); if (cu != null && cu.isWorkingCopy()) { member= (IMember) cu.getOriginal(member); if (member == null) { return; } } Control methodControl= fMethodsViewer.getControl(); if (methodControl != null && !methodControl.isDisposed()) { fMethodsViewer.getControl().setFocus(); } fMethodsViewer.setSelection(new StructuredSelection(member), true); } /** * @deprecated */ public IType getInput() { if (fInputElement instanceof IType) { return (IType) fInputElement; } return null; } /** * Sets the input to a new type * @deprecated */ public void setInput(IType type) { setInputElement(type);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} /** * Returns the input element of the type hierarchy. * Can be of type <code>IType</code> or <code>IPackageFragment</code> */ public IJavaElement getInputElement() { return fInputElement; } /** * Sets the input to a new element. */ public void setInputElement(IJavaElement element) { if (element != null) { if (element instanceof IMember) { ICompilationUnit cu= ((IMember) element).getCompilationUnit(); if (cu != null && cu.isWorkingCopy()) { element= cu.getOriginal(element); } if (element.getElementType() == IJavaElement.METHOD || element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.INITIALIZER) { element= ((IMember) element).getDeclaringType(); } } } if (element != null && !element.equals(fInputElement)) { addHistoryEntry(element); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
updateInput(element); } /** * Changes the input to a new type */ private void updateInput(IJavaElement inputElement) { IJavaElement prevInput= fInputElement; fInputElement= inputElement; if (fInputElement == null) { clearInput(); } else { enableMemberFilter(false); try { fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInputElement); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); clearInput(); return; } fPagebook.showPage(fTypeMethodsSplitter); if (inputElement.getElementType() != IJavaElement.TYPE) { setView(VIEW_ID_TYPE); } if (!fInputElement.equals(prevInput)) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
updateHierarchyViewer(); } IType root= getSelectableType(fInputElement); internalSelectType(root); updateMethodViewer(root); updateToolbarButtons(); updateTitle(); } } private void clearInput() { fInputElement= null; fHierarchyLifeCycle.freeHierarchy(); updateHierarchyViewer(); updateToolbarButtons(); } /* * @see IWorbenchPart#setFocus */ public void setFocus() { fPagebook.setFocus(); } /* * @see IWorkbenchPart#dispose */ public void dispose() { fHierarchyLifeCycle.freeHierarchy(); fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener); fPaneLabelProvider.dispose();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
getSite().getPage().removePartListener(fPartListener); if (fHierarchyProblemListener != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener); } if (fMethodsViewer != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fMethodsViewer); } super.dispose(); } private Control createTypeViewerControl(Composite parent) { fViewerbook= new PageBook(parent, SWT.NULL); KeyListener keyListener= createKeyListener(); HierarchyLabelProvider lprovider= new HierarchyLabelProvider(this, new MarkerErrorTickProvider()); TypeHierarchyViewer superTypesViewer= new SuperTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, lprovider, this); initializeTypesViewer(superTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUPERTYPES_VIEW); TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, lprovider, this); initializeTypesViewer(subTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW); TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle, lprovider, this); initializeTypesViewer(vajViewer, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW); fAllViewers= new TypeHierarchyViewer[3]; fAllViewers[VIEW_ID_SUPER]= superTypesViewer; fAllViewers[VIEW_ID_SUB]= subTypesViewer; fAllViewers[VIEW_ID_TYPE]= vajViewer;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
int currViewerIndex; try { currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW); if (currViewerIndex < 0 || currViewerIndex > 2) { currViewerIndex= VIEW_ID_TYPE; } } catch (NumberFormatException e) { currViewerIndex= VIEW_ID_TYPE; } fEmptyTypesViewer= new Label(fViewerbook, SWT.LEFT); for (int i= 0; i < fAllViewers.length; i++) { fAllViewers[i].setInput(fAllViewers[i]); } fCurrentViewerIndex= -1; setView(currViewerIndex); return fViewerbook; } private KeyListener createKeyListener() { return new KeyAdapter() { public void keyPressed(KeyEvent event) { if (event.stateMask == 0) { if (event.keyCode == SWT.F4) { OpenTypeHierarchyUtil.open(getSite().getSelectionProvider().getSelection(), getSite().getWorkbenchWindow());
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
return; } else if (event.keyCode == SWT.F5) { updateHierarchyViewer(); return; } } viewPartKeyShortcuts(event); } }; } private void initializeTypesViewer(final TypeHierarchyViewer typesViewer, KeyListener keyListener, String cotextHelpId) { typesViewer.getControl().setVisible(false); typesViewer.getControl().addKeyListener(keyListener); typesViewer.initContextMenu(new IMenuListener() { public void menuAboutToShow(IMenuManager menu) { fillTypesViewerContextMenu(typesViewer, menu); } }, cotextHelpId, getSite()); typesViewer.addSelectionChangedListener(fSelectionChangedListener); } private Control createMethodViewerControl(Composite parent) { fMethodsViewer= new MethodsViewer(parent, this); fMethodsViewer.initContextMenu(new IMenuListener() { public void menuAboutToShow(IMenuManager menu) { fillMethodsViewerContextMenu(menu); } }, IContextMenuConstants.TARGET_ID_MEMBERS_VIEW, getSite()); fMethodsViewer.addSelectionChangedListener(fSelectionChangedListener);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
Control control= fMethodsViewer.getTable(); control.addKeyListener(createKeyListener()); JavaPlugin.getDefault().getProblemMarkerManager().addListener(fMethodsViewer); return control; } private void initDragAndDrop() { Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance() }; int ops= DND.DROP_COPY; DragSource source= new DragSource(fMethodsViewer.getControl(), ops); source.setTransfer(transfers); source.addDragListener(new BasicSelectionTransferDragAdapter(fMethodsViewer)); for (int i= 0; i < fAllViewers.length; i++) { TypeHierarchyViewer curr= fAllViewers[i]; curr.addDropSupport(ops, transfers, new TypeHierarchyTransferDropAdapter(curr)); } } private void viewPartKeyShortcuts(KeyEvent event) { if (event.stateMask == SWT.CTRL) { if (event.character == '1') { setView(VIEW_ID_TYPE); } else if (event.character == '2') { setView(VIEW_ID_SUPER); } else if (event.character == '3') { setView(VIEW_ID_SUB);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} } } /** * Returns the inner component in a workbench part. * @see IWorkbenchPart#createPartControl */ public void createPartControl(Composite container) { fPagebook= new PageBook(container, SWT.NONE); fTypeMethodsSplitter= new SashForm(fPagebook, SWT.VERTICAL); fTypeMethodsSplitter.setVisible(false); fTypeViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE); Control typeViewerControl= createTypeViewerControl(fTypeViewerViewForm); fTypeViewerViewForm.setContent(typeViewerControl); fMethodViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE); fTypeMethodsSplitter.setWeights(new int[] {35, 65}); Control methodViewerPart= createMethodViewerControl(fMethodViewerViewForm); fMethodViewerViewForm.setContent(methodViewerPart); fMethodViewerPaneLabel= new CLabel(fMethodViewerViewForm, SWT.NONE); fMethodViewerViewForm.setTopLeft(fMethodViewerPaneLabel);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
initDragAndDrop(); ToolBar methodViewerToolBar= new ToolBar(fMethodViewerViewForm, SWT.FLAT | SWT.WRAP); fMethodViewerViewForm.setTopCenter(methodViewerToolBar); fNoHierarchyShownLabel= new Label(fPagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); fNoHierarchyShownLabel.setText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.empty")); MenuManager menu= new MenuManager(); menu.add(fFocusOnTypeAction); fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel)); fPagebook.showPage(fNoHierarchyShownLabel); int orientation; try { orientation= fDialogSettings.getInt(DIALOGSTORE_VIEWORIENTATION); if (orientation < 0 || orientation > 2) { orientation= VIEW_ORIENTATION_VERTICAL; } } catch (NumberFormatException e) { orientation= VIEW_ORIENTATION_VERTICAL; } fCurrentOrientation= -1; setOrientation(orientation); IActionBars actionBars= getViewSite().getActionBars();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
IMenuManager viewMenu= actionBars.getMenuManager(); for (int i= 0; i < fToggleOrientationActions.length; i++) { viewMenu.add(fToggleOrientationActions[i]); } viewMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); ToolBarManager lowertbmanager= new ToolBarManager(methodViewerToolBar); lowertbmanager.add(fEnableMemberFilterAction); lowertbmanager.add(new Separator()); fMethodsViewer.contributeToToolBar(lowertbmanager); lowertbmanager.update(true); int nHierarchyViewers= fAllViewers.length; Viewer[] trackedViewers= new Viewer[nHierarchyViewers + 1]; for (int i= 0; i < nHierarchyViewers; i++) { trackedViewers[i]= fAllViewers[i]; } trackedViewers[nHierarchyViewers]= fMethodsViewer; fSelectionProviderMediator= new SelectionProviderMediator(trackedViewers); IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager(); fSelectionProviderMediator.addSelectionChangedListener(new StatusBarUpdater(slManager)); getSite().setSelectionProvider(fSelectionProviderMediator); getSite().getPage().addPartListener(fPartListener); IJavaElement input= determineInputElement(); if (fMemento != null) { restoreState(fMemento, input);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} else if (input != null) { setInputElement(input); } else { setViewerVisibility(false); } WorkbenchHelp.setHelp(fPagebook, new ViewContextComputer(this, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW)); } /** * called from ToggleOrientationAction. * @param orientation VIEW_ORIENTATION_SINGLE, VIEW_ORIENTATION_HORIZONTAL or VIEW_ORIENTATION_VERTICAL */ public void setOrientation(int orientation) { if (fCurrentOrientation != orientation) { boolean methodViewerNeedsUpdate= false; if (fMethodViewerViewForm != null && !fMethodViewerViewForm.isDisposed() && fTypeMethodsSplitter != null && !fTypeMethodsSplitter.isDisposed()) { if (orientation == VIEW_ORIENTATION_SINGLE) { fMethodViewerViewForm.setVisible(false); enableMemberFilter(false); updateMethodViewer(null); } else { if (fCurrentOrientation == VIEW_ORIENTATION_SINGLE) { fMethodViewerViewForm.setVisible(true); methodViewerNeedsUpdate= true; } boolean horizontal= orientation == VIEW_ORIENTATION_HORIZONTAL; fTypeMethodsSplitter.setOrientation(horizontal ? SWT.HORIZONTAL : SWT.VERTICAL);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
updateMainToolbar(horizontal); } fTypeMethodsSplitter.layout(); } for (int i= 0; i < fToggleOrientationActions.length; i++) { fToggleOrientationActions[i].setChecked(orientation == fToggleOrientationActions[i].getOrientation()); } fCurrentOrientation= orientation; if (methodViewerNeedsUpdate) { updateMethodViewer(fSelectedType); } fDialogSettings.put(DIALOGSTORE_VIEWORIENTATION, orientation); } } private void updateMainToolbar(boolean horizontal) { IActionBars actionBars= getViewSite().getActionBars(); IToolBarManager tbmanager= actionBars.getToolBarManager(); if (horizontal) { clearMainToolBar(tbmanager); ToolBar typeViewerToolBar= new ToolBar(fTypeViewerViewForm, SWT.FLAT | SWT.WRAP); fillMainToolBar(new ToolBarManager(typeViewerToolBar)); fTypeViewerViewForm.setTopLeft(typeViewerToolBar); } else { fTypeViewerViewForm.setTopLeft(null); fillMainToolBar(tbmanager); } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
private void fillMainToolBar(IToolBarManager tbmanager) { tbmanager.removeAll(); tbmanager.add(fHistoryDropDownAction); for (int i= 0; i < fViewActions.length; i++) { tbmanager.add(fViewActions[i]); } tbmanager.update(false); } private void clearMainToolBar(IToolBarManager tbmanager) { tbmanager.removeAll(); tbmanager.update(false); } /** * Creates the context menu for the hierarchy viewers */ private void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) { JavaPlugin.createStandardGroups(menu); viewer.contributeToContextMenu(menu); IStructuredSelection selection= (IStructuredSelection)viewer.getSelection(); if (JavaBasePreferencePage.openTypeHierarchyInPerspective()) { addOpenPerspectiveItem(menu, selection); } addOpenWithMenu(menu, selection); menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnTypeAction); if (fFocusOnSelectionAction.canActionBeAdded())
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnSelectionAction); addRefactoring(menu, viewer); ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, viewer); } /** * Creates the context menu for the method viewer */ private void fillMethodsViewerContextMenu(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); fMethodsViewer.contributeToContextMenu(menu); if (fSelectedType != null && fAddStubAction.init(fSelectedType, fMethodsViewer.getSelection())) { menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddStubAction); } menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new JavaReplaceWithEditionAction(fMethodsViewer)); addOpenWithMenu(menu, (IStructuredSelection)fMethodsViewer.getSelection()); addRefactoring(menu, fMethodsViewer); ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, fMethodsViewer); } private void addRefactoring(IMenuManager menu, IInputSelectionProvider viewer){ MenuManager refactoring= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.refactor")); ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, viewer); if (!refactoring.isEmpty()) menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring); } private void addOpenWithMenu(IMenuManager menu, IStructuredSelection selection) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (selection.size() != 1) return; Object element= selection.getFirstElement(); if (!(element instanceof IJavaElement)) return; IResource resource= null; try { resource= ((IJavaElement)element).getUnderlyingResource(); } catch(JavaModelException e) { } if (!(resource instanceof IFile)) return; MenuManager submenu= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.open")); submenu.add(new OpenWithMenu(getSite().getPage(), (IFile) resource)); menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu); } private void addOpenPerspectiveItem(IMenuManager menu, IStructuredSelection selection) { OpenTypeHierarchyUtil.addToMenu(getSite().getWorkbenchWindow(), menu, selection); } /** * Toggles between the empty viewer page and the hierarchy */ private void setViewerVisibility(boolean showHierarchy) { if (showHierarchy) { fViewerbook.showPage(getCurrentViewer().getControl()); } else {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
fViewerbook.showPage(fEmptyTypesViewer); } } /** * Sets the member filter. <code>null</code> disables member filtering. */ private void setMemberFilter(IMember[] memberFilter) { Assert.isNotNull(fAllViewers); for (int i= 0; i < fAllViewers.length; i++) { fAllViewers[i].setMemberFilter(memberFilter); } updateHierarchyViewer(); updateTitle(); } private IType getSelectableType(IJavaElement elem) { ISelection sel= null; if (elem.getElementType() != IJavaElement.TYPE) { return (IType) getCurrentViewer().getTreeRootType(); } else { return (IType) elem; } } private void internalSelectType(IMember elem) { TypeHierarchyViewer viewer= getCurrentViewer(); viewer.removeSelectionChangedListener(fSelectionChangedListener); viewer.setSelection(elem != null ? new StructuredSelection(elem) : StructuredSelection.EMPTY); viewer.addSelectionChangedListener(fSelectionChangedListener);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} private void internalSelectMember(IMember member) { fMethodsViewer.removeSelectionChangedListener(fSelectionChangedListener); fMethodsViewer.setSelection(member != null ? new StructuredSelection(member) : StructuredSelection.EMPTY); fMethodsViewer.addSelectionChangedListener(fSelectionChangedListener); } /** * When the input changed or the hierarchy pane becomes visible, * <code>updateHierarchyViewer<code> brings up the correct view and refreshes * the current tree */ private void updateHierarchyViewer() { if (fInputElement == null) { fPagebook.showPage(fNoHierarchyShownLabel); } else { if (getCurrentViewer().containsElements() != null) { Runnable runnable= new Runnable() { public void run() { getCurrentViewer().updateContent(); } }; BusyIndicator.showWhile(getDisplay(), runnable); if (!isChildVisible(fViewerbook, getCurrentViewer().getControl())) { setViewerVisibility(true); } } else { fEmptyTypesViewer.setText(TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.nodecl", fInputElement.getElementName())); setViewerVisibility(false);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} } } private void updateMethodViewer(IType input) { if (input != fMethodsViewer.getInput() && !fIsEnableMemberFilter && fCurrentOrientation != VIEW_ORIENTATION_SINGLE) { if (input != null) { fMethodViewerPaneLabel.setText(fPaneLabelProvider.getText(input)); fMethodViewerPaneLabel.setImage(fPaneLabelProvider.getImage(input)); } else { fMethodViewerPaneLabel.setText(""); fMethodViewerPaneLabel.setImage(null); } fMethodsViewer.setInput(input); } } private void doSelectionChanged(SelectionChangedEvent e) { if (e.getSelectionProvider() == fMethodsViewer) { methodSelectionChanged(e.getSelection()); } else { typeSelectionChanged(e.getSelection()); } } private void methodSelectionChanged(ISelection sel) { if (sel instanceof IStructuredSelection) { List selected= ((IStructuredSelection)sel).toList();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
int nSelected= selected.size(); if (fIsEnableMemberFilter) { IMember[] memberFilter= null; if (nSelected > 0) { memberFilter= new IMember[nSelected]; selected.toArray(memberFilter); } setMemberFilter(memberFilter); } if (nSelected == 1) { revealElementInEditor(selected.get(0), fMethodsViewer); } } } private void typeSelectionChanged(ISelection sel) { if (sel instanceof IStructuredSelection) { List selected= ((IStructuredSelection)sel).toList(); int nSelected= selected.size(); if (nSelected != 0) { List types= new ArrayList(nSelected); for (int i= nSelected-1; i >= 0; i--) { Object elem= selected.get(i); if (elem instanceof IType && !types.contains(elem)) { types.add(elem); } } if (types.size() == 1) { fSelectedType= (IType) types.get(0); updateMethodViewer(fSelectedType);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} else if (types.size() == 0) { } if (nSelected == 1) { revealElementInEditor(selected.get(0), getCurrentViewer()); } } else { fSelectedType= null; updateMethodViewer(null); } } } private void revealElementInEditor(Object elem, Viewer originViewer) { if (getSite().getPage().getActivePart() != this) { return; } if (fSelectionProviderMediator.getViewerInFocus() != originViewer) { return; } IEditorPart editorPart= EditorUtility.isOpenInEditor(elem); if (editorPart != null && (elem instanceof IJavaElement)) { try { getSite().getPage().removePartListener(fPartListener); EditorUtility.openInEditor(elem, false); EditorUtility.revealInEditor(editorPart, (IJavaElement) elem);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
getSite().getPage().addPartListener(fPartListener); } catch (CoreException e) { JavaPlugin.log(e); } } } private Display getDisplay() { if (fPagebook != null && !fPagebook.isDisposed()) { return fPagebook.getDisplay(); } return null; } private boolean isChildVisible(Composite pb, Control child) { Control[] children= pb.getChildren(); for (int i= 0; i < children.length; i++) { if (children[i] == child && children[i].isVisible()) return true; } return false; } private void updateTitle() { String viewerTitle= getCurrentViewer().getTitle(); String tooltip; String title; if (fInputElement != null) { String[] args= new String[] { viewerTitle, JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT) };
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
title= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.title", args); tooltip= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.tooltip", args); } else { title= viewerTitle; tooltip= viewerTitle; } setTitle(title); setTitleToolTip(tooltip); } private void updateToolbarButtons() { boolean isType= fInputElement instanceof IType; for (int i= 0; i < fViewActions.length; i++) { ToggleViewAction action= fViewActions[i]; if (action.getViewerIndex() == VIEW_ID_TYPE) { action.setEnabled(fInputElement != null); } else { action.setEnabled(isType); } } } /** * Sets the current view (see view id) * called from ToggleViewAction. Must be called after creation of the viewpart. */ public void setView(int viewerIndex) { Assert.isNotNull(fAllViewers); if (viewerIndex < fAllViewers.length && fCurrentViewerIndex != viewerIndex) { fCurrentViewerIndex= viewerIndex;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
updateHierarchyViewer(); if (fInputElement != null) { ISelection currSelection= getCurrentViewer().getSelection(); if (currSelection == null || currSelection.isEmpty()) { internalSelectType(getSelectableType(fInputElement)); } if (!fIsEnableMemberFilter) { typeSelectionChanged(currSelection); } } updateTitle(); if (fHierarchyProblemListener != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener); } fHierarchyProblemListener= getCurrentViewer(); JavaPlugin.getDefault().getProblemMarkerManager().addListener(fHierarchyProblemListener); fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex); getCurrentViewer().getTree().setFocus(); } for (int i= 0; i < fViewActions.length; i++) { ToggleViewAction action= fViewActions[i]; action.setChecked(fCurrentViewerIndex == action.getViewerIndex()); } } /** * Gets the curret active view index.
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
*/ public int getViewIndex() { return fCurrentViewerIndex; } private TypeHierarchyViewer getCurrentViewer() { return fAllViewers[fCurrentViewerIndex]; } /** * called from EnableMemberFilterAction. * Must be called after creation of the viewpart. */ public void enableMemberFilter(boolean on) { if (on != fIsEnableMemberFilter) { fIsEnableMemberFilter= on; if (!on) { IType methodViewerInput= (IType) fMethodsViewer.getInput(); setMemberFilter(null); if (methodViewerInput != null && getCurrentViewer().isElementShown(methodViewerInput)) { internalSelectType(methodViewerInput); } else if (fSelectedType != null) { internalSelectType(fSelectedType); updateMethodViewer(fSelectedType); } } else { methodSelectionChanged(fMethodsViewer.getSelection()); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
} fEnableMemberFilterAction.setChecked(on); } /** * Called from ITypeHierarchyLifeCycleListener. * Can be called from any thread */ private void doTypeHierarchyChanged(final TypeHierarchyLifeCycle typeHierarchy, final IType[] changedTypes) { Display display= getDisplay(); if (display != null) { display.asyncExec(new Runnable() { public void run() { doTypeHierarchyChangedOnViewers(changedTypes); } }); } } private void doTypeHierarchyChangedOnViewers(IType[] changedTypes) { if (changedTypes == null) { if (fHierarchyLifeCycle.getHierarchy() == null || !fHierarchyLifeCycle.getHierarchy().exists()) { clearInput(); } else { try { fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInputElement); } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); clearInput();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
return; } updateHierarchyViewer(); } } else { if (getCurrentViewer().isMethodFiltering()) { if (changedTypes.length == 1) { getCurrentViewer().refresh(changedTypes[0]); } else { updateHierarchyViewer(); } } else { getCurrentViewer().update(changedTypes, new String[] { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE } ); } } } /** * Determines the input element to be used initially . */ private IJavaElement determineInputElement() { Object input= getSite().getPage().getInput(); if (input instanceof IJavaElement) { return (IJavaElement) input; } return null; }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
/* * @see IViewPart#init */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); fMemento= memento; } /* * @see ViewPart#saveState(IMemento) */ public void saveState(IMemento memento) { if (fPagebook == null) { if (fMemento != null) { memento.putMemento(fMemento); } return; } if (fInputElement != null) { memento.putString(TAG_INPUT, fInputElement.getHandleIdentifier()); } memento.putInteger(TAG_VIEW, getViewIndex()); memento.putInteger(TAG_ORIENTATION, fCurrentOrientation); int weigths[]= fTypeMethodsSplitter.getWeights(); int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]); memento.putInteger(TAG_RATIO, ratio); ScrollBar bar= getCurrentViewer().getTree().getVerticalBar(); int position= bar != null ? bar.getSelection() : 0;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
memento.putInteger(TAG_VERTICAL_SCROLL, position); IJavaElement selection= (IJavaElement)((IStructuredSelection) getCurrentViewer().getSelection()).getFirstElement(); if (selection != null) { memento.putString(TAG_SELECTION, selection.getHandleIdentifier()); } fMethodsViewer.saveState(memento); } /** * Restores the type hierarchy settings from a memento. */ private void restoreState(IMemento memento, IJavaElement defaultInput) { IJavaElement input= defaultInput; String elementId= memento.getString(TAG_INPUT); if (elementId != null) { input= JavaCore.create(elementId); if (!input.exists()) { input= null; } } setInputElement(input); Integer viewerIndex= memento.getInteger(TAG_VIEW); if (viewerIndex != null) { setView(viewerIndex.intValue()); } Integer orientation= memento.getInteger(TAG_ORIENTATION); if (orientation != null) { setOrientation(orientation.intValue()); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
Integer ratio= memento.getInteger(TAG_RATIO); if (ratio != null) { fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() }); } ScrollBar bar= getCurrentViewer().getTree().getVerticalBar(); if (bar != null) { Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL); if (vScroll != null) { bar.setSelection(vScroll.intValue()); } } String selectionId= memento.getString(TAG_SELECTION); if (selectionId != null) { IJavaElement elem= JavaCore.create(selectionId); if (getCurrentViewer().isElementShown(elem) && elem instanceof IMember) { internalSelectType((IMember)elem); } } fMethodsViewer.restoreState(memento); } /** * Link selection to active editor. */ private void editorActivated(IEditorPart editor) { if (!JavaBasePreferencePage.linkTypeHierarchySelectionToEditor()) { return; } if (fInputElement == null) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
return; } IJavaElement elem= (IJavaElement)editor.getEditorInput().getAdapter(IJavaElement.class); try { TypeHierarchyViewer currentViewer= getCurrentViewer(); if (elem instanceof IClassFile) { IType type= ((IClassFile)elem).getType(); if (currentViewer.isElementShown(type)) { internalSelectType(type); updateMethodViewer(type); } } else if (elem instanceof ICompilationUnit) { IType[] allTypes= ((ICompilationUnit)elem).getAllTypes(); for (int i= 0; i < allTypes.length; i++) { if (currentViewer.isElementShown(allTypes[i])) { internalSelectType(allTypes[i]); updateMethodViewer(allTypes[i]); return; } } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
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.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.IBuffer; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.ui.IJavaElementSearchConstants; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.internal.compiler.env.IConstants; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.codemanipulation.IImportsStructure; import org.eclipse.jdt.internal.ui.codemanipulation.ImportsStructure;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
import org.eclipse.jdt.internal.ui.codemanipulation.StubUtility; import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jdt.internal.ui.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup; import org.eclipse.jdt.internal.ui.wizards.dialogfields.Separator; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonStatusDialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField; import org.eclipse.jdt.internal.ui.wizards.swt.MGridData; /** * <code>TypePage</code> contains controls and validation routines for a 'New Type WizardPage' * Implementors decide which components to add and to enable. Implementors can also * customize the validation code. * <code>TypePage</code> is intended to serve as base class of all wizards that create types. * Applets, Servlets, Classes, Interfaces... * See <code>NewClassCreationWizardPage</code> or <code>NewInterfaceCreationWizardPage</code> for an * example usage of TypePage. */ public abstract class TypePage extends ContainerPage {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
private final static String PAGE_NAME= "TypePage"; protected final static String PACKAGE= PAGE_NAME + ".package"; protected final static String ENCLOSING= PAGE_NAME + ".enclosing"; protected final static String ENCLOSINGSELECTION= ENCLOSING + ".selection"; protected final static String TYPENAME= PAGE_NAME + ".typename"; protected final static String SUPER= PAGE_NAME + ".superclass"; protected final static String INTERFACES= PAGE_NAME + ".interfaces"; protected final static String MODIFIERS= PAGE_NAME + ".modifiers"; protected final static String METHODS= PAGE_NAME + ".methods"; private class InterfacesListLabelProvider extends LabelProvider { private Image fInterfaceImage; public InterfacesListLabelProvider() { super(); fInterfaceImage= JavaPlugin.getDefault().getImageRegistry().get(JavaPluginImages.IMG_OBJS_INTERFACE); } public Image getImage(Object element) { return fInterfaceImage; } } private StringButtonStatusDialogField fPackageDialogField;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
private SelectionButtonDialogField fEnclosingTypeSelection; private StringButtonDialogField fEnclosingTypeDialogField; private boolean fCanModifyPackage; private boolean fCanModifyEnclosingType; private IPackageFragment fCurrPackage; private IType fCurrEnclosingType; private StringDialogField fTypeNameDialogField; private StringButtonDialogField fSuperClassDialogField; private ListDialogField fSuperInterfacesDialogField; private IType fSuperClass; private SelectionButtonDialogFieldGroup fAccMdfButtons; private SelectionButtonDialogFieldGroup fOtherMdfButtons; private IType fCreatedType; protected IStatus fEnclosingTypeStatus; protected IStatus fPackageStatus; protected IStatus fTypeNameStatus; protected IStatus fSuperClassStatus; protected IStatus fModifierStatus; protected IStatus fSuperInterfacesStatus; private boolean fIsClass;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
private int fStaticMdfIndex; private final int PUBLIC_INDEX= 0, DEFAULT_INDEX= 1, PRIVATE_INDEX= 2, PROTECTED_INDEX= 3; private final int ABSTRACT_INDEX= 0, FINAL_INDEX= 1; public TypePage(boolean isClass, String pageName, IWorkspaceRoot root) { super(pageName, root); fCreatedType= null; fIsClass= isClass; TypeFieldsAdapter adapter= new TypeFieldsAdapter(); fPackageDialogField= new StringButtonStatusDialogField(adapter); fPackageDialogField.setDialogFieldListener(adapter); fPackageDialogField.setLabelText(NewWizardMessages.getString("TypePage.package.label")); fPackageDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.package.button")); fPackageDialogField.setStatusWidthHint(NewWizardMessages.getString("TypePage.default")); fEnclosingTypeSelection= new SelectionButtonDialogField(SWT.CHECK); fEnclosingTypeSelection.setDialogFieldListener(adapter); fEnclosingTypeSelection.setLabelText(NewWizardMessages.getString("TypePage.enclosing.selection.label")); fEnclosingTypeDialogField= new StringButtonDialogField(adapter); fEnclosingTypeDialogField.setDialogFieldListener(adapter); fEnclosingTypeDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.enclosing.button")); fTypeNameDialogField= new StringDialogField(); fTypeNameDialogField.setDialogFieldListener(adapter); fTypeNameDialogField.setLabelText(NewWizardMessages.getString("TypePage.typename.label"));
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fSuperClassDialogField= new StringButtonDialogField(adapter); fSuperClassDialogField.setDialogFieldListener(adapter); fSuperClassDialogField.setLabelText(NewWizardMessages.getString("TypePage.superclass.label")); fSuperClassDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.superclass.button")); String[] addButtons= new String[] { NewWizardMessages.getString("TypePage.interfaces.add"), null, NewWizardMessages.getString("TypePage.interfaces.remove") }; fSuperInterfacesDialogField= new ListDialogField(adapter, addButtons, new InterfacesListLabelProvider()); fSuperInterfacesDialogField.setDialogFieldListener(adapter); String interfaceLabel= fIsClass ? NewWizardMessages.getString("TypePage.interfaces.class.label") : NewWizardMessages.getString("TypePage.interfaces.ifc.label"); fSuperInterfacesDialogField.setLabelText(interfaceLabel); fSuperInterfacesDialogField.setRemoveButtonIndex(2); String[] buttonNames1= new String[] { NewWizardMessages.getString("TypePage.modifiers.public"), NewWizardMessages.getString("TypePage.modifiers.default"), NewWizardMessages.getString("TypePage.modifiers.private"), NewWizardMessages.getString("TypePage.modifiers.protected") }; fAccMdfButtons= new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames1, 4); fAccMdfButtons.setDialogFieldListener(adapter); fAccMdfButtons.setLabelText(NewWizardMessages.getString("TypePage.modifiers.acc.label")); fAccMdfButtons.setSelection(0, true); String[] buttonNames2; if (fIsClass) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
buttonNames2= new String[] { NewWizardMessages.getString("TypePage.modifiers.abstract"), NewWizardMessages.getString("TypePage.modifiers.final"), NewWizardMessages.getString("TypePage.modifiers.static") }; fStaticMdfIndex= 2; } else { buttonNames2= new String[] { NewWizardMessages.getString("TypePage.modifiers.static") }; fStaticMdfIndex= 0; } fOtherMdfButtons= new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames2, 4); fOtherMdfButtons.setDialogFieldListener(adapter); fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, false); fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, false); fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, false); fPackageStatus= new StatusInfo(); fEnclosingTypeStatus= new StatusInfo(); fCanModifyPackage= true; fCanModifyEnclosingType= true; updateEnableState(); fTypeNameStatus= new StatusInfo(); fSuperClassStatus= new StatusInfo(); fSuperInterfacesStatus= new StatusInfo(); fModifierStatus= new StatusInfo(); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
/** * Initializes all fields provided by the type page with a given * Java element as selection. * @param elem The initial selection of this page or null if no * selection was available */ protected void initTypePage(IJavaElement elem) { String initSuperclass= "java.lang.Object"; ArrayList initSuperinterfaces= new ArrayList(5); IPackageFragment pack= null; IType enclosingType= null; if (elem != null) { pack= (IPackageFragment) JavaModelUtil.findElementOfKind(elem, IJavaElement.PACKAGE_FRAGMENT); IType typeInCU= (IType) JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE); if (typeInCU != null) { if (typeInCU.getCompilationUnit() != null) { enclosingType= typeInCU; } } else { ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT); if (cu != null) { enclosingType= JavaModelUtil.findPrimaryType(cu); } } try { IType type= null;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (elem.getElementType() == IJavaElement.TYPE) { type= (IType)elem; if (type.exists()) { String superName= JavaModelUtil.getFullyQualifiedName(type); if (type.isInterface()) { initSuperinterfaces.add(superName); } else { initSuperclass= superName; } } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } setPackageFragment(pack, true); setEnclosingType(enclosingType, true); setEnclosingTypeSelection(false, true); setTypeName("", true); setSuperClass(initSuperclass, true); setSuperInterfaces(initSuperinterfaces, true); } /** * Creates a separator line. * @param composite The parent composite
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
* @param nColumns Number of columns to span */ protected void createSeparator(Composite composite, int nColumns) { initializeDialogUnits(composite); (new Separator(SWT.SEPARATOR | SWT.HORIZONTAL)).doFillIntoGrid(composite, nColumns, convertHeightInCharsToPixels(1)); } /** * Creates the controls for the package name field. * @param composite The parent composite * @param nColumns Number of columns to span */ protected void createPackageControls(Composite composite, int nColumns) { fPackageDialogField.doFillIntoGrid(composite, 4); } /** * Creates the controls for the enclosing type name field. * @param composite The parent composite * @param nColumns Number of columns to span */ protected void createEnclosingTypeControls(Composite composite, int nColumns) { fEnclosingTypeSelection.doFillIntoGrid(composite, 1); Control c= fEnclosingTypeDialogField.getTextControl(composite); c.setLayoutData(new MGridData(MGridData.FILL_HORIZONTAL)); LayoutUtil.setHorizontalSpan(c, 2); c= fEnclosingTypeDialogField.getChangeControl(composite); c.setLayoutData(new MGridData(MGridData.HORIZONTAL_ALIGN_FILL)); } /** * Creates the controls for the type name field.
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
* @param composite The parent composite * @param nColumns Number of columns to span */ protected void createTypeNameControls(Composite composite, int nColumns) { fTypeNameDialogField.doFillIntoGrid(composite, nColumns - 1); DialogField.createEmptySpace(composite); } /** * Creates the controls for the modifiers radio/ceckbox buttons. * @param composite The parent composite * @param nColumns Number of columns to span */ protected void createModifierControls(Composite composite, int nColumns) { LayoutUtil.setHorizontalSpan(fAccMdfButtons.getLabelControl(composite), 1); LayoutUtil.setHorizontalSpan(fAccMdfButtons.getSelectionButtonsGroup(composite), nColumns - 2); int minWidthHint= convertWidthInCharsToPixels(15); fAccMdfButtons.setButtonsMinWidth(minWidthHint); DialogField.createEmptySpace(composite); DialogField.createEmptySpace(composite); LayoutUtil.setHorizontalSpan(fOtherMdfButtons.getSelectionButtonsGroup(composite), nColumns - 2); fOtherMdfButtons.setButtonsMinWidth(minWidthHint); DialogField.createEmptySpace(composite); } /** * Creates the controls for the superclass name field. * @param composite The parent composite * @param nColumns Number of columns to span
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
*/ protected void createSuperClassControls(Composite composite, int nColumns) { fSuperClassDialogField.doFillIntoGrid(composite, nColumns); } /** * Creates the controls for the superclass name field. * @param composite The parent composite * @param nColumns Number of columns to span */ protected void createSuperInterfacesControls(Composite composite, int nColumns) { initializeDialogUnits(composite); fSuperInterfacesDialogField.doFillIntoGrid(composite, nColumns); MGridData gd= (MGridData)fSuperInterfacesDialogField.getListControl(null).getLayoutData(); if (fIsClass) { gd.heightHint= convertHeightInCharsToPixels(3); } else { gd.heightHint= convertHeightInCharsToPixels(6); } gd.grabExcessVerticalSpace= false; } /** * Sets the focus on the container if empty, elso on type name. */ protected void setFocus() { fTypeNameDialogField.setFocus(); } private class TypeFieldsAdapter implements IStringButtonAdapter, IDialogFieldListener, IListAdapter {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
public void changeControlPressed(DialogField field) { typePageChangeControlPressed(field); } public void customButtonPressed(DialogField field, int index) { typePageCustomButtonPressed(field, index); } public void selectionChanged(DialogField field) {} public void dialogFieldChanged(DialogField field) { typePageDialogFieldChanged(field); } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
private void typePageChangeControlPressed(DialogField field) { if (field == fPackageDialogField) { IPackageFragment pack= choosePackage(); if (pack != null) { fPackageDialogField.setText(pack.getElementName()); } } else if (field == fEnclosingTypeDialogField) { IType type= chooseEnclosingType(); if (type != null) { fEnclosingTypeDialogField.setText(JavaModelUtil.getFullyQualifiedName(type)); } } else if (field == fSuperClassDialogField) { IType type= chooseSuperType(); if (type != null) { fSuperClassDialogField.setText(JavaModelUtil.getFullyQualifiedName(type)); } } } private void typePageCustomButtonPressed(DialogField field, int index) { if (field == fSuperInterfacesDialogField) { chooseSuperInterfaces(); } } /* * A field on the type has changed. The fields' status and all dependend * status are updated. */ private void typePageDialogFieldChanged(DialogField field) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
String fieldName= null; if (field == fPackageDialogField) { fPackageStatus= packageChanged(); updatePackageStatusLabel(); fTypeNameStatus= typeNameChanged(); fSuperClassStatus= superClassChanged(); fieldName= PACKAGE; } else if (field == fEnclosingTypeDialogField) { fEnclosingTypeStatus= enclosingTypeChanged(); fTypeNameStatus= typeNameChanged(); fSuperClassStatus= superClassChanged(); fieldName= ENCLOSING; } else if (field == fEnclosingTypeSelection) { updateEnableState(); boolean isEnclosedType= isEnclosingTypeSelected(); if (!isEnclosedType) { if (fAccMdfButtons.isSelected(PRIVATE_INDEX) || fAccMdfButtons.isSelected(PROTECTED_INDEX)) { fAccMdfButtons.setSelection(PRIVATE_INDEX, false); fAccMdfButtons.setSelection(PROTECTED_INDEX, false); fAccMdfButtons.setSelection(PUBLIC_INDEX, true); } if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) { fOtherMdfButtons.setSelection(fStaticMdfIndex, false); } } fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, isEnclosedType && fIsClass); fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, isEnclosedType && fIsClass); fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, isEnclosedType); fTypeNameStatus= typeNameChanged(); fSuperClassStatus= superClassChanged();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fieldName= ENCLOSINGSELECTION; } else if (field == fTypeNameDialogField) { fTypeNameStatus= typeNameChanged(); fieldName= TYPENAME; } else if (field == fSuperClassDialogField) { fSuperClassStatus= superClassChanged(); fieldName= SUPER; } else if (field == fSuperInterfacesDialogField) { fSuperInterfacesStatus= superInterfacesChanged(); fieldName= INTERFACES; } else if (field == fOtherMdfButtons) { fModifierStatus= modifiersChanged(); fieldName= MODIFIERS; } else { fieldName= METHODS; } handleFieldChanged(fieldName); } /** * Called whenever a content of a field has changed. * Implementors of TypePage can hook in. * @see ContainerPage#handleFieldChanged */ protected void handleFieldChanged(String fieldName) { super.handleFieldChanged(fieldName);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (fieldName == CONTAINER) { fPackageStatus= packageChanged(); fEnclosingTypeStatus= enclosingTypeChanged(); fTypeNameStatus= typeNameChanged(); fSuperClassStatus= superClassChanged(); fSuperInterfacesStatus= superInterfacesChanged(); } } /** * Gets the text of package field. */ public String getPackageText() { return fPackageDialogField.getText(); } /** * Gets the text of enclosing type field. */ public String getEnclosingTypeText() { return fEnclosingTypeDialogField.getText(); } /** * Returns the package fragment corresponding to the current input. * @return Returns <code>null</code> if the input could not be resolved. */ public IPackageFragment getPackageFragment() {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (!isEnclosingTypeSelected()) { return fCurrPackage; } else { if (fCurrEnclosingType != null) { return fCurrEnclosingType.getPackageFragment(); } } return null; } /** * Sets the package fragment. * This will update model and the text of the control. * @param canBeModified Selects if the package fragment can be changed by the user */ public void setPackageFragment(IPackageFragment pack, boolean canBeModified) { fCurrPackage= pack; fCanModifyPackage= canBeModified; String str= (pack == null) ? "" : pack.getElementName(); fPackageDialogField.setText(str); updateEnableState(); } /** * Returns the encloding type corresponding to the current input. * @return Returns <code>null</code> if enclosing type is not selected or the input could not * be resolved. */ public IType getEnclosingType() { if (isEnclosingTypeSelected()) { return fCurrEnclosingType;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
} return null; } /** * Sets the package fragment. * This will update model and the text of the control. * @param canBeModified Selects if the enclosing type can be changed by the user */ public void setEnclosingType(IType type, boolean canBeModified) { fCurrEnclosingType= type; fCanModifyEnclosingType= canBeModified; String str= (type == null) ? "" : JavaModelUtil.getFullyQualifiedName(type); fEnclosingTypeDialogField.setText(str); updateEnableState(); } /** * Returns <code>true</code> if the enclosing type selection check box is enabled. */ public boolean isEnclosingTypeSelected() { return fEnclosingTypeSelection.isSelected(); } /** * Sets the enclosing type selection checkbox. * @param canBeModified Selects if the enclosing type selection can be changed by the user */ public void setEnclosingTypeSelection(boolean isSelected, boolean canBeModified) { fEnclosingTypeSelection.setSelection(isSelected); fEnclosingTypeSelection.setEnabled(canBeModified); updateEnableState();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
} /** * Gets the type name. */ public String getTypeName() { return fTypeNameDialogField.getText(); } /** * Sets the type name. * @param canBeModified Selects if the type name can be changed by the user */ public void setTypeName(String name, boolean canBeModified) { fTypeNameDialogField.setText(name); fTypeNameDialogField.setEnabled(canBeModified); } /** * Gets the selected modifiers. * @see Flags */ public int getModifiers() { int mdf= 0; if (fAccMdfButtons.isSelected(PUBLIC_INDEX)) { mdf+= IConstants.AccPublic; } else if (fAccMdfButtons.isSelected(PRIVATE_INDEX)) { mdf+= IConstants.AccPrivate; } else if (fAccMdfButtons.isSelected(PROTECTED_INDEX)) { mdf+= IConstants.AccProtected; }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (fOtherMdfButtons.isSelected(ABSTRACT_INDEX) && (fStaticMdfIndex != 0)) { mdf+= IConstants.AccAbstract; } if (fOtherMdfButtons.isSelected(FINAL_INDEX)) { mdf+= IConstants.AccFinal; } if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) { mdf+= IConstants.AccStatic; } return mdf; } /** * Sets the modifiers. * @param canBeModified Selects if the modifiers can be changed by the user * @see IConstants */ public void setModifiers(int modifiers, boolean canBeModified) { if (Flags.isPublic(modifiers)) { fAccMdfButtons.setSelection(PUBLIC_INDEX, true); } else if (Flags.isPrivate(modifiers)) { fAccMdfButtons.setSelection(PRIVATE_INDEX, true); } else if (Flags.isProtected(modifiers)) { fAccMdfButtons.setSelection(PROTECTED_INDEX, true); } else { fAccMdfButtons.setSelection(DEFAULT_INDEX, true); } if (Flags.isAbstract(modifiers)) { fOtherMdfButtons.setSelection(ABSTRACT_INDEX, true); } if (Flags.isFinal(modifiers)) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fOtherMdfButtons.setSelection(FINAL_INDEX, true); } if (Flags.isStatic(modifiers)) { fOtherMdfButtons.setSelection(fStaticMdfIndex, true); } fAccMdfButtons.setEnabled(canBeModified); fOtherMdfButtons.setEnabled(canBeModified); } /** * Gets the content of the super class text field. */ public String getSuperClass() { return fSuperClassDialogField.getText(); } /** * Sets the super class name. * @param canBeModified Selects if the super class can be changed by the user */ public void setSuperClass(String name, boolean canBeModified) { fSuperClassDialogField.setText(name); fSuperClassDialogField.setEnabled(canBeModified); } /** * Gets the currently chosen super interfaces. * @return returns a list of String */ public List getSuperInterfaces() {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
return fSuperInterfacesDialogField.getElements(); } /** * Sets the super interfaces. * @param interfacesNames a list of String */ public void setSuperInterfaces(List interfacesNames, boolean canBeModified) { fSuperInterfacesDialogField.setElements(interfacesNames); fSuperInterfacesDialogField.setEnabled(canBeModified); } /** * Called when the package field has changed. * The method validates the package name and returns the status of the validation * This also updates the package fragment model. * Can be extended to add more validation */ protected IStatus packageChanged() { StatusInfo status= new StatusInfo(); fPackageDialogField.enableButton(getPackageFragmentRoot() != null); String packName= getPackageText(); if (packName.length() > 0) { IStatus val= JavaConventions.validatePackageName(packName); if (val.getSeverity() == IStatus.ERROR) { status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidPackageName", val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.DiscouragedPackageName", val.getMessage())); } } IPackageFragmentRoot root= getPackageFragmentRoot(); if (root != null) { IPackageFragment pack= root.getPackageFragment(packName); try { IPath rootPath= root.getPath(); IPath outputPath= root.getJavaProject().getOutputLocation(); if (rootPath.isPrefixOf(outputPath) && !rootPath.equals(outputPath)) { IPath packagePath= pack.getUnderlyingResource().getFullPath(); if (outputPath.isPrefixOf(packagePath)) { status.setError(NewWizardMessages.getString("TypePage.error.ClashOutputLocation")); return status; } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } fCurrPackage= pack; } else { status.setError(""); } return status;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
} /* * Updates the 'default' label next to the package field. */ private void updatePackageStatusLabel() { String packName= fPackageDialogField.getText(); if (packName.length() == 0) { fPackageDialogField.setStatus(NewWizardMessages.getString("TypePage.default")); } else { fPackageDialogField.setStatus(""); } } /* * Updates the enable state of buttons related to the enclosing type selection checkbox. */ private void updateEnableState() { boolean enclosing= isEnclosingTypeSelected(); fPackageDialogField.setEnabled(fCanModifyPackage && !enclosing); fEnclosingTypeDialogField.setEnabled(fCanModifyEnclosingType && enclosing); } /** * Called when the enclosing type name has changed. * The method validates the enclosing type and returns the status of the validation * This also updates the enclosing type model. * Can be extended to add more validation */ protected IStatus enclosingTypeChanged() { StatusInfo status= new StatusInfo();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fCurrEnclosingType= null; IPackageFragmentRoot root= getPackageFragmentRoot(); fEnclosingTypeDialogField.enableButton(root != null); if (root == null) { status.setError(""); return status; } String enclName= getEnclosingTypeText(); if (enclName.length() == 0) { status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeEnterName")); return status; } try { IType type= JavaModelUtil.findType(root.getJavaProject(), enclName); if (type == null) { status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists")); return status; } if (type.getCompilationUnit() == null) { status.setError(NewWizardMessages.getString("TypePage.error.EnclosingNotInCU")); return status; } fCurrEnclosingType= type; return status; } catch (JavaModelException e) { status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists")); JavaPlugin.log(e.getStatus());
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
return status; } } /** * Called when the type name has changed. * The method validates the type name and returns the status of the validation. * Can be extended to add more validation */ protected IStatus typeNameChanged() { StatusInfo status= new StatusInfo(); String typeName= getTypeName(); if (typeName.length() == 0) { status.setError(NewWizardMessages.getString("TypePage.error.EnterTypeName")); return status; } if (typeName.indexOf('.') != -1) { status.setError(NewWizardMessages.getString("TypePage.error.QualifiedName")); return status; } IStatus val= JavaConventions.validateJavaTypeName(typeName); if (val.getSeverity() == IStatus.ERROR) { status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidTypeName", val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.TypeNameDiscouraged", val.getMessage())); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (!isEnclosingTypeSelected()) { IPackageFragment pack= getPackageFragment(); if (pack != null) { ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java"); if (cu.exists()) { status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists")); return status; } } } else { IType type= getEnclosingType(); if (type != null) { IType member= type.getType(typeName); if (member.exists()) { status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists")); return status; } } } return status; } /** * Called when the superclass name has changed. * The method validates the superclass name and returns the status of the validation. * Can be extended to add more validation */ protected IStatus superClassChanged() { StatusInfo status= new StatusInfo(); IPackageFragmentRoot root= getPackageFragmentRoot();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
fSuperClassDialogField.enableButton(root != null); fSuperClass= null; String sclassName= getSuperClass(); if (sclassName.length() == 0) { return status; } IStatus val= JavaConventions.validateJavaTypeName(sclassName); if (!val.isOK()) { status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName")); return status; } if (root != null) { try { IType type= resolveSuperTypeName(root.getJavaProject(), sclassName); if (type == null) { status.setWarning(NewWizardMessages.getString("TypePage.warning.SuperClassNotExists")); return status; } else { if (type.isInterface()) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotClass", sclassName)); return status; } int flags= type.getFlags(); if (Flags.isFinal(flags)) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsFinal", sclassName)); return status;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
} else if (!JavaModelUtil.isVisible(type, getPackageFragment())) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotVisible", sclassName)); return status; } } fSuperClass= type; } catch (JavaModelException e) { status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName")); JavaPlugin.log(e.getStatus()); } } else { status.setError(""); } return status; } private IType resolveSuperTypeName(IJavaProject jproject, String sclassName) throws JavaModelException { IType type= null; if (isEnclosingTypeSelected()) { IType enclosingType= getEnclosingType(); if (enclosingType != null) { String[][] res= enclosingType.resolveType(sclassName); if (res != null && res.length > 0) { type= JavaModelUtil.findType(jproject, res[0][0], res[0][1]); } } } else { IPackageFragment currPack= getPackageFragment();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (type == null && currPack != null) { String packName= currPack.getElementName(); if (!currPack.isDefaultPackage()) { type= JavaModelUtil.findType(jproject, packName, sclassName); } if (type == null && !"java.lang".equals(packName)) { type= JavaModelUtil.findType(jproject, "java.lang", sclassName); } } if (type == null) { type= JavaModelUtil.findType(jproject, sclassName); } } return type; } /** * Called when the list of super interface has changed. * The method validates the superinterfaces and returns the status of the validation. * Can be extended to add more validation. */ protected IStatus superInterfacesChanged() { StatusInfo status= new StatusInfo(); IPackageFragmentRoot root= getPackageFragmentRoot(); fSuperInterfacesDialogField.enableButton(0, root != null);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
if (root != null) { List elements= fSuperInterfacesDialogField.getElements(); int nElements= elements.size(); for (int i= 0; i < nElements; i++) { String intfname= (String)elements.get(i); try { IType type= JavaModelUtil.findType(root.getJavaProject(), intfname); if (type == null) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceNotExists", intfname)); return status; } else { if (type.isClass()) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotInterface", intfname)); return status; } if (!JavaModelUtil.isVisible(type, getPackageFragment())) { status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotVisible", intfname)); return status; } } } catch (JavaModelException e) { JavaPlugin.log(e.getStatus()); } } } return status; } /** * Called when the modifiers have changed.
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
* The method validates the modifiers and returns the status of the validation. * Can be extended to add more validation. */ protected IStatus modifiersChanged() { StatusInfo status= new StatusInfo(); int modifiers= getModifiers(); if (Flags.isFinal(modifiers) && Flags.isAbstract(modifiers)) { status.setError(NewWizardMessages.getString("TypePage.error.ModifiersFinalAndAbstract")); } return status; } private IPackageFragment choosePackage() { IPackageFragmentRoot froot= getPackageFragmentRoot(); IJavaElement[] packages= null; try { if (froot != null) { packages= froot.getChildren(); } } catch (JavaModelException e) { } if (packages == null) { packages= new IJavaElement[0]; } ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT)); dialog.setIgnoreCase(false);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description")); dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty")); dialog.setElements(packages); if (fCurrPackage != null) { dialog.setInitialSelections(new Object[] { fCurrPackage }); } if (dialog.open() == dialog.OK) { return (IPackageFragment) dialog.getFirstResult(); } return null; } private IType chooseEnclosingType() { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root == null) { return null; } IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements); TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_TYPES); dialog.setTitle(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.description")); if (fCurrEnclosingType != null) { dialog.setInitialSelections(new Object[] { fCurrEnclosingType }); dialog.setFilter(fCurrEnclosingType.getElementName().substring(0, 1)); } if (dialog.open() == dialog.OK) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
return (IType) dialog.getFirstResult(); } return null; } private IType chooseSuperType() { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root == null) { return null; } IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements); TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_CLASSES); dialog.setTitle(NewWizardMessages.getString("TypePage.SuperClassDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.SuperClassDialog.message")); if (fSuperClass != null) { dialog.setFilter(fSuperClass.getElementName()); } if (dialog.open() == dialog.OK) { return (IType) dialog.getFirstResult(); } return null; } private void chooseSuperInterfaces() { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root == null) { return; } IJavaProject project= root.getJavaProject();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
SuperInterfaceSelectionDialog dialog= new SuperInterfaceSelectionDialog(getShell(), getWizard().getContainer(), fSuperInterfacesDialogField, project); dialog.setTitle(NewWizardMessages.getString("TypePage.InterfacesDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.InterfacesDialog.message")); dialog.open(); return; } /** * Creates a type using the current field values. */ public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException { monitor.beginTask(NewWizardMessages.getString("TypePage.operationdesc"), 10); IPackageFragmentRoot root= getPackageFragmentRoot(); IPackageFragment pack= getPackageFragment(); if (pack == null) { pack= root.getPackageFragment(""); } if (!pack.exists()) { String packName= pack.getElementName(); pack= root.createPackageFragment(packName, true, null); } monitor.worked(1); String clName= fTypeNameDialogField.getText();
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
boolean isInnerClass= isEnclosingTypeSelected(); IType createdType; ImportsStructure imports; int indent= 0; String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference(); int threshold= ImportOrganizePreferencePage.getImportNumberThreshold(); String lineDelimiter= null; if (!isInnerClass) { ICompilationUnit parentCU= pack.getCompilationUnit(clName + ".java"); imports= new ImportsStructure(parentCU, prefOrder, threshold, false); lineDelimiter= StubUtility.getLineDelimiterUsed(parentCU); String content= createTypeBody(imports, lineDelimiter); createdType= parentCU.createType(content, null, false, new SubProgressMonitor(monitor, 5)); } else { IType enclosingType= getEnclosingType(); IType workingCopy= (IType) EditorUtility.getWorkingCopy(enclosingType); if (workingCopy != null) { enclosingType= workingCopy; } ICompilationUnit parentCU= enclosingType.getCompilationUnit(); imports= new ImportsStructure(parentCU, prefOrder, threshold, true);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
lineDelimiter= StubUtility.getLineDelimiterUsed(enclosingType); String content= createTypeBody(imports, lineDelimiter); IJavaElement[] elems= enclosingType.getChildren(); IJavaElement sibling= elems.length > 0 ? elems[0] : null; createdType= enclosingType.createType(content, sibling, false, new SubProgressMonitor(monitor, 1)); indent= StubUtility.getIndentUsed(enclosingType) + 1; } imports.create(!isInnerClass, new SubProgressMonitor(monitor, 1)); String[] methods= evalMethods(createdType, imports, new SubProgressMonitor(monitor, 1)); if (methods.length > 0) { for (int i= 0; i < methods.length; i++) { createdType.createMethod(methods[i], null, false, null); } imports.create(!isInnerClass, null); } monitor.worked(1); String formattedContent= StubUtility.codeFormat(createdType.getSource(), indent, lineDelimiter); ISourceRange range= createdType.getSourceRange(); IBuffer buf= createdType.getCompilationUnit().getBuffer(); buf.replace(range.getOffset(), range.getLength(), formattedContent); if (!isInnerClass) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
buf.save(new SubProgressMonitor(monitor, 1), false); } else { monitor.worked(1); } fCreatedType= createdType; monitor.done(); } /** * Returns the created type. Only valid after createType has been invoked */ public IType getCreatedType() { return fCreatedType; } private void writeSuperClass(StringBuffer buf, IImportsStructure imports) { String typename= getSuperClass(); if (fIsClass && typename.length() > 0 && !"java.lang.Object".equals(typename)) { buf.append(" extends "); buf.append(Signature.getSimpleName(typename)); if (fSuperClass != null) { imports.addImport(JavaModelUtil.getFullyQualifiedName(fSuperClass)); } else { imports.addImport(typename); } } } private void writeSuperInterfaces(StringBuffer buf, IImportsStructure imports) {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
List interfaces= getSuperInterfaces(); int last= interfaces.size() - 1; if (last >= 0) { if (fIsClass) { buf.append(" implements "); } else { buf.append(" extends "); } for (int i= 0; i <= last; i++) { String typename= (String) interfaces.get(i); imports.addImport(typename); buf.append(Signature.getSimpleName(typename)); if (i < last) { buf.append(", "); } } } } /* * Called from createType to construct the source for this type */ private String createTypeBody(IImportsStructure imports, String lineDelimiter) { StringBuffer buf= new StringBuffer(); int modifiers= getModifiers(); buf.append(Flags.toString(modifiers)); if (modifiers != 0) { buf.append(' '); } buf.append(fIsClass ? "class " : "interface ");
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
buf.append(getTypeName()); writeSuperClass(buf, imports); writeSuperInterfaces(buf, imports); buf.append(" {"); buf.append(lineDelimiter); buf.append(lineDelimiter); buf.append('}'); buf.append(lineDelimiter); return buf.toString(); } /** * Called from createType to allow adding methods for the newly created type * Returns array of sources of the methods that have to be added * @param parent The type where the methods will be added to */ protected String[] evalMethods(IType parent, IImportsStructure imports, IProgressMonitor monitor) throws CoreException { return new String[0]; } /** * Creates the bodies of all unimplemented methods or/and all constructors * Can be used by implementors of TypePage to add method stub checkboxes */ protected String[] constructInheritedMethods(IType type, boolean doConstructors, boolean doUnimplementedMethods, IImportsStructure imports, IProgressMonitor monitor) throws CoreException { List newMethods= new ArrayList(); ITypeHierarchy hierarchy= type.newSupertypeHierarchy(monitor); if (doConstructors) { IType superclass= hierarchy.getSuperclass(type); if (superclass != null) { StubUtility.evalConstructors(type, superclass, newMethods, imports);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
} } if (doUnimplementedMethods) { StubUtility.evalUnimplementedMethods(type, hierarchy, false, newMethods, imports); } return (String[]) newMethods.toArray(new String[newMethods.size()]); } /** * @see NewElementWizardPage#getRunnable */ public IRunnableWithProgress getRunnable() { return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { if (monitor == null) { monitor= new NullProgressMonitor(); } createType(monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } } }; } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.buildpaths; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection;
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.launching.JavaRuntime; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter; import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; public class VariableBlock {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
private ListDialogField fVariablesList; private StatusInfo fSelectionStatus; private IStatusChangeListener fContext; private boolean fUseAsSelectionDialog; private boolean fRemovingSelection= false; private String fSelectedVariable; private Control fControl; /** * Constructor for VariableBlock */ public VariableBlock(IStatusChangeListener context, boolean useAsSelectionDialog, String initSelection) { fContext= context; fUseAsSelectionDialog= useAsSelectionDialog; fSelectionStatus= new StatusInfo(); String[] buttonLabels= new String[] { NewWizardMessages.getString("VariableBlock.vars.add.button"),
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
NewWizardMessages.getString("VariableBlock.vars.edit.button"), null, NewWizardMessages.getString("VariableBlock.vars.remove.button") }; VariablesAdapter adapter= new VariablesAdapter(); CPVariableElementLabelProvider labelProvider= new CPVariableElementLabelProvider(useAsSelectionDialog); fVariablesList= new ListDialogField(adapter, buttonLabels, labelProvider); fVariablesList.setDialogFieldListener(adapter); fVariablesList.setLabelText(NewWizardMessages.getString("VariableBlock.vars.label")); fVariablesList.setRemoveButtonIndex(3); fVariablesList.enableButton(1, false); CPVariableElement initSelectedElement= null; String[] reservedName= getReservedVariableNames(); ArrayList reserved= new ArrayList(reservedName.length); addAll(reservedName, reserved); String[] entries= JavaCore.getClasspathVariableNames(); ArrayList elements= new ArrayList(entries.length); for (int i= 0; i < entries.length; i++) { String name= entries[i]; CPVariableElement elem; IPath entryPath= JavaCore.getClasspathVariable(name); elem= new CPVariableElement(name, entryPath, reserved.contains(name)); elements.add(elem);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
if (name.equals(initSelection)) { initSelectedElement= elem; } } fVariablesList.setElements(elements); ISelection sel; if (initSelectedElement != null) { sel= new StructuredSelection(initSelectedElement); } else if (entries.length > 0) { sel= new StructuredSelection(fVariablesList.getElement(0)); } else { sel= StructuredSelection.EMPTY; } fVariablesList.selectElements(sel); } private String[] getReservedVariableNames() { return new String[] { JavaRuntime.JRELIB_VARIABLE, JavaRuntime.JRESRC_VARIABLE, JavaRuntime.JRESRCROOT_VARIABLE, }; } public Control createContents(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); int minimalWidth= SWTUtil.convertWidthInCharsToPixels(80, composite); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fVariablesList }, true, minimalWidth, 0, 0, 0); fVariablesList.getTableViewer().setSorter(new ViewerSorter() {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
public int compare(Viewer viewer, Object e1, Object e2) { if (e1 instanceof CPVariableElement && e2 instanceof CPVariableElement) { return ((CPVariableElement)e1).getName().compareTo(((CPVariableElement)e2).getName()); } return super.compare(viewer, e1, e2); } }); fControl= composite; return composite; } public void addDoubleClickListener(IDoubleClickListener listener) { fVariablesList.getTableViewer().addDoubleClickListener(listener); } private Shell getShell() { if (fControl != null) { return fControl.getShell(); } return JavaPlugin.getActiveWorkbenchShell(); } public String getSelectedVariable() { return fSelectedVariable; } private class VariablesAdapter implements IDialogFieldListener, IListAdapter {
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
public void customButtonPressed(DialogField field, int index) { switch (index) { case 0: editEntries(null); break; case 1: List selected= fVariablesList.getSelectedElements(); editEntries((CPVariableElement)selected.get(0)); break; } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
public void selectionChanged(DialogField field) { doSelectionChanged(field); } public void dialogFieldChanged(DialogField field) { } } private boolean containsReserved(List selected) { for (int i= selected.size()-1; i >= 0; i--) { if (((CPVariableElement)selected.get(i)).isReserved()) { return true; } } return false; } private static void addAll(Object[] objs, Collection dest) { for (int i= 0; i < objs.length; i++) { dest.add(objs[i]); } } private void doSelectionChanged(DialogField field) { List selected= fVariablesList.getSelectedElements(); boolean isSingleSelected= selected.size() == 1; boolean containsReserved= containsReserved(selected);
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
fVariablesList.enableButton(1, isSingleSelected && !containsReserved); fVariablesList.enableButton(3, !containsReserved); fSelectedVariable= null; if (fUseAsSelectionDialog) { if (isSingleSelected) { fSelectionStatus.setOK(); fSelectedVariable= ((CPVariableElement)selected.get(0)).getName(); } else { fSelectionStatus.setError(""); } fContext.statusChanged(fSelectionStatus); } } private void editEntries(CPVariableElement entry) { List existingEntries= fVariablesList.getElements(); VariableCreationDialog dialog= new VariableCreationDialog(getShell(), entry, existingEntries); if (dialog.open() != dialog.OK) { return; } CPVariableElement newEntry= dialog.getClasspathElement(); if (entry == null) { fVariablesList.addElement(newEntry); entry= newEntry; } else { entry.setName(newEntry.getName());
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
entry.setPath(newEntry.getPath()); fVariablesList.refresh(); } fVariablesList.selectElements(new StructuredSelection(entry)); } public void performDefaults() { fVariablesList.removeAllElements(); String[] reservedName= getReservedVariableNames(); for (int i= 0; i < reservedName.length; i++) { CPVariableElement elem= new CPVariableElement(reservedName[i], null, true); elem.setReserved(true); fVariablesList.addElement(elem); } } public boolean performOk() { List toRemove= new ArrayList(); toRemove.addAll(Arrays.asList(JavaCore.getClasspathVariableNames())); List elements= fVariablesList.getElements(); for (int i= elements.size()-1; i >= 0; i--) { CPVariableElement curr= (CPVariableElement) elements.get(i); if (curr.isReserved()) { elements.remove(curr); } else { IPath path= curr.getPath(); IPath prevPath= JavaCore.getClasspathVariable(curr.getName()); if (prevPath != null && prevPath.equals(path)) { elements.remove(curr); }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
} toRemove.remove(curr.getName()); } int steps= elements.size() + toRemove.size(); if (steps > 0) { IRunnableWithProgress runnable= new VariableBlockRunnable(toRemove, elements); ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); try { dialog.run(true, true, runnable); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), NewWizardMessages.getString("VariableBlock.operation_errror.title"), NewWizardMessages.getString("VariableBlock.operation_errror.message")); return false; } catch (InterruptedException e) { return true; } } return true; } private class VariableBlockRunnable implements IRunnableWithProgress { private List fToRemove; private List fToChange; public VariableBlockRunnable(List toRemove, List toChange) { fToRemove= toRemove; fToChange= toChange; } /*
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
* @see IRunnableWithProgress#run(IProgressMonitor) */ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { int steps= fToChange.size() + fToRemove.size(); monitor.beginTask(NewWizardMessages.getString("VariableBlock.operation_desc"), steps); try { for (int i= 0; i < fToChange.size(); i++) { CPVariableElement curr= (CPVariableElement) fToChange.get(i); SubProgressMonitor subMonitor= new SubProgressMonitor(monitor, 1); JavaCore.setClasspathVariable(curr.getName(), curr.getPath(), subMonitor); if (monitor.isCanceled()) { return; } } for (int i= 0; i < fToRemove.size(); i++) { SubProgressMonitor subMonitor= new SubProgressMonitor(monitor, 1); JavaCore.removeClasspathVariable((String) fToRemove.get(i), subMonitor); if (monitor.isCanceled()) { return; } } } catch (JavaModelException e) { throw new InvocationTargetException(e); } finally { monitor.done(); } } } }
5,449
Bug 5449 TVT Text Expansion/Truncations in new java class dialog
null
resolved fixed
24c773c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2001-11-22T14:06:41Z
2001-11-02T00:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.wizards.dialogfields; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite;