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
unknown | report_datetime
unknown | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | textBox.setData(key);
textBox.setLayoutData(new GridData());
String currValue= (String)fWorkingValues.get(key);
textBox.setText(String.valueOf(getIntValue(currValue, 1)));
textBox.setTextLimit(3);
textBox.addModifyListener(fTextModifyListener);
GridData gd= new GridData();
gd.widthHint= convertWidthInCharsToPixels(5);
textBox.setLayoutData(gd);
fTextBoxes.add(textBox);
return textBox;
}
private void controlChanged(Button button) {
ControlData data= (ControlData) button.getData();
boolean selection= button.getSelection();
String newValue= data.getValue(selection);
fWorkingValues.put(data.getKey(), newValue);
updatePreview();
if (PREF_TAB_CHAR.equals(data.getKey())) {
fTabSizeTextBox.setEnabled(!selection);
updateStatus(new StatusInfo());
if (selection) {
fTabSizeTextBox.setText((String)fWorkingValues.get(PREF_TAB_SIZE));
}
}
} |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | private void textChanged(Text textControl) {
String key= (String) textControl.getData();
String number= textControl.getText();
IStatus status= validatePositiveNumber(number);
if (!status.matches(IStatus.ERROR)) {
fWorkingValues.put(key, number);
}
updateStatus(status);
updatePreview();
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
String[] allKeys= getAllKeys();
Hashtable actualOptions= JavaCore.getOptions();
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < allKeys.length; i++) {
String key= allKeys[i];
String val= (String) fWorkingValues.get(key);
actualOptions.put(key, val);
store.putValue(key, val);
}
JavaCore.setOptions(actualOptions);
return super.performOk();
} |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | /*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fWorkingValues= JavaCore.getDefaultOptions();
updateControls();
super.performDefaults();
}
private String loadPreviewFile(String filename) {
String separator= System.getProperty("line.separator");
StringBuffer btxt= new StringBuffer(512);
BufferedReader rin= null;
try {
rin= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
String line;
while ((line= rin.readLine()) != null) {
btxt.append(line);
btxt.append(separator);
}
} catch (IOException io) {
JavaPlugin.log(io);
} finally {
if (rin != null) {
try { rin.close(); } catch (IOException e) {}
}
}
return btxt.toString();
}
private void updatePreview() { |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | fPreviewDocument.set(CodeFormatter.format(fPreviewText, 0, fWorkingValues));
}
private void updateControls() {
for (int i= fCheckBoxes.size() - 1; i >= 0; i--) {
Button curr= (Button) fCheckBoxes.get(i);
ControlData data= (ControlData) curr.getData();
String currValue= (String) fWorkingValues.get(data.getKey());
curr.setSelection(data.getSelection(currValue) == 0);
}
for (int i= fTextBoxes.size() - 1; i >= 0; i--) {
Text curr= (Text) fTextBoxes.get(i);
String key= (String) curr.getData();
String currValue= (String) fWorkingValues.get(key);
curr.setText(currValue);
}
fTabSizeTextBox.setEnabled(!usesTabs());
}
private IStatus validatePositiveNumber(String number) {
StatusInfo status= new StatusInfo();
if (number.length() == 0) {
status.setError(JavaUIMessages.getString("CodeFormatterPreferencePage.empty_input"));
} else {
try {
int value= Integer.parseInt(number);
if (value < 0) {
status.setError(JavaUIMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number)); |
4,171 | Bug 4171 Accessibility: Code Formatter Page too large with a large text font (1GJL58E) | If the Text font is set to be very large (say 36 point) the CodeFormatter preference page is created so large that it ends up bigger than the display. The text in the preference page should be scrollable. It also does not pick up changes to the font size so if the user changes the size of the text font they will have to reopen the preference dialog to get the change picked up. STEPS 1) Set the Text Font in the font preference page to be 36 point 2) Close the preference dialog 3) Reopen the preference dialog and select the code formatter page NOTES: | verified fixed | c9d4729 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T10:08:06Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java | }
} catch (NumberFormatException e) {
status.setError(JavaUIMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number));
}
}
return status;
}
private void updateStatus(IStatus status) {
if (!status.matches(IStatus.ERROR)) {
for (int i= 0; i < fTextBoxes.size(); i++) {
Text curr= (Text) fTextBoxes.get(i);
if (!(curr == fTabSizeTextBox && usesTabs())) {
IStatus currStatus= validatePositiveNumber(curr.getText());
status= StatusUtil.getMoreSevere(currStatus, status);
}
}
}
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private boolean usesTabs() {
return TAB.equals(fWorkingValues.get(PREF_TAB_CHAR));
}
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.lang.reflect.InvocationTargetException;
import java.util.Iterator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.TextPresentation;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IViewPart; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.ui.texteditor.MarkerUtilities;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.tasklist.TaskList;
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.ISourceReference;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.compare.JavaAddElementFromHistory;
import org.eclipse.jdt.internal.ui.compare.JavaReplaceWithEditionAction;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.BracketHighlighter.BracketPositionManager;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.BracketHighlighter.HighlightBrackets;
import org.eclipse.jdt.internal.ui.text.JavaPairMatcher;
/**
* Java specific text editor.
*/
public class CompilationUnitEditor extends JavaEditor { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | /**
* Responsible for highlighting matching pairs of brackets.
*/
class BracketHighlighter implements KeyListener, MouseListener {
/**
* Highlights the brackets.
*/
class HighlightBrackets implements PaintListener {
private boolean fHooked= false;
private JavaPairMatcher fMatcher= new JavaPairMatcher(new char[] { '{', '}', '(', ')', '[', ']' });
private StyledText fTextWidget;
private Color fColor;
public HighlightBrackets() {
fTextWidget= fSourceViewer.getTextWidget();
fColor= fTextWidget.getDisplay().getSystemColor(SWT.COLOR_MAGENTA);
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | public void dispose() {
if (fMatcher != null) {
fMatcher.dispose();
fMatcher= null;
}
fTextWidget= null;
fColor= null;
}
public void run() {
int offset= fSourceViewer.getSelectedRange().x;
IRegion pair= fMatcher.match(fSourceViewer.getDocument(), offset);
if (pair == null) {
removeStyles();
} else {
if (pair.getOffset() != fBracketPosition.getOffset() || pair.getLength() != fBracketPosition.getLength())
removeStyles();
fBracketPosition.offset= pair.getOffset();
fBracketPosition.length= pair.getLength();
fBracketPosition.isDeleted= false;
applyStyles();
}
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | public void paintControl(PaintEvent event) {
handleDrawRequest(event.gc);
}
private void handleDrawRequest(GC gc) {
IRegion region= fSourceViewer.getVisibleRegion();
int offset= fBracketPosition.getOffset();
int length= fBracketPosition.getLength();
if (region.getOffset() <= offset && region.getOffset() + region.getLength() >= offset + length) {
offset -= region.getOffset();
if (length == 2) {
draw(gc, offset, length);
} else {
draw(gc, offset, 1);
draw(gc, offset + length -1, 1);
}
}
}
private void draw(GC gc, int offset, int length) {
if (gc != null) {
Point left= fTextWidget.getLocationAtOffset(offset);
Point right= fTextWidget.getLocationAtOffset(offset + length);
gc.setForeground(fColor);
gc.drawRectangle(left.x, left.y, right.x - left.x - 1, gc.getFontMetrics().getHeight() - 1);
} else {
fTextWidget.redrawRange(offset, length, true);
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | }
private void removeStyles() {
fHooked= false;
fTextWidget.removePaintListener(this);
handleDrawRequest(null);
}
private void applyStyles() {
if (!fHooked) {
fHooked= true;
fTextWidget.addPaintListener(this);
}
handleDrawRequest(null);
}
};
/**
* Monitors the input document of the source viewer.
*/
class BracketPositionManager implements ITextInputListener {
private IDocument fDocument;
private IPositionUpdater fPositionUpdater;
private String fCategory;
public BracketPositionManager() {
fCategory= getClass().getName() + hashCode();
fPositionUpdater= new DefaultPositionUpdater(fCategory);
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | public void install() {
fSourceViewer.addTextInputListener(this);
start(fSourceViewer.getDocument());
}
public void dispose() {
fSourceViewer.removeTextInputListener(this);
if (fDocument != null) {
stop(fDocument);
fDocument= null;
}
}
private void start(IDocument document) {
fDocument= document;
fDocument.addPositionCategory(fCategory);
fDocument.addPositionUpdater(fPositionUpdater);
try {
fDocument.addPosition(fCategory, fBracketPosition);
} catch (BadPositionCategoryException x) {
} catch (BadLocationException x) {
}
}
private void stop(IDocument document) {
if (document == fDocument) {
try { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | document.removePositionUpdater(fPositionUpdater);
document.removePositionCategory(fCategory);
} catch (BadPositionCategoryException x) {
}
fDocument= null;
}
}
/*
* @see ITextInputListener#inputDocumentAboutToBeChanged(IDocument, IDocument)
*/
public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
if (oldInput != null)
stop(oldInput);
}
/*
* @see ITextInputListener#inputDocumentChanged(IDocument, IDocument)
*/
public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
if (newInput != null)
start(newInput);
}
};
private Position fBracketPosition= new Position(0, 0);
private BracketPositionManager fManager= new BracketPositionManager();
private ISourceViewer fSourceViewer; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | private HighlightBrackets fHighlightBrackets;
public BracketHighlighter(ISourceViewer sourceViewer) {
fSourceViewer= sourceViewer;
fHighlightBrackets= new HighlightBrackets();
}
public void install() {
fManager.install();
StyledText text= fSourceViewer.getTextWidget();
text.addKeyListener(this);
text.addMouseListener(this);
}
public void dispose() {
if (fManager != null) {
fManager.dispose();
fManager= null;
}
if (fHighlightBrackets != null) {
fHighlightBrackets.dispose();
fHighlightBrackets= null;
}
if (fSourceViewer != null && fBracketHighlighter != null) {
StyledText text= fSourceViewer.getTextWidget(); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | if (text != null && !text.isDisposed()) {
text.removeKeyListener(fBracketHighlighter);
text.removeMouseListener(fBracketHighlighter);
}
fSourceViewer= null;
}
}
/*
* @see KeyListener#keyPressed(KeyEvent)
*/
public void keyPressed(KeyEvent e) {
}
/*
* @see KeyListener#keyReleased(KeyEvent)
*/
public void keyReleased(KeyEvent e) {
fHighlightBrackets.run();
}
/*
* @see MouseListener#mouseDoubleClick(MouseEvent)
*/
public void mouseDoubleClick(MouseEvent e) {
}
/*
* @see MouseListener#mouseDown(MouseEvent)
*/
public void mouseDown(MouseEvent e) {
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | /*
* @see MouseListener#mouseUp(MouseEvent)
*/
public void mouseUp(MouseEvent e) {
fHighlightBrackets.run();
}
};
protected ISelectionChangedListener fStatusLineClearer;
protected ISavePolicy fSavePolicy;
private JavaEditorErrorTickUpdater fJavaEditorErrorTickUpdater;
private BracketHighlighter fBracketHighlighter;
/**
* Creates a new compilation unit editor.
*/
public CompilationUnitEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getCompilationUnitDocumentProvider());
setEditorContextMenuId("#CompilationUnitEditorContext");
setRulerContextMenuId("#CompilationUnitRulerContext");
setOutlinerContextMenuId("#CompilationUnitOutlinerContext");
fSavePolicy= null; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | fJavaEditorErrorTickUpdater= new JavaEditorErrorTickUpdater(this);
}
/*
* @see AbstractTextEditor#createActions
*/
protected void createActions() {
super.createActions();
setAction("ContentAssistProposal", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS));
setAction("AddImportOnSelection", new AddImportOnSelectionAction(this));
setAction("OrganizeImports", new OrganizeImportsAction(this));
setAction("Comment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Comment.", this, ITextOperationTarget.PREFIX));
setAction("Uncomment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX));
setAction("Format", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT));
setAction("AddBreakpoint", new AddBreakpointAction(this));
setAction("ManageBreakpoints", new BreakpointRulerAction(getVerticalRuler(), this));
setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, getAction("ManageBreakpoints"));
}
/*
* @see JavaEditor#getJavaSourceReferenceAt
*/
protected ISourceReference getJavaSourceReferenceAt(int position) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
synchronized (unit) {
try {
unit.reconcile();
IJavaElement element= unit.getElementAt(position);
if (element instanceof ISourceReference)
return (ISourceReference) element;
} catch (JavaModelException x) {
}
}
}
return null;
}
/*
* @see AbstractEditor#editorContextMenuAboutToChange
*/
public void editorContextMenuAboutToShow(IMenuManager menu) {
super.editorContextMenuAboutToShow(menu);
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "ContentAssistProposal");
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "AddImportOnSelection");
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "OrganizeImports");
addAction(menu, ITextEditorActionConstants.GROUP_ADD, "AddBreakpoint");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Comment");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Uncomment");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Format"); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | }
/*
* @see AbstractTextEditor#rulerContextMenuAboutToShow
*/
protected void rulerContextMenuAboutToShow(IMenuManager menu) {
super.rulerContextMenuAboutToShow(menu);
addAction(menu, "ManageBreakpoints");
}
/*
* @see JavaEditor#createOutlinePage
*/
protected JavaOutlinePage createOutlinePage() {
JavaOutlinePage page= super.createOutlinePage();
page.setAction("OrganizeImports", new OrganizeImportsAction(this));
page.setAction("ReplaceWithEdition", new JavaReplaceWithEditionAction(page));
page.setAction("AddEdition", new JavaAddElementFromHistory(this, page));
DeleteISourceManipulationsAction deleteElement= new DeleteISourceManipulationsAction(page);
page.setAction("DeleteElement", deleteElement);
page.addSelectionChangedListener(deleteElement);
return page;
}
/*
* @see JavaEditor#setOutlinePageInput(JavaOutlinePage, IEditorInput)
*/
protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | if (page != null) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
page.setInput(manager.getWorkingCopy(input));
}
}
/*
* @see AbstractTextEditor#performSaveOperation(WorkspaceModifyOperation, IProgressMonitor)
*/
protected void performSaveOperation(WorkspaceModifyOperation operation, IProgressMonitor progressMonitor) {
IDocumentProvider p= getDocumentProvider();
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(fSavePolicy);
}
try {
super.performSaveOperation(operation, progressMonitor);
} finally {
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(null);
}
}
}
/*
* @see AbstractTextEditor#doSave(IProgressMonitor)
*/
public void doSave(IProgressMonitor progressMonitor) { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | IDocumentProvider p= getDocumentProvider();
if (p == null)
return;
if (p.isDeleted(getEditorInput())) {
if (isSaveAsAllowed()) {
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
* Changed Behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
performSaveAs(progressMonitor);
} else {
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Missing resources.
*/
Shell shell= getSite().getShell();
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title1"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message1"));
}
} else {
getStatusLineManager().setErrorMessage(""); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
synchronized (unit) {
performSaveOperation(createSaveOperation(false), progressMonitor);
}
} else
performSaveOperation(createSaveOperation(false), progressMonitor);
}
}
/**
* Jumps to the error next according to the given direction.
*/
public void gotoError(boolean forward) {
ISelectionProvider provider= getSelectionProvider();
if (fStatusLineClearer != null) {
provider.removeSelectionChangedListener(fStatusLineClearer);
fStatusLineClearer= null;
}
ITextSelection s= (ITextSelection) provider.getSelection();
IMarker nextError= getNextError(s.getOffset(), forward);
if (nextError != null) {
gotoMarker(nextError); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | IWorkbenchPage page= getSite().getPage();
IViewPart view= view= page.findView("org.eclipse.ui.views.TaskList");
if (view instanceof TaskList) {
StructuredSelection ss= new StructuredSelection(nextError);
((TaskList) view).setSelection(ss, true);
}
getStatusLineManager().setErrorMessage(nextError.getAttribute(IMarker.MESSAGE, ""));
fStatusLineClearer= new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
getSelectionProvider().removeSelectionChangedListener(fStatusLineClearer);
fStatusLineClearer= null;
getStatusLineManager().setErrorMessage("");
}
};
provider.addSelectionChangedListener(fStatusLineClearer);
} else {
getStatusLineManager().setErrorMessage("");
}
}
private IMarker getNextError(int offset, boolean forward) {
IMarker nextError= null;
IDocument document= getDocumentProvider().getDocument(getEditorInput()); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | int endOfDocument= document.getLength();
int distance= 0;
IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
Iterator e= model.getAnnotationIterator();
while (e.hasNext()) {
Annotation a= (Annotation) e.next();
if (a instanceof MarkerAnnotation) {
MarkerAnnotation ma= (MarkerAnnotation) a;
IMarker marker= ma.getMarker();
if (MarkerUtilities.isMarkerType(marker, IMarker.PROBLEM)) {
Position p= model.getPosition(a);
if (!p.includes(offset)) {
int currentDistance= 0;
if (forward) {
currentDistance= p.getOffset() - offset;
if (currentDistance < 0)
currentDistance= endOfDocument - offset + p.getOffset();
} else {
currentDistance= offset - p.getOffset();
if (currentDistance < 0)
currentDistance= offset + endOfDocument - p.getOffset();
}
if (nextError == null || currentDistance < distance) {
distance= currentDistance;
nextError= marker; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | }
}
}
}
}
return nextError;
}
/*
* @see AbstractTextEditor#isSaveAsAllowed()
*/
public boolean isSaveAsAllowed() {
return true;
}
/*
* 1GF7WG9: ITPJUI:ALL - EXCEPTION: "Save As..." always fails
*/
protected IPackageFragment getPackage(IWorkspaceRoot root, IPath path) {
if (path.segmentCount() == 1) {
IProject project= root.getProject(path.toString());
if (project != null) {
IJavaProject jProject= JavaCore.create(project);
if (jProject != null) {
try {
IJavaElement element= jProject.findElement(new Path("")); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | if (element instanceof IPackageFragment) {
IPackageFragment fragment= (IPackageFragment) element;
IJavaElement parent= fragment.getParent();
if (parent instanceof IPackageFragmentRoot) {
IPackageFragmentRoot pRoot= (IPackageFragmentRoot) parent;
if ( !pRoot.isArchive() && !pRoot.isExternal() && path.equals(pRoot.getPath()))
return fragment;
}
}
} catch (JavaModelException x) {
}
}
}
return null;
} else if (path.segmentCount() > 1) {
IFolder folder= root.getFolder(path);
IJavaElement element= JavaCore.create(folder);
if (element instanceof IPackageFragment)
return (IPackageFragment) element;
}
return null;
}
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors. |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | * Changed behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
protected void performSaveAs(IProgressMonitor progressMonitor) {
Shell shell= getSite().getShell();
SaveAsDialog dialog= new SaveAsDialog(shell);
if (dialog.open() == Dialog.CANCEL) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
IPath filePath= dialog.getResult();
if (filePath == null) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
filePath= filePath.removeTrailingSeparator();
final String fileName= filePath.lastSegment();
IPath folderPath= filePath.removeLastSegments(1);
if (folderPath == null) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
/*
* 1GF7WG9: ITPJUI:ALL - EXCEPTION: "Save As..." always fails
*/
final IPackageFragment fragment= getPackage(root, folderPath);
IFile file= root.getFile(filePath);
final FileEditorInput newInput= new FileEditorInput(file);
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
public void execute(final IProgressMonitor monitor) throws CoreException {
if (fragment != null) {
try {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
/*
* 1GJXY0L: ITPJUI:WINNT - NPE during save As in Java editor
* Introduced null check, just go on in the null case
*/
if (unit != null) {
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Changed false to true.
*/
unit.copy(fragment, null, fileName, true, monitor); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | return;
}
} catch (JavaModelException x) {
}
}
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Changed false to true.
*/
getDocumentProvider().saveDocument(monitor, newInput, getDocumentProvider().getDocument(getEditorInput()), true);
}
};
boolean success= false;
try {
if (fragment == null)
getDocumentProvider().aboutToChange(newInput);
new ProgressMonitorDialog(shell).run(false, true, op);
setInput(newInput);
success= true;
} catch (InterruptedException x) {
} catch (InvocationTargetException x) { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | /*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Missing resources.
*/
Throwable t= x.getTargetException();
if (t instanceof CoreException) {
CoreException cx= (CoreException) t;
ErrorDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title2"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message2"), cx.getStatus());
} else {
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title3"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message3") + t.getMessage());
}
} finally {
if (fragment == null)
getDocumentProvider().changed(newInput);
if (progressMonitor != null)
progressMonitor.setCanceled(!success);
}
}
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/
protected void doSetInput(IEditorInput input) throws CoreException {
super.doSetInput(input);
fJavaEditorErrorTickUpdater.setAnnotationModel(getDocumentProvider().getAnnotationModel(input));
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java | /*
* @see AbstractTextEditor#dispose()
*/
public void dispose() {
if (fJavaEditorErrorTickUpdater != null) {
fJavaEditorErrorTickUpdater.setAnnotationModel(null);
fJavaEditorErrorTickUpdater= null;
}
if (fBracketHighlighter != null) {
fBracketHighlighter.dispose();
fBracketHighlighter= null;
}
super.dispose();
}
/*
* @see AbstractTextEditor#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
ISourceViewer sourceViewer= getSourceViewer();
fBracketHighlighter= new BracketHighlighter(sourceViewer);
fBracketHighlighter.install();
}
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCodeScanner.java | package org.eclipse.jdt.internal.ui.text.java;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.EndOfLineRule;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WhitespaceRule;
import org.eclipse.jface.text.rules.WordRule;
import org.eclipse.swt.SWT;
import org.eclipse.jdt.ui.text.IColorManager;
import org.eclipse.jdt.ui.text.IJavaColorConstants;
import org.eclipse.jdt.internal.ui.text.JavaWhitespaceDetector;
import org.eclipse.jdt.internal.ui.text.JavaWordDetector;
/**
* A Java code scanner.
*/
public class JavaCodeScanner extends RuleBasedScanner { |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCodeScanner.java | private static String[] fgKeywords= {
"abstract",
"break",
"case", "catch", "class", "const", "continue",
"default", "do",
"else", "extends",
"final", "finally", "for",
"goto",
"if", "implements", "import", "instanceof", "interface",
"native", "new",
"package", "private", "protected", "public",
"return",
"static", "super", "switch", "synchronized",
"this", "throw", "throws", "transient", "try",
"volatile",
"while"
};
private static String[] fgTypes= { "void", "boolean", "char", "byte", "short", "strictfp", "int", "long", "float", "double" };
private static String[] fgConstants= { "false", "null", "true" };
private Token fKeyword;
private Token fType;
private Token fString;
private Token fComment;
private IColorManager fColorManager; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCodeScanner.java | /**
* Creates a Java code scanner
*/
public JavaCodeScanner(IColorManager manager) {
super();
setDefaultReturnToken(new Token(new TextAttribute(manager.getColor(IJavaColorConstants.JAVA_DEFAULT))));
fColorManager= manager;
fKeyword= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_KEYWORD), null, SWT.BOLD));
fType= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_TYPE), null, SWT.BOLD));
fString= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_STRING)));
fComment= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT)));
initializeRules();
}
private void initializeRules() {
List rules= new ArrayList();
rules.add(new EndOfLineRule("//", fComment));
rules.add(new SingleLineRule("\"", "\"", fString, '\\'));
rules.add(new SingleLineRule("'", "'", fString, '\\')); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCodeScanner.java | rules.add(new WhitespaceRule(new JavaWhitespaceDetector()));
WordRule wordRule= new WordRule(new JavaWordDetector(), getDefaultReturnToken());
for (int i=0; i<fgKeywords.length; i++)
wordRule.addWord(fgKeywords[i], fKeyword);
for (int i=0; i<fgTypes.length; i++)
wordRule.addWord(fgTypes[i], fType);
for (int i=0; i<fgConstants.length; i++)
wordRule.addWord(fgConstants[i], fType);
rules.add(wordRule);
IRule[] result= new IRule[rules.size()];
rules.toArray(result);
setRules(result);
}
public void colorManagerChanged() {
IToken token= getDefaultReturnToken();
if (token instanceof Token)
((Token) token).setData(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_DEFAULT)));
fKeyword.setData(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_KEYWORD)));
fType.setData(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_TYPE)));
fString.setData(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_STRING)));
fComment.setData(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT)));
}
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | package org.eclipse.jdt.ui.text;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.text.DefaultTextDoubleClickStrategy;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IAutoIndentStrategy;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.ITextDoubleClickStrategy;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.formatter.ContentFormatter;
import org.eclipse.jface.text.formatter.IContentFormatter;
import org.eclipse.jface.text.formatter.IFormattingStrategy;
import org.eclipse.jface.text.information.IInformationPresenter;
import org.eclipse.jface.text.information.IInformationProvider;
import org.eclipse.jface.text.information.InformationPresenter;
import org.eclipse.jface.text.internal.html.HoverBrowserControl;
import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.reconciler.IReconciler; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | import org.eclipse.jface.text.reconciler.MonoReconciler;
import org.eclipse.jface.text.rules.RuleBasedDamagerRepairer;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.jdt.internal.ui.text.HTMLTextPresenter;
import org.eclipse.jdt.internal.ui.text.JavaAnnotationHover;
import org.eclipse.jdt.internal.ui.text.JavaPartitionScanner;
import org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy;
import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor;
import org.eclipse.jdt.internal.ui.text.java.JavaDoubleClickSelector;
import org.eclipse.jdt.internal.ui.text.java.JavaFormattingStrategy;
import org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy;
import org.eclipse.jdt.internal.ui.text.java.hover.JavaTextHover;
import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocAutoIndentStrategy;
import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocCompletionProcessor;
/**
* Configuration for a source viewer which shows Java code.
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*/
public class JavaSourceViewerConfiguration extends SourceViewerConfiguration {
private JavaTextTools fJavaTextTools;
private ITextEditor fTextEditor; |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | /**
* Creates a new Java source viewer configuration for viewers in the given editor
* using the given Java tools.
*
* @param tools the Java tools to be used
* @param editor the editor in which the configured viewer(s) will reside
*/
public JavaSourceViewerConfiguration(JavaTextTools tools, ITextEditor editor) {
fJavaTextTools= tools;
fTextEditor= editor;
}
/**
* Returns the Java source code scanner for this configuration.
*
* @return the Java source code scanner
*/
protected RuleBasedScanner getCodeScanner() {
return fJavaTextTools.getCodeScanner();
}
/**
* Returns the JavaDoc scanner for this configuration.
*
* @return the JavaDoc scanner
*/
protected RuleBasedScanner getJavaDocScanner() {
return fJavaTextTools.getJavaDocScanner();
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | /**
* Returns the color manager for this configuration.
*
* @return the color manager
*/
protected IColorManager getColorManager() {
return fJavaTextTools.getColorManager();
}
/**
* Returns the editor in which the configured viewer(s) will reside.
*
* @return the enclosing editor
*/
protected ITextEditor getEditor() {
return fTextEditor;
}
/*
* @see ISourceViewerConfiguration#getPresentationReconciler(ISourceViewer)
*/
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
IColorManager manager= getColorManager();
PresentationReconciler reconciler= new PresentationReconciler();
RuleBasedDamagerRepairer dr= new RuleBasedDamagerRepairer(getCodeScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
dr= new RuleBasedDamagerRepairer(getJavaDocScanner());
reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC);
reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | RuleBasedScanner scanner= new RuleBasedScanner();
scanner.setDefaultReturnToken(new Token(new TextAttribute(manager.getColor(IJavaColorConstants.JAVA_MULTI_LINE_COMMENT))));
dr= new RuleBasedDamagerRepairer(scanner);
reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT);
reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT);
scanner= new RuleBasedScanner();
scanner.setDefaultReturnToken(new Token(new TextAttribute(manager.getColor(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT))));
dr= new RuleBasedDamagerRepairer(scanner);
reconciler.setDamager(dr, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT);
reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT);
return reconciler;
}
/*
* @see SourceViewerConfiguration#getContentAssistant(ISourceViewer)
*/
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant= new ContentAssistant();
assistant.setContentAssistProcessor(new JavaCompletionProcessor(getEditor()), IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(new JavaDocCompletionProcessor(getEditor()), JavaPartitionScanner.JAVA_DOC);
assistant.enableAutoActivation(true);
assistant.setAutoActivationDelay(500);
assistant.setProposalPopupOrientation(assistant.PROPOSAL_OVERLAY);
assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE);
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
Color background= getColorManager().getColor(new RGB(254, 241, 233));
assistant.setContextInformationPopupBackground(background); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | assistant.setContextSelectorBackground(background);
assistant.setProposalSelectorBackground(background);
return assistant;
}
/*
* @see SourceViewerConfiguration#getReconciler(ISourceViewer)
*/
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (getEditor() != null && getEditor().isEditable()) {
MonoReconciler reconciler= new MonoReconciler(new JavaReconcilingStrategy(getEditor()), false);
reconciler.setDelay(500);
return reconciler;
}
return null;
}
/*
* @see SourceViewerConfiguration#getAutoIndentStrategy(ISourceViewer, String)
*/
public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer, String contentType) {
if (JavaPartitionScanner.JAVA_DOC.equals(contentType) ||
JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT.equals(contentType))
return new JavaDocAutoIndentStrategy();
return new JavaAutoIndentStrategy();
}
/*
* @see SourceViewerConfiguration#getDoubleClickStrategy(ISourceViewer, String)
*/ |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
if (JavaPartitionScanner.JAVA_DOC.equals(contentType) ||
JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT.equals(contentType) ||
JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT.equals(contentType))
return new DefaultTextDoubleClickStrategy();
return new JavaDoubleClickSelector();
}
/*
* @see SourceViewerConfiguration#getDefaultPrefix(ISourceViewer, String)
*/
public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) {
return new String[] { "//", "" };
}
/*
* @see SourceViewerConfiguration#getIndentPrefixes(ISourceViewer, String)
*/
public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
return new String[] {"\t", " ", ""};
}
/*
* @see SourceViewerConfiguration#getTabWidth(ISourceViewer)
*/
public int getTabWidth(ISourceViewer sourceViewer) {
return 4;
}
/*
* @see SourceViewerConfiguration#getAnnotationHover(ISourceViewer)
*/
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
return new JavaAnnotationHover(); |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | }
/*
* @see SourceViewerConfiguration#getTextHover(ISourceViewer, String)
*/
public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
return new JavaTextHover(getEditor());
}
/*
* @see SourceViewerConfiguration#getConfiguredContentTypes(ISourceViewer)
*/
public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
return new String[] { IDocument.DEFAULT_CONTENT_TYPE, JavaPartitionScanner.JAVA_DOC, JavaPartitionScanner.JAVA_MULTI_LINE_COMMENT, JavaPartitionScanner.JAVA_SINGLE_LINE_COMMENT };
}
/*
* @see SourceViewerConfiguration#getContentFormatter(ISourceViewer)
*/
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter= new ContentFormatter();
IFormattingStrategy strategy= new JavaFormattingStrategy(sourceViewer);
formatter.setFormattingStrategy(strategy, IDocument.DEFAULT_CONTENT_TYPE);
formatter.enablePartitionAwareFormatting(false);
formatter.setPartitionManagingPositionCategories(fJavaTextTools.getPartitionManagingPositionCategories());
return formatter;
} |
5,418 | Bug 5418 bracket marker stays in editor | private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter | resolved fixed | d287924 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-01T19:13:57Z" | "2001-11-01T15:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java | /*
* @see SourceViewerConfiguration#getHoverControlCreator(ISourceViewer)
*/
public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) {
return getInformationControlCreator(sourceViewer, true);
}
private IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer, final boolean cutDown) {
return new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
int style= cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL);
return new DefaultInformationControl(parent, style, new HTMLTextPresenter(cutDown));
}
};
}
/*
* @see SourceViewerConfiguration#getInformationPresenter(ISourceViewer)
*/
public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
InformationPresenter presenter= new InformationPresenter(getInformationControlCreator(sourceViewer, false));
IInformationProvider provider= new JavaTextHover(getEditor());
presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);
presenter.setInformationProvider(provider, JavaPartitionScanner.JAVA_DOC);
presenter.setSizeConstraints(60, 10, true, true);
return presenter;
}
} |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.typehierarchy;
import java.util.Set;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager; |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup;
import org.eclipse.jdt.internal.ui.actions.GenerateGroup;
import org.eclipse.jdt.internal.ui.actions.OpenSourceReferenceAction;
import org.eclipse.jdt.internal.ui.search.JavaSearchGroup;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter;
import org.eclipse.jdt.internal.ui.viewsupport.MarkerErrorTickProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemItemMapper;
/**
* Method viewer shows a list of methods of a input type.
* Offers filter actions.
* No dependency to the type hierarchy view
*/
public class MethodsViewer extends TableViewer implements IProblemChangedListener { |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | private ProblemItemMapper fProblemItemMapper;
/**
* Sorter that uses the unmodified labelprovider (No declaring class names)
*/
private static class MethodsViewerSorter extends JavaElementSorter {
public MethodsViewerSorter() {
}
public int compare(Viewer viewer, Object e1, Object e2) {
int cat1 = category(e1);
int cat2 = category(e2);
if (cat1 != cat2)
return cat1 - cat2;
String name1= JavaElementLabels.getElementLabel((IJavaElement) e1, JavaElementLabels.ALL_DEFAULT); |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | String name2= JavaElementLabels.getElementLabel((IJavaElement) e2, JavaElementLabels.ALL_DEFAULT);
return getCollator().compare(name1, name2);
}
}
private static final String TAG_HIDEFIELDS= "hidefields";
private static final String TAG_HIDESTATIC= "hidestatic";
private static final String TAG_HIDENONPUBLIC= "hidenonpublic";
private static final String TAG_SHOWINHERITED= "showinherited";
private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll";
private MethodsViewerFilterAction[] fFilterActions;
private MethodsViewerFilter fFilter;
private OpenSourceReferenceAction fOpen;
private ShowInheritedMembersAction fShowInheritedMembersAction;
private ContextMenuGroup[] fStandardGroups;
public MethodsViewer(Composite parent, IWorkbenchPart part) {
super(new Table(parent, SWT.MULTI));
fProblemItemMapper= new ProblemItemMapper();
final Table table= getTable();
final TableColumn column= new TableColumn(table, SWT.NULL | SWT.MULTI | SWT.FULL_SELECTION);
table.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
int width= table.getSize().x- 2*table.getBorderWidth();
if (width < 0) { |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | width= 0;
}
column.setWidth(width);
}
});
JavaElementLabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
lprovider.setErrorTickManager(new MarkerErrorTickProvider());
MethodsContentProvider contentProvider= new MethodsContentProvider();
setLabelProvider(lprovider);
setContentProvider(contentProvider);
fOpen= new OpenSourceReferenceAction(this);
addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
fOpen.run();
}
});
fFilter= new MethodsViewerFilter();
String title= TypeHierarchyMessages.getString("MethodsViewer.hide_fields.label");
String helpContext= IJavaHelpContextIds.FILTER_FIELDS_ACTION;
MethodsViewerFilterAction hideFields= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_FIELDS, helpContext, false);
hideFields.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.description"));
hideFields.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.checked"));
hideFields.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_fields.tooltip.unchecked"));
JavaPluginImages.setLocalImageDescriptors(hideFields, "fields_co.gif"); |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | title= TypeHierarchyMessages.getString("MethodsViewer.hide_static.label");
helpContext= IJavaHelpContextIds.FILTER_STATIC_ACTION;
MethodsViewerFilterAction hideStatic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_STATIC, helpContext, false);
hideStatic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_static.description"));
hideStatic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.checked"));
hideStatic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_static.tooltip.unchecked"));
JavaPluginImages.setLocalImageDescriptors(hideStatic, "static_co.gif");
title= TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.label");
helpContext= IJavaHelpContextIds.FILTER_PUBLIC_ACTION;
MethodsViewerFilterAction hideNonPublic= new MethodsViewerFilterAction(this, title, MethodsViewerFilter.FILTER_NONPUBLIC, helpContext, false);
hideNonPublic.setDescription(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.description"));
hideNonPublic.setToolTipChecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.checked"));
hideNonPublic.setToolTipUnchecked(TypeHierarchyMessages.getString("MethodsViewer.hide_nonpublic.tooltip.unchecked"));
JavaPluginImages.setLocalImageDescriptors(hideNonPublic, "public_co.gif");
fFilterActions= new MethodsViewerFilterAction[] { hideFields, hideStatic, hideNonPublic };
addFilter(fFilter);
fShowInheritedMembersAction= new ShowInheritedMembersAction(this, false);
showInheritedMethods(false);
fStandardGroups= new ContextMenuGroup[] {
new JavaSearchGroup(), new GenerateGroup()
}; |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | setSorter(new MethodsViewerSorter());
}
/**
* Show inherited methods
*/
public void showInheritedMethods(boolean on) {
MethodsContentProvider cprovider= (MethodsContentProvider) getContentProvider();
try {
cprovider.showInheritedMethods(on);
fShowInheritedMembersAction.setChecked(on);
JavaElementLabelProvider lprovider= (JavaElementLabelProvider) getLabelProvider();
if (on) {
lprovider.turnOn(JavaElementLabelProvider.SHOW_POST_QUALIFIED);
} else {
lprovider.turnOff(JavaElementLabelProvider.SHOW_POST_QUALIFIED);
}
refresh();
} catch (JavaModelException e) {
ExceptionHandler.handle(e, getControl().getShell(), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.title"), TypeHierarchyMessages.getString("MethodsViewer.toggle.error.message"));
}
}
/**
* Returns <code>true</code> if inherited methods are shown.
*/
public boolean isShowInheritedMethods() {
return ((MethodsContentProvider) getContentProvider()).isShowInheritedMethods();
}
/** |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | * Filters the method list
*/
public void setMemberFilter(int filterProperty, boolean set) {
if (set) {
fFilter.addFilter(filterProperty);
} else {
fFilter.removeFilter(filterProperty);
}
for (int i= 0; i < fFilterActions.length; i++) {
if (fFilterActions[i].getFilterProperty() == filterProperty) {
fFilterActions[i].setChecked(set);
}
}
refresh();
}
/**
* Returns <code>true</code> if the given filter is set.
*/
public boolean hasMemberFilter(int filterProperty) {
return fFilter.hasFilter(filterProperty);
}
/**
* Saves the state of the filter actions
*/
public void saveState(IMemento memento) {
memento.putString(TAG_HIDEFIELDS, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_FIELDS)));
memento.putString(TAG_HIDESTATIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_STATIC)));
memento.putString(TAG_HIDENONPUBLIC, String.valueOf(hasMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC)));
memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods())); |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | ScrollBar bar= getTable().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
}
/**
* Restores the state of the filter actions
*/
public void restoreState(IMemento memento) {
boolean set= Boolean.valueOf(memento.getString(TAG_HIDEFIELDS)).booleanValue();
setMemberFilter(MethodsViewerFilter.FILTER_FIELDS, set);
set= Boolean.valueOf(memento.getString(TAG_HIDESTATIC)).booleanValue();
setMemberFilter(MethodsViewerFilter.FILTER_STATIC, set);
set= Boolean.valueOf(memento.getString(TAG_HIDENONPUBLIC)).booleanValue();
setMemberFilter(MethodsViewerFilter.FILTER_NONPUBLIC, set);
set= Boolean.valueOf(memento.getString(TAG_SHOWINHERITED)).booleanValue();
showInheritedMethods(set);
ScrollBar bar= getTable().getVerticalBar();
if (bar != null) {
Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL);
if (vScroll != null) {
bar.setSelection(vScroll.intValue());
}
}
}
/**
* Attaches a contextmenu listener to the table
*/ |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) {
MenuManager menuMgr= new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(menuListener);
Menu menu= menuMgr.createContextMenu(getTable());
getTable().setMenu(menu);
viewSite.registerContextMenu(popupId, menuMgr, this);
}
/**
* Fills up the context menu with items for the method viewer
* Should be called by the creator of the context menu
*/
public void contributeToContextMenu(IMenuManager menu) {
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpen);
ContextMenuGroup.add(menu, fStandardGroups, this);
}
/**
* Fills up the tool bar with items for the method viewer
* Should be called by the creator of the tool bar
*/
public void contributeToToolBar(ToolBarManager tbm) {
tbm.add(fShowInheritedMembersAction);
tbm.add(new Separator());
tbm.add(fFilterActions[0]);
tbm.add(fFilterActions[1]);
tbm.add(fFilterActions[2]);
}
/* |
5,452 | Bug 5452 Typehierarchy: can't see full label in method list | The label is shown with "..." even though the view has a horizontal scrollbar. This is critical since when showin inherited members the lable can be long. | resolved fixed | 3cee768 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T14:45:01Z" | "2001-11-02T08:33:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java | * @see IProblemChangedListener#problemsChanged
*/
public void problemsChanged(final Set changed) {
Control control= getControl();
if (control != null && !control.isDisposed()) {
control.getDisplay().asyncExec(new Runnable() {
public void run() {
fProblemItemMapper.problemsChanged(changed, (ILabelProvider)getLabelProvider());
}
});
}
}
/*
* @see StructuredViewer#associate(Object, Item)
*/
protected void associate(Object element, Item item) {
if (item.getData() != element) {
fProblemItemMapper.addToMap(element, item);
}
super.associate(element, item);
}
/*
* @see StructuredViewer#disassociate(Item)
*/
protected void disassociate(Item item) {
fProblemItemMapper.removeFromMap(item.getData(), item);
super.disassociate(item);
}
} |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | package org.eclipse.jdt.internal.ui.preferences;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.debug.core.JDIDebugModel;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.IPreferencesConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.WorkbenchViewerSorter;
/**
* Preference page for debug preferences that apply specifically to
* Java Debugging.
*/
public class JavaDebugPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, Listener {
private static final String SHOW_HEX= IPreferencesConstants.SHOW_HEX_VALUES;
private static final String SHOW_CHARS= IPreferencesConstants.SHOW_CHAR_VALUES;
private static final String SHOW_UNSIGNED= IPreferencesConstants.SHOW_UNSIGNED_VALUES;
private static final String DEFAULT_NEW_FILTER_TEXT = "";
private static final Image IMG_CUNIT = JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CUNIT);
private static final Image IMG_PKG = JavaPluginImages.get(JavaPluginImages.IMG_OBJS_PACKAGE); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | private Button fHexButton;
private Button fCharButton;
private Button fUnsignedButton;
private CheckboxTableViewer fFilterViewer;
private Table fFilterTable;
private Button fUseFiltersCheckbox;
private Button fAddPackageButton;
private Button fAddTypeButton;
private Button fRemoveFilterButton;
private Button fAddFilterButton;
private Button fFilterSyntheticButton;
private Button fFilterStaticButton;
private Button fFilterConstructorButton;
private Text fEditorText;
private TableEditor fTableEditor;
private TableItem fNewTableItem;
private StepFilter fNewStepFilter;
private static final String[] TABLE_COLUMN_PROPERTIES = {"filter_name"};
private static final int FILTERNAME_PROP= 0;
private StepFilterContentProvider fStepFilterContentProvider;
private ICellEditorValidator fCellValidator;
/**
* Model object that represents a single entry in the table
*/
protected class StepFilter { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | private String fName;
private boolean fChecked;
public StepFilter(String name, boolean checked) {
setName(name);
setChecked(checked);
}
public String getName() {
return fName;
}
public void setName(String name) {
fName = name;
}
public boolean isChecked() {
return fChecked;
}
public void setChecked(boolean checked) {
fChecked = checked;
}
}
/**
* Content provider for the table. Content consists of instances of StepFilter.
*/
protected class StepFilterContentProvider implements IStructuredContentProvider { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | private CheckboxTableViewer fViewer;
private List fFilters;
public StepFilterContentProvider(CheckboxTableViewer viewer) {
fViewer = viewer;
List active = JDIDebugModel.getActiveStepFilters();
List inactive = JDIDebugModel.getInactiveStepFilters();
populateFilters(active, inactive);
}
public void setDefaults() {
fViewer.remove(fFilters.toArray());
List active = JDIDebugModel.getDefaultActiveStepFilters();
List inactive = JDIDebugModel.getDefaultInactiveStepFilters();
populateFilters(active, inactive);
fFilterSyntheticButton.setSelection(JDIDebugModel.getDefaultFilterSynthetic());
fFilterStaticButton.setSelection(JDIDebugModel.getDefaultFilterStatic()); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | fFilterConstructorButton.setSelection(JDIDebugModel.getDefaultFilterConstructor());
boolean useStepFilters = JDIDebugModel.getDefaultUseStepFilters();
fUseFiltersCheckbox.setSelection(useStepFilters);
toggleStepFilterWidgetsEnabled(useStepFilters);
}
protected void populateFilters(List activeList, List inactiveList) {
fFilters = new ArrayList(activeList.size() + inactiveList.size());
populateList(activeList, true);
populateList(inactiveList, false);
}
protected void populateList(List list, boolean checked) {
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
String name = (String)iterator.next();
addFilter(name, checked);
}
}
public StepFilter addFilter(String name, boolean checked) {
StepFilter filter = new StepFilter(name, checked);
if (!fFilters.contains(filter)) {
fFilters.add(filter);
fViewer.add(filter);
fViewer.setChecked(filter, checked);
}
return filter;
} |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | public void saveFilters() {
JDIDebugModel.setUseStepFilters(fUseFiltersCheckbox.getSelection());
JDIDebugModel.setFilterSynthetic(fFilterSyntheticButton.getSelection());
JDIDebugModel.setFilterStatic(fFilterStaticButton.getSelection());
JDIDebugModel.setFilterConstructor(fFilterConstructorButton.getSelection());
List active = new ArrayList(fFilters.size());
List inactive = new ArrayList(fFilters.size());
Iterator iterator = fFilters.iterator();
while (iterator.hasNext()) {
StepFilter filter = (StepFilter)iterator.next();
String name = filter.getName();
if (filter.isChecked()) {
active.add(name);
} else {
inactive.add(name);
}
}
JDIDebugModel.setActiveStepFilters(active);
JDIDebugModel.setInactiveStepFilters(inactive);
}
public void removeFilters(Object[] filters) {
for (int i = 0; i < filters.length; i++) {
StepFilter filter = (StepFilter)filters[i];
fFilters.remove(filter);
}
fViewer.remove(filters);
} |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | public void toggleFilter(StepFilter filter) {
boolean newState = !filter.isChecked();
filter.setChecked(newState);
fViewer.setChecked(filter, newState);
}
/*
* @see IStructuredContentProvider#getElements(Object)
*/
public Object[] getElements(Object inputElement) {
return fFilters.toArray();
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
/*
* @see IContentProvider#dispose()
*/
public void dispose() {
}
}
/**
* Support for editing entries in filter table.
*/
protected class CellModifier implements ICellModifier { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | public CellModifier() {
}
/*
* @see ICellModifier#canModify(Object, String)
*/
public boolean canModify(Object element, String property) {
return isNameProperty(property);
}
/*
* @see ICellModifier#getValue(Object, String)
*/
public Object getValue(Object element, String property) {
if (isNameProperty(property)) {
StepFilter filter = (StepFilter)element;
return filter.getName();
}
return null;
} |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | /*
* @see ICellModifier#modify(Object, String, Object)
*/
public void modify(Object element, String property, Object value) {
if (value != null) {
if (isNameProperty(property) && element instanceof TableItem) {
String stringValue = (String) value;
TableItem tableItem = (TableItem)element;
StepFilter filter = (StepFilter)tableItem.getData();
filter.setName(stringValue);
tableItem.setText(stringValue);
}
}
}
private boolean isNameProperty(String property) {
return property.equals(TABLE_COLUMN_PROPERTIES[FILTERNAME_PROP]);
}
};
/**
* Label provider for StepFilter model objects
*/
protected class StepFilterLabelProvider extends LabelProvider implements ITableLabelProvider {
/*
* @see ITableLabelProvider#getColumnText(Object, int)
*/
public String getColumnText(Object object, int column) {
if (column == 0) { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | return ((StepFilter)object).getName();
}
return "";
}
/*
* @see ILabelProvider#getText(Object)
*/
public String getText(Object element) {
return ((StepFilter)element).getName();
}
/*
* @see ITableLabelProvider#getColumnImage(Object, int)
*/
public Image getColumnImage(Object object, int column) {
String name = ((StepFilter)object).getName();
if (name.endsWith(".*")) {
return IMG_PKG;
} else {
return IMG_CUNIT;
}
}
}
public JavaDebugPreferencePage() {
super();
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
}
/** |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | * Set the default preferences for this page.
*/
public static void initDefaults(IPreferenceStore store) {
store.setDefault(SHOW_HEX, false);
store.setDefault(SHOW_CHARS, false);
store.setDefault(SHOW_UNSIGNED, false);
}
/**
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.JAVA_BASE_PREFERENCE_PAGE));
Composite composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
composite.setLayout(layout);
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
composite.setLayoutData(data);
createPrimitiveDisplayPreferences(composite);
createSpace(composite);
createStepFilterPreferences(composite);
setValues(); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | return composite;
}
/**
* Create the primitive display preferences composite widget
*/
private void createPrimitiveDisplayPreferences(Composite parent) {
Composite comp= createLabelledComposite(parent, 1, "Primitive type display options");
fHexButton= createCheckButton(comp, "Display &hexadecimal values (byte, short, char, int, long)");
fCharButton= createCheckButton(comp, "Display ASCII &character values (byte, short, int, long)");
fUnsignedButton= createCheckButton(comp, "Display &unsigned values (byte)");
}
/**
* Create a group to contain the step filter related widgetry
*/
private void createStepFilterPreferences(Composite parent) {
Composite comp = createLabelledComposite(parent, 1, "Step filters");
Composite container = new Composite(comp, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 0;
layout.marginWidth = 0;
container.setLayout(layout);
fUseFiltersCheckbox = new Button(container, SWT.CHECK); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | fUseFiltersCheckbox.setText("Use &step filters");
fUseFiltersCheckbox.setToolTipText("Toggle whether step filters are used at all");
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = 2;
fUseFiltersCheckbox.setLayoutData(gd);
fUseFiltersCheckbox.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent se) {
toggleStepFilterWidgetsEnabled(fUseFiltersCheckbox.getSelection());
}
public void widgetDefaultSelected(SelectionEvent se) {
}
});
fFilterViewer = new CheckboxTableViewer(container, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
fFilterTable = fFilterViewer.getTable();
fTableEditor = new TableEditor(fFilterTable);
fFilterViewer.setLabelProvider(new StepFilterLabelProvider());
fFilterViewer.setSorter(new WorkbenchViewerSorter());
fStepFilterContentProvider = new StepFilterContentProvider(fFilterViewer);
fFilterViewer.setContentProvider(fStepFilterContentProvider);
fFilterViewer.setInput(JDIDebugModel.getAllStepFilters());
gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
gd.heightHint = 150;
gd.widthHint = 300;
fFilterViewer.getTable().setLayoutData(gd);
fFilterViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
StepFilter filter = (StepFilter)event.getElement();
fStepFilterContentProvider.toggleFilter(filter); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | }
});
fFilterViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection.isEmpty()) {
fRemoveFilterButton.setEnabled(false);
} else {
fRemoveFilterButton.setEnabled(true);
}
}
});
Composite buttonContainer = new Composite(container, SWT.NONE);
gd = new GridData(GridData.FILL_VERTICAL);
buttonContainer.setLayoutData(gd);
GridLayout buttonLayout = new GridLayout();
buttonLayout.numColumns = 1;
buttonLayout.marginHeight = 0;
buttonLayout.marginWidth = 0;
buttonContainer.setLayout(buttonLayout);
fAddFilterButton = new Button(buttonContainer, SWT.PUSH);
fAddFilterButton.setText("Add &Filter");
fAddFilterButton.setToolTipText("Key in the name of a new step filter");
gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
fAddFilterButton.setLayoutData(gd);
fAddFilterButton.addSelectionListener(new SelectionListener() { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | public void widgetSelected(SelectionEvent se) {
addActiveFilter();
}
public void widgetDefaultSelected(SelectionEvent se) {
}
});
fAddTypeButton = new Button(buttonContainer, SWT.PUSH);
fAddTypeButton.setText("Add &Type...");
fAddTypeButton.setToolTipText("Choose a java type and add it to step filters");
gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
fAddTypeButton.setLayoutData(gd);
fAddTypeButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent se) {
addType();
}
public void widgetDefaultSelected(SelectionEvent se) {
}
});
fAddPackageButton = new Button(buttonContainer, SWT.PUSH);
fAddPackageButton.setText("Add &Package...");
fAddPackageButton.setToolTipText("Choose a package and add it to step filters");
gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
fAddPackageButton.setLayoutData(gd);
fAddPackageButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent se) {
addPackage(); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | }
public void widgetDefaultSelected(SelectionEvent se) {
}
});
fRemoveFilterButton = new Button(buttonContainer, SWT.PUSH);
fRemoveFilterButton.setText("&Remove");
fRemoveFilterButton.setToolTipText("Remove all selected step filters");
gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
fRemoveFilterButton.setLayoutData(gd);
fRemoveFilterButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent se) {
removeFilters();
}
public void widgetDefaultSelected(SelectionEvent se) {
}
});
fRemoveFilterButton.setEnabled(false);
fFilterSyntheticButton = new Button(container, SWT.CHECK);
fFilterSyntheticButton.setText("Filter s&ynthetic methods (requires VM support)");
fFilterSyntheticButton.setToolTipText("Don't stop in synthetic (compiler-generated) methods");
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = 2;
fFilterSyntheticButton.setLayoutData(gd);
fFilterStaticButton = new Button(container, SWT.CHECK); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | fFilterStaticButton.setText("Filter static &initializers");
fFilterStaticButton.setToolTipText("Don't stop in static initialization code");
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = 2;
fFilterStaticButton.setLayoutData(gd);
fFilterConstructorButton = new Button(container, SWT.CHECK);
fFilterConstructorButton.setText("Filter co&nstructors");
fFilterConstructorButton.setToolTipText("Don't stop in constructors");
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = 2;
fFilterConstructorButton.setLayoutData(gd);
fFilterSyntheticButton.setSelection(JDIDebugModel.getFilterSynthetic());
fFilterStaticButton.setSelection(JDIDebugModel.getFilterStatic());
fFilterConstructorButton.setSelection(JDIDebugModel.getFilterConstructor());
boolean enabled = JDIDebugModel.useStepFilters();
fUseFiltersCheckbox.setSelection(enabled);
toggleStepFilterWidgetsEnabled(enabled);
}
private void toggleStepFilterWidgetsEnabled(boolean enabled) {
fFilterViewer.getTable().setEnabled(enabled);
fAddPackageButton.setEnabled(enabled);
fAddTypeButton.setEnabled(enabled);
fAddFilterButton.setEnabled(enabled);
fFilterSyntheticButton.setEnabled(enabled);
fFilterStaticButton.setEnabled(enabled);
fFilterConstructorButton.setEnabled(enabled); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | if (!enabled) {
fRemoveFilterButton.setEnabled(enabled);
} else if (!fFilterViewer.getSelection().isEmpty()) {
fRemoveFilterButton.setEnabled(true);
}
}
/**
* Create a new filter in the table (with the default 'new filter' value),
* then open up an in-place editor on it.
*/
private void addActiveFilter() {
fNewStepFilter = fStepFilterContentProvider.addFilter(DEFAULT_NEW_FILTER_TEXT, true);
fNewTableItem = fFilterTable.getItem(0);
editFilter();
}
private void editFilter() {
if (fEditorText != null) {
validateChangeAndCleanup();
}
fEditorText = new Text(fFilterTable, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_BOTH);
fEditorText.setLayoutData(gd);
fTableEditor.horizontalAlignment = SWT.LEFT; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | fTableEditor.grabHorizontal = true;
fTableEditor.setEditor(fEditorText, fNewTableItem, 0);
fEditorText.setText(fNewStepFilter.getName());
fEditorText.selectAll();
setEditorListeners(fEditorText);
fEditorText.setFocus();
}
private void setEditorListeners(Text text) {
text.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
if (event.character == SWT.CR) {
validateChangeAndCleanup();
} else if (event.character == SWT.ESC) {
removeNewFilter();
cleanupEditor();
}
}
});
text.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent event) {
validateChangeAndCleanup();
}
}); |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | text.addListener(SWT.Traverse, new Listener() {
public void handleEvent(Event event) {
event.doit = false;
}
});
}
private void validateChangeAndCleanup() {
String trimmedValue = fEditorText.getText().trim();
if (trimmedValue.length() < 1) {
removeNewFilter();
}
else if (!validateEditorInput(trimmedValue)) {
getShell().getDisplay().beep();
return;
} else {
fNewTableItem.setText(trimmedValue);
fNewStepFilter.setName(trimmedValue);
}
cleanupEditor();
}
/**
* Cleanup all widgetry & resources used by the in-place editing
*/
private void cleanupEditor() { |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | if (fEditorText != null) {
fEditorText.dispose();
fEditorText = null;
fNewStepFilter = null;
fNewTableItem = null;
fTableEditor.setEditor(null, null, 0);
}
}
private void removeNewFilter() {
fStepFilterContentProvider.removeFilters(new Object[] {fNewStepFilter});
}
/**
* A valid step filter is simply one that is not empty (all spaces),
* and has no embedded spaces. Beyond this, a string cannot be
* validated as corresponding to an existing type or package (and
* this is probably not even desirable).
*/
private boolean validateEditorInput(String trimmedValue) {
int embeddedSpace = trimmedValue.indexOf(' ');
if (embeddedSpace != -1) {
return false;
}
return true;
}
private void addType() {
Shell shell= JavaPlugin.getActiveWorkbenchShell();
SelectionDialog dialog= null; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | try {
dialog= JavaUI.createTypeDialog(shell, new ProgressMonitorDialog(shell),
SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_TYPES, false);
} catch (JavaModelException jme) {
String title= "Add type to step filters";
String message= "Could not open type selection dialog for step filters";
ExceptionHandler.handle(jme, title, message);
return;
}
dialog.setTitle("Add type to step filters");
dialog.setMessage("Select a type to filter when stepping");
if (dialog.open() == IDialogConstants.CANCEL_ID) {
return;
}
Object[] types= dialog.getResult();
if (types != null && types.length > 0) {
IType type = (IType)types[0];
fStepFilterContentProvider.addFilter(type.getFullyQualifiedName(), true);
}
}
private void addPackage() {
Shell shell= JavaPlugin.getActiveWorkbenchShell();
SelectionDialog dialog = null;
try {
dialog = createAllPackagesDialog(shell);
} catch (JavaModelException jme) {
String title= "Add package to step filters"; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | String message= "Could not open package selection dialog for step filters";
ExceptionHandler.handle(jme, title, message);
return;
}
dialog.setTitle("Add package to step filters");
dialog.setMessage("Select a package to filter when stepping");
if (dialog.open() == IDialogConstants.CANCEL_ID) {
return;
}
Object[] packages= dialog.getResult();
if (packages != null && packages.length > 0) {
IJavaElement pkg = (IJavaElement)packages[0];
String filter = pkg.getElementName();
if (filter.length() < 1) {
filter = "(default package)";
} else {
filter += ".*";
}
fStepFilterContentProvider.addFilter(filter, true);
}
}
private void removeFilters() {
IStructuredSelection selection = (IStructuredSelection)fFilterViewer.getSelection();
fStepFilterContentProvider.removeFilters(selection.toArray());
}
/**
* Ignore package fragments that contain only non-java resources, and make sure |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | * that each fragment is added to the list only once.
*/
private SelectionDialog createAllPackagesDialog(Shell shell) throws JavaModelException{
IWorkspaceRoot wsroot= JavaPlugin.getWorkspace().getRoot();
IJavaModel model= JavaCore.create(wsroot);
IJavaProject[] projects= model.getJavaProjects();
Set packageNameSet= new HashSet();
List packageList = new ArrayList();
for (int i = 0; i < projects.length; i++) {
IPackageFragment[] pkgs= projects[i].getPackageFragments();
for (int j = 0; j < pkgs.length; j++) {
IPackageFragment pkg = pkgs[j];
if (!pkg.hasChildren() && (pkg.getNonJavaResources().length > 0)) {
continue;
}
if (packageNameSet.add(pkg.getElementName())) {
packageList.add(pkg);
}
}
}
int flags= JavaElementLabelProvider.SHOW_DEFAULT;
ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new JavaElementLabelProvider(flags));
dialog.setIgnoreCase(false);
dialog.setElements(packageList.toArray());
return dialog;
}
/**
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/ |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | public void init(IWorkbench workbench) {
}
/**
* @see PreferencePage#performOk()
* Also, notifies interested listeners
*/
public boolean performOk() {
storeValues();
getPreferenceStore().firePropertyChangeEvent(IPreferencesConstants.VARIABLE_RENDERING, new Boolean(true), new Boolean(false));
fStepFilterContentProvider.saveFilters();
return true;
}
/**
* Sets the default preferences
*/
protected void performDefaults() {
setDefaultValues();
super.performDefaults();
}
private void setDefaultValues() {
IPreferenceStore store = getPreferenceStore();
fHexButton.setSelection(store.getDefaultBoolean(SHOW_HEX));
fCharButton.setSelection(store.getDefaultBoolean(SHOW_CHARS));
fUnsignedButton.setSelection(store.getDefaultBoolean(SHOW_UNSIGNED));
fStepFilterContentProvider.setDefaults();
} |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | /**
* Creates a button with the given label and sets the default
* configuration data.
*/
private Button createCheckButton(Composite parent, String label) {
Button button= new Button(parent, SWT.CHECK | SWT.LEFT);
button.setText(label);
button.addListener(SWT.Selection, this);
GridData data = new GridData();
button.setLayoutData(data);
return button;
}
/**
* Creates composite control and sets the default layout data.
*
* @param parent the parent of the new composite
* @param numColumns the number of columns for the new composite
* @param labelText the text label of the new composite
* @return the newly-created composite
*/
private Composite createLabelledComposite(Composite parent, int numColumns, String labelText) {
Composite comp = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = numColumns; |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | comp.setLayout(layout);
GridData gd= new GridData();
gd.verticalAlignment = GridData.FILL;
gd.horizontalAlignment = GridData.FILL;
comp.setLayoutData(gd);
Label label = new Label(comp, SWT.NONE);
label.setText(labelText);
gd = new GridData();
gd.horizontalSpan = numColumns;
label.setLayoutData(gd);
return comp;
}
/**
* Create a vertical space to separate groups of controls.
*/
private void createSpace(Composite parent) {
Label vfiller = new Label(parent, SWT.LEFT);
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.BEGINNING;
gridData.grabExcessHorizontalSpace = false;
gridData.verticalAlignment = GridData.CENTER;
gridData.grabExcessVerticalSpace = false;
vfiller.setLayoutData(gridData);
}
/**
* @see Listener#handleEvent(Event) |
5,474 | Bug 5474 should not use tool tips for labels | To be consistent with other preference pages, the debug preference labels for step filtering (filter sythetic methods, etc), should not specify tool tips. Instead, the relevant information should just be in the label. | verified fixed | 63aabcb | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-02T23:43:07Z" | "2001-11-02T16:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaDebugPreferencePage.java | */
public void handleEvent(Event event) {
}
/**
* Set the values of the component widgets based on the
* values in the preference store
*/
private void setValues() {
IPreferenceStore store = getPreferenceStore();
fHexButton.setSelection(store.getBoolean(SHOW_HEX));
fCharButton.setSelection(store.getBoolean(SHOW_CHARS));
fUnsignedButton.setSelection(store.getBoolean(SHOW_UNSIGNED));
}
/**
* Store the preference values based on the state of the
* component widgets
*/
private void storeValues() {
IPreferenceStore store = getPreferenceStore();
store.setValue(SHOW_HEX, fHexButton.getSelection());
store.setValue(SHOW_CHARS, fCharButton.getSelection());
store.setValue(SHOW_UNSIGNED, fUnsignedButton.getSelection());
}
} |
4,928 | Bug 4928 Java perspective should have placeholder for Navigator | build 204 I sometimes want to show the Navigator in the Java perspective. It currently opens over the outline. I would prefer it to open over the packages view, since they're of the same flavour and I usually want one or the other, not both at the same time. It also means my flow still goes from left to right: choose something in the Navigator or packages view, it appears in the editor and outline view to the right. | resolved fixed | e48f52e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T14:00:19Z" | "2001-10-12T15:20:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jdt.ui.JavaUI;
public class JavaPerspectiveFactory implements IPerspectiveFactory {
/**
* Constructs a new Default layout engine.
*/
public JavaPerspectiveFactory() {
super();
}
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea);
folder.addView(JavaUI.ID_PACKAGES);
folder.addView(JavaUI.ID_TYPE_HIERARCHY);
IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); |
4,928 | Bug 4928 Java perspective should have placeholder for Navigator | build 204 I sometimes want to show the Navigator in the Java perspective. It currently opens over the outline. I would prefer it to open over the packages view, since they're of the same flavour and I usually want one or the other, not both at the same time. It also means my flow still goes from left to right: choose something in the Navigator or packages view, it appears in the editor and outline view to the right. | resolved fixed | e48f52e | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T14:00:19Z" | "2001-10-12T15:20:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java | outputfolder.addView(IPageLayout.ID_TASK_LIST);
outputfolder.addView(SearchUI.SEARCH_RESULT_VIEW_ID);
outputfolder.addView(IDebugUIConstants.ID_CONSOLE_VIEW);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea);
layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
layout.addActionSet(JavaUI.ID_ACTION_SET);
layout.addActionSet(IUIConstants.ID_REFACTORING_ACTION_SET);
layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
layout.addShowViewShortcut(SearchUI.SEARCH_RESULT_VIEW_ID);
layout.addShowViewShortcut(IDebugUIConstants.ID_PROCESS_VIEW);
layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard");
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard");
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard");
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetCreationWizard");
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/DeclarationsSearchGroup.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
/**
* Contribute Java search specific menu elements.
*/
public class DeclarationsSearchGroup extends JavaSearchSubGroup {
public static final String GROUP_NAME= SearchMessages.getString("group.declarations");
protected ElementSearchAction[] getActions() {
return new ElementSearchAction[] {
new FindDeclarationsAction(),
new FindDeclarationsInHierarchyAction(),
new FindDeclarationsInWorkingSetAction()
};
}
protected String getName() {
return GROUP_NAME;
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ElementSearchAction.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Abstract class for all search actions which work on java elements.
*/
public abstract class ElementSearchAction extends JavaElementAction { |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ElementSearchAction.java | public ElementSearchAction(String label, Class[] validTypes) {
super(label, validTypes);
}
public void run(IJavaElement element) {
SearchUI.activateSearchResultView();
Shell shell= JavaPlugin.getActiveWorkbenchShell();
JavaSearchOperation op= null;
try {
op= makeOperation(element);
if (op == null)
return;
} catch (JavaModelException ex) {
ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.search.title"), SearchMessages.getString("Search.Error.search.message"));
return;
}
IWorkspaceDescription workspaceDesc= JavaPlugin.getWorkspace().getDescription();
boolean isAutoBuilding= workspaceDesc.isAutoBuilding(); |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ElementSearchAction.java | if (isAutoBuilding) {
workspaceDesc.setAutoBuilding(false);
try {
JavaPlugin.getWorkspace().setDescription(workspaceDesc);
}
catch (CoreException ex) {
ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.setDescription.title"), SearchMessages.getString("Search.Error.setDescription.message"));
}
}
try {
new ProgressMonitorDialog(shell).run(true, true, op);
} catch (InvocationTargetException ex) {
ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.search.title"), SearchMessages.getString("Search.Error.search.message"));
} catch(InterruptedException e) {
} finally {
if (isAutoBuilding) {
workspaceDesc= JavaPlugin.getWorkspace().getDescription();
workspaceDesc.setAutoBuilding(true);
try {
JavaPlugin.getWorkspace().setDescription(workspaceDesc);
}
catch (CoreException ex) {
ExceptionHandler.handle(ex, shell, SearchMessages.getString("Search.Error.setDescription.title"), SearchMessages.getString("Search.Error.setDescription.message"));
}
}
}
}
protected JavaSearchOperation makeOperation(IJavaElement element) throws JavaModelException { |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ElementSearchAction.java | IType type= getType(element);
return new JavaSearchOperation(JavaPlugin.getWorkspace(), element, getLimitTo(), getScope(type), getScopeDescription(type), getCollector());
};
protected abstract int getLimitTo();
protected IJavaSearchScope getScope(IType element) throws JavaModelException {
return SearchEngine.createWorkspaceScope();
}
protected JavaSearchResultCollector getCollector() {
return new JavaSearchResultCollector();
}
protected String getScopeDescription(IType type) {
return SearchMessages.getString("WorkspaceScope");
}
protected IType getType(IJavaElement element) {
IType type= null;
if (element.getElementType() == IJavaElement.TYPE)
type= (IType)element;
else if (element instanceof IMember)
type= ((IMember)element).getDeclaringType();
if (type != null) {
ICompilationUnit cu= type.getCompilationUnit();
if (cu != null && cu.isWorkingCopy())
type= (IType)cu.getOriginal(type);
return type;
}
return null;
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindDeclarationsInWorkingSetAction.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.ui.JavaPlugin;
public class FindDeclarationsInWorkingSetAction extends FindDeclarationsAction {
public FindDeclarationsInWorkingSetAction() {
setText(SearchMessages.getString("Search.FindDeclarationsInWorkingSetAction.label"));
setToolTipText(SearchMessages.getString("Search.FindDeclarationsInWorkingSetAction.tooltip"));
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindDeclarationsInWorkingSetAction.java | protected JavaSearchOperation makeOperation(IJavaElement element) throws JavaModelException {
IWorkingSet workingSet= queryWorkingSet();
if (workingSet == null)
return null;
if (element.getElementType() == IJavaElement.METHOD) {
IMethod method= (IMethod)element;
int searchFor= IJavaSearchConstants.METHOD;
if (method.isConstructor())
searchFor= IJavaSearchConstants.CONSTRUCTOR;
String pattern= PrettySignature.getUnqualifiedMethodSignature(method);
return new JavaSearchOperation(JavaPlugin.getWorkspace(), pattern, searchFor, getLimitTo(), getScope(workingSet), getScopeDescription(workingSet), getCollector());
}
else
return new JavaSearchOperation(JavaPlugin.getWorkspace(), element, getLimitTo(), getScope(workingSet), getScopeDescription(workingSet), getCollector());
};
private IJavaSearchScope getScope(IWorkingSet workingSet) throws JavaModelException {
return JavaSearchScopeFactory.getInstance().createJavaSearchScope(workingSet);
}
private String getScopeDescription(IWorkingSet workingSet) {
return SearchMessages.getFormattedString("WorkingSetScope", new String[] {workingSet.getName()});
}
private IWorkingSet queryWorkingSet() throws JavaModelException {
SelectionDialog dialog= SearchUI.createWorkingSetDialog(JavaPlugin.getActiveWorkbenchShell());
if (dialog.open() == dialog.OK)
return (IWorkingSet)dialog.getResult()[0];
else
return null;
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindImplementorsInWorkingSetAction.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.ui.JavaPlugin;
public class FindImplementorsInWorkingSetAction extends FindImplementorsAction { |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindImplementorsInWorkingSetAction.java | public FindImplementorsInWorkingSetAction() {
setText(SearchMessages.getString("Search.FindImplementorsInWorkingSetAction.label"));
setToolTipText(SearchMessages.getString("Search.FindImplementorsInWorkingSetAction.tooltip"));
}
protected JavaSearchOperation makeOperation(IJavaElement element) throws JavaModelException {
IWorkingSet workingSet= queryWorkingSet();
if (workingSet == null)
return null;
return new JavaSearchOperation(JavaPlugin.getWorkspace(), element, getLimitTo(), getScope(workingSet), getScopeDescription(workingSet), getCollector());
};
private IJavaSearchScope getScope(IWorkingSet workingSet) throws JavaModelException {
return JavaSearchScopeFactory.getInstance().createJavaSearchScope(workingSet);
}
private String getScopeDescription(IWorkingSet workingSet) {
return SearchMessages.getFormattedString("WorkingSetScope", new String[] {workingSet.getName()});
}
private IWorkingSet queryWorkingSet() throws JavaModelException {
SelectionDialog dialog= SearchUI.createWorkingSetDialog(JavaPlugin.getActiveWorkbenchShell());
if (dialog.open() == dialog.OK)
return (IWorkingSet)dialog.getResult()[0];
else
return null;
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindReadReferencesInWorkingSetAction.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
public class FindReadReferencesInWorkingSetAction extends FindReferencesInWorkingSetAction {
public FindReadReferencesInWorkingSetAction() {
super(SearchMessages.getString("Search.FindReadReferencesInWorkingSetAction.label"), new Class[] {IField.class} );
setToolTipText(SearchMessages.getString("Search.FindReadReferencesInWorkingSetAction.tooltip"));
}
protected int getLimitTo() {
return IJavaSearchConstants.READ_REFERENCES;
}
} |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindReferencesInWorkingSetAction.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.ui.JavaPlugin;
public class FindReferencesInWorkingSetAction extends FindReferencesAction { |
3,672 | Bug 3672 DCR: Add working set support | Would be nice to have the VAME Search "Scope" feature. This allows the user to filter searches, which reduces both the time to do the search, and the number of results found - so that more of the results are known to be useful. In VAME, the user could edit a search scope (for example, only search in these 3 projects), and give it a name (for example "SWT"), and then the named scope would show up in all of the search context menus, for example, if a class was selected, the context menu would allow searches on: - References [to the class] -> Workspace [in the whole workspace] -> Hierarchy [in the current hierarchy (the one the class is in)] -> Project [in the current project (the one the class is in)] -> SWT [in the user- defined set of projects named "SWT" - this is the "search scope" or "scope set"] - Declarations [of the class] -> Workspace -> Hierarchy -> Project -> SWT Also, the search dialog would allow temporary scopes to be specified for each individual search. See the VAME Searching for more details. (or ask me - I use search a lot - CM) Currently, all searches in Eclipse are done on the whole workspace. This is sub-optimal. NOTES: EG (5/17/01 11:12:48 AM) Missing working sets to. Can't be done for June. DM (10/4/01 3:07:48 PM) Added "Selection" scope DM (10/9/01 9:31:44 AM) Will now have to add temporary implementation for working sets: IWorkingSet WorkingSet -> IWorkingSet WorkingSetSelectionDialog WorkingSetContentProvider WorkingSetLabelProvider | verified fixed | 7049e8f | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-11-07T16:23:46Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindReferencesInWorkingSetAction.java | public FindReferencesInWorkingSetAction() {
setText(SearchMessages.getString("Search.FindReferencesInWorkingSetAction.label"));
setToolTipText(SearchMessages.getString("Search.FindReferencesInWorkingSetAction.tooltip"));
}
FindReferencesInWorkingSetAction(String label, Class[] validTypes) {
super(label, validTypes);
}
protected JavaSearchOperation makeOperation(IJavaElement element) throws JavaModelException {
IWorkingSet workingSet= queryWorkingSet();
if (workingSet == null)
return null;
return new JavaSearchOperation(JavaPlugin.getWorkspace(), element, getLimitTo(), getScope(workingSet), getScopeDescription(workingSet), getCollector());
};
private IJavaSearchScope getScope(IWorkingSet workingSet) throws JavaModelException {
return JavaSearchScopeFactory.getInstance().createJavaSearchScope(workingSet);
}
private String getScopeDescription(IWorkingSet workingSet) {
return SearchMessages.getFormattedString("WorkingSetScope", new String[] {workingSet.getName()});
}
private IWorkingSet queryWorkingSet() throws JavaModelException {
SelectionDialog dialog= SearchUI.createWorkingSetDialog(JavaPlugin.getActiveWorkbenchShell());
if (dialog.open() == dialog.OK)
return (IWorkingSet)dialog.getResult()[0];
else
return null;
}
} |