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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,911 |
Bug 8911 Set defaults for new Java Class Wizard's method stubs options
|
In the new Java Class Wizard, I would like to change the default options for the method stubs. Currently, it always defaults to no main method, no constructors from superclass and inherit abstract methods.
|
verified fixed
|
8e38296
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T13:10:46Z | 2002-02-01T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizardPage.java
|
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridData;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout;
public class NewClassCreationWizardPage extends TypePage {
private final static String PAGE_NAME= "NewClassCreationWizardPage";
private SelectionButtonDialogFieldGroup fMethodStubsButtons;
public NewClassCreationWizardPage(IWorkspaceRoot root) {
super(true, PAGE_NAME, root);
setTitle(NewWizardMessages.getString("NewClassCreationWizardPage.title"));
setDescription(NewWizardMessages.getString("NewClassCreationWizardPage.description"));
|
8,911 |
Bug 8911 Set defaults for new Java Class Wizard's method stubs options
|
In the new Java Class Wizard, I would like to change the default options for the method stubs. Currently, it always defaults to no main method, no constructors from superclass and inherit abstract methods.
|
verified fixed
|
8e38296
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T13:10:46Z | 2002-02-01T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizardPage.java
|
String[] buttonNames3= new String[] {
NewWizardMessages.getString("NewClassCreationWizardPage.methods.main"), NewWizardMessages.getString("NewClassCreationWizardPage.methods.constructors"),
NewWizardMessages.getString("NewClassCreationWizardPage.methods.inherited")
};
fMethodStubsButtons= new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames3, 1);
fMethodStubsButtons.setLabelText(NewWizardMessages.getString("NewClassCreationWizardPage.methods.label"));
}
/**
* Should be called from the wizard with the input element.
*/
public void init(IStructuredSelection selection) {
IJavaElement jelem= getInitialJavaElement(selection);
initContainerPage(jelem);
initTypePage(jelem);
updateStatus(findMostSevereStatus());
fMethodStubsButtons.setSelection(0, false);
fMethodStubsButtons.setSelection(1, false);
fMethodStubsButtons.setSelection(2, true);
}
/**
* Finds the most severe error (if there is one)
*/
private IStatus findMostSevereStatus() {
return StatusUtil.getMostSevere(new IStatus[] {
fContainerStatus,
isEnclosingTypeSelected() ? fEnclosingTypeStatus : fPackageStatus,
|
8,911 |
Bug 8911 Set defaults for new Java Class Wizard's method stubs options
|
In the new Java Class Wizard, I would like to change the default options for the method stubs. Currently, it always defaults to no main method, no constructors from superclass and inherit abstract methods.
|
verified fixed
|
8e38296
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T13:10:46Z | 2002-02-01T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizardPage.java
|
fTypeNameStatus,
fModifierStatus,
fSuperClassStatus,
fSuperInterfacesStatus
});
}
/*
* @see ContainerPage#handleFieldChanged
*/
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
updateStatus(findMostSevereStatus());
}
/*
* @see WizardPage#createControl
*/
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NONE);
int nColumns= 4;
MGridLayout layout= new MGridLayout();
|
8,911 |
Bug 8911 Set defaults for new Java Class Wizard's method stubs options
|
In the new Java Class Wizard, I would like to change the default options for the method stubs. Currently, it always defaults to no main method, no constructors from superclass and inherit abstract methods.
|
verified fixed
|
8e38296
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T13:10:46Z | 2002-02-01T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizardPage.java
|
layout.minimumWidth= convertWidthInCharsToPixels(80);
layout.numColumns= nColumns;
composite.setLayout(layout);
createContainerControls(composite, nColumns);
createPackageControls(composite, nColumns);
createEnclosingTypeControls(composite, nColumns);
createSeparator(composite, nColumns);
createTypeNameControls(composite, nColumns);
createModifierControls(composite, nColumns);
createSuperClassControls(composite, nColumns);
createSuperInterfacesControls(composite, nColumns);
createMethodStubSelectionControls(composite, nColumns);
setControl(composite);
setFocus();
WorkbenchHelp.setHelp(composite, new DialogPageContextComputer(this, IJavaHelpContextIds.NEW_CLASS_WIZARD_PAGE));
}
protected void createMethodStubSelectionControls(Composite composite, int nColumns) {
LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getLabelControl(composite), nColumns);
DialogField.createEmptySpace(composite);
|
8,911 |
Bug 8911 Set defaults for new Java Class Wizard's method stubs options
|
In the new Java Class Wizard, I would like to change the default options for the method stubs. Currently, it always defaults to no main method, no constructors from superclass and inherit abstract methods.
|
verified fixed
|
8e38296
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T13:10:46Z | 2002-02-01T10:40:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizardPage.java
|
LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getSelectionButtonsGroup(composite), nColumns - 1);
}
/*
* @see TypePage#evalMethods
*/
protected String[] evalMethods(IType type, IImportsStructure imports, IProgressMonitor monitor) throws CoreException {
List newMethods= new ArrayList();
boolean doConstr= fMethodStubsButtons.isSelected(1);
boolean doInherited= fMethodStubsButtons.isSelected(2);
String[] meth= constructInheritedMethods(type, doConstr, doInherited, imports, new SubProgressMonitor(monitor, 1));
for (int i= 0; i < meth.length; i++) {
newMethods.add(meth[i]);
}
if (monitor != null) {
monitor.done();
}
if (fMethodStubsButtons.isSelected(0)) {
String main= "public static void main(String[] args) {}";
newMethods.add(main);
}
return (String[]) newMethods.toArray(new String[newMethods.size()]);
}
}
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.swt.SWT;
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.graphics.Color;
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.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
import org.eclipse.jdt.ui.text.IJavaColorConstants;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
/*
* The page for setting the editor options.
*/
public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] {
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_KEYWORD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_KEYWORD + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_STRING),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_STRING + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_DEFAULT + "_bold"),
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_KEYWORD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_KEYWORD + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_TAG),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_TAG + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_LINK),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_LINK + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_DEFAULT + "_bold"),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.MATCHING_BRACKETS_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.MATCHING_BRACKETS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOACTIVATION),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_IMPORT)
};
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private final String[][] fListModel= new String[][] {
{ "Multi-line comment", IJavaColorConstants.JAVA_MULTI_LINE_COMMENT },
{ "Single-line comment", IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT },
{ "Keywords", IJavaColorConstants.JAVA_KEYWORD },
{ "Strings", IJavaColorConstants.JAVA_STRING },
{ "Others", IJavaColorConstants.JAVA_DEFAULT },
{ "JavaDoc keywords", IJavaColorConstants.JAVADOC_KEYWORD },
{ "JavaDoc HTML tags", IJavaColorConstants.JAVADOC_TAG },
{ "JavaDoc links", IJavaColorConstants.JAVADOC_LINK },
{"JavaDoc others", IJavaColorConstants.JAVADOC_DEFAULT }
};
private OverlayPreferenceStore fOverlayStore;
private JavaTextTools fJavaTextTools;
private Map fColorButtons= new HashMap();
private SelectionListener fColorButtonListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
ColorEditor editor= (ColorEditor) e.widget.getData();
PreferenceConverter.setValue(fOverlayStore, (String) fColorButtons.get(editor), editor.getColorValue());
}
};
private Map fCheckBoxes= new HashMap();
private SelectionListener fCheckBoxListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void widgetSelected(SelectionEvent e) {
Button button= (Button) e.widget;
fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
}
};
private Map fTextFields= new HashMap();
private ModifyListener fTextFieldListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
Text text= (Text) e.widget;
fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
}
};
private WorkbenchChainedTextFontFieldEditor fFontEditor;
private List fList;
private ColorEditor fColorEditor;
private Button fBoldCheckBox;
private SourceViewer fPreviewViewer;
public JavaEditorPreferencePage() {
setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description"));
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
}
public static void initDefaults(IPreferenceStore store) {
Color color;
Display display= Display.getDefault();
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true);
color= display.getSystemColor(SWT.COLOR_GRAY);
PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, color.getRGB());
WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
color= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, color.getRGB());
color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB());
store.setDefault(JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT, new RGB(63, 127, 95));
store.setDefault(IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT, new RGB(63, 127, 95));
store.setDefault(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_KEYWORD, new RGB(127, 0, 85));
store.setDefault(IJavaColorConstants.JAVA_KEYWORD + "_bold", true);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_STRING, new RGB(42, 0, 255));
store.setDefault(IJavaColorConstants.JAVA_STRING + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_DEFAULT, new RGB(0, 0, 0));
store.setDefault(IJavaColorConstants.JAVA_DEFAULT + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_KEYWORD, new RGB(127, 159, 191));
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
store.setDefault(IJavaColorConstants.JAVADOC_KEYWORD + "_bold", true);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_TAG, new RGB(127, 127, 159));
store.setDefault(IJavaColorConstants.JAVADOC_TAG + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_LINK, new RGB(63, 63, 191));
store.setDefault(IJavaColorConstants.JAVADOC_LINK + "_bold", false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_DEFAULT, new RGB(63, 95, 191));
store.setDefault(IJavaColorConstants.JAVADOC_DEFAULT + "_bold", false);
store.setDefault(ContentAssistPreference.AUTOACTIVATION, true);
store.setDefault(ContentAssistPreference.AUTOACTIVATION_DELAY, 500);
store.setDefault(ContentAssistPreference.AUTOINSERT, false);
PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233));
PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0));
PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233));
PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0));
store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, ".,");
store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, "@");
store.setDefault(ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, true);
store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false);
store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false);
store.setDefault(ContentAssistPreference.ADD_IMPORT, true);
}
/*
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
/*
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE));
}
private void handleListSelection() {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
fColorEditor.setColorValue(rgb);
fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold"));
}
private Control createColorPage(Composite parent) {
Composite colorComposite= new Composite(parent, SWT.NULL);
colorComposite.setLayout(new GridLayout());
Label label= new Label(colorComposite, SWT.LEFT);
label.setText("C&olors:");
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite editorComposite= new Composite(colorComposite, SWT.NULL);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
GridData gd= new GridData(GridData.FILL_BOTH);
editorComposite.setLayoutData(gd);
fList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fList.setLayoutData(gd);
Composite stylesComposite= new Composite(editorComposite, SWT.NULL);
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("Fo®round:");
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fColorEditor= new ColorEditor(stylesComposite);
Button colorButton= fColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
colorButton.setLayoutData(gd);
label= new Label(stylesComposite, SWT.LEFT);
label.setText("&Bold:");
gd= new GridData();
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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("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);
fList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleListSelection();
}
});
colorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
public void widgetSelected(SelectionEvent e) {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fColorEditor.getColorValue());
}
});
fBoldCheckBox.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
fOverlayStore.setValue(key + "_bold", fBoldCheckBox.getSelection());
}
});
return colorComposite;
}
private Control createPreviewer(Composite parent) {
fJavaTextTools= new JavaTextTools(fOverlayStore);
fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null));
fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
fPreviewViewer.setEditable(false);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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) {
fPreviewViewer.invalidateTextPresentation();
}
});
return fPreviewViewer.getControl();
}
private static void setEnabled(Control control, boolean enable) {
control.setEnabled(enable);
if (control instanceof Composite) {
Composite composite= (Composite) control;
Control[] children= composite.getChildren();
for (int i= 0; i < children.length; i++)
setEnabled(children[i], enable);
}
}
private Button fBracketHighlightButton;
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private Control fBracketHighlightColor;
private Control createBehaviorPage(Composite parent) {
Composite behaviorComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
behaviorComposite.setLayout(layout);
String label= "Highlight &matching brackets";
fBracketHighlightButton= addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0);
label= "Matching &brackets highlight color:";
fBracketHighlightColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, 0);
fBracketHighlightButton.addSelectionListener(new SelectionListener() {
Button button= fBracketHighlightButton;
Control control= fBracketHighlightColor;
public void widgetSelected(SelectionEvent e) {
setEnabled(control, button.getSelection());
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
label= "Text font:";
addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT);
label= "Displayed &tab width:";
addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0);
return behaviorComposite;
}
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private Control createContentAssistPage(Composite parent) {
Composite contentAssistComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
contentAssistComposite.setLayout(layout);
String label= "Insert single &proposals automatically";
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0);
label= "Show only proposals visible in the invocation conte&xt";
addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0);
label= "Present proposals in a&lphabetical order";
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0);
label= "&Enable auto activation";
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0);
label= "Automatically add &import instead of qualified name";
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0);
label= "Auto activation dela&y:";
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0);
label= "Auto activation &triggers for Java:";
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 25, 0);
label= "Auto activation triggers for &JavaDoc:";
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 25, 0);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= "&Background for completion proposals:";
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0);
label= "&Foreground for completion proposals:";
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0);
label= "Bac&kground for method parameters:";
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0);
label= "Fo®round for method parameters:";
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0);
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("&General");
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createBehaviorPage(folder));
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
item= new TabItem(folder, SWT.NONE);
item.setText("&Colors");
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createColorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText("Code A&ssist");
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createContentAssistPage(folder));
initialize();
return folder;
}
private void initialize() {
fFontEditor.setPreferenceStore(getPreferenceStore());
fFontEditor.setPreferencePage(this);
fFontEditor.load();
initializeFields();
for (int i= 0; i < fListModel.length; i++)
fList.add(fListModel[i][0]);
fList.getDisplay().asyncExec(new Runnable() {
public void run() {
fList.select(0);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
handleListSelection();
}
});
}
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));
}
e= fTextFields.keySet().iterator();
while (e.hasNext()) {
Text t= (Text) e.next();
String key= (String) fTextFields.get(t);
t.setText(fOverlayStore.getString(key));
}
setEnabled(fBracketHighlightColor, fBracketHighlightButton.getSelection());
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
/*
* @see PreferencePage#performOk()
*/
public boolean performOk() {
fFontEditor.store();
fOverlayStore.propagate();
return true;
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fFontEditor.loadDefault();
fOverlayStore.loadDefaults();
initializeFields();
handleListSelection();
super.performDefaults();
fPreviewViewer.invalidateTextPresentation();
}
/*
* @see DialogPage#dispose()
*/
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void dispose() {
if (fJavaTextTools != null) {
fJavaTextTools= null;
}
fFontEditor.setPreferencePage(null);
fFontEditor.setPreferenceStore(null);
if (fOverlayStore != null) {
fOverlayStore.stop();
fOverlayStore= null;
}
super.dispose();
}
private Control addColorButton(Composite parent, String label, String key, int indentation) {
Composite composite= new Composite(parent, SWT.NONE);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
composite.setLayoutData(gd);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
composite.setLayout(layout);
Label labelControl= new Label(composite, SWT.NONE);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
labelControl.setText(label);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
ColorEditor editor= new ColorEditor(composite);
Button button= editor.getButton();
button.setData(editor);
gd= new GridData();
gd.horizontalAlignment= GridData.END;
button.setLayoutData(gd);
button.addSelectionListener(fColorButtonListener);
fColorButtons.put(editor, key);
return composite;
}
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.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
gd.horizontalSpan= 2;
checkBox.setLayoutData(gd);
checkBox.addSelectionListener(fCheckBoxListener);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fCheckBoxes.put(checkBox, key);
return checkBox;
}
private void addTextField(Composite parent, String label, String key, int textLimit, int indentation) {
Label labelControl= new Label(parent, SWT.NONE);
labelControl.setText(label);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
Text textControl= new Text(parent, SWT.BORDER | SWT.SINGLE);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
gd.horizontalAlignment= GridData.END;
textControl.setLayoutData(gd);
textControl.setTextLimit(textLimit);
textControl.addModifyListener(fTextFieldListener);
fTextFields.put(textControl, key);
}
private void addTextFontEditor(Composite parent, String label, String key) {
Composite editorComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
editorComposite.setLayout(layout);
|
5,811 |
Bug 5811 [preferences] Pref to set editor background color
|
It would be very useful to add a preference to change the background color of the Java editor, since all of the other elements are editable.
|
resolved fixed
|
8a2963a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T16:48:39Z | 2001-11-12T18:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite);
fFontEditor.setChangeButtonText("C&hange...");
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
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;
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();
}
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.LabelProvider;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.compiler.env.IConstants;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure;
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.template.Template;
import org.eclipse.jdt.internal.corext.template.Templates;
import org.eclipse.jdt.internal.corext.template.java.JavaContext;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.preferences.CodeGenerationPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.Separator;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonStatusDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridData;
import org.eclipse.jdt.internal.ui.wizards.swt.MGridLayout;
/**
* <code>TypePage</code> contains controls and validation routines for a 'New Type WizardPage'
* Implementors decide which components to add and to enable. Implementors can also
* customize the validation code.
* <code>TypePage</code> is intended to serve as base class of all wizards that create types.
* Applets, Servlets, Classes, Interfaces...
* See <code>NewClassCreationWizardPage</code> or <code>NewInterfaceCreationWizardPage</code> for an
* example usage of TypePage.
*/
public abstract class TypePage extends ContainerPage {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
private final static String PAGE_NAME= "TypePage";
protected final static String PACKAGE= PAGE_NAME + ".package";
protected final static String ENCLOSING= PAGE_NAME + ".enclosing";
protected final static String ENCLOSINGSELECTION= ENCLOSING + ".selection";
protected final static String TYPENAME= PAGE_NAME + ".typename";
protected final static String SUPER= PAGE_NAME + ".superclass";
protected final static String INTERFACES= PAGE_NAME + ".interfaces";
protected final static String MODIFIERS= PAGE_NAME + ".modifiers";
protected final static String METHODS= PAGE_NAME + ".methods";
private class InterfacesListLabelProvider extends LabelProvider {
private Image fInterfaceImage;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
public InterfacesListLabelProvider() {
super();
fInterfaceImage= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_INTERFACE);
}
public Image getImage(Object element) {
return fInterfaceImage;
}
}
private StringButtonStatusDialogField fPackageDialogField;
private SelectionButtonDialogField fEnclosingTypeSelection;
private StringButtonDialogField fEnclosingTypeDialogField;
private boolean fCanModifyPackage;
private boolean fCanModifyEnclosingType;
private IPackageFragment fCurrPackage;
private IType fCurrEnclosingType;
private StringDialogField fTypeNameDialogField;
private StringButtonDialogField fSuperClassDialogField;
private ListDialogField fSuperInterfacesDialogField;
private IType fSuperClass;
private SelectionButtonDialogFieldGroup fAccMdfButtons;
private SelectionButtonDialogFieldGroup fOtherMdfButtons;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
private IType fCreatedType;
protected IStatus fEnclosingTypeStatus;
protected IStatus fPackageStatus;
protected IStatus fTypeNameStatus;
protected IStatus fSuperClassStatus;
protected IStatus fModifierStatus;
protected IStatus fSuperInterfacesStatus;
private boolean fIsClass;
private int fStaticMdfIndex;
private final int PUBLIC_INDEX= 0, DEFAULT_INDEX= 1, PRIVATE_INDEX= 2, PROTECTED_INDEX= 3;
private final int ABSTRACT_INDEX= 0, FINAL_INDEX= 1;
public TypePage(boolean isClass, String pageName, IWorkspaceRoot root) {
super(pageName, root);
fCreatedType= null;
fIsClass= isClass;
TypeFieldsAdapter adapter= new TypeFieldsAdapter();
fPackageDialogField= new StringButtonStatusDialogField(adapter);
fPackageDialogField.setDialogFieldListener(adapter);
fPackageDialogField.setLabelText(NewWizardMessages.getString("TypePage.package.label"));
fPackageDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.package.button"));
fPackageDialogField.setStatusWidthHint(NewWizardMessages.getString("TypePage.default"));
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fEnclosingTypeSelection= new SelectionButtonDialogField(SWT.CHECK);
fEnclosingTypeSelection.setDialogFieldListener(adapter);
fEnclosingTypeSelection.setLabelText(NewWizardMessages.getString("TypePage.enclosing.selection.label"));
fEnclosingTypeDialogField= new StringButtonDialogField(adapter);
fEnclosingTypeDialogField.setDialogFieldListener(adapter);
fEnclosingTypeDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.enclosing.button"));
fTypeNameDialogField= new StringDialogField();
fTypeNameDialogField.setDialogFieldListener(adapter);
fTypeNameDialogField.setLabelText(NewWizardMessages.getString("TypePage.typename.label"));
fSuperClassDialogField= new StringButtonDialogField(adapter);
fSuperClassDialogField.setDialogFieldListener(adapter);
fSuperClassDialogField.setLabelText(NewWizardMessages.getString("TypePage.superclass.label"));
fSuperClassDialogField.setButtonLabel(NewWizardMessages.getString("TypePage.superclass.button"));
String[] addButtons= new String[] {
NewWizardMessages.getString("TypePage.interfaces.add"),
null,
NewWizardMessages.getString("TypePage.interfaces.remove")
};
fSuperInterfacesDialogField= new ListDialogField(adapter, addButtons, new InterfacesListLabelProvider());
fSuperInterfacesDialogField.setDialogFieldListener(adapter);
String interfaceLabel= fIsClass ? NewWizardMessages.getString("TypePage.interfaces.class.label") : NewWizardMessages.getString("TypePage.interfaces.ifc.label");
fSuperInterfacesDialogField.setLabelText(interfaceLabel);
fSuperInterfacesDialogField.setRemoveButtonIndex(2);
String[] buttonNames1= new String[] {
NewWizardMessages.getString("TypePage.modifiers.public"),
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
NewWizardMessages.getString("TypePage.modifiers.default"),
NewWizardMessages.getString("TypePage.modifiers.private"),
NewWizardMessages.getString("TypePage.modifiers.protected")
};
fAccMdfButtons= new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames1, 4);
fAccMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.setLabelText(NewWizardMessages.getString("TypePage.modifiers.acc.label"));
fAccMdfButtons.setSelection(0, true);
String[] buttonNames2;
if (fIsClass) {
buttonNames2= new String[] {
NewWizardMessages.getString("TypePage.modifiers.abstract"),
NewWizardMessages.getString("TypePage.modifiers.final"),
NewWizardMessages.getString("TypePage.modifiers.static")
};
fStaticMdfIndex= 2;
} else {
buttonNames2= new String[] {
NewWizardMessages.getString("TypePage.modifiers.static")
};
fStaticMdfIndex= 0;
}
fOtherMdfButtons= new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames2, 4);
fOtherMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, false);
fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, false);
fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, false);
fPackageStatus= new StatusInfo();
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fEnclosingTypeStatus= new StatusInfo();
fCanModifyPackage= true;
fCanModifyEnclosingType= true;
updateEnableState();
fTypeNameStatus= new StatusInfo();
fSuperClassStatus= new StatusInfo();
fSuperInterfacesStatus= new StatusInfo();
fModifierStatus= new StatusInfo();
}
/**
* Initializes all fields provided by the type page with a given
* Java element as selection.
* @param elem The initial selection of this page or null if no
* selection was available
*/
protected void initTypePage(IJavaElement elem) {
String initSuperclass= "java.lang.Object";
ArrayList initSuperinterfaces= new ArrayList(5);
IPackageFragment pack= null;
IType enclosingType= null;
if (elem != null) {
pack= (IPackageFragment) JavaModelUtil.findElementOfKind(elem, IJavaElement.PACKAGE_FRAGMENT);
IType typeInCU= (IType) JavaModelUtil.findElementOfKind(elem, IJavaElement.TYPE);
if (typeInCU != null) {
if (typeInCU.getCompilationUnit() != null) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
enclosingType= typeInCU;
}
} else {
ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(elem, IJavaElement.COMPILATION_UNIT);
if (cu != null) {
enclosingType= JavaModelUtil.findPrimaryType(cu);
}
}
try {
IType type= null;
if (elem.getElementType() == IJavaElement.TYPE) {
type= (IType)elem;
if (type.exists()) {
String superName= JavaModelUtil.getFullyQualifiedName(type);
if (type.isInterface()) {
initSuperinterfaces.add(superName);
} else {
initSuperclass= superName;
}
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
setPackageFragment(pack, true);
setEnclosingType(enclosingType, true);
setEnclosingTypeSelection(false, true);
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
setTypeName("", true);
setSuperClass(initSuperclass, true);
setSuperInterfaces(initSuperinterfaces, true);
}
/**
* Creates a separator line.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createSeparator(Composite composite, int nColumns) {
(new Separator(SWT.SEPARATOR | SWT.HORIZONTAL)).doFillIntoGrid(composite, nColumns, convertHeightInCharsToPixels(1));
}
/**
* Creates the controls for the package name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createPackageControls(Composite composite, int nColumns) {
fPackageDialogField.doFillIntoGrid(composite, 4);
LayoutUtil.setWidthHint(fPackageDialogField.getTextControl(null), getMaxFieldWidth());
}
/**
* Creates the controls for the enclosing type name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
protected void createEnclosingTypeControls(Composite composite, int nColumns) {
Composite tabGroup= new Composite(composite, SWT.NONE);
MGridLayout layout= new MGridLayout();
layout.marginWidth= 0;
layout.marginHeight= 0;
tabGroup.setLayout(layout);
fEnclosingTypeSelection.doFillIntoGrid(tabGroup, 1);
Control c= fEnclosingTypeDialogField.getTextControl(composite);
MGridData gd= new MGridData(MGridData.FILL_HORIZONTAL);
gd.widthHint= getMaxFieldWidth();
gd.horizontalSpan= 2;
c.setLayoutData(gd);
Button button= fEnclosingTypeDialogField.getChangeControl(composite);
gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd);
}
/**
* Creates the controls for the type name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createTypeNameControls(Composite composite, int nColumns) {
fTypeNameDialogField.doFillIntoGrid(composite, nColumns - 1);
DialogField.createEmptySpace(composite);
LayoutUtil.setWidthHint(fTypeNameDialogField.getTextControl(null), getMaxFieldWidth());
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
/**
* Creates the controls for the modifiers radio/ceckbox buttons.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createModifierControls(Composite composite, int nColumns) {
LayoutUtil.setHorizontalSpan(fAccMdfButtons.getLabelControl(composite), 1);
Control control= fAccMdfButtons.getSelectionButtonsGroup(composite);
MGridData gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= nColumns - 2;
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
DialogField.createEmptySpace(composite);
control= fOtherMdfButtons.getSelectionButtonsGroup(composite);
gd= new MGridData(MGridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= nColumns - 2;
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
}
/**
* Creates the controls for the superclass name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createSuperClassControls(Composite composite, int nColumns) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fSuperClassDialogField.doFillIntoGrid(composite, nColumns);
LayoutUtil.setWidthHint(fSuperClassDialogField.getTextControl(null), getMaxFieldWidth());
}
/**
* Creates the controls for the superclass name field.
* @param composite The parent composite
* @param nColumns Number of columns to span
*/
protected void createSuperInterfacesControls(Composite composite, int nColumns) {
fSuperInterfacesDialogField.doFillIntoGrid(composite, nColumns);
MGridData gd= (MGridData)fSuperInterfacesDialogField.getListControl(null).getLayoutData();
if (fIsClass) {
gd.heightHint= convertHeightInCharsToPixels(3);
} else {
gd.heightHint= convertHeightInCharsToPixels(6);
}
gd.grabExcessVerticalSpace= false;
gd.widthHint= getMaxFieldWidth();
}
/**
* Sets the focus on the container if empty, elso on type name.
*/
protected void setFocus() {
fTypeNameDialogField.setFocus();
}
private class TypeFieldsAdapter implements IStringButtonAdapter, IDialogFieldListener, IListAdapter {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
public void changeControlPressed(DialogField field) {
typePageChangeControlPressed(field);
}
public void customButtonPressed(DialogField field, int index) {
typePageCustomButtonPressed(field, index);
}
public void selectionChanged(DialogField field) {}
public void dialogFieldChanged(DialogField field) {
typePageDialogFieldChanged(field);
}
}
private void typePageChangeControlPressed(DialogField field) {
if (field == fPackageDialogField) {
IPackageFragment pack= choosePackage();
if (pack != null) {
fPackageDialogField.setText(pack.getElementName());
}
} else if (field == fEnclosingTypeDialogField) {
IType type= chooseEnclosingType();
if (type != null) {
fEnclosingTypeDialogField.setText(JavaModelUtil.getFullyQualifiedName(type));
}
} else if (field == fSuperClassDialogField) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
IType type= chooseSuperType();
if (type != null) {
fSuperClassDialogField.setText(JavaModelUtil.getFullyQualifiedName(type));
}
}
}
private void typePageCustomButtonPressed(DialogField field, int index) {
if (field == fSuperInterfacesDialogField) {
chooseSuperInterfaces();
}
}
/*
* A field on the type has changed. The fields' status and all dependend
* status are updated.
*/
private void typePageDialogFieldChanged(DialogField field) {
String fieldName= null;
if (field == fPackageDialogField) {
fPackageStatus= packageChanged();
updatePackageStatusLabel();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= PACKAGE;
} else if (field == fEnclosingTypeDialogField) {
fEnclosingTypeStatus= enclosingTypeChanged();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= ENCLOSING;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
} else if (field == fEnclosingTypeSelection) {
updateEnableState();
boolean isEnclosedType= isEnclosingTypeSelected();
if (!isEnclosedType) {
if (fAccMdfButtons.isSelected(PRIVATE_INDEX) || fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
fAccMdfButtons.setSelection(PRIVATE_INDEX, false);
fAccMdfButtons.setSelection(PROTECTED_INDEX, false);
fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
}
if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
fOtherMdfButtons.setSelection(fStaticMdfIndex, false);
}
}
fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, isEnclosedType && fIsClass);
fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, isEnclosedType && fIsClass);
fOtherMdfButtons.enableSelectionButton(fStaticMdfIndex, isEnclosedType);
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fieldName= ENCLOSINGSELECTION;
} else if (field == fTypeNameDialogField) {
fTypeNameStatus= typeNameChanged();
fieldName= TYPENAME;
} else if (field == fSuperClassDialogField) {
fSuperClassStatus= superClassChanged();
fieldName= SUPER;
} else if (field == fSuperInterfacesDialogField) {
fSuperInterfacesStatus= superInterfacesChanged();
fieldName= INTERFACES;
} else if (field == fOtherMdfButtons) {
fModifierStatus= modifiersChanged();
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fieldName= MODIFIERS;
} else {
fieldName= METHODS;
}
handleFieldChanged(fieldName);
}
/**
* Called whenever a content of a field has changed.
* Implementors of TypePage can hook in.
* @see ContainerPage#handleFieldChanged
*/
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
if (fieldName == CONTAINER) {
fPackageStatus= packageChanged();
fEnclosingTypeStatus= enclosingTypeChanged();
fTypeNameStatus= typeNameChanged();
fSuperClassStatus= superClassChanged();
fSuperInterfacesStatus= superInterfacesChanged();
}
}
/**
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* Gets the text of package field.
*/
public String getPackageText() {
return fPackageDialogField.getText();
}
/**
* Gets the text of enclosing type field.
*/
public String getEnclosingTypeText() {
return fEnclosingTypeDialogField.getText();
}
/**
* Returns the package fragment corresponding to the current input.
* @return Returns <code>null</code> if the input could not be resolved.
*/
public IPackageFragment getPackageFragment() {
if (!isEnclosingTypeSelected()) {
return fCurrPackage;
} else {
if (fCurrEnclosingType != null) {
return fCurrEnclosingType.getPackageFragment();
}
}
return null;
}
/**
* Sets the package fragment.
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* This will update model and the text of the control.
* @param canBeModified Selects if the package fragment can be changed by the user
*/
public void setPackageFragment(IPackageFragment pack, boolean canBeModified) {
fCurrPackage= pack;
fCanModifyPackage= canBeModified;
String str= (pack == null) ? "" : pack.getElementName();
fPackageDialogField.setText(str);
updateEnableState();
}
/**
* Returns the encloding type corresponding to the current input.
* @return Returns <code>null</code> if enclosing type is not selected or the input could not
* be resolved.
*/
public IType getEnclosingType() {
if (isEnclosingTypeSelected()) {
return fCurrEnclosingType;
}
return null;
}
/**
* Sets the package fragment.
* This will update model and the text of the control.
* @param canBeModified Selects if the enclosing type can be changed by the user
*/
public void setEnclosingType(IType type, boolean canBeModified) {
fCurrEnclosingType= type;
fCanModifyEnclosingType= canBeModified;
String str= (type == null) ? "" : JavaModelUtil.getFullyQualifiedName(type);
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
fEnclosingTypeDialogField.setText(str);
updateEnableState();
}
/**
* Returns <code>true</code> if the enclosing type selection check box is enabled.
*/
public boolean isEnclosingTypeSelected() {
return fEnclosingTypeSelection.isSelected();
}
/**
* Sets the enclosing type selection checkbox.
* @param canBeModified Selects if the enclosing type selection can be changed by the user
*/
public void setEnclosingTypeSelection(boolean isSelected, boolean canBeModified) {
fEnclosingTypeSelection.setSelection(isSelected);
fEnclosingTypeSelection.setEnabled(canBeModified);
updateEnableState();
}
/**
* Gets the type name.
*/
public String getTypeName() {
return fTypeNameDialogField.getText();
}
/**
* Sets the type name.
* @param canBeModified Selects if the type name can be changed by the user
*/
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
public void setTypeName(String name, boolean canBeModified) {
fTypeNameDialogField.setText(name);
fTypeNameDialogField.setEnabled(canBeModified);
}
/**
* Gets the selected modifiers.
* @see Flags
*/
public int getModifiers() {
int mdf= 0;
if (fAccMdfButtons.isSelected(PUBLIC_INDEX)) {
mdf+= IConstants.AccPublic;
} else if (fAccMdfButtons.isSelected(PRIVATE_INDEX)) {
mdf+= IConstants.AccPrivate;
} else if (fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
mdf+= IConstants.AccProtected;
}
if (fOtherMdfButtons.isSelected(ABSTRACT_INDEX) && (fStaticMdfIndex != 0)) {
mdf+= IConstants.AccAbstract;
}
if (fOtherMdfButtons.isSelected(FINAL_INDEX)) {
mdf+= IConstants.AccFinal;
}
if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
mdf+= IConstants.AccStatic;
}
return mdf;
}
/**
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
* Sets the modifiers.
* @param canBeModified Selects if the modifiers can be changed by the user
* @see IConstants
*/
public void setModifiers(int modifiers, boolean canBeModified) {
if (Flags.isPublic(modifiers)) {
fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
} else if (Flags.isPrivate(modifiers)) {
fAccMdfButtons.setSelection(PRIVATE_INDEX, true);
} else if (Flags.isProtected(modifiers)) {
fAccMdfButtons.setSelection(PROTECTED_INDEX, true);
} else {
fAccMdfButtons.setSelection(DEFAULT_INDEX, true);
}
if (Flags.isAbstract(modifiers)) {
fOtherMdfButtons.setSelection(ABSTRACT_INDEX, true);
}
if (Flags.isFinal(modifiers)) {
fOtherMdfButtons.setSelection(FINAL_INDEX, true);
}
if (Flags.isStatic(modifiers)) {
fOtherMdfButtons.setSelection(fStaticMdfIndex, true);
}
fAccMdfButtons.setEnabled(canBeModified);
fOtherMdfButtons.setEnabled(canBeModified);
}
/**
* Gets the content of the super class text field.
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
*/
public String getSuperClass() {
return fSuperClassDialogField.getText();
}
/**
* Sets the super class name.
* @param canBeModified Selects if the super class can be changed by the user
*/
public void setSuperClass(String name, boolean canBeModified) {
fSuperClassDialogField.setText(name);
fSuperClassDialogField.setEnabled(canBeModified);
}
/**
* Gets the currently chosen super interfaces.
* @return returns a list of String
*/
public List getSuperInterfaces() {
return fSuperInterfacesDialogField.getElements();
}
/**
* Sets the super interfaces.
* @param interfacesNames a list of String
*/
public void setSuperInterfaces(List interfacesNames, boolean canBeModified) {
fSuperInterfacesDialogField.setElements(interfacesNames);
fSuperInterfacesDialogField.setEnabled(canBeModified);
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Called when the package field has changed.
* The method validates the package name and returns the status of the validation
* This also updates the package fragment model.
* Can be extended to add more validation
*/
protected IStatus packageChanged() {
StatusInfo status= new StatusInfo();
fPackageDialogField.enableButton(getPackageFragmentRoot() != null);
String packName= getPackageText();
if (packName.length() > 0) {
IStatus val= JavaConventions.validatePackageName(packName);
if (val.getSeverity() == IStatus.ERROR) {
status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidPackageName", val.getMessage()));
return status;
} else if (val.getSeverity() == IStatus.WARNING) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.DiscouragedPackageName", val.getMessage()));
}
}
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root != null) {
IPackageFragment pack= root.getPackageFragment(packName);
try {
IPath rootPath= root.getPath();
IPath outputPath= root.getJavaProject().getOutputLocation();
if (rootPath.isPrefixOf(outputPath) && !rootPath.equals(outputPath)) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
IPath packagePath= pack.getUnderlyingResource().getFullPath();
if (outputPath.isPrefixOf(packagePath)) {
status.setError(NewWizardMessages.getString("TypePage.error.ClashOutputLocation"));
return status;
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
fCurrPackage= pack;
} else {
status.setError("");
}
return status;
}
/*
* Updates the 'default' label next to the package field.
*/
private void updatePackageStatusLabel() {
String packName= fPackageDialogField.getText();
if (packName.length() == 0) {
fPackageDialogField.setStatus(NewWizardMessages.getString("TypePage.default"));
} else {
fPackageDialogField.setStatus("");
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
/*
* Updates the enable state of buttons related to the enclosing type selection checkbox.
*/
private void updateEnableState() {
boolean enclosing= isEnclosingTypeSelected();
fPackageDialogField.setEnabled(fCanModifyPackage && !enclosing);
fEnclosingTypeDialogField.setEnabled(fCanModifyEnclosingType && enclosing);
}
/**
* Called when the enclosing type name has changed.
* The method validates the enclosing type and returns the status of the validation
* This also updates the enclosing type model.
* Can be extended to add more validation
*/
protected IStatus enclosingTypeChanged() {
StatusInfo status= new StatusInfo();
fCurrEnclosingType= null;
IPackageFragmentRoot root= getPackageFragmentRoot();
fEnclosingTypeDialogField.enableButton(root != null);
if (root == null) {
status.setError("");
return status;
}
String enclName= getEnclosingTypeText();
if (enclName.length() == 0) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeEnterName"));
return status;
}
try {
IType type= JavaModelUtil.findType(root.getJavaProject(), enclName);
if (type == null) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists"));
return status;
}
if (type.getCompilationUnit() == null) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingNotInCU"));
return status;
}
fCurrEnclosingType= type;
IPackageFragmentRoot enclosingRoot= JavaModelUtil.getPackageFragmentRoot(type);
if (!enclosingRoot.equals(root)) {
status.setWarning(NewWizardMessages.getString("TypePage.warning.EnclosingNotInSourceFolder"));
}
return status;
} catch (JavaModelException e) {
status.setError(NewWizardMessages.getString("TypePage.error.EnclosingTypeNotExists"));
JavaPlugin.log(e.getStatus());
return status;
}
}
/**
* Called when the type name has changed.
* The method validates the type name and returns the status of the validation.
* Can be extended to add more validation
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
*/
protected IStatus typeNameChanged() {
StatusInfo status= new StatusInfo();
String typeName= getTypeName();
if (typeName.length() == 0) {
status.setError(NewWizardMessages.getString("TypePage.error.EnterTypeName"));
return status;
}
if (typeName.indexOf('.') != -1) {
status.setError(NewWizardMessages.getString("TypePage.error.QualifiedName"));
return status;
}
IStatus val= JavaConventions.validateJavaTypeName(typeName);
if (val.getSeverity() == IStatus.ERROR) {
status.setError(NewWizardMessages.getFormattedString("TypePage.error.InvalidTypeName", val.getMessage()));
return status;
} else if (val.getSeverity() == IStatus.WARNING) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.TypeNameDiscouraged", val.getMessage()));
}
if (!isEnclosingTypeSelected()) {
IPackageFragment pack= getPackageFragment();
if (pack != null) {
ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java");
if (cu.exists()) {
status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists"));
return status;
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
} else {
IType type= getEnclosingType();
if (type != null) {
IType member= type.getType(typeName);
if (member.exists()) {
status.setError(NewWizardMessages.getString("TypePage.error.TypeNameExists"));
return status;
}
}
}
return status;
}
/**
* Called when the superclass name has changed.
* The method validates the superclass name and returns the status of the validation.
* Can be extended to add more validation
*/
protected IStatus superClassChanged() {
StatusInfo status= new StatusInfo();
IPackageFragmentRoot root= getPackageFragmentRoot();
fSuperClassDialogField.enableButton(root != null);
fSuperClass= null;
String sclassName= getSuperClass();
if (sclassName.length() == 0) {
return status;
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
IStatus val= JavaConventions.validateJavaTypeName(sclassName);
if (!val.isOK()) {
status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName"));
return status;
}
if (root != null) {
try {
IType type= resolveSuperTypeName(root.getJavaProject(), sclassName);
if (type == null) {
status.setWarning(NewWizardMessages.getString("TypePage.warning.SuperClassNotExists"));
return status;
} else {
if (type.isInterface()) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotClass", sclassName));
return status;
}
int flags= type.getFlags();
if (Flags.isFinal(flags)) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsFinal", sclassName));
return status;
} else if (!JavaModelUtil.isVisible(type, getPackageFragment())) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.SuperClassIsNotVisible", sclassName));
return status;
}
}
fSuperClass= type;
} catch (JavaModelException e) {
status.setError(NewWizardMessages.getString("TypePage.error.InvalidSuperClassName"));
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
JavaPlugin.log(e.getStatus());
}
} else {
status.setError("");
}
return status;
}
private IType resolveSuperTypeName(IJavaProject jproject, String sclassName) throws JavaModelException {
IType type= null;
if (isEnclosingTypeSelected()) {
IType enclosingType= getEnclosingType();
if (enclosingType != null) {
String[][] res= enclosingType.resolveType(sclassName);
if (res != null && res.length > 0) {
type= JavaModelUtil.findType(jproject, res[0][0], res[0][1]);
}
}
} else {
IPackageFragment currPack= getPackageFragment();
if (type == null && currPack != null) {
String packName= currPack.getElementName();
if (!currPack.isDefaultPackage()) {
type= JavaModelUtil.findType(jproject, packName, sclassName);
}
if (type == null && !"java.lang".equals(packName)) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
type= JavaModelUtil.findType(jproject, "java.lang", sclassName);
}
}
if (type == null) {
type= JavaModelUtil.findType(jproject, sclassName);
}
}
return type;
}
/**
* Called when the list of super interface has changed.
* The method validates the superinterfaces and returns the status of the validation.
* Can be extended to add more validation.
*/
protected IStatus superInterfacesChanged() {
StatusInfo status= new StatusInfo();
IPackageFragmentRoot root= getPackageFragmentRoot();
fSuperInterfacesDialogField.enableButton(0, root != null);
if (root != null) {
List elements= fSuperInterfacesDialogField.getElements();
int nElements= elements.size();
for (int i= 0; i < nElements; i++) {
String intfname= (String)elements.get(i);
try {
IType type= JavaModelUtil.findType(root.getJavaProject(), intfname);
if (type == null) {
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceNotExists", intfname));
return status;
} else {
if (type.isClass()) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotInterface", intfname));
return status;
}
if (!JavaModelUtil.isVisible(type, getPackageFragment())) {
status.setWarning(NewWizardMessages.getFormattedString("TypePage.warning.InterfaceIsNotVisible", intfname));
return status;
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
}
return status;
}
/**
* Called when the modifiers have changed.
* The method validates the modifiers and returns the status of the validation.
* Can be extended to add more validation.
*/
protected IStatus modifiersChanged() {
StatusInfo status= new StatusInfo();
int modifiers= getModifiers();
if (Flags.isFinal(modifiers) && Flags.isAbstract(modifiers)) {
status.setError(NewWizardMessages.getString("TypePage.error.ModifiersFinalAndAbstract"));
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
return status;
}
private IPackageFragment choosePackage() {
IPackageFragmentRoot froot= getPackageFragmentRoot();
IJavaElement[] packages= null;
try {
if (froot != null) {
packages= froot.getChildren();
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
if (packages == null) {
packages= new IJavaElement[0];
}
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT));
dialog.setIgnoreCase(false);
dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description"));
dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty"));
dialog.setElements(packages);
if (fCurrPackage != null) {
dialog.setInitialSelections(new Object[] { fCurrPackage });
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
if (dialog.open() == dialog.OK) {
return (IPackageFragment) dialog.getFirstResult();
}
return null;
}
private IType chooseEnclosingType() {
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root == null) {
return null;
}
IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { root });
TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), IJavaSearchConstants.TYPE, scope);
dialog.setTitle(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.description"));
if (fCurrEnclosingType != null) {
dialog.setInitialSelections(new Object[] { fCurrEnclosingType });
dialog.setFilter(fCurrEnclosingType.getElementName().substring(0, 1));
}
if (dialog.open() == dialog.OK) {
return (IType) dialog.getFirstResult();
}
return null;
}
private IType chooseSuperType() {
IPackageFragmentRoot root= getPackageFragmentRoot();
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
if (root == null) {
return null;
}
IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() };
IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), IJavaSearchConstants.CLASS, scope);
dialog.setTitle(NewWizardMessages.getString("TypePage.SuperClassDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.SuperClassDialog.message"));
if (fSuperClass != null) {
dialog.setFilter(fSuperClass.getElementName());
}
if (dialog.open() == dialog.OK) {
return (IType) dialog.getFirstResult();
}
return null;
}
private void chooseSuperInterfaces() {
IPackageFragmentRoot root= getPackageFragmentRoot();
if (root == null) {
return;
}
IJavaProject project= root.getJavaProject();
SuperInterfaceSelectionDialog dialog= new SuperInterfaceSelectionDialog(getShell(), getWizard().getContainer(), fSuperInterfacesDialogField, project);
dialog.setTitle(NewWizardMessages.getString("TypePage.InterfacesDialog.title"));
dialog.setMessage(NewWizardMessages.getString("TypePage.InterfacesDialog.message"));
dialog.open();
return;
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Creates a type using the current field values.
*/
public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException {
monitor.beginTask(NewWizardMessages.getString("TypePage.operationdesc"), 10);
IPackageFragmentRoot root= getPackageFragmentRoot();
IPackageFragment pack= getPackageFragment();
if (pack == null) {
pack= root.getPackageFragment("");
}
if (!pack.exists()) {
String packName= pack.getElementName();
pack= root.createPackageFragment(packName, true, null);
}
monitor.worked(1);
String clName= fTypeNameDialogField.getText();
boolean isInnerClass= isEnclosingTypeSelected();
IType createdType;
ImportsStructure imports;
int indent= 0;
String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference();
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
int threshold= ImportOrganizePreferencePage.getImportNumberThreshold();
String lineDelimiter= null;
if (!isInnerClass) {
lineDelimiter= System.getProperty("line.separator", "\n");
String packStatement= pack.isDefaultPackage() ? "" : "package " + pack.getElementName() + ";" + lineDelimiter;
ICompilationUnit parentCU= pack.createCompilationUnit(clName + ".java", packStatement, false, new SubProgressMonitor(monitor, 2));
imports= new ImportsStructure(parentCU, prefOrder, threshold, false);
String content= createTypeBody(imports, lineDelimiter, parentCU);
createdType= parentCU.createType(content, null, false, new SubProgressMonitor(monitor, 3));
} else {
IType enclosingType= getEnclosingType();
IType workingCopy= (IType) EditorUtility.getWorkingCopy(enclosingType);
if (workingCopy != null) {
enclosingType= workingCopy;
}
ICompilationUnit parentCU= enclosingType.getCompilationUnit();
imports= new ImportsStructure(parentCU, prefOrder, threshold, true);
lineDelimiter= StubUtility.getLineDelimiterUsed(enclosingType);
String content= createTypeBody(imports, lineDelimiter, parentCU);
IJavaElement[] elems= enclosingType.getChildren();
IJavaElement sibling= elems.length > 0 ? elems[0] : null;
createdType= enclosingType.createType(content, sibling, false, new SubProgressMonitor(monitor, 1));
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
indent= StubUtility.getIndentUsed(enclosingType) + 1;
}
imports.create(!isInnerClass, new SubProgressMonitor(monitor, 1));
String[] methods= evalMethods(createdType, imports, new SubProgressMonitor(monitor, 1));
if (methods.length > 0) {
for (int i= 0; i < methods.length; i++) {
createdType.createMethod(methods[i], null, false, null);
}
imports.create(!isInnerClass, null);
}
monitor.worked(1);
ICompilationUnit cu= createdType.getCompilationUnit();
ISourceRange range;
if (isInnerClass) {
synchronized(cu) {
cu.reconcile();
}
range= createdType.getSourceRange();
} else {
range= cu.getSourceRange();
}
IBuffer buf= cu.getBuffer();
String originalContent= buf.getText(range.getOffset(), range.getLength());
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
String formattedContent= StubUtility.codeFormat(originalContent, indent, lineDelimiter);
buf.replace(range.getOffset(), range.getLength(), formattedContent);
if (!isInnerClass) {
String fileComment= getFileComment(cu);
if (fileComment != null) {
buf.replace(0, 0, fileComment + lineDelimiter);
}
buf.save(new SubProgressMonitor(monitor, 1), false);
} else {
monitor.worked(1);
}
fCreatedType= createdType;
monitor.done();
}
/**
* Returns the created type. Only valid after createType has been invoked
*/
public IType getCreatedType() {
return fCreatedType;
}
private void writeSuperClass(StringBuffer buf, IImportsStructure imports) {
String typename= getSuperClass();
if (fIsClass && typename.length() > 0 && !"java.lang.Object".equals(typename)) {
buf.append(" extends ");
buf.append(Signature.getSimpleName(typename));
if (fSuperClass != null) {
imports.addImport(JavaModelUtil.getFullyQualifiedName(fSuperClass));
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
} else {
imports.addImport(typename);
}
}
}
private void writeSuperInterfaces(StringBuffer buf, IImportsStructure imports) {
List interfaces= getSuperInterfaces();
int last= interfaces.size() - 1;
if (last >= 0) {
if (fIsClass) {
buf.append(" implements ");
} else {
buf.append(" extends ");
}
for (int i= 0; i <= last; i++) {
String typename= (String) interfaces.get(i);
imports.addImport(typename);
buf.append(Signature.getSimpleName(typename));
if (i < last) {
buf.append(", ");
}
}
}
}
/*
* Called from createType to construct the source for this type
*/
private String createTypeBody(IImportsStructure imports, String lineDelimiter, ICompilationUnit parentCU) {
StringBuffer buf= new StringBuffer();
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
String typeComment= getTypeComment(parentCU);
if (typeComment != null) {
buf.append(typeComment);
buf.append(lineDelimiter);
}
int modifiers= getModifiers();
buf.append(Flags.toString(modifiers));
if (modifiers != 0) {
buf.append(' ');
}
buf.append(fIsClass ? "class " : "interface ");
buf.append(getTypeName());
writeSuperClass(buf, imports);
writeSuperInterfaces(buf, imports);
buf.append(" {");
buf.append(lineDelimiter);
buf.append(lineDelimiter);
buf.append('}');
buf.append(lineDelimiter);
return buf.toString();
}
/**
* Called from createType to allow adding methods for the newly created type
* Returns array of sources of the methods that have to be added
* @param parent The type where the methods will be added to
*/
protected String[] evalMethods(IType parent, IImportsStructure imports, IProgressMonitor monitor) throws CoreException {
return new String[0];
}
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
/**
* Called from createType to get a file comment. By default the content of template
* 'filecomment' is taken.
* Returns source or null, if no file comment should be added
*/
protected String getFileComment(ICompilationUnit parentCU) {
if (CodeGenerationPreferencePage.doFileComments()) {
return getTemplate("filecomment", parentCU);
}
return null;
}
/**
* Called from createType to get a type comment.
* Returns source or null, if no type comment should be added
*/
protected String getTypeComment(ICompilationUnit parentCU) {
if (CodeGenerationPreferencePage.doCreateComments()) {
return getTemplate("typecomment", parentCU);
}
return null;
}
protected String getTemplate(String name, ICompilationUnit parentCU) {
Template[] templates= Templates.getInstance().getTemplates();
try {
for (int i= 0; i < templates.length; i++) {
if (name.equals(templates[i].getName())) {
return JavaContext.evaluateTemplate(templates[i], parentCU);
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
}
}
} catch (CoreException e) {
JavaPlugin.log(e);
}
return null;
}
/**
* Creates the bodies of all unimplemented methods or/and all constructors
* Can be used by implementors of TypePage to add method stub checkboxes
*/
protected String[] constructInheritedMethods(IType type, boolean doConstructors, boolean doUnimplementedMethods, IImportsStructure imports, IProgressMonitor monitor) throws CoreException {
List newMethods= new ArrayList();
ITypeHierarchy hierarchy= type.newSupertypeHierarchy(monitor);
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
if (doConstructors) {
IType superclass= hierarchy.getSuperclass(type);
if (superclass != null) {
String[] constructors= StubUtility.evalConstructors(type, superclass, settings, imports);
if (constructors != null) {
for (int i= 0; i < constructors.length; i++) {
newMethods.add(constructors[i]);
}
}
}
}
if (doUnimplementedMethods) {
String[] unimplemented= StubUtility.evalUnimplementedMethods(type, hierarchy, false, settings, null, imports);
|
9,304 |
Bug 9304 new class wizard: incorrect terminology used
|
1. new class wizard 2. press Add.. in interfaces 3. the dialog you see has a title 'Extended Interfaces Selection' this is incorrect - it should be 'Implemented Interfaces Selection' (this bug was pointed out on the wsad newsgroup)
|
verified fixed
|
eda4d5a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-12T18:37:39Z | 2002-02-08T12:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
|
if (unimplemented != null) {
for (int i= 0; i < unimplemented.length; i++) {
newMethods.add(unimplemented[i]);
}
}
}
return (String[]) newMethods.toArray(new String[newMethods.size()]);
}
/**
* @see NewElementWizardPage#getRunnable
*/
public IRunnableWithProgress getRunnable() {
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
createType(monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
};
}
}
|
9,517 |
Bug 9517 Browser Perspective: new project doesn't show up in project view part
|
Test pass for M3 - open eclipse - switch to browser perspective - open context menu in project view part - select New->Project - create JUnit project observe: new project doesn't show up in project view part
|
resolved fixed
|
9196996
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:42:32Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
public class ProjectsView extends JavaBrowsingPart {
|
9,517 |
Bug 9517 Browser Perspective: new project doesn't show up in project view part
|
Test pass for M3 - open eclipse - switch to browser perspective - open context menu in project view part - select New->Project - create JUnit project observe: new project doesn't show up in project view part
|
resolved fixed
|
9196996
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:42:32Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
/**
* Creates the the viewer of this part.
*
* @param parent the parent for the viewer
*/
protected StructuredViewer createViewer(Composite parent) {
return new ProblemTreeViewer(parent, SWT.SINGLE);
}
/**
* Creates the the content provider of this part.
*/
protected BaseJavaElementContentProvider createContentProvider() {
return new ProjectAndSourceFolderContentProvider(this);
}
|
9,517 |
Bug 9517 Browser Perspective: new project doesn't show up in project view part
|
Test pass for M3 - open eclipse - switch to browser perspective - open context menu in project view part - select New->Project - create JUnit project observe: new project doesn't show up in project view part
|
resolved fixed
|
9196996
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:42:32Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
/**
* Returns the context ID for the Help system.
*
* @return the string used as ID for the Help context
*/
protected String getHelpContextId() {
return IJavaHelpContextIds.PROJECTS_VIEW;
}
/**
* Adds additional listeners to this view.
*/
protected void hookViewerListeners() {
}
protected void setInitialInput() {
IJavaElement root= JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot());
getViewer().setInput(root);
}
/**
* Answers if the given <code>element</code> is a valid
* input for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid input
*/
protected boolean isValidInput(Object element) {
return element instanceof IJavaModel;
}
/**
* Answers if the given <code>element</code> is a valid
* element for this part.
|
9,517 |
Bug 9517 Browser Perspective: new project doesn't show up in project view part
|
Test pass for M3 - open eclipse - switch to browser perspective - open context menu in project view part - select New->Project - create JUnit project observe: new project doesn't show up in project view part
|
resolved fixed
|
9196996
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:42:32Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
|
*
* @param element the object to test
* @return <true> if the given element is a valid element
*/
protected boolean isValidElement(Object element) {
return element instanceof IJavaProject || element instanceof IPackageFragmentRoot;
}
/**
* Finds the element which has to be selected in this part.
*
* @param je the Java element which has the focus
*/
protected IJavaElement findElementToSelect(IJavaElement je) {
if (je == null)
return null;
switch (je.getElementType()) {
case IJavaElement.JAVA_MODEL :
return null;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (je.getElementName().equals(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH))
return je.getParent();
else
return je;
default :
return findElementToSelect(je.getParent());
}
}
}
|
9,528 |
Bug 9528 CCE while coping a project to the clipboard
|
Test pass for M3 Got the following CCE while copying text to the clipboard. java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getWorkingCopyElements (SourceReferenceAction.java:139) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getSelectedElements (SourceReferenceAction.java:85) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getElementsToProcess (SourceReferenceAction.java:59) at org.eclipse.jdt.internal.ui.reorg.CopySourceReferencesToClipboardAction.perform (CopySourceReferencesToClipboardAction.java:21) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction$1.run (SourceReferenceAction.java:50) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.run (SourceReferenceAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.ui.internal.RetargetAction.runWithEvent (RetargetAction.java:137) 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:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
resolved fixed
|
af2c531
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:56:29Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
|
package org.eclipse.jdt.internal.ui.reorg;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportContainer;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.refactoring.reorg.SourceReferenceUtil;
import org.eclipse.jdt.internal.corext.refactoring.util.WorkingCopyUtil;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringAction;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
abstract class SourceReferenceAction extends RefactoringAction {
|
9,528 |
Bug 9528 CCE while coping a project to the clipboard
|
Test pass for M3 Got the following CCE while copying text to the clipboard. java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getWorkingCopyElements (SourceReferenceAction.java:139) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getSelectedElements (SourceReferenceAction.java:85) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getElementsToProcess (SourceReferenceAction.java:59) at org.eclipse.jdt.internal.ui.reorg.CopySourceReferencesToClipboardAction.perform (CopySourceReferencesToClipboardAction.java:21) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction$1.run (SourceReferenceAction.java:50) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.run (SourceReferenceAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.ui.internal.RetargetAction.runWithEvent (RetargetAction.java:137) 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:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
resolved fixed
|
af2c531
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:56:29Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
|
private ISelectionProvider fSelectionProvider;
protected SourceReferenceAction(String name, ISelectionProvider provider) {
super(name, provider);
fSelectionProvider= provider;
}
protected ISelectionProvider getSelectionProvider(){
return fSelectionProvider;
}
/*
* @see Action#run
*/
public final void run() {
new BusyIndicator().showWhile(JavaPlugin.getActiveWorkbenchShell().getDisplay(), new Runnable() {
public void run() {
try {
perform();
} catch (CoreException e) {
ExceptionHandler.handle(e, getText(), "Unexpected exception. See log for details.");
}
}
});
}
protected ISourceReference[] getElementsToProcess() {
return SourceReferenceUtil.removeAllWithParentsSelected(getSelectedElements());
}
|
9,528 |
Bug 9528 CCE while coping a project to the clipboard
|
Test pass for M3 Got the following CCE while copying text to the clipboard. java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getWorkingCopyElements (SourceReferenceAction.java:139) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getSelectedElements (SourceReferenceAction.java:85) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getElementsToProcess (SourceReferenceAction.java:59) at org.eclipse.jdt.internal.ui.reorg.CopySourceReferencesToClipboardAction.perform (CopySourceReferencesToClipboardAction.java:21) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction$1.run (SourceReferenceAction.java:50) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.run (SourceReferenceAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.ui.internal.RetargetAction.runWithEvent (RetargetAction.java:137) 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:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
resolved fixed
|
af2c531
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:56:29Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
|
protected abstract void perform() throws CoreException;
/*
* @see RefactoringAction#canOperateOn(IStructuredSelection)
*/
public boolean canOperateOn(IStructuredSelection selection) {
try{
if (selection.isEmpty())
return false;
Object[] elems= selection.toArray();
for (int i= 0; i < elems.length; i++) {
Object elem= elems[i];
if (! canWorkOn(elem))
return false;
}
return true;
} catch (JavaModelException e){
JavaPlugin.log(e);
return false;
}
}
private ISourceReference[] getSelectedElements(){
return getWorkingCopyElements(getStructuredSelection().toList());
}
private static boolean canWorkOn(Object elem) throws JavaModelException{
if (elem == null)
return false;
|
9,528 |
Bug 9528 CCE while coping a project to the clipboard
|
Test pass for M3 Got the following CCE while copying text to the clipboard. java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getWorkingCopyElements (SourceReferenceAction.java:139) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getSelectedElements (SourceReferenceAction.java:85) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getElementsToProcess (SourceReferenceAction.java:59) at org.eclipse.jdt.internal.ui.reorg.CopySourceReferencesToClipboardAction.perform (CopySourceReferencesToClipboardAction.java:21) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction$1.run (SourceReferenceAction.java:50) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.run (SourceReferenceAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.ui.internal.RetargetAction.runWithEvent (RetargetAction.java:137) 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:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
resolved fixed
|
af2c531
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:56:29Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
|
if (! (elem instanceof ISourceReference))
return false;
if (! (elem instanceof IJavaElement))
return false;
if (elem instanceof IClassFile)
return false;
if (elem instanceof ICompilationUnit)
return false;
if ((elem instanceof IMember) && ((IMember)elem).isBinary())
return false;
if (isDeletedFromEditor((ISourceReference)elem))
return false;
if (elem instanceof IMember)
return true;
if (elem instanceof IImportContainer)
return true;
if (elem instanceof IImportDeclaration)
return true;
if (elem instanceof IPackageDeclaration)
return true;
return false;
}
private static boolean isDeletedFromEditor(ISourceReference elem) throws JavaModelException{
|
9,528 |
Bug 9528 CCE while coping a project to the clipboard
|
Test pass for M3 Got the following CCE while copying text to the clipboard. java.lang.ClassCastException: org.eclipse.jdt.internal.core.JavaProject at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getWorkingCopyElements (SourceReferenceAction.java:139) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getSelectedElements (SourceReferenceAction.java:85) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.getElementsToProcess (SourceReferenceAction.java:59) at org.eclipse.jdt.internal.ui.reorg.CopySourceReferencesToClipboardAction.perform (CopySourceReferencesToClipboardAction.java:21) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction$1.run (SourceReferenceAction.java:50) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.run (SourceReferenceAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.ui.internal.RetargetAction.runWithEvent (RetargetAction.java:137) 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:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
resolved fixed
|
af2c531
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T10:56:29Z | 2002-02-13T08:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
|
ICompilationUnit cu= SourceReferenceUtil.getCompilationUnit(elem);
ICompilationUnit wc= WorkingCopyUtil.getWorkingCopyIfExists(cu);
if (wc.equals(cu))
return false;
IJavaElement element= (IJavaElement)elem;
IJavaElement wcElement= JavaModelUtil.findInCompilationUnit(wc, element);
return wcElement == null || ! wcElement.exists();
}
private static ISourceReference[] getWorkingCopyElements(List l) {
List wcList= new ArrayList(l.size());
for (Iterator iter= l.iterator(); iter.hasNext();) {
ISourceReference element= (ISourceReference) iter.next();
if (! (element instanceof IJavaElement))
wcList.add(element);
ICompilationUnit cu= SourceReferenceUtil.getCompilationUnit(element);
ICompilationUnit wc= WorkingCopyUtil.getWorkingCopyIfExists(cu);
try {
IJavaElement wcElement= JavaModelUtil.findInCompilationUnit(wc, (IJavaElement)element);
if (wcElement != null && wcElement.exists())
wcList.add(wcElement);
} catch(JavaModelException e) {
JavaPlugin.log(e);
}
}
return (ISourceReference[]) wcList.toArray(new ISourceReference[wcList.size()]);
}
}
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.lang.reflect.InvocationTargetException;
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import java.util.Iterator;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IViewPart;
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.ui.texteditor.MarkerUtilities;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.tasklist.TaskList;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.refactoring.actions.SurroundWithTryCatchAction;
import org.eclipse.jdt.internal.ui.reorg.DeleteAction;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.JavaPairMatcher;
/**
* Java specific text editor.
*/
public class CompilationUnitEditor extends JavaEditor {
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/**
* Responsible for highlighting matching pairs of brackets.
*/
class BracketHighlighter implements KeyListener, MouseListener, ISelectionChangedListener, ITextListener, ITextInputListener {
/**
* Highlights the brackets.
*/
class HighlightBrackets implements PaintListener {
private JavaPairMatcher fMatcher= new JavaPairMatcher(new char[] { '{', '}', '(', ')', '[', ']' });
private Position fBracketPosition= new Position(0, 0);
private int fAnchor;
private boolean fIsActive= false;
private StyledText fTextWidget;
private Color fColor;
public HighlightBrackets() {
fTextWidget= fSourceViewer.getTextWidget();
}
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public void setHighlightColor(Color color) {
fColor= color;
}
public void dispose() {
if (fMatcher != null) {
fMatcher.dispose();
fMatcher= null;
}
fColor= null;
fTextWidget= null;
}
public void deactivate(boolean redraw) {
if (fIsActive) {
fIsActive= false;
fTextWidget.removePaintListener(this);
fManager.unmanage(fBracketPosition);
if (redraw)
handleDrawRequest(null);
}
}
public void run() {
Point selection= fSourceViewer.getSelectedRange();
if (selection.y > 0) {
deactivate(true);
return;
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
IRegion pair= fMatcher.match(fSourceViewer.getDocument(), selection.x);
if (pair == null) {
deactivate(true);
return;
}
if (fIsActive) {
if (pair.getOffset() != fBracketPosition.getOffset() ||
pair.getLength() != fBracketPosition.getLength() ||
fMatcher.getAnchor() != fAnchor) {
handleDrawRequest(null);
fBracketPosition.isDeleted= false;
fBracketPosition.offset= pair.getOffset();
fBracketPosition.length= pair.getLength();
fAnchor= fMatcher.getAnchor();
handleDrawRequest(null);
}
} else {
fIsActive= true;
fBracketPosition.isDeleted= false;
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
fBracketPosition.offset= pair.getOffset();
fBracketPosition.length= pair.getLength();
fAnchor= fMatcher.getAnchor();
fTextWidget.addPaintListener(this);
fManager.manage(fBracketPosition);
handleDrawRequest(null);
}
}
public void paintControl(PaintEvent event) {
if (fTextWidget != null)
handleDrawRequest(event.gc);
}
private void handleDrawRequest(GC gc) {
IRegion region= fSourceViewer.getVisibleRegion();
int offset= fBracketPosition.getOffset();
int length= fBracketPosition.getLength();
if (region.getOffset() <= offset && region.getOffset() + region.getLength() >= offset + length) {
offset -= region.getOffset();
if (fMatcher.RIGHT == fAnchor)
draw(gc, offset, 1);
else
draw(gc, offset + length -1, 1);
}
}
private void draw(GC gc, int offset, int length) {
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
if (gc != null) {
Point left= fTextWidget.getLocationAtOffset(offset);
Point right= fTextWidget.getLocationAtOffset(offset + length);
gc.setForeground(fColor);
gc.drawRectangle(left.x, left.y, right.x - left.x - 1, gc.getFontMetrics().getHeight() - 1);
} else {
fTextWidget.redrawRange(offset, length, true);
}
}
};
/**
* Manages the registration and updating of the bracket position.
*/
class BracketPositionManager {
private IDocument fDocument;
private IPositionUpdater fPositionUpdater;
private String fCategory;
public BracketPositionManager() {
fCategory= getClass().getName() + hashCode();
fPositionUpdater= new DefaultPositionUpdater(fCategory);
}
public void install(IDocument document) {
fDocument= document;
fDocument.addPositionCategory(fCategory);
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
fDocument.addPositionUpdater(fPositionUpdater);
}
public void dispose() {
uninstall(fDocument);
}
public void uninstall(IDocument document) {
if (document == fDocument && document != null) {
try {
fDocument.removePositionUpdater(fPositionUpdater);
fDocument.removePositionCategory(fCategory);
} catch (BadPositionCategoryException x) {
}
fDocument= null;
}
}
public void manage(Position position) {
try {
fDocument.addPosition(fCategory, position);
} catch (BadPositionCategoryException x) {
} catch (BadLocationException x) {
}
}
public void unmanage(Position position) {
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
try {
fDocument.removePosition(fCategory, position);
} catch (BadPositionCategoryException x) {
}
}
};
private BracketPositionManager fManager= new BracketPositionManager();
private HighlightBrackets fHighlightBrackets;
private ISourceViewer fSourceViewer;
private boolean fTextChanged= false;
public BracketHighlighter(ISourceViewer sourceViewer) {
fSourceViewer= sourceViewer;
fHighlightBrackets= new HighlightBrackets();
}
public void setHighlightColor(Color color) {
fHighlightBrackets.setHighlightColor(color);
}
public void install() {
fManager.install(fSourceViewer.getDocument());
fSourceViewer.addTextInputListener(this);
ISelectionProvider provider= fSourceViewer.getSelectionProvider();
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
provider.addSelectionChangedListener(this);
fSourceViewer.addTextListener(this);
StyledText text= fSourceViewer.getTextWidget();
text.addKeyListener(this);
text.addMouseListener(this);
}
public void dispose() {
if (fManager != null) {
fManager.dispose();
fManager= null;
}
if (fHighlightBrackets != null) {
fHighlightBrackets.dispose();
fHighlightBrackets= null;
}
if (fSourceViewer != null && fBracketHighlighter != null) {
fSourceViewer.removeTextInputListener(this);
ISelectionProvider provider= fSourceViewer.getSelectionProvider();
provider.removeSelectionChangedListener(this);
fSourceViewer.removeTextListener(this);
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
StyledText text= fSourceViewer.getTextWidget();
if (text != null && !text.isDisposed()) {
text.removeKeyListener(fBracketHighlighter);
text.removeMouseListener(fBracketHighlighter);
}
fSourceViewer= null;
}
}
/**
* @see KeyListener#keyPressed(KeyEvent)
*/
public void keyPressed(KeyEvent e) {
fTextChanged= false;
}
/**
* @see KeyListener#keyReleased(KeyEvent)
*/
public void keyReleased(KeyEvent e) {
if (!fTextChanged)
fHighlightBrackets.run();
}
/**
* @see MouseListener#mouseDoubleClick(MouseEvent)
*/
public void mouseDoubleClick(MouseEvent e) {
}
/**
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
* @see MouseListener#mouseDown(MouseEvent)
*/
public void mouseDown(MouseEvent e) {
}
/**
* @see MouseListener#mouseUp(MouseEvent)
*/
public void mouseUp(MouseEvent e) {
fHighlightBrackets.run();
}
/**
* @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
*/
public void selectionChanged(SelectionChangedEvent event) {
fHighlightBrackets.run();
}
/**
* @see ITextListener#textChanged(TextEvent)
*/
public void textChanged(TextEvent event) {
fTextChanged= true;
Control control= fSourceViewer.getTextWidget();
if (control != null) {
control.getDisplay().asyncExec(new Runnable() {
public void run() {
if (fTextChanged && fHighlightBrackets != null)
fHighlightBrackets.run();
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
});
}
}
/**
* @see ITextInputListener#inputDocumentAboutToBeChanged(IDocument, IDocument)
*/
public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
if (oldInput != null) {
fHighlightBrackets.deactivate(false);
fManager.uninstall(oldInput);
}
}
/**
* @see ITextInputListener#inputDocumentChanged(IDocument, IDocument)
*/
public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
if (newInput != null)
fManager.install(newInput);
}
};
class InternalSourceViewer extends SourceViewer {
public InternalSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
super(parent, ruler, styles);
}
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public IContentAssistant getContentAssistant() {
return fContentAssistant;
}
};
private final static String CODE_FORMATTER_TAB_SIZE= "org.eclipse.jdt.core.formatter.tabulation.size";
private final static String CODE_FORMATTER_TAB_CHAR= "org.eclipse.jdt.core.formatter.tabulation.char";
public final static String MATCHING_BRACKETS= "matchingBrackets";
public final static String MATCHING_BRACKETS_COLOR= "matchingBracketsColor";
protected ISelectionChangedListener fStatusLineClearer;
protected ISavePolicy fSavePolicy;
private JavaEditorErrorTickUpdater fJavaEditorErrorTickUpdater;
private BracketHighlighter fBracketHighlighter;
/**
* Creates a new compilation unit editor.
*/
|
9,741 |
Bug 9741 Organize import is gone from the context menu
|
Is this intentional?
|
resolved fixed
|
edf2d4c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-02-14T11:38:26Z | 2002-02-13T19:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public CompilationUnitEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getCompilationUnitDocumentProvider());
setEditorContextMenuId("#CompilationUnitEditorContext");
setRulerContextMenuId("#CompilationUnitRulerContext");
setOutlinerContextMenuId("#CompilationUnitOutlinerContext");
setHelpContextId(IJavaHelpContextIds.COMPILATION_UNIT_EDITOR);
fSavePolicy= null;
fJavaEditorErrorTickUpdater= new JavaEditorErrorTickUpdater(this);
}
/**
* @see AbstractTextEditor#createActions()
*/
protected void createActions() {
super.createActions();
setAction("ContentAssistProposal", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS));
setAction("ContentAssistContextInformation", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION));
setAction("AddImportOnSelection", new AddImportOnSelectionAction(this));
setAction("OrganizeImports", new OrganizeImportsAction(this));
setAction("Comment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Comment.", this, ITextOperationTarget.PREFIX));
setAction("Uncomment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX));
setAction("Format", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT));
setAction("ManageBreakpoints", new BreakpointRulerAction(getVerticalRuler(), this));
setAction("SurroundWithTryCatch", new SurroundWithTryCatchAction(this));
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.