issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
private Control createColorPage(Composite parent) {
Composite colorComposite= new Composite(parent, SWT.NULL);
colorComposite.setLayout(new GridLayout());
Composite backgroundComposite= new Composite(colorComposite, SWT.NULL);
backgroundComposite.setLayout(new RowLayout());
Label label= new Label(backgroundComposite, SWT.NULL);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.backgroundColor"));
SelectionListener backgroundSelectionListener= new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
boolean custom= fBackgroundCustomRadioButton.getSelection();
fBackgroundColorButton.setEnabled(custom);
fOverlayStore.setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom);
}
public void widgetDefaultSelected(SelectionEvent e) {}
};
fBackgroundDefaultRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundDefaultRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.systemDefault"));
fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundCustomRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundCustomRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.custom"));
fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundColorEditor= new ColorEditor(backgroundComposite);
fBackgroundColorButton= fBackgroundColorEditor.getButton();
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.foreground"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite editorComposite= new Composite(colorComposite, SWT.NONE);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
GridData gd= new GridData(GridData.FILL_BOTH);
editorComposite.setLayoutData(gd);
fSyntaxColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fSyntaxColorList.setLayoutData(gd);
Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
stylesComposite.setLayout(layout);
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fSyntaxForegroundColorEditor= new ColorEditor(stylesComposite);
Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.bold"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
fBoldCheckBox.setLayoutData(gd);
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.preview"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Control previewer= createPreviewer(colorComposite);
gd= new GridData(GridData.FILL_BOTH);
gd.widthHint= convertWidthInCharsToPixels(80);
gd.heightHint= convertHeightInCharsToPixels(15);
previewer.setLayoutData(gd);
fSyntaxColorList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleSyntaxColorListSelection();
}
});
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
foregroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
int i= fSyntaxColorList.getSelectionIndex();
String key= fSyntaxColorListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue());
}
});
fBackgroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
PreferenceConverter.setValue(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, fBackgroundColorEditor.getColorValue());
}
});
fBoldCheckBox.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
int i= fSyntaxColorList.getSelectionIndex();
String key= fSyntaxColorListModel[i][1];
fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection());
}
});
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
return colorComposite;
}
private Control createPreviewer(Composite parent) {
fJavaTextTools= new JavaTextTools(fOverlayStore);
fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null));
fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
fPreviewViewer.setEditable(false);
initializeViewerColors(fPreviewViewer);
String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt");
IDocument document= new Document(content);
IDocumentPartitioner partitioner= fJavaTextTools.createDocumentPartitioner();
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
fPreviewViewer.setDocument(document);
fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String p= event.getProperty();
if (p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND) ||
p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT))
{
initializeViewerColors(fPreviewViewer);
}
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fPreviewViewer.invalidateTextPresentation();
}
});
return fPreviewViewer.getControl();
}
/**
* Initializes the given viewer's colors.
*
* @param viewer the viewer to be initialized
*/
private void initializeViewerColors(ISourceViewer viewer) {
IPreferenceStore store= fOverlayStore;
if (store != null) {
StyledText styledText= viewer.getTextWidget();
Color color= store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
? null
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
styledText.setBackground(color);
if (fBackgroundColor != null)
fBackgroundColor.dispose();
fBackgroundColor= color;
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
}
/**
* Creates a color from the information stored in the given preference store.
* Returns <code>null</code> if there is no such information available.
*/
private Color createColor(IPreferenceStore store, String key, Display display) {
RGB rgb= null;
if (store.contains(key)) {
if (store.isDefault(key))
rgb= PreferenceConverter.getDefaultColor(store, key);
else
rgb= PreferenceConverter.getColor(store, key);
if (rgb != null)
return new Color(display, rgb);
}
return null;
}
private static void setEnabled(Control control, boolean enable) {
control.setEnabled(enable);
if (control instanceof Composite) {
Composite composite= (Composite) control;
Control[] children= composite.getChildren();
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
for (int i= 0; i < children.length; i++)
setEnabled(children[i], enable);
}
}
private Control createAppearancePage(Composite parent) {
Composite behaviorComposite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
behaviorComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.textFont");
addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT);
label= JavaUIMessages.getString("JavaEditorPreferencePage.displayedTabWidth");
addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 3, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColumn");
addTextField(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN_COLUMN, 3, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.SPACES_FOR_TABS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.synchronizeOnCursor");
addCheckBox(behaviorComposite, label, JavaEditorPreferencePage.PREF_SYNC_OUTLINE_ON_CURSOR_MOVE, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOverviewRuler");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.OVERVIEW_RULER, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showLineNumbers");
addCheckBox(behaviorComposite, label, JavaEditor.LINE_NUMBER_RULER, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightMatchingBrackets");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightCurrentLine");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.CURRENT_LINE, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showPrintMargin");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN, 0);
Label l= new Label(behaviorComposite, SWT.LEFT );
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
gd.heightHint= convertHeightInCharsToPixels(1) / 2;
l.setLayoutData(gd);
l= new Label(behaviorComposite, SWT.LEFT);
l.setText(JavaUIMessages.getString("JavaEditorPreferencePage.appearanceOptions"));
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
l.setLayoutData(gd);
Composite editorComposite= new Composite(behaviorComposite, SWT.NONE);
layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
gd.horizontalSpan= 2;
editorComposite.setLayoutData(gd);
fAppearanceColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fAppearanceColorList.setLayoutData(gd);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
stylesComposite.setLayout(layout);
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
l= new Label(stylesComposite, SWT.LEFT);
l.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
l.setLayoutData(gd);
fAppearanceForegroundColorEditor= new ColorEditor(stylesComposite);
Button foregroundColorButton= fAppearanceForegroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
fAppearanceColorList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleAppearanceColorListSelection();
}
});
foregroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void widgetSelected(SelectionEvent e) {
int i= fAppearanceColorList.getSelectionIndex();
String key= fAppearanceColorListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fAppearanceForegroundColorEditor.getColorValue());
}
});
return behaviorComposite;
}
private Control createProblemIndicationPage(Composite parent) {
Composite composite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
composite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.showProblemsBeforeCompiling");
addCheckBox(composite, label, CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightProblems");
addCheckBox(composite, label, CompilationUnitEditor.PROBLEM_INDICATION, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showQuickFixables");
addCheckBox(composite, label, JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS, 0);
return composite;
}
private Control createContentAssistPage(Composite parent) {
Composite contentAssistComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
contentAssistComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSingleProposalsAutomatically");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOnlyProposalsVisibleInTheInvocationContext");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.presentProposalsInAlphabeticalOrder");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.automaticallyAddImportInsteadOfQualifiedName");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.fillArgumentNamesOnMethodCompletion");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.FILL_METHOD_ARGUMENTS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.enableAutoActivation");
final Button autoactivation= addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationDelay");
fAutoInsertDelayText= addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJava");
fAutoInsertJavaTriggerText= addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 4, 0, false);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJavaDoc");
fAutoInsertJavaDocTriggerText= addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 4, 0, false);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForMethodParameters");
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForMethodParameters");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0);
autoactivation.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
updateAutoactivationControls();
}
});
return contentAssistComposite;
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
fOverlayStore.load();
fOverlayStore.start();
TabFolder folder= new TabFolder(parent, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.general"));
item.setControl(createAppearancePage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.colors"));
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
item.setControl(createColorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.codeAssist"));
item.setControl(createContentAssistPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText("Problem Indi&cation");
item.setControl(createProblemIndicationPage(folder));
initialize();
return folder;
}
private void initialize() {
fFontEditor.setPreferenceStore(getPreferenceStore());
fFontEditor.setPreferencePage(this);
fFontEditor.load();
initializeFields();
for (int i= 0; i < fSyntaxColorListModel.length; i++)
fSyntaxColorList.add(fSyntaxColorListModel[i][0]);
fSyntaxColorList.getDisplay().asyncExec(new Runnable() {
public void run() {
fSyntaxColorList.select(0);
handleSyntaxColorListSelection();
}
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
});
for (int i= 0; i < fAppearanceColorListModel.length; i++)
fAppearanceColorList.add(fAppearanceColorListModel[i][0]);
fAppearanceColorList.getDisplay().asyncExec(new Runnable() {
public void run() {
fAppearanceColorList.select(0);
handleAppearanceColorListSelection();
}
});
}
private void initializeFields() {
Iterator e= fColorButtons.keySet().iterator();
while (e.hasNext()) {
ColorEditor c= (ColorEditor) e.next();
String key= (String) fColorButtons.get(c);
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
c.setColorValue(rgb);
}
e= fCheckBoxes.keySet().iterator();
while (e.hasNext()) {
Button b= (Button) e.next();
String key= (String) fCheckBoxes.get(b);
b.setSelection(fOverlayStore.getBoolean(key));
}
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
e= fTextFields.keySet().iterator();
while (e.hasNext()) {
Text t= (Text) e.next();
String key= (String) fTextFields.get(t);
t.setText(fOverlayStore.getString(key));
}
RGB rgb= PreferenceConverter.getColor(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
fBackgroundColorEditor.setColorValue(rgb);
boolean default_= fOverlayStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
fBackgroundDefaultRadioButton.setSelection(default_);
fBackgroundCustomRadioButton.setSelection(!default_);
fBackgroundColorButton.setEnabled(!default_);
updateAutoactivationControls();
}
private void updateAutoactivationControls() {
boolean autoactivation= fOverlayStore.getBoolean(ContentAssistPreference.AUTOACTIVATION);
fAutoInsertDelayText.setEnabled(autoactivation);
fAutoInsertJavaTriggerText.setEnabled(autoactivation);
fAutoInsertJavaDocTriggerText.setEnabled(autoactivation);
}
/*
* @see PreferencePage#performOk()
*/
public boolean performOk() {
fFontEditor.store();
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fOverlayStore.propagate();
JavaPlugin.getDefault().savePluginPreferences();
return true;
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fFontEditor.loadDefault();
fOverlayStore.loadDefaults();
initializeFields();
handleSyntaxColorListSelection();
handleAppearanceColorListSelection();
super.performDefaults();
fPreviewViewer.invalidateTextPresentation();
}
/*
* @see DialogPage#dispose()
*/
public void dispose() {
if (fJavaTextTools != null) {
fJavaTextTools= null;
}
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fFontEditor.setPreferencePage(null);
fFontEditor.setPreferenceStore(null);
if (fOverlayStore != null) {
fOverlayStore.stop();
fOverlayStore= null;
}
super.dispose();
}
private Control addColorButton(Composite composite, String label, String key, int indentation) {
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
ColorEditor editor= new ColorEditor(composite);
Button button= editor.getButton();
button.setData(editor);
gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
button.setLayoutData(gd);
button.addSelectionListener(fColorButtonListener);
fColorButtons.put(editor, key);
return composite;
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
private Button addCheckBox(Composite parent, String label, String key, int indentation) {
Button checkBox= new Button(parent, SWT.CHECK);
checkBox.setText(label);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
gd.horizontalSpan= 2;
checkBox.setLayoutData(gd);
checkBox.addSelectionListener(fCheckBoxListener);
fCheckBoxes.put(checkBox, key);
return checkBox;
}
private Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE);
gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
textControl.setLayoutData(gd);
textControl.setTextLimit(textLimit);
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fTextFields.put(textControl, key);
if (isNumber) {
fNumberFields.add(textControl);
textControl.addModifyListener(fNumberFieldListener);
} else {
textControl.addModifyListener(fTextFieldListener);
}
return textControl;
}
private void addTextFontEditor(Composite parent, String label, String key) {
Composite editorComposite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
editorComposite.setLayout(layout);
fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite);
fFontEditor.setChangeButtonText(JavaUIMessages.getString("JavaEditorPreferencePage.change"));
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
editorComposite.setLayoutData(gd);
}
private String loadPreviewContentFromFile(String filename) {
String line;
String separator= System.getProperty("line.separator");
StringBuffer buffer= new StringBuffer(512);
BufferedReader reader= null;
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
try {
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
while ((line= reader.readLine()) != null) {
buffer.append(line);
buffer.append(separator);
}
} catch (IOException io) {
JavaPlugin.log(io);
} finally {
if (reader != null) {
try { reader.close(); } catch (IOException e) {}
}
}
return buffer.toString();
}
private void numberFieldChanged(Text textControl) {
String number= textControl.getText();
IStatus status= validatePositiveNumber(number);
if (!status.matches(IStatus.ERROR))
fOverlayStore.setValue((String) fTextFields.get(textControl), number);
updateStatus(status);
}
private IStatus validatePositiveNumber(String number) {
StatusInfo status= new StatusInfo();
if (number.length() == 0) {
status.setError(JavaUIMessages.getString("JavaEditorPreferencePage.empty_input"));
} else {
try {
|
18,266
|
Bug 18266 Turning off lightbulb preference doesn't turn the lights off right away
|
When you turn off the lightbulb preference, editors with existing lightbulbs continue to show them. Closing and reopening the editors gets rid of them.
|
verified fixed
|
8038473
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:20:57Z
| 2002-05-30T00:53:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
int value= Integer.parseInt(number);
if (value < 0)
status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number));
} catch (NumberFormatException e) {
status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number));
}
}
return status;
}
private void updateStatus(IStatus status) {
if (!status.matches(IStatus.ERROR)) {
for (int i= 0; i < fNumberFields.size(); i++) {
Text text= (Text) fNumberFields.get(i);
IStatus s= validatePositiveNumber(text.getText());
status= StatusUtil.getMoreSevere(s, status);
}
}
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
public static boolean showTempProblems() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(JavaEditorPreferencePage.PREF_SHOW_TEMP_PROBLEMS);
}
static public boolean synchronizeOutlineOnCursorMove() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(PREF_SYNC_OUTLINE_ON_CURSOR_MOVE);
}
}
|
18,198
|
Bug 18198 Java Model Exception out of JavaOutlineViewer / JDT Core
|
20020528 Unsure if this is a Core or UI problem Open a compilation unit Close the project containing the compilation unit Java Model Exception: Java Model Status [HEy does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:502) at org.eclipse.jdt.internal.core.JavaProject.openWhenClosed (JavaProject.java:1665) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:523) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java:310) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo (JavaProject.java:966) at org.eclipse.jdt.internal.core.JavaProject.getSearchableNameEnvironment (JavaProject.java:1425) at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.<init> (HierarchyBuilder.java:81) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.<init> (IndexBasedHierarchyBuilder.java:117) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute (TypeHierarchy.java:266) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh (TypeHierarchy.java:1128) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation (CreateTypeHierarchyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:292) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:500) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1183) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:576) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:338) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:327) at org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache.getTypeHierarchy (SuperTypeHierarchyCache.java:60) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators (OverrideIndicatorLabelDecorator.java:97) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags (OverrideIndicatorLabelDecorator.java:84) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage (OverrideIndicatorLabelDecorator.java:67) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage (JavaUILabelProvider.java:110) at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage (DecoratingLabelProvider.java:67) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:83) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:354) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1134) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.labelProviderChanged (AbstractTreeViewer.java:936) at org.eclipse.jface.viewers.ContentViewer.handleLabelProviderChanged (ContentViewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged (StructuredViewer.java:528) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$JavaOutlineViewer.handleL abelProviderChanged(JavaOutlinePage.java:566) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged (ContentViewer.java:70) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged (ProblemsLabelDecorator.java:293) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0 (ProblemsLabelDecorator.java:288) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged (ProblemsLabelDecorator.java:268) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run (ProblemMarkerManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.WorkspaceAction.run(WorkspaceAction.java:272) at org.eclipse.ui.actions.CloseResourceAction.run (CloseResourceAction.java:151) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
|
resolved fixed
|
73bbec8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:21:33Z
| 2002-05-29T16:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
|
package org.eclipse.jdt.ui;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage;
import org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry;
import org.eclipse.jdt.internal.ui.viewsupport.ImageImageDescriptor;
/**
* LabelDecorator that decorates an method's image with override or implements overlays.
* Updating of images on element changes is the resposibility of the viewers using this
* decorator.
*/
public class OverrideIndicatorLabelDecorator implements ILabelDecorator {
|
18,198
|
Bug 18198 Java Model Exception out of JavaOutlineViewer / JDT Core
|
20020528 Unsure if this is a Core or UI problem Open a compilation unit Close the project containing the compilation unit Java Model Exception: Java Model Status [HEy does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:502) at org.eclipse.jdt.internal.core.JavaProject.openWhenClosed (JavaProject.java:1665) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:523) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java:310) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo (JavaProject.java:966) at org.eclipse.jdt.internal.core.JavaProject.getSearchableNameEnvironment (JavaProject.java:1425) at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.<init> (HierarchyBuilder.java:81) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.<init> (IndexBasedHierarchyBuilder.java:117) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute (TypeHierarchy.java:266) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh (TypeHierarchy.java:1128) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation (CreateTypeHierarchyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:292) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:500) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1183) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:576) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:338) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:327) at org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache.getTypeHierarchy (SuperTypeHierarchyCache.java:60) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators (OverrideIndicatorLabelDecorator.java:97) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags (OverrideIndicatorLabelDecorator.java:84) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage (OverrideIndicatorLabelDecorator.java:67) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage (JavaUILabelProvider.java:110) at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage (DecoratingLabelProvider.java:67) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:83) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:354) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1134) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.labelProviderChanged (AbstractTreeViewer.java:936) at org.eclipse.jface.viewers.ContentViewer.handleLabelProviderChanged (ContentViewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged (StructuredViewer.java:528) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$JavaOutlineViewer.handleL abelProviderChanged(JavaOutlinePage.java:566) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged (ContentViewer.java:70) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged (ProblemsLabelDecorator.java:293) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0 (ProblemsLabelDecorator.java:288) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged (ProblemsLabelDecorator.java:268) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run (ProblemMarkerManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.WorkspaceAction.run(WorkspaceAction.java:272) at org.eclipse.ui.actions.CloseResourceAction.run (CloseResourceAction.java:151) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
|
resolved fixed
|
73bbec8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:21:33Z
| 2002-05-29T16:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
|
private ImageDescriptorRegistry fRegistry;
private boolean fRegistryNeedsDispose= false;
/**
* Creates a decorator. The decorator creates an own image registry to cache
* images.
*/
public OverrideIndicatorLabelDecorator() {
this(new ImageDescriptorRegistry());
fRegistryNeedsDispose= true;
}
/**
* Internal constructor. Creates decorator with a shared image registry.
* @param registry The registry to use or <code>null</code> to use the Java plugin's
* image registry.
|
18,198
|
Bug 18198 Java Model Exception out of JavaOutlineViewer / JDT Core
|
20020528 Unsure if this is a Core or UI problem Open a compilation unit Close the project containing the compilation unit Java Model Exception: Java Model Status [HEy does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:502) at org.eclipse.jdt.internal.core.JavaProject.openWhenClosed (JavaProject.java:1665) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:523) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java:310) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo (JavaProject.java:966) at org.eclipse.jdt.internal.core.JavaProject.getSearchableNameEnvironment (JavaProject.java:1425) at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.<init> (HierarchyBuilder.java:81) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.<init> (IndexBasedHierarchyBuilder.java:117) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute (TypeHierarchy.java:266) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh (TypeHierarchy.java:1128) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation (CreateTypeHierarchyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:292) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:500) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1183) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:576) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:338) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:327) at org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache.getTypeHierarchy (SuperTypeHierarchyCache.java:60) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators (OverrideIndicatorLabelDecorator.java:97) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags (OverrideIndicatorLabelDecorator.java:84) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage (OverrideIndicatorLabelDecorator.java:67) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage (JavaUILabelProvider.java:110) at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage (DecoratingLabelProvider.java:67) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:83) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:354) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1134) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.labelProviderChanged (AbstractTreeViewer.java:936) at org.eclipse.jface.viewers.ContentViewer.handleLabelProviderChanged (ContentViewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged (StructuredViewer.java:528) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$JavaOutlineViewer.handleL abelProviderChanged(JavaOutlinePage.java:566) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged (ContentViewer.java:70) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged (ProblemsLabelDecorator.java:293) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0 (ProblemsLabelDecorator.java:288) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged (ProblemsLabelDecorator.java:268) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run (ProblemMarkerManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.WorkspaceAction.run(WorkspaceAction.java:272) at org.eclipse.ui.actions.CloseResourceAction.run (CloseResourceAction.java:151) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
|
resolved fixed
|
73bbec8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:21:33Z
| 2002-05-29T16:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
|
*/
public OverrideIndicatorLabelDecorator(ImageDescriptorRegistry registry) {
if (registry == null) {
registry= JavaPlugin.getImageDescriptorRegistry();
}
fRegistry= registry;
}
/* (non-Javadoc)
* @see ILabelDecorator#decorateText(String, Object)
*/
public String decorateText(String text, Object element) {
return text;
}
/* (non-Javadoc)
* @see ILabelDecorator#decorateImage(Image, Object)
*/
public Image decorateImage(Image image, Object element) {
int adornmentFlags= computeAdornmentFlags(element);
if (adornmentFlags != 0) {
ImageDescriptor baseImage= new ImageImageDescriptor(image);
Rectangle bounds= image.getBounds();
return fRegistry.get(new JavaElementImageDescriptor(baseImage, adornmentFlags, new Point(bounds.width, bounds.height)));
}
return image;
}
public int computeAdornmentFlags(Object element) {
if (AppearancePreferencePage.showOverrideIndicators()) {
if (element instanceof IMethod) {
|
18,198
|
Bug 18198 Java Model Exception out of JavaOutlineViewer / JDT Core
|
20020528 Unsure if this is a Core or UI problem Open a compilation unit Close the project containing the compilation unit Java Model Exception: Java Model Status [HEy does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:502) at org.eclipse.jdt.internal.core.JavaProject.openWhenClosed (JavaProject.java:1665) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:523) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java:310) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo (JavaProject.java:966) at org.eclipse.jdt.internal.core.JavaProject.getSearchableNameEnvironment (JavaProject.java:1425) at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.<init> (HierarchyBuilder.java:81) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.<init> (IndexBasedHierarchyBuilder.java:117) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute (TypeHierarchy.java:266) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh (TypeHierarchy.java:1128) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation (CreateTypeHierarchyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:292) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:500) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1183) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:576) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:338) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:327) at org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache.getTypeHierarchy (SuperTypeHierarchyCache.java:60) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators (OverrideIndicatorLabelDecorator.java:97) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags (OverrideIndicatorLabelDecorator.java:84) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage (OverrideIndicatorLabelDecorator.java:67) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage (JavaUILabelProvider.java:110) at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage (DecoratingLabelProvider.java:67) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:83) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:354) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1134) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.labelProviderChanged (AbstractTreeViewer.java:936) at org.eclipse.jface.viewers.ContentViewer.handleLabelProviderChanged (ContentViewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged (StructuredViewer.java:528) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$JavaOutlineViewer.handleL abelProviderChanged(JavaOutlinePage.java:566) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged (ContentViewer.java:70) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged (ProblemsLabelDecorator.java:293) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0 (ProblemsLabelDecorator.java:288) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged (ProblemsLabelDecorator.java:268) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run (ProblemMarkerManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.WorkspaceAction.run(WorkspaceAction.java:272) at org.eclipse.ui.actions.CloseResourceAction.run (CloseResourceAction.java:151) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
|
resolved fixed
|
73bbec8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:21:33Z
| 2002-05-29T16:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
|
try {
IMethod method= (IMethod) element;
if (method.exists()) {
int flags= method.getFlags();
if (method.getDeclaringType().isClass() && !method.isConstructor() && !Flags.isPrivate(flags) && !Flags.isStatic(flags)) {
return getOverrideIndicators(method);
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
}
return 0;
}
protected int getOverrideIndicators(IMethod method) throws JavaModelException {
IType type= method.getDeclaringType();
ITypeHierarchy hierarchy= SuperTypeHierarchyCache.getTypeHierarchy(type);
if (hierarchy != null) {
return findInHierarchy(type, hierarchy, method.getElementName(), method.getParameterTypes());
}
return 0;
}
protected int findInHierarchy(IType type, ITypeHierarchy hierarchy, String name, String[] paramTypes) throws JavaModelException {
IMethod impl= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, type, name, paramTypes, false);
if (impl != null) {
IMethod overridden= JavaModelUtil.findMethodImplementationInHierarchy(hierarchy, type, name, paramTypes, false);
if (overridden != null) {
|
18,198
|
Bug 18198 Java Model Exception out of JavaOutlineViewer / JDT Core
|
20020528 Unsure if this is a Core or UI problem Open a compilation unit Close the project containing the compilation unit Java Model Exception: Java Model Status [HEy does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:502) at org.eclipse.jdt.internal.core.JavaProject.openWhenClosed (JavaProject.java:1665) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:523) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java:310) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo (JavaProject.java:966) at org.eclipse.jdt.internal.core.JavaProject.getSearchableNameEnvironment (JavaProject.java:1425) at org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder.<init> (HierarchyBuilder.java:81) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.<init> (IndexBasedHierarchyBuilder.java:117) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute (TypeHierarchy.java:266) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh (TypeHierarchy.java:1128) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation (CreateTypeHierarchyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:292) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:500) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1183) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:576) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:338) at org.eclipse.jdt.internal.core.SourceType.newSupertypeHierarchy (SourceType.java:327) at org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache.getTypeHierarchy (SuperTypeHierarchyCache.java:60) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators (OverrideIndicatorLabelDecorator.java:97) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags (OverrideIndicatorLabelDecorator.java:84) at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage (OverrideIndicatorLabelDecorator.java:67) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage (JavaUILabelProvider.java:110) at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage (DecoratingLabelProvider.java:67) at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:83) at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem (AbstractTreeViewer.java:354) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1134) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:848) at org.eclipse.jface.viewers.AbstractTreeViewer.labelProviderChanged (AbstractTreeViewer.java:936) at org.eclipse.jface.viewers.ContentViewer.handleLabelProviderChanged (ContentViewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged (StructuredViewer.java:528) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$JavaOutlineViewer.handleL abelProviderChanged(JavaOutlinePage.java:566) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged (ContentViewer.java:70) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged (ProblemsLabelDecorator.java:293) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0 (ProblemsLabelDecorator.java:288) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged (ProblemsLabelDecorator.java:268) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run (ProblemMarkerManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.WorkspaceAction.run(WorkspaceAction.java:272) at org.eclipse.ui.actions.CloseResourceAction.run (CloseResourceAction.java:151) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
|
resolved fixed
|
73bbec8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:21:33Z
| 2002-05-29T16:33:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
|
return JavaElementImageDescriptor.OVERRIDES;
} else {
return JavaElementImageDescriptor.IMPLEMENTS;
}
}
return 0;
}
/* (non-Javadoc)
* @see IBaseLabelProvider#addListener(ILabelProviderListener)
*/
public void addListener(ILabelProviderListener listener) {
}
/* (non-Javadoc)
* @see IBaseLabelProvider#dispose()
*/
public void dispose() {
}
/* (non-Javadoc)
* @see IBaseLabelProvider#isLabelProperty(Object, String)
*/
public boolean isLabelProperty(Object element, String property) {
return true;
}
/* (non-Javadoc)
* @see IBaseLabelProvider#removeListener(ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener listener) {
}
}
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.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.ArrayList;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
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.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportDeclaration;
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.ITypeNameRequestor;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.internal.corext.codemanipulation.AddImportsOperation;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.TypeInfo;
import org.eclipse.jdt.internal.corext.util.TypeInfoRequestor;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider;
public class AddImportOnSelectionAction extends Action implements IUpdate {
private CompilationUnitEditor fEditor;
public AddImportOnSelectionAction(CompilationUnitEditor editor) {
super(JavaEditorMessages.getString("AddImportOnSelection.label"));
setToolTipText(JavaEditorMessages.getString("AddImportOnSelection.tooltip"));
setDescription(JavaEditorMessages.getString("AddImportOnSelection.description"));
fEditor= editor;
WorkbenchHelp.setHelp(this, IJavaHelpContextIds.ADD_IMPORT_ON_SELECTION_ACTION);
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
}
public AddImportOnSelectionAction() {
this(null);
}
public void update() {
setEnabled(fEditor != null && !fEditor.isEditorInputReadOnly());
}
private ICompilationUnit getCompilationUnit () {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(fEditor.getEditorInput());
}
/*
* @see org.eclipse.jface.action.IAction#run()
*/
public void run() {
ICompilationUnit cu= getCompilationUnit();
if (cu != null) {
ISelection s= fEditor.getSelectionProvider().getSelection();
IDocument doc= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
ITextSelection selection= (ITextSelection) s;
if (doc != null) {
try {
int nameStart= getNameStart(doc, selection.getOffset());
int nameEnd= getNameEnd(doc, selection.getOffset() + selection.getLength());
int len= nameEnd - nameStart;
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
String name= doc.get(nameStart, len).trim();
String simpleName= Signature.getSimpleName(name);
String containerName= Signature.getQualifier(name);
IImportDeclaration existingImport= JavaModelUtil.findImport(cu, simpleName);
if (existingImport != null) {
if (!existingImport.getElementName().equals(name)) {
getShell().getDisplay().beep();
}
return;
}
IJavaSearchScope searchScope= SearchEngine.createJavaSearchScope(new IJavaElement[] { cu.getJavaProject() });
TypeInfo[] types= findAllTypes(simpleName, searchScope, null);
if (types.length== 0) {
getShell().getDisplay().beep();
return;
}
TypeInfo chosen= selectResult(types, containerName, getShell());
if (chosen == null) {
return;
}
IType type= chosen.resolveType(searchScope);
if (type == null) {
JavaPlugin.logErrorMessage("AddImportOnSelectionAction: Failed to resolve TypeRef: " + chosen.toString());
MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), JavaEditorMessages.getString("AddImportOnSelection.error.notresolved.message"));
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
return;
}
removeQualification(doc, nameStart, chosen);
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
AddImportsOperation op= new AddImportsOperation(cu, new IJavaElement[] { type }, settings, false);
ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
try {
dialog.run(false, true, new WorkbenchRunnableAdapter(op));
} catch (InvocationTargetException e) {
JavaPlugin.log(e);
MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getTargetException().getMessage());
} catch (InterruptedException e) {
}
return;
} catch (CoreException e) {
JavaPlugin.log(e);
ErrorDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), null, e.getStatus());
} catch (BadLocationException e) {
JavaPlugin.log(e);
MessageDialog.openError(getShell(), JavaEditorMessages.getString("AddImportOnSelection.error.title"), e.getMessage());
}
}
}
}
private int getNameStart(IDocument doc, int pos) throws BadLocationException {
while (pos > 0) {
char ch= doc.getChar(pos - 1);
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
if (!Character.isJavaIdentifierPart(ch) && ch != '.') {
return pos;
}
pos--;
}
return pos;
}
private int getNameEnd(IDocument doc, int pos) throws BadLocationException {
int len= doc.getLength();
while (pos < len) {
char ch= doc.getChar(pos);
if (!Character.isJavaIdentifierPart(ch)) {
return pos;
}
pos++;
}
return pos;
}
private void removeQualification(IDocument doc, int nameStart, TypeInfo typeInfo) throws BadLocationException {
String containerName= typeInfo.getTypeContainerName();
int containerLen= containerName.length();
int docLen= doc.getLength();
if ((containerLen > 0) && (nameStart + containerLen + 1 < docLen)) {
for (int k= 0; k < containerLen; k++) {
if (doc.getChar(nameStart + k) != containerName.charAt(k)) {
return;
}
}
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
if (doc.getChar(nameStart + containerLen) == '.') {
doc.replace(nameStart, containerLen + 1, "");
}
}
}
/**
* Finds a type by the simple name.
*/
private static TypeInfo[] findAllTypes(String simpleTypeName, IJavaSearchScope searchScope, IProgressMonitor monitor) throws CoreException {
SearchEngine searchEngine= new SearchEngine();
ArrayList typeRefsFound= new ArrayList(10);
ITypeNameRequestor requestor= new TypeInfoRequestor(typeRefsFound);
searchEngine.searchAllTypeNames(
JavaPlugin.getWorkspace(),
null,
simpleTypeName.toCharArray(),
IJavaSearchConstants.EXACT_MATCH,
IJavaSearchConstants.CASE_SENSITIVE,
IJavaSearchConstants.TYPE,
searchScope,
requestor,
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
monitor);
return (TypeInfo[]) typeRefsFound.toArray(new TypeInfo[typeRefsFound.size()]);
}
private Shell getShell() {
return fEditor.getSite().getShell();
|
18,163
|
Bug 18163 Add Import should ignore leading/trailing whitespace
|
It often happens to me that I have selected i.e. "Node " instead of "Node" because I made my selection by using "Shift + Ctrl + Right". When I then use Ctrl+M (Add Import) nothing happens because of the trailing whitespace within the selection.
|
resolved fixed
|
b92efa1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:32:10Z
| 2002-05-29T13:46:40Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
|
}
private TypeInfo selectResult(TypeInfo[] results, String containerName, Shell shell) {
int nResults= results.length;
if (nResults == 0) {
return null;
} else if (nResults == 1) {
return results[0];
}
if (containerName.length() != 0) {
for (int i= 0; i < nResults; i++) {
TypeInfo curr= (TypeInfo) results[i];
if (containerName.equals(curr.getTypeContainerName())) {
return curr;
}
}
}
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED));
dialog.setTitle(JavaEditorMessages.getString("AddImportOnSelection.dialog.title"));
dialog.setMessage(JavaEditorMessages.getString("AddImportOnSelection.dialog.message"));
dialog.setElements(results);
if (dialog.open() == dialog.OK) {
return (TypeInfo) dialog.getFirstResult();
}
return null;
}
}
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.ui.wizards;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaElementContentProvider;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
/**
* Base class for Java wizards. Provides source folder selection UI, validation and creation.
* @since 2.0
*/
public abstract class NewContainerWizardPage extends NewElementWizardPage {
/**
* container field id
*/
protected static final String CONTAINER= "NewContainerWizardPage.container";
/**
* Status of last validation
*/
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
protected IStatus fContainerStatus;
private StringButtonDialogField fContainerDialogField;
/*
* package fragment root corresponding to the input type (can be null)
*/
private IPackageFragmentRoot fCurrRoot;
private IWorkspaceRoot fWorkspaceRoot;
public NewContainerWizardPage(String name) {
super(name);
fWorkspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
ContainerFieldAdapter adapter= new ContainerFieldAdapter();
fContainerDialogField= new StringButtonDialogField(adapter);
fContainerDialogField.setDialogFieldListener(adapter);
fContainerDialogField.setLabelText(NewWizardMessages.getString("NewContainerWizardPage.container.label"));
fContainerDialogField.setButtonLabel(NewWizardMessages.getString("NewContainerWizardPage.container.button"));
fContainerStatus= new StatusInfo();
fCurrRoot= null;
}
/**
* Initializes the fields provided by the container page with a given
* Java element as selection.
* @param elem The initial selection of this page or null if no
* selection was available
*/
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
protected void initContainerPage(IJavaElement elem) {
IPackageFragmentRoot initRoot= null;
if (elem != null) {
initRoot= JavaModelUtil.getPackageFragmentRoot(elem);
if (initRoot == null || initRoot.isArchive()) {
IJavaProject jproject= elem.getJavaProject();
try {
initRoot= null;
IPackageFragmentRoot[] roots= jproject.getPackageFragmentRoots();
for (int i= 0; i < roots.length; i++) {
if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
initRoot= roots[i];
break;
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
if (initRoot == null) {
initRoot= jproject.getPackageFragmentRoot("");
}
}
}
setPackageFragmentRoot(initRoot, true);
}
/**
* Utility method to inspect a selection to find a Java element as initial element.
* @return Returns a Java element to use as initial selection, or <code>null</code>,
* if none is found.
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
*/
protected IJavaElement getInitialJavaElement(IStructuredSelection selection) {
IJavaElement jelem= null;
if (selection != null && !selection.isEmpty()) {
Object selectedElement= selection.getFirstElement();
if (selectedElement instanceof IAdaptable) {
IAdaptable adaptable= (IAdaptable) selectedElement;
jelem= (IJavaElement) adaptable.getAdapter(IJavaElement.class);
if (jelem == null) {
IResource resource= (IResource) adaptable.getAdapter(IResource.class);
if (resource != null && resource.getType() != IResource.ROOT) {
while (jelem == null && resource.getType() != IResource.PROJECT) {
resource= resource.getParent();
jelem= (IJavaElement) resource.getAdapter(IJavaElement.class);
}
if (jelem == null) {
jelem= JavaCore.create(resource);
}
}
}
}
}
if (jelem == null) {
jelem= EditorUtility.getActiveEditorJavaInput();
}
if (jelem == null) {
IProject[] projects= getWorkspaceRoot().getProjects();
if (projects.length > 0) {
jelem= JavaCore.create(projects[0]);
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
}
}
return jelem;
}
/**
* Returns the recommended maximum width for text fields (in pixels)
* Not valid until entering createContent.
* Overwrite to change value.
*/
protected int getMaxFieldWidth() {
return convertWidthInCharsToPixels(40);
}
/**
* Creates the controls for the container field. Expects a GridLayout with at least 3 columns.
* @param parent The parent composite
* @param nColumns The number of columns to span
*/
protected void createContainerControls(Composite parent, int nColumns) {
fContainerDialogField.doFillIntoGrid(parent, nColumns);
LayoutUtil.setWidthHint(fContainerDialogField.getTextControl(null), getMaxFieldWidth());
}
protected void setFocusOnContainer() {
fContainerDialogField.setFocus();
}
private class ContainerFieldAdapter implements IStringButtonAdapter, IDialogFieldListener {
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
public void changeControlPressed(DialogField field) {
containerChangeControlPressed(field);
}
public void dialogFieldChanged(DialogField field) {
containerDialogFieldChanged(field);
}
}
private void containerChangeControlPressed(DialogField field) {
IPackageFragmentRoot root= getPackageFragmentRoot();
root= chooseSourceContainer(root);
if (root != null) {
setPackageFragmentRoot(root, true);
}
}
private void containerDialogFieldChanged(DialogField field) {
if (field == fContainerDialogField) {
fContainerStatus= containerChanged();
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
}
handleFieldChanged(CONTAINER);
}
/**
* Called after the container field has changed.
* Updates the model and returns the status.
* Model is only valid if returned status is OK
*/
protected IStatus containerChanged() {
StatusInfo status= new StatusInfo();
fCurrRoot= null;
String str= getPackageFragmentRootText();
if (str.length() == 0) {
status.setError(NewWizardMessages.getString("NewContainerWizardPage.error.EnterContainerName"));
return status;
}
IPath path= new Path(str);
IResource res= fWorkspaceRoot.findMember(path);
if (res != null) {
int resType= res.getType();
if (resType == IResource.PROJECT || resType == IResource.FOLDER) {
IProject proj= res.getProject();
if (!proj.isOpen()) {
status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ProjectClosed", proj.getFullPath().toString()));
return status;
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
}
IJavaProject jproject= JavaCore.create(proj);
fCurrRoot= jproject.getPackageFragmentRoot(res);
if (fCurrRoot.exists()) {
try {
if (!proj.hasNature(JavaCore.NATURE_ID)) {
if (resType == IResource.PROJECT) {
status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotAJavaProject"));
} else {
status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotInAJavaProject"));
}
return status;
}
} catch (CoreException e) {
status.setWarning(NewWizardMessages.getString("NewContainerWizardPage.warning.NotAJavaProject"));
}
try {
if (!jproject.isOnClasspath(fCurrRoot)) {
status.setWarning(NewWizardMessages.getFormattedString("NewContainerWizardPage.warning.NotOnClassPath", str));
}
} catch (JavaModelException e) {
status.setWarning(NewWizardMessages.getFormattedString("NewContainerWizardPage.warning.NotOnClassPath", str));
}
if (fCurrRoot.isArchive()) {
status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ContainerIsBinary", str));
return status;
}
}
return status;
} else {
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.NotAFolder", str));
return status;
}
} else {
status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ContainerDoesNotExist", str));
return status;
}
}
/**
* Called when a field on a page changed. Every sub type is responsible to
* call this method when a field on its page has changed.
* Subtypes override (extend) the method to add verification when own field has a
* dependency to an other field. (for example the class name input must be verified
* again, when the package field changes (check for duplicated class names))
* @param fieldName The name of the field that has changed (field id)
*/
protected void handleFieldChanged(String fieldName) {
}
/**
* Returns the workspace root.
*/
protected IWorkspaceRoot getWorkspaceRoot() {
return fWorkspaceRoot;
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
}
/**
* Returns the PackageFragmentRoot corresponding to the current input.
* @return the PackageFragmentRoot or <code>null</code> if the current
* input is not a valid source folder
*/
public IPackageFragmentRoot getPackageFragmentRoot() {
return fCurrRoot;
}
/**
* Returns the text of the container field.
*/
public String getPackageFragmentRootText() {
return fContainerDialogField.getText();
}
/**
* Sets the current PackageFragmentRoot (model and text field).
* @param canBeModified Selects if the container field can be changed by the user
*/
public void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified) {
fCurrRoot= root;
String str= (root == null) ? "" : root.getPath().makeRelative().toString();
fContainerDialogField.setText(str);
fContainerDialogField.setEnabled(canBeModified);
}
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
private IPackageFragmentRoot chooseSourceContainer(IJavaElement initElement) {
Class[] acceptedClasses= new Class[] { IPackageFragmentRoot.class, IJavaProject.class };
TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false) {
public boolean isSelectedValid(Object element) {
try {
if (element instanceof IJavaProject) {
IJavaProject jproject= (IJavaProject)element;
IPath path= jproject.getProject().getFullPath();
return (jproject.findPackageFragmentRoot(path) != null);
} else if (element instanceof IPackageFragmentRoot) {
return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE);
}
return true;
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
return false;
}
};
acceptedClasses= new Class[] { IJavaModel.class, IPackageFragmentRoot.class, IJavaProject.class };
ViewerFilter filter= new TypedViewerFilter(acceptedClasses) {
public boolean select(Viewer viewer, Object parent, Object element) {
if (element instanceof IPackageFragmentRoot) {
try {
return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE);
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
return false;
|
18,132
|
Bug 18132 New wizards should verify if folder is on classpath
|
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
|
resolved fixed
|
cb8ab38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T09:39:28Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
|
}
}
return super.select(viewer, parent, element);
}
};
JavaElementContentProvider provider= new JavaElementContentProvider();
ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, provider);
dialog.setValidator(validator);
dialog.setSorter(new JavaElementSorter());
dialog.setTitle(NewWizardMessages.getString("NewContainerWizardPage.ChooseSourceContainerDialog.title"));
dialog.setMessage(NewWizardMessages.getString("NewContainerWizardPage.ChooseSourceContainerDialog.description"));
dialog.addFilter(filter);
dialog.setInput(JavaCore.create(fWorkspaceRoot));
dialog.setInitialSelection(initElement);
if (dialog.open() == dialog.OK) {
Object element= dialog.getFirstResult();
if (element instanceof IJavaProject) {
IJavaProject jproject= (IJavaProject)element;
return jproject.getPackageFragmentRoot(jproject.getProject());
} else if (element instanceof IPackageFragmentRoot) {
return (IPackageFragmentRoot)element;
}
return null;
}
return null;
}
}
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.AddBookmarkAction;
import org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.AddTaskAction;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group that adds the source and generate actions to a context menu and
* action bar.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class GenerateActionGroup extends ActionGroup {
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
private boolean fEditorIsOwner;
private IWorkbenchSite fSite;
private String fGroupName= IContextMenuConstants.GROUP_SOURCE;
private List fRegisteredSelectionListeners;
private AddImportOnSelectionAction fAddImport;
private OverrideMethodsAction fOverrideMethods;
private AddGetterSetterAction fAddGetterSetter;
private AddUnimplementedConstructorsAction fAddUnimplementedConstructors;
private AddJavaDocStubAction fAddJavaDocStub;
private AddBookmarkAction fAddBookmark;
private AddTaskAction fAddTaskAction;
private ExternalizeStringsAction fExternalizeStrings;
private FindStringsToExternalizeAction fFindStringsToExternalize;
private SurroundWithTryCatchAction fSurroundWithTryCatch;
private OrganizeImportsAction fOrganizeImports;
private ConvertLineDelimitersAction fConvertToWindows;
private ConvertLineDelimitersAction fConvertToUNIX;
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
private ConvertLineDelimitersAction fConvertToMac;
/**
* Creates a new <code>GenerateActionGroup</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public GenerateActionGroup(CompilationUnitEditor editor, String groupName) {
fSite= editor.getSite();
fEditorIsOwner= true;
fGroupName= groupName;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fAddImport= new AddImportOnSelectionAction(editor);
fAddImport.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_IMPORT);
fAddImport.update();
editor.setAction("AddImport", fAddImport);
fOrganizeImports= new OrganizeImportsAction(editor);
fOrganizeImports.setActionDefinitionId(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS);
fOrganizeImports.editorStateChanged();
editor.setAction("OrganizeImports", fOrganizeImports);
fOverrideMethods= new OverrideMethodsAction(editor);
fOverrideMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.OVERRIDE_METHODS);
fOverrideMethods.editorStateChanged();
editor.setAction("OverrideMethods", fOverrideMethods);
fAddGetterSetter= new AddGetterSetterAction(editor);
fAddGetterSetter.setActionDefinitionId(IJavaEditorActionDefinitionIds.CREATE_GETTER_SETTER);
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
fAddGetterSetter.editorStateChanged();
editor.setAction("AddGetterSetter", fAddGetterSetter);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor);
fAddUnimplementedConstructors.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS);
fAddUnimplementedConstructors.editorStateChanged();
editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors);
fAddJavaDocStub= new AddJavaDocStubAction(editor);
fAddJavaDocStub.editorStateChanged();
fSurroundWithTryCatch= new SurroundWithTryCatchAction(editor);
fSurroundWithTryCatch.setActionDefinitionId(IJavaEditorActionDefinitionIds.SURROUND_WITH_TRY_CATCH);
fSurroundWithTryCatch.update(selection);
provider.addSelectionChangedListener(fSurroundWithTryCatch);
editor.setAction("SurroundWithTryCatch", fSurroundWithTryCatch);
fExternalizeStrings= new ExternalizeStringsAction(editor);
fExternalizeStrings.setActionDefinitionId(IJavaEditorActionDefinitionIds.EXTERNALIZE_STRINGS);
fExternalizeStrings.editorStateChanged();
editor.setAction("ExternalizeStrings", fExternalizeStrings);
fConvertToWindows= new ConvertLineDelimitersAction(editor, "\r\n");
fConvertToWindows.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
editor.setAction("ConvertLineDelimitersToWindows", fConvertToWindows);
fConvertToUNIX= new ConvertLineDelimitersAction(editor, "\n");
fConvertToUNIX.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_UNIX);
editor.setAction("ConvertLineDelimitersToUNIX", fConvertToUNIX);
fConvertToMac= new ConvertLineDelimitersAction(editor, "\r");
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
fConvertToMac.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_MAC);
editor.setAction("ConvertLineDelimitersToMac", fConvertToMac);
}
/**
* Creates a new <code>GenerateActionGroup</code>.
*
* @param page the page that owns this action group
*/
public GenerateActionGroup(Page page) {
this(page.getSite());
}
/**
* Creates a new <code>GenerateActionGroup</code>.
*
* @param part the view part that owns this action group
*/
public GenerateActionGroup(IViewPart part) {
this(part.getSite());
}
private GenerateActionGroup(IWorkbenchSite site) {
fSite= site;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fOverrideMethods= new OverrideMethodsAction(site);
fAddGetterSetter= new AddGetterSetterAction(site);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site);
fAddJavaDocStub= new AddJavaDocStubAction(site);
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
fAddBookmark= new AddBookmarkAction(site.getShell());
fAddTaskAction= new AddTaskAction(site);
fExternalizeStrings= new ExternalizeStringsAction(site);
fFindStringsToExternalize= new FindStringsToExternalizeAction(site);
fOrganizeImports= new OrganizeImportsAction(site);
fOverrideMethods.update(selection);
fAddGetterSetter.update(selection);
fAddUnimplementedConstructors.update(selection);
fAddJavaDocStub.update(selection);
fExternalizeStrings.update(selection);
fFindStringsToExternalize.update(selection);
fAddTaskAction.update(selection);
fOrganizeImports.update(selection);
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection)selection;
fAddBookmark.selectionChanged(ss);
} else {
fAddBookmark.setEnabled(false);
}
registerSelectionListener(provider, fOverrideMethods);
registerSelectionListener(provider, fAddGetterSetter);
registerSelectionListener(provider, fAddUnimplementedConstructors);
registerSelectionListener(provider, fAddJavaDocStub);
registerSelectionListener(provider, fAddBookmark);
registerSelectionListener(provider, fExternalizeStrings);
registerSelectionListener(provider, fFindStringsToExternalize);
registerSelectionListener(provider, fOrganizeImports);
registerSelectionListener(provider, fAddTaskAction);
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
}
private void registerSelectionListener(ISelectionProvider provider, ISelectionChangedListener listener) {
if (fRegisteredSelectionListeners == null)
fRegisteredSelectionListeners= new ArrayList(12);
provider.addSelectionChangedListener(listener);
fRegisteredSelectionListeners.add(listener);
}
/**
* The state of the editor owning this action group has changed.
* This method does nothing if the group's owner isn't an
* editor.
* <p>
* Note: This method is for internal use only. Clients should not call this method.
* </p>
*/
public void editorStateChanged() {
Assert.isTrue(fEditorIsOwner);
fAddImport.update();
fExternalizeStrings.editorStateChanged();
fOrganizeImports.editorStateChanged();
fOverrideMethods.editorStateChanged();
fAddUnimplementedConstructors.editorStateChanged();
fAddJavaDocStub.editorStateChanged();
fSurroundWithTryCatch.editorStateChanged();
fAddGetterSetter.editorStateChanged();
}
/* (non-Javadoc)
* Method declared in ActionGroup
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
*/
public void fillActionBars(IActionBars actionBar) {
super.fillActionBars(actionBar);
setGlobalActionHandlers(actionBar);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
if (fEditorIsOwner) {
IMenuManager subMenu= createEditorSubMenu(menu);
if (subMenu != null)
menu.appendToGroup(fGroupName, subMenu);
} else {
appendToGroup(menu, fOrganizeImports);
appendToGroup(menu, fOverrideMethods);
appendToGroup(menu, fAddGetterSetter);
appendToGroup(menu, fAddUnimplementedConstructors);
appendToGroup(menu, fAddJavaDocStub);
appendToGroup(menu, fAddBookmark);
}
}
private IMenuManager createEditorSubMenu(IMenuManager mainMenu) {
IMenuManager result= new MenuManager(ActionMessages.getString("SourceMenu.label"));
int added= 0;
added+= addAction(result, fAddImport);
added+= addAction(result, fOrganizeImports);
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
result.add(new Separator());
added+= addAction(result, fOverrideMethods);
added+= addAction(result, fAddGetterSetter);
added+= addAction(result, fAddUnimplementedConstructors);
added+= addAction(result, fAddJavaDocStub);
added+= addAction(result, fAddBookmark);
result.add(new Separator());
added+= addAction(result, fSurroundWithTryCatch);
added+= addAction(result, fExternalizeStrings);
if (added == 0)
result= null;
return result;
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void dispose() {
if (fRegisteredSelectionListeners != null) {
ISelectionProvider provider= fSite.getSelectionProvider();
for (Iterator iter= fRegisteredSelectionListeners.iterator(); iter.hasNext();) {
ISelectionChangedListener listener= (ISelectionChangedListener) iter.next();
provider.removeSelectionChangedListener(listener);
}
}
super.dispose();
}
private void setGlobalActionHandlers(IActionBars actionBar) {
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_IMPORT, fAddImport);
actionBar.setGlobalActionHandler(JdtActionConstants.SURROUND_WITH_TRY_CATCH, fSurroundWithTryCatch);
|
18,137
|
Bug 18137 No uncaught exception are thrown by selected code. - .. But there is an uncaught IOExcption
|
eclipse build=20020521 Consider code 1 public Object foo(String name) 2 { 3 Object a; 4 a = super.createFilmType(name, false); 5 return a; 6 } *** Line 4 throws an IOException. So I select that line and select contextmenu source\surround with try ... I get a message "No uncaught exceptions are thrown..Catch java.lang RunTimeExc?" This is incorrect!
|
verified fixed
|
2571696
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:32:22Z
| 2002-05-29T08:13:20Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_GETTER_SETTER, fAddGetterSetter);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_CONSTRUCTOR_FROM_SUPERCLASS, fAddUnimplementedConstructors);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_JAVA_DOC_COMMENT, fAddJavaDocStub);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.BOOKMARK, fAddBookmark);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.ADD_TASK, fAddTaskAction);
actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings);
actionBar.setGlobalActionHandler(JdtActionConstants.FIND_STRINGS_TO_EXTERNALIZE, fFindStringsToExternalize);
actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, fConvertToWindows);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_UNIX, fConvertToUNIX);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_MAC, fConvertToMac);
}
private int appendToGroup(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.appendToGroup(fGroupName, action);
return 1;
}
return 0;
}
private int addAction(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.add(action);
return 1;
}
return 0;
}
}
|
18,291
|
Bug 18291 incorrect dialog title in surround with try.catch
|
the title is 'Surround with &try/catch block' mnemonics do not work well in dialog titles
|
verified fixed
|
1492382
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:56:48Z
| 2002-05-30T12:00:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.internal.corext.refactoring.base.ChangeContext;
|
18,291
|
Bug 18291 incorrect dialog title in surround with try.catch
|
the title is 'Surround with &try/catch block' mnemonics do not work well in dialog titles
|
verified fixed
|
1492382
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:56:48Z
| 2002-05-30T12:00:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
|
import org.eclipse.jdt.internal.corext.refactoring.base.JavaSourceContext;
import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatus;
import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatusEntry;
import org.eclipse.jdt.internal.corext.refactoring.surround.ISurroundWithTryCatchQuery;
import org.eclipse.jdt.internal.corext.refactoring.surround.SurroundWithTryCatchRefactoring;
import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation;
import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringErrorDialogUtil;
import org.eclipse.jdt.internal.ui.refactoring.changes.AbortChangeExceptionHandler;
import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Action to surround a set of statements with a try/catch block.
*
* @since 2.0
*/
public class SurroundWithTryCatchAction extends SelectionDispatchAction {
private CompilationUnitEditor fEditor;
private static final String TITLE= RefactoringMessages.getString("SurroundWithTryCatchAction.title");
private static class Query implements ISurroundWithTryCatchQuery {
private Shell fParent;
public Query(Shell shell) {
fParent= shell;
}
public boolean catchRuntimeException() {
return MessageDialog.openQuestion(fParent, TITLE, RefactoringMessages.getString("SurroundWithTryCatchAction.no_exceptions"));
|
18,291
|
Bug 18291 incorrect dialog title in surround with try.catch
|
the title is 'Surround with &try/catch block' mnemonics do not work well in dialog titles
|
verified fixed
|
1492382
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:56:48Z
| 2002-05-30T12:00:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
|
}
}
/**
* Creates a new <code>SurroundWithTryCatchAction</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public SurroundWithTryCatchAction(CompilationUnitEditor editor) {
super(editor.getEditorSite());
setText(TITLE);
fEditor= editor;
setEnabled(checkEditor());
}
protected void run(ITextSelection selection) {
SurroundWithTryCatchRefactoring refactoring= new SurroundWithTryCatchRefactoring(getCompilationUnit(), selection,
JavaPreferencesSettings.getCodeGenerationSettings(),
new Query(getShell()));
try {
RefactoringStatus status= refactoring.checkActivation(new NullProgressMonitor());
if (status.hasFatalError()) {
RefactoringErrorDialogUtil.open(TITLE, status);
RefactoringStatusEntry entry= status.getFirstEntry(RefactoringStatus.FATAL);
if (entry.getContext() instanceof JavaSourceContext && fEditor != null) {
JavaSourceContext context= (JavaSourceContext)entry.getContext();
ISourceRange range= context.getSourceRange();
fEditor.setHighlightRange(range.getOffset(), range.getLength(), true);
}
return;
}
|
18,291
|
Bug 18291 incorrect dialog title in surround with try.catch
|
the title is 'Surround with &try/catch block' mnemonics do not work well in dialog titles
|
verified fixed
|
1492382
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T12:56:48Z
| 2002-05-30T12:00:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
|
if (refactoring.stopExecution())
return;
PerformChangeOperation op= new PerformChangeOperation(refactoring.createChange(new NullProgressMonitor()));
op.setChangeContext(new ChangeContext(new AbortChangeExceptionHandler()));
new BusyIndicatorRunnableContext().run(false, false, op);
} catch (CoreException e) {
ExceptionHandler.handle(e, TITLE, RefactoringMessages.getString("SurroundWithTryCatchAction.exception"));
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e, TITLE, RefactoringMessages.getString("SurroundWithTryCatchAction.exception"));
} catch (InterruptedException e) {
}
}
void editorStateChanged() {
setEnabled(fEditor != null && !fEditor.isEditorInputReadOnly() && getCompilationUnit() != null);
}
protected void selectionChanged(ITextSelection selection) {
setEnabled(selection.getLength() > 0 && checkEditor());
}
private final ICompilationUnit getCompilationUnit() {
return SelectionConverter.getInputAsCompilationUnit(fEditor);
}
private boolean checkEditor() {
return fEditor != null && !fEditor.isEditorInputReadOnly() && getCompilationUnit() != null;
}
}
|
17,916
|
Bug 17916 junit: progress max-filled when test still running
|
F1 the icon-progress is fully filled while test are still running (in my case, it was filled at ca. 1100 out of 1300 tests) what happens if the last test fails? (is the last 'brick' repainted?)
|
resolved fixed
|
3e1416d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:34:15Z
| 2002-05-27T11:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ProgressImages.java
|
package org.eclipse.jdt.internal.junit.ui;
import java.net.MalformedURLException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
/**
* Manages a set of images that can show progress in the image itself.
*/
public class ProgressImages {
static final int PROGRESS_STEPS= 9;
static final String BASE= "prgss/";
static final String FAILURE= "ff";
static final String OK= "ss";
|
17,916
|
Bug 17916 junit: progress max-filled when test still running
|
F1 the icon-progress is fully filled while test are still running (in my case, it was filled at ca. 1100 out of 1300 tests) what happens if the last test fails? (is the last 'brick' repainted?)
|
resolved fixed
|
3e1416d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:34:15Z
| 2002-05-27T11:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ProgressImages.java
|
Image[] fOKImages= new Image[PROGRESS_STEPS];
Image[] fFailureImages= new Image[PROGRESS_STEPS];
Image fMissingImage= null;
void load() {
if (isLoaded())
return;
for (int i= 0; i < PROGRESS_STEPS; i++) {
String okname= BASE+OK+Integer.toString(i+1)+".gif";
fOKImages[i]= createImage(okname);
String failurename= BASE+FAILURE+Integer.toString(i+1)+".gif";
fFailureImages[i]= createImage(failurename);
}
}
Image createImage(String name) {
try {
ImageDescriptor id= ImageDescriptor.createFromURL(JUnitPlugin.makeIconFileURL(name));
return id.createImage();
} catch (MalformedURLException e) {
}
if (fMissingImage == null)
fMissingImage= ImageDescriptor.getMissingImageDescriptor().createImage();
return fMissingImage;
}
public void dispose() {
if (!isLoaded())
return;
|
17,916
|
Bug 17916 junit: progress max-filled when test still running
|
F1 the icon-progress is fully filled while test are still running (in my case, it was filled at ca. 1100 out of 1300 tests) what happens if the last test fails? (is the last 'brick' repainted?)
|
resolved fixed
|
3e1416d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:34:15Z
| 2002-05-27T11:46:40Z
|
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/ProgressImages.java
|
if (fMissingImage != null)
fMissingImage.dispose();
for (int i= 0; i < PROGRESS_STEPS; i++) {
fOKImages[i].dispose();
fOKImages[i]= null;
fFailureImages[i].dispose();
fFailureImages[i]= null;
}
}
public Image getImage(int current, int total, int errors, int failures) {
if (!isLoaded())
load();
if (total == 0)
return fOKImages[0];
int index= (current*PROGRESS_STEPS)/total;
index= Math.min(Math.max(0, index), PROGRESS_STEPS-1);
if (errors + failures == 0)
return fOKImages[index];
return fFailureImages[index];
}
boolean isLoaded() {
return fOKImages[0] != null;
}
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
import org.eclipse.core.resources.IResource;
import org.eclipse.swt.SWT;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IOpenable;
import org.eclipse.jdt.core.IParent;
import org.eclipse.jdt.core.ISourceRange;
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.JavaElementSorter;
import org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
import org.eclipse.jdt.ui.ProblemsLabelDecorator.ProblemsLabelChangedEvent;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.JdtActionConstants;
import org.eclipse.jdt.ui.actions.MemberFilterActionGroup;
import org.eclipse.jdt.ui.actions.OpenAction;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jdt.ui.actions.ShowActionGroup;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
/**
* The content outline page of the Java editor. The viewer implements a proprietary
* update mechanism based on Java model deltas. It does not react on domain changes.
* It is specified to show the content of ICompilationUnits and IClassFiles.
* Pulishes its context menu under <code>JavaPlugin.getDefault().getPluginId() + ".outliner"</code>.
*/
class JavaOutlinePage extends Page implements IContentOutlinePage {
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
/**
* The element change listener of the java outline viewer.
* @see IElementChangedListener
*/
class ElementChangedListener implements IElementChangedListener {
public void elementChanged(final ElementChangedEvent e) {
if (getControl() == null)
return;
Display d= getControl().getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
IJavaElementDelta delta= findElement( (ICompilationUnit) fInput, e.getDelta());
if (delta != null && fOutlineViewer != null) {
fOutlineViewer.reconcile(delta);
}
}
});
}
}
protected IJavaElementDelta findElement(ICompilationUnit unit, IJavaElementDelta delta) {
if (delta == null || unit == null)
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
return null;
IJavaElement element= delta.getElement();
if (unit.equals(element))
return delta;
if (element.getElementType() > IJavaElement.CLASS_FILE)
return null;
IJavaElementDelta[] children= delta.getAffectedChildren();
if (children == null || children.length == 0)
return null;
for (int i= 0; i < children.length; i++) {
IJavaElementDelta d= findElement(unit, children[i]);
if (d != null)
return d;
}
return null;
}
};
/**
* Content provider for the children of an ICompilationUnit or
* an IClassFile
* @see ITreeContentProvider
*/
class ChildrenProvider implements ITreeContentProvider {
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
private ElementChangedListener fListener;
protected boolean matches(IJavaElement element) {
if (element.getElementType() == IJavaElement.METHOD) {
String name= element.getElementName();
return (name != null && name.indexOf('<') >= 0);
}
return false;
}
protected IJavaElement[] filter(IJavaElement[] children) {
boolean initializers= false;
for (int i= 0; i < children.length; i++) {
if (matches(children[i])) {
initializers= true;
break;
}
}
if (!initializers)
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
return children;
Vector v= new Vector();
for (int i= 0; i < children.length; i++) {
if (matches(children[i]))
continue;
v.addElement(children[i]);
}
IJavaElement[] result= new IJavaElement[v.size()];
v.copyInto(result);
return result;
}
public Object[] getChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
return filter(c.getChildren());
} catch (JavaModelException x) {
JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.getChildren.message1"), x.getStatus());
}
}
return new Object[0];
}
public Object[] getElements(Object parent) {
return getChildren(parent);
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
public Object getParent(Object child) {
if (child instanceof IJavaElement) {
IJavaElement e= (IJavaElement) child;
return e.getParent();
}
return null;
}
public boolean hasChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
IJavaElement[] children= filter(c.getChildren());
return (children != null && children.length > 0);
} catch (JavaModelException x) {
JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.hasChildren.message1"), x.getStatus());
}
}
return false;
}
public boolean isDeleted(Object o) {
return false;
}
public void dispose() {
if (fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
boolean isCU= (newInput instanceof ICompilationUnit);
if (isCU && fListener == null) {
fListener= new ElementChangedListener();
JavaCore.addElementChangedListener(fListener);
} else if (!isCU && fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
}
};
class JavaOutlineViewer extends TreeViewer {
/**
* Indicates an item which has been reused. At the point of
* its reuse it has been expanded. This field is used to
* communicate between <code>internalExpandToLevel</code> and
* <code>reuseTreeItem</code>.
*/
private Item fReusedExpandedItem;
public JavaOutlineViewer(Tree tree) {
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
super(tree);
setAutoExpandLevel(ALL_LEVELS);
}
/**
* Investigates the given element change event and if affected incrementally
* updates the outline.
*/
public void reconcile(IJavaElementDelta delta) {
if (getSorter() == null) {
Widget w= findItem(fInput);
if (w != null && !w.isDisposed())
update(w, delta);
} else {
refresh();
}
}
/*
* @see TreeViewer#internalExpandToLevel
*/
protected void internalExpandToLevel(Widget node, int level) {
if (node instanceof Item) {
Item i= (Item) node;
if (i.getData() instanceof IJavaElement) {
IJavaElement je= (IJavaElement) i.getData();
if (je.getElementType() == IJavaElement.IMPORT_CONTAINER || isInnerType(je)) {
if (i != fReusedExpandedItem) {
setExpanded(i, false);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
return;
}
}
}
}
super.internalExpandToLevel(node, level);
}
protected void reuseTreeItem(Item item, Object element) {
Item[] c= getChildren(item);
if (c != null && c.length > 0) {
if (getExpanded(item))
fReusedExpandedItem= item;
for (int k= 0; k < c.length; k++) {
if (c[k].getData() != null)
disassociate(c[k]);
c[k].dispose();
}
}
updateItem(item, element);
updatePlus(item, element);
internalExpandToLevel(item, ALL_LEVELS);
fReusedExpandedItem= null;
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
protected boolean mustUpdateParent(IJavaElementDelta delta, IJavaElement element) {
if (element instanceof IMethod) {
if ((delta.getKind() & IJavaElementDelta.ADDED) != 0) {
try {
return ((IMethod)element).isMainMethod();
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
return "main".equals(element.getElementName());
}
return false;
}
protected ISourceRange getSourceRange(IJavaElement element) throws JavaModelException {
if (element instanceof IMember)
return ((IMember) element).getNameRange();
if (element instanceof ISourceReference)
return ((ISourceReference) element).getSourceRange();
return null;
}
protected boolean overlaps(ISourceRange range, int start, int end) {
return start <= (range.getOffset() + range.getLength() - 1) && range.getOffset() <= end;
}
protected boolean filtered(IJavaElement parent, IJavaElement child) {
Object[] result= new Object[] { child };
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
ViewerFilter[] filters= getFilters();
for (int i= 0; i < filters.length; i++) {
result= filters[i].filter(this, parent, result);
if (result.length == 0)
return true;
}
return false;
}
protected void update(Widget w, IJavaElementDelta delta) {
Item item;
IJavaElement parent= delta.getElement();
IJavaElementDelta[] affected= delta.getAffectedChildren();
Item[] children= getChildren(w);
boolean doUpdateParent= false;
Vector deletions= new Vector();
Vector additions= new Vector();
for (int i= 0; i < affected.length; i++) {
IJavaElementDelta affectedDelta= affected[i];
IJavaElement affectedElement= affectedDelta.getElement();
int status= affected[i].getKind();
int j;
for (j= 0; j < children.length; j++)
if (affectedElement.equals(children[j].getData()))
break;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
if (j == children.length) {
if ((status & IJavaElementDelta.CHANGED) != 0 &&
(affectedDelta.getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 &&
!filtered(parent, affectedElement))
{
additions.addElement(affectedDelta);
}
continue;
}
item= children[j];
if ((status & IJavaElementDelta.REMOVED) != 0) {
deletions.addElement(item);
doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement);
} else if ((status & IJavaElementDelta.CHANGED) != 0) {
int change= affectedDelta.getFlags();
doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement);
if ((change & IJavaElementDelta.F_MODIFIERS) != 0) {
if (filtered(parent, affectedElement))
deletions.addElement(item);
else
updateItem(item, affectedElement);
}
if ((change & IJavaElementDelta.F_CONTENT) != 0)
updateItem(item, affectedElement);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
if ((change & IJavaElementDelta.F_CHILDREN) != 0)
update(item, affectedDelta);
}
}
IJavaElementDelta[] add= delta.getAddedChildren();
if (additions.size() > 0) {
IJavaElementDelta[] tmp= new IJavaElementDelta[add.length + additions.size()];
System.arraycopy(add, 0, tmp, 0, add.length);
for (int i= 0; i < additions.size(); i++)
tmp[i + add.length]= (IJavaElementDelta) additions.elementAt(i);
add= tmp;
}
go2: for (int i= 0; i < add.length; i++) {
try {
IJavaElement e= add[i].getElement();
if (filtered(parent, e))
continue go2;
doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e);
ISourceRange rng= getSourceRange(e);
int start= rng.getOffset();
int end= start + rng.getLength() - 1;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
Item last= null;
item= null;
children= getChildren(w);
for (int j= 0; j < children.length; j++) {
item= children[j];
IJavaElement r= (IJavaElement) item.getData();
if (r == null) {
continue go2;
}
try {
rng= getSourceRange(r);
if (overlaps(rng, start, end)) {
reuseTreeItem(item, e);
continue go2;
} else if (rng.getOffset() > start) {
if (last != null && deletions.contains(last)) {
deletions.removeElement(last);
reuseTreeItem(last, (Object) e);
} else {
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
createTreeItem(w, (Object) e, j);
}
continue go2;
}
} catch (JavaModelException x) {
}
last= item;
}
if (last != null && deletions.contains(last)) {
deletions.removeElement(last);
reuseTreeItem(last, e);
} else {
createTreeItem(w, e, -1);
}
} catch (JavaModelException x) {
}
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
Enumeration e= deletions.elements();
while (e.hasMoreElements()) {
item= (Item) e.nextElement();
disassociate(item);
item.dispose();
}
if (doUpdateParent)
updateItem(w, delta.getElement());
}
/*
* @see ContentViewer#handleLabelProviderChanged(LabelProviderChangedEvent)
*/
protected void handleLabelProviderChanged(LabelProviderChangedEvent event) {
Object input= getInput();
if (event instanceof ProblemsLabelChangedEvent) {
ProblemsLabelChangedEvent e= (ProblemsLabelChangedEvent) event;
if (e.isMarkerChange() && input instanceof ICompilationUnit) {
return;
}
}
Object[] changed= event.getElements();
if (changed != null) {
IResource resource= getUnderlyingResource();
if (resource != null) {
for (int i= 0; i < changed.length; i++) {
if (changed[i].equals(resource)) {
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
event= new LabelProviderChangedEvent((IBaseLabelProvider) event.getSource());
break;
}
}
}
}
super.handleLabelProviderChanged(event);
}
private IResource getUnderlyingResource() {
Object input= getInput();
if (input instanceof ICompilationUnit) {
ICompilationUnit cu= (ICompilationUnit) input;
if (cu.isWorkingCopy()) {
return cu.getOriginalElement().getResource();
} else {
return cu.getResource();
}
} else if (input instanceof IClassFile) {
return ((IClassFile) input).getResource();
}
return null;
}
};
class LexicalSortingAction extends Action {
private JavaElementSorter fSorter= new JavaElementSorter();
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
public LexicalSortingAction() {
super();
setText(JavaEditorMessages.getString("JavaOutlinePage.Sort.label"));
JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif");
setToolTipText(JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip"));
setDescription(JavaEditorMessages.getString("JavaOutlinePage.Sort.description"));
boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean("LexicalSortingAction.isChecked");
valueChanged(checked, false);
}
public void run() {
valueChanged(isChecked(), true);
}
private void valueChanged(boolean on, boolean store) {
setChecked(on);
fOutlineViewer.setSorter(on ? fSorter : null);
if (store)
JavaPlugin.getDefault().getPreferenceStore().setValue("LexicalSortingAction.isChecked", on);
}
};
private IJavaElement fInput;
private String fContextMenuID;
private Menu fMenu;
private JavaOutlineViewer fOutlineViewer;
private JavaEditor fEditor;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
private MemberFilterActionGroup fMemberFilterActionGroup;
private ListenerList fSelectionChangedListeners= new ListenerList();
private Hashtable fActions= new Hashtable();
private TogglePresentationAction fTogglePresentation;
private ToggleTextHoverAction fToggleTextHover;
private GotoErrorAction fPreviousError;
private GotoErrorAction fNextError;
private TextOperationAction fShowJavadoc;
private OpenAction fOpenAction;
private CompositeActionGroup fActionGroups;
private CCPActionGroup fCCPActionGroup;
public JavaOutlinePage(String contextMenuID, JavaEditor editor) {
super();
Assert.isNotNull(editor);
fContextMenuID= contextMenuID;
fEditor= editor;
fTogglePresentation= new TogglePresentationAction();
fToggleTextHover= new ToggleTextHoverAction();
fPreviousError= new GotoErrorAction("PreviousError.", false);
fPreviousError.setImageDescriptor(JavaPluginImages.DESC_TOOL_GOTO_PREV_ERROR);
fNextError= new GotoErrorAction("NextError.", true);
fNextError.setImageDescriptor(JavaPluginImages.DESC_TOOL_GOTO_NEXT_ERROR);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
fShowJavadoc= (TextOperationAction) fEditor.getAction("ShowJavaDoc");
fTogglePresentation.setEditor(editor);
fToggleTextHover.setEditor(editor);
fPreviousError.setEditor(editor);
fNextError.setEditor(editor);
}
/* (non-Javadoc)
* Method declared on Page
*/
public void init(IPageSite pageSite) {
super.init(pageSite);
}
/*
* @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener)
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
if (fOutlineViewer != null)
fOutlineViewer.addSelectionChangedListener(listener);
else
fSelectionChangedListeners.add(listener);
}
/*
* @see ISelectionProvider#removeSelectionChangedListener(ISelectionChangedListener)
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
if (fOutlineViewer != null)
fOutlineViewer.removeSelectionChangedListener(listener);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
else
fSelectionChangedListeners.remove(listener);
}
/*
* @see ISelectionProvider#setSelection(ISelection)
*/
public void setSelection(ISelection selection) {
if (fOutlineViewer != null)
fOutlineViewer.setSelection(selection);
}
/*
* @see ISelectionProvider#getSelection()
*/
public ISelection getSelection() {
if (fOutlineViewer == null)
return StructuredSelection.EMPTY;
return fOutlineViewer.getSelection();
}
private void registerToolbarActions() {
IToolBarManager toolBarManager= getSite().getActionBars().getToolBarManager();
if (toolBarManager != null) {
Action action= new LexicalSortingAction();
toolBarManager.add(action);
fMemberFilterActionGroup= new MemberFilterActionGroup(fOutlineViewer, "JavaOutlineViewer");
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
fMemberFilterActionGroup.contributeToToolBar(toolBarManager);
}
}
/*
* @see IPage#createControl
*/
public void createControl(Composite parent) {
Tree tree= new Tree(parent, SWT.MULTI);
ILabelProvider lprovider= new AppearanceAwareLabelProvider(
AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS,
AppearanceAwareLabelProvider.getDecorators(true, new OverrideIndicatorLabelDecorator(null))
);
fOutlineViewer= new JavaOutlineViewer(tree);
fOutlineViewer.setContentProvider(new ChildrenProvider());
fOutlineViewer.setLabelProvider(new DecoratingLabelProvider(lprovider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
fSelectionChangedListeners.remove(listeners[i]);
fOutlineViewer.addSelectionChangedListener((ISelectionChangedListener) listeners[i]);
}
MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID);
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
contextMenuAboutToShow(manager);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
}
});
fMenu= manager.createContextMenu(tree);
tree.setMenu(fMenu);
IPageSite site= getSite();
site.registerContextMenu(JavaPlugin.getDefault().getPluginId() + ".outline", manager, fOutlineViewer);
site.setSelectionProvider(fOutlineViewer);
fOpenAction= new OpenAction(site);
site.getSelectionProvider().addSelectionChangedListener(fOpenAction);
fActionGroups= new CompositeActionGroup(new ActionGroup[] {
new OpenViewActionGroup(this),
new ShowActionGroup(this),
fCCPActionGroup= new CCPActionGroup(this),
new RefactorActionGroup(this),
new GenerateActionGroup(this),
new JavaSearchActionGroup(this)});
IActionBars bars= site.getActionBars();
bars.setGlobalActionHandler(JdtActionConstants.SHOW_PREVIOUS_PROBLEM, fPreviousError);
bars.setGlobalActionHandler(JdtActionConstants.SHOW_NEXT_PROBLEM, fNextError);
bars.setGlobalActionHandler(JdtActionConstants.SHOW_JAVA_DOC, fShowJavadoc);
bars.setGlobalActionHandler(IJavaEditorActionConstants.TOGGLE_PRESENTATION, fTogglePresentation);
bars.setGlobalActionHandler(IJavaEditorActionConstants.TOGGLE_TEXT_HOVER, fToggleTextHover);
fActionGroups.fillActionBars(bars);
bars.setGlobalActionHandler(JdtActionConstants.OPEN, fOpenAction);
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
IStatusLineManager statusLineManager= site.getActionBars().getStatusLineManager();
if (statusLineManager != null) {
StatusBarUpdater updater= new StatusBarUpdater(statusLineManager);
fOutlineViewer.addSelectionChangedListener(updater);
}
registerToolbarActions();
fOutlineViewer.setInput(fInput);
fOutlineViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
handleKeyReleased(e);
}
});
initDragAndDrop();
}
public void dispose() {
if (fEditor == null)
return;
fEditor.outlinePageClosed();
fEditor= null;
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; i++)
fSelectionChangedListeners.remove(listeners[i]);
fSelectionChangedListeners= null;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
if (fMenu != null && !fMenu.isDisposed()) {
fMenu.dispose();
fMenu= null;
}
if (fActionGroups != null)
fActionGroups.dispose();
fTogglePresentation.setEditor(null);
fToggleTextHover.setEditor(null);
fPreviousError.setEditor(null);
fNextError.setEditor(null);
fOutlineViewer= null;
super.dispose();
}
public Control getControl() {
if (fOutlineViewer != null)
return fOutlineViewer.getControl();
return null;
}
public void setInput(IJavaElement inputElement) {
fInput= inputElement;
if (fOutlineViewer != null)
fOutlineViewer.setInput(fInput);
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
public void select(ISourceReference reference) {
if (fOutlineViewer != null) {
ISelection s= fOutlineViewer.getSelection();
if (s instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection) s;
List elements= ss.toList();
if (!elements.contains(reference)) {
s= (reference == null ? StructuredSelection.EMPTY : new StructuredSelection(reference));
fOutlineViewer.setSelection(s, true);
}
}
}
}
public void setAction(String actionID, IAction action) {
Assert.isNotNull(actionID);
if (action == null)
fActions.remove(actionID);
else
fActions.put(actionID, action);
}
public IAction getAction(String actionID) {
Assert.isNotNull(actionID);
return (IAction) fActions.get(actionID);
}
/**
* Convenience method to add the action installed under the given actionID to the
* specified group of the menu.
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
*/
protected void addAction(IMenuManager menu, String group, String actionID) {
IAction action= getAction(actionID);
if (action != null) {
if (action instanceof IUpdate)
((IUpdate) action).update();
if (action.isEnabled()) {
IMenuManager subMenu= menu.findMenuUsingPath(group);
if (subMenu != null)
subMenu.add(action);
else
menu.appendToGroup(group, action);
}
}
}
protected void contextMenuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
IStructuredSelection selection= (IStructuredSelection)getSelection();
Object element= selection.getFirstElement();
if (fOpenAction.isEnabled() && element instanceof IImportDeclaration && !((IImportDeclaration)element).isOnDemand()) {
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenAction);
}
fActionGroups.setContext(new ActionContext(selection));
fActionGroups.fillContextMenu(menu);
}
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
/*
* @see Page#setFocus()
*/
public void setFocus() {
if (fOutlineViewer != null)
fOutlineViewer.getControl().setFocus();
}
/**
* Checkes whether a given Java element is an inner type.
*/
private boolean isInnerType(IJavaElement element) {
if (element.getElementType() == IJavaElement.TYPE) {
IJavaElement parent= element.getParent();
int type= parent.getElementType();
return (type != IJavaElement.COMPILATION_UNIT && type != IJavaElement.CLASS_FILE);
}
return false;
}
/**
* Handles key events in viewer.
*/
private void handleKeyReleased(KeyEvent event) {
if (event.stateMask != 0)
return;
|
17,292
|
Bug 17292 Inconsistent Undo behaviour for Cut/Copy/Paste in outline
|
Build 20020521 (freeze 1) 1) Open a java editor on some class 2) In the content outline, select a method and do Ctrl+X to cut 3) Notice in the menus, Edit->Undo and Refactor->Undo are disabled 4) Now select the type node in the content outline, and Ctrl+V to paste 5) Still, neither Undo action is enabled 6) Now click inside the editor area to give it focus. 7) Now "Edit->Undo" is possible. So, the problems are: 1) Undo is not consistent, it's available for Paste but not Cut. 2) Even when undo is possible, it only becomes enabled when the editor is activated.
|
resolved wontfix
|
0408678
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:50:39Z
| 2002-05-23T13:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
IAction action= null;
if (event.character == SWT.DEL) {
action= fCCPActionGroup.getDeleteAction();
}
if (action != null && action.isEnabled())
action.run();
}
private void initDragAndDrop() {
int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers= new Transfer[] {
LocalSelectionTransfer.getInstance()
};
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new SelectionTransferDropAdapter(fOutlineViewer)
};
fOutlineViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
Control control= fOutlineViewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(fOutlineViewer)
};
DragSource source= new DragSource(control, ops);
source.addDragListener(new DelegatingDragAdapter(dragListeners));
}}
|
17,646
|
Bug 17646 Comments in Java Templates don't have right syntax coloring
|
F1 - open Template preferences - select filecomment observe: the preview doesn't rendere the filecomment using the defined color for comments, but it does use the color for the keyword this.
|
verified fixed
|
320f4fe
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:58:00Z
| 2002-05-24T14:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.VerifyEvent;
|
17,646
|
Bug 17646 Comments in Java Templates don't have right syntax coloring
|
F1 - open Template preferences - select filecomment observe: the preview doesn't rendere the filecomment using the defined color for comments, but it does use the color for the keyword this.
|
verified fixed
|
320f4fe
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-30T13:58:00Z
| 2002-05-24T14:20:00Z
|
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
|
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IAction;
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.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextViewer;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.