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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/**
* Creates a source attachment form for a class file.
*/
public SourceAttachmentForm(IClassFile file) {
fFile= file;
}
/**
* Returns the package fragment root of this file.
*/
private IPackageFragmentRoot getPackageFragmentRoot(IClassFile file) {
IJavaElement element= file.getParent();
while (element != null && element.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
element= element.getParent();
return (IPackageFragmentRoot) element;
}
/**
* Creates the control of the source attachment form.
*/
public Control createControl(Composite parent) {
Display display= parent.getDisplay();
fBackgroundColor= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
fForegroundColor= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
fSeparatorColor= new Color(display, 152, 170, 203);
JFaceResources.getFontRegistry().addListener(this);
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
fScrolledComposite= new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
fScrolledComposite.setAlwaysShowScrollBars(false);
fScrolledComposite.setExpandHorizontal(true);
fScrolledComposite.setExpandVertical(true);
fScrolledComposite.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
JFaceResources.getFontRegistry().removeListener(SourceAttachmentForm.this);
fScrolledComposite= null;
fSeparatorColor.dispose();
fSeparatorColor= null;
fBannerLabels.clear();
fHeaderLabels.clear();
}
});
Composite composite= createComposite(fScrolledComposite);
composite.setLayout(new GridLayout());
Label titleLabel= createTitleLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.title"));
createLabel(composite, null);
createLabel(composite, null);
createHeadingLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.heading"));
Composite separator= createCompositeSeparator(composite);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
data.heightHint= 2;
separator.setLayoutData(data);
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
final IPackageFragmentRoot root= getPackageFragmentRoot(fFile);
if (root != null) {
if (!root.isArchive()) {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSource", fFile.getElementName()));
} else {
try {
Button button;
IPath path= root.getSourceAttachmentPath();
if (path == null) {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSourceAttachment", root.getElementName()));
createLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.message.pressButtonToAttach"));
createLabel(composite, null);
button= createButton(composite, JavaEditorMessages.getString("SourceAttachmentForm.button.attachSource"));
} else {
createLabel(composite, JavaEditorMessages.getFormattedString("SourceAttachmentForm.message.noSourceInAttachment", fFile.getElementName()));
createLabel(composite, JavaEditorMessages.getString("SourceAttachmentForm.message.pressButtonToChange"));
createLabel(composite, null);
button= createButton(composite, JavaEditorMessages.getString("SourceAttachmentForm.button.changeAttachedSource"));
}
button.setEnabled(false);
button.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent event) {
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
try {
SourceAttachmentDialog dialog= new SourceAttachmentDialog(fScrolledComposite.getShell(), root);
if (dialog.open() == SourceAttachmentDialog.OK)
verifyInput(getEditorInput());
} catch (CoreException e) {
String title= JavaEditorMessages.getString("SourceAttachmentForm.error.title");
String message= JavaEditorMessages.getString("SourceAttachmentForm.error.message");
ExceptionHandler.handle(e, fScrolledComposite.getShell(), title, message);
}
}
public void widgetDefaultSelected(SelectionEvent e) {}
});
} catch (JavaModelException e) {
String title= JavaEditorMessages.getString("SourceAttachmentForm.error.title");
String message= JavaEditorMessages.getString("SourceAttachmentForm.error.message");
ExceptionHandler.handle(e, fScrolledComposite.getShell(), title, message);
}
}
}
fScrolledComposite.setContent(composite);
fScrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return fScrolledComposite;
}
/*
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
for (Iterator iterator = fBannerLabels.iterator(); iterator.hasNext();) {
Label label = (Label) iterator.next();
label.setFont(JFaceResources.getBannerFont());
}
for (Iterator iterator = fHeaderLabels.iterator(); iterator.hasNext();) {
Label label = (Label) iterator.next();
label.setFont(JFaceResources.getHeaderFont());
}
Control control= fScrolledComposite.getContent();
fScrolledComposite.setMinSize(control.computeSize(SWT.DEFAULT, SWT.DEFAULT));
fScrolledComposite.setContent(control);
fScrolledComposite.layout(true);
fScrolledComposite.redraw();
}
private Composite createComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(fBackgroundColor);
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
return composite;
}
private Composite createCompositeSeparator(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(fSeparatorColor);
return composite;
}
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
private Label createTitleLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getHeaderFont());
fHeaderLabels.add(label);
return label;
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
private Label createHeadingLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getBannerFont());
fBannerLabels.add(label);
return label;
}
private Button createButton(Composite parent, String text) {
Button button = new Button(parent, SWT.FLAT);
button.setBackground(fBackgroundColor);
button.setForeground(fForegroundColor);
if (text != null)
button.setText(text);
return button;
}
};
private StackLayout fStackLayout;
private Composite fParent;
private Composite fViewerComposite;
private Control fSourceAttachmentForm;
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/**
* Default constructor.
*/
public ClassFileEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getClassFileDocumentProvider());
setEditorContextMenuId("#ClassFileEditorContext");
setRulerContextMenuId("#ClassFileRulerContext");
setOutlinerContextMenuId("#ClassFileOutlinerContext");
}
/*
* @see AbstractTextEditor#createActions()
*/
protected void createActions() {
super.createActions();
setAction(ITextEditorActionConstants.SAVE, null);
setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null);
/*
* 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to classfile
*
* // replace default action with class file specific ones
*
* setAction(ITextEditorActionConstants.BOOKMARK, new AddClassFileMarkerAction("AddBookmark.", this, IMarker.BOOKMARK, true));
* setAction(ITextEditorActionConstants.ADD_TASK, new AddClassFileMarkerAction("AddTask.", this, IMarker.TASK, false));
* setAction(ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS, new ClassFileMarkerRulerAction("ManageBookmarks.", getVerticalRuler(), this, IMarker.BOOKMARK, true));
* setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true));
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
*/
setAction(ITextEditorActionConstants.BOOKMARK, null);
setAction(ITextEditorActionConstants.ADD_TASK, null);
}
/*
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementAt(int offset) {
if (getEditorInput() instanceof IClassFileEditorInput) {
try {
IClassFileEditorInput input= (IClassFileEditorInput) getEditorInput();
return input.getClassFile().getElementAt(offset);
} catch (JavaModelException x) {
}
}
return null;
}
/*
* @see JavaEditor#getCorrespondingElement(IJavaElement)
*/
protected IJavaElement getCorrespondingElement(IJavaElement element) {
if (getEditorInput() instanceof IClassFileEditorInput) {
IClassFileEditorInput input= (IClassFileEditorInput) getEditorInput();
IJavaElement parent= element.getAncestor(IJavaElement.CLASS_FILE);
if (input.getClassFile().equals(parent))
return element;
}
return null;
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
}
/*
* @see IEditorPart#saveState(IMemento)
*/
public void saveState(IMemento memento) {
}
/*
* @see JavaEditor#setOutlinePageInput(JavaOutlinePage, IEditorInput)
*/
protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) {
if (page != null && input instanceof IClassFileEditorInput) {
IClassFileEditorInput cfi= (IClassFileEditorInput) input;
page.setInput(cfi.getClassFile());
}
}
/*
* 1GEPKT5: ITPJUI:Linux - Source in editor for external classes is editable
* Removed methods isSaveOnClosedNeeded and isDirty.
* Added method isEditable.
*/
/**
* @see AbstractTextEditor#isEditable()
*/
public boolean isEditable() {
return false;
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/**
* Translates the given editor input into an <code>ExternalClassFileEditorInput</code>
* if it is a file editor input representing an external class file.
*
* @param input the editor input to be transformed if necessary
* @return the transformed editor input
*/
protected IEditorInput transformEditorInput(IEditorInput input) {
if (input instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput) input).getFile();
IClassFileEditorInput classFileInput= new ExternalClassFileEditorInput(file);
if (classFileInput.getClassFile() != null)
input= classFileInput;
}
return input;
}
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/
protected void doSetInput(IEditorInput input) throws CoreException {
input= transformEditorInput(input);
if (!(input instanceof IClassFileEditorInput))
throw new CoreException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_RESOURCE_TYPE, JavaEditorMessages.getString("ClassFileEditor.error.invalid_input_message")));
super.doSetInput(input);
verifyInput(getEditorInput());
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/*
* @see IWorkbenchPart#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
fParent= new Composite(parent, SWT.NONE);
fStackLayout= new StackLayout();
fParent.setLayout(fStackLayout);
fViewerComposite= new Composite(fParent, SWT.NONE);
fViewerComposite.setLayout(new FillLayout());
super.createPartControl(fViewerComposite);
fStackLayout.topControl= fViewerComposite;
fParent.layout();
try {
verifyInput(getEditorInput());
} catch (CoreException e) {
String title= JavaEditorMessages.getString("ClassFileEditor.error.title");
String message= JavaEditorMessages.getString("ClassFileEditor.error.message");
ExceptionHandler.handle(e, fParent.getShell(), title, message);
}
}
/**
* Returns the package fragment root corresponding to the class file.
*/
private static IPackageFragmentRoot getPackageFragmentRoot(IClassFile file) {
IJavaElement element= file.getParent();
while (element != null && element.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
element= element.getParent();
return (IPackageFragmentRoot) element;
}
|
14,113 |
Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
|
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
|
verified fixed
|
e529085
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-14T17:36:17Z | 2002-04-18T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
|
/**
* Checks if the class file input has no source attached. If so, a source attachment form is shown.
*/
private void verifyInput(IEditorInput input) throws CoreException {
if (fParent == null || input == null)
return;
IClassFileEditorInput classFileEditorInput= (IClassFileEditorInput) input;
IClassFile file= classFileEditorInput.getClassFile();
if (file.getSourceRange() == null) {
if (fSourceAttachmentForm != null)
fSourceAttachmentForm.dispose();
SourceAttachmentForm form= new SourceAttachmentForm(file);
fSourceAttachmentForm= form.createControl(fParent);
fStackLayout.topControl= fSourceAttachmentForm;
fParent.layout();
} else {
if (fSourceAttachmentForm != null) {
fSourceAttachmentForm.dispose();
fSourceAttachmentForm= null;
fStackLayout.topControl= fViewerComposite;
fParent.layout();
}
}
}
}
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
/*
* (c) Copyright IBM Corp. 2000, 2002.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Set;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSourceAdapter;
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Drag support class to allow dragging of files and folder from
* the packages view to another application.
*/
class FileTransferDragAdapter extends DragSourceAdapter implements TransferDragSourceListener {
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
private ISelectionProvider fProvider;
FileTransferDragAdapter(ISelectionProvider provider) {
fProvider= provider;
Assert.isNotNull(fProvider);
}
public Transfer getTransfer() {
return FileTransfer.getInstance();
}
public void dragStart(DragSourceEvent event) {
event.doit= isDragable(fProvider.getSelection());
}
private boolean isDragable(ISelection selection) {
if (selection instanceof IStructuredSelection) {
for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
Object element= iter.next();
if (element instanceof IPackageFragment) {
return false;
} else if (element instanceof IJavaElement) {
IPackageFragmentRoot root= (IPackageFragmentRoot)((IJavaElement)element).getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
if (root != null && root.isArchive())
return false;
}
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
}
return true;
}
return false;
}
public void dragSetData(DragSourceEvent event){
List elements= getResources();
if (elements == null || elements.size() == 0) {
event.data= null;
return;
}
String[] result= new String[elements.size()];
Iterator iter= elements.iterator();
for(int i= 0; iter.hasNext(); i++) {
IResource resource= (IResource)iter.next();
result[i]= resource.getLocation().toOSString();
}
event.data= result;
}
public void dragFinished(DragSourceEvent event) {
if (!event.doit)
return;
if (event.detail == DND.DROP_MOVE) {
handleDropMove(event);
}
else if (event.detail == DND.DROP_NONE) {
handleRefresh(event);
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
}
}
private void handleDropMove(DragSourceEvent event) {
final List elements= getResources();
if (elements == null || elements.size() == 0)
return;
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
public void execute(IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask(PackagesMessages.getString("DragAdapter.deleting"), elements.size());
MultiStatus status= createMultiStatus();
Iterator iter= elements.iterator();
while(iter.hasNext()) {
IResource resource= (IResource)iter.next();
try {
monitor.subTask(resource.getFullPath().toOSString());
resource.delete(true, null);
} catch (CoreException e) {
status.add(e.getStatus());
} finally {
monitor.worked(1);
}
}
if (!status.isOK()) {
throw new CoreException(status);
}
} finally {
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
monitor.done();
}
}
};
runOperation(op, true, false);
}
private void handleRefresh(DragSourceEvent event) {
final Set roots= collectRoots(getResources());
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
public void execute(IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask(PackagesMessages.getString("DragAdapter.refreshing"), roots.size());
MultiStatus status= createMultiStatus();
Iterator iter= roots.iterator();
while (iter.hasNext()) {
IResource r= (IResource)iter.next();
try {
r.refreshLocal(IResource.DEPTH_ONE, new SubProgressMonitor(monitor, 1));
} catch (CoreException e) {
status.add(e.getStatus());
}
}
if (!status.isOK()) {
throw new CoreException(status);
}
} finally {
monitor.done();
}
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
}
};
runOperation(op, true, false);
}
protected Set collectRoots(final List elements) {
final Set roots= new HashSet(10);
Iterator iter= elements.iterator();
while (iter.hasNext()) {
IResource resource= (IResource)iter.next();
IResource parent= resource.getParent();
if (parent == null) {
roots.add(resource);
} else {
roots.add(parent);
}
}
return roots;
}
private List getResources() {
ISelection s= fProvider.getSelection();
if (!(s instanceof IStructuredSelection))
return null;
List result= new ArrayList(10);
Iterator iter= ((IStructuredSelection)s).iterator();
while (iter.hasNext()) {
Object o= iter.next();
|
15,638 |
Bug 15638 Drag & Drop: Packages view doesn't update on move
|
Build: 20020508 If I move a file from the packages view using drag & drop, the packages view does not update to show that the file has been removed. After I refresh the packages view shows the file is no longer there.
|
resolved fixed
|
71efaac
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T10:01:07Z | 2002-05-09T16:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDragAdapter.java
|
IResource r= null;
if (o instanceof IResource) {
r= (IResource)o;
} else if (o instanceof IAdaptable) {
r= (IResource)((IAdaptable)o).getAdapter(IResource.class);
}
if (r != null)
result.add(r);
}
return result;
}
private MultiStatus createMultiStatus() {
return new MultiStatus(JavaPlugin.getPluginId(),
IStatus.OK, PackagesMessages.getString("DragAdapter.problem"), null);
}
private void runOperation(IRunnableWithProgress op, boolean fork, boolean cancelable) {
try {
Shell parent= JavaPlugin.getActiveWorkbenchShell();
new ProgressMonitorDialog(parent).run(fork, cancelable, op);
} catch (InvocationTargetException e) {
String message= PackagesMessages.getString("DragAdapter.problem");
String title= PackagesMessages.getString("DragAdapter.problemTitle");
ExceptionHandler.handle(e, title, message);
} catch (InterruptedException e) {
}
}
}
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoPackageAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
class GotoPackageAction extends Action {
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoPackageAction.java
|
private PackageExplorerPart fPackageExplorer;
private EmptyInnerPackageFilter fFilter;
GotoPackageAction(PackageExplorerPart part) {
super(PackagesMessages.getString("GotoPackage.action.label"));
setDescription(PackagesMessages.getString("GotoPackage.action.description"));
fPackageExplorer= part;
fFilter= new EmptyInnerPackageFilter();
}
public void run() {
try {
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoPackageAction.java
|
Shell shell= JavaPlugin.getActiveWorkbenchShell();
SelectionDialog dialog= createAllPackagesDialog(shell);
dialog.setTitle(PackagesMessages.getString("GotoPackage.dialog.title"));
dialog.setMessage(PackagesMessages.getString("GotoPackage.dialog.message"));
dialog.open();
Object[] res= dialog.getResult();
if (res != null && res.length == 1)
gotoPackage((IPackageFragment)res[0]);
} catch (JavaModelException e) {
}
}
SelectionDialog createAllPackagesDialog(Shell shell) throws JavaModelException{
ElementListSelectionDialog dialog= new ElementListSelectionDialog(
shell,
new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_ROOT|JavaElementLabelProvider.SHOW_POST_QUALIFIED)
);
dialog.setIgnoreCase(false);
dialog.setElements(collectPackages());
return dialog;
}
Object[] collectPackages() throws JavaModelException {
IWorkspaceRoot wsroot= JavaPlugin.getWorkspace().getRoot();
IJavaModel model= JavaCore.create(wsroot);
IJavaProject[] projects= model.getJavaProjects();
Set set= new HashSet();
List allPackages= new ArrayList();
for (int i= 0; i < projects.length; i++) {
IPackageFragmentRoot[] roots= projects[i].getPackageFragmentRoots();
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoPackageAction.java
|
for (int j= 0; j < roots.length; j++) {
IPackageFragmentRoot root= roots[j];
if (root.isArchive() && !showLibraries())
continue;
if (!set.contains(root)) {
set.add(root);
IJavaElement[] packages= root.getChildren();
appendPackages(allPackages, packages);
}
}
}
return allPackages.toArray();
}
void appendPackages(List all, IJavaElement[] packages) {
for (int i= 0; i < packages.length; i++) {
IJavaElement element= packages[i];
if (fFilter.select(null, null, element))
all.add(element);
}
}
void gotoPackage(IPackageFragment p) {
fPackageExplorer.selectReveal(new StructuredSelection(p));
}
boolean showLibraries() {
return fPackageExplorer.getLibraryFilter().getShowLibraries();
}
}
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoTypeAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
class GotoTypeAction extends Action {
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoTypeAction.java
|
private PackageExplorerPart fPackageExplorer;
GotoTypeAction(PackageExplorerPart part) {
super();
setText(PackagesMessages.getString("GotoType.action.label"));
setDescription(PackagesMessages.getString("GotoType.action.description"));
fPackageExplorer= part;
}
public void run() {
Shell shell= JavaPlugin.getActiveWorkbenchShell();
SelectionDialog dialog= null;
try {
dialog= JavaUI.createTypeDialog(shell, new ProgressMonitorDialog(shell),
SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_TYPES, false);
} catch (JavaModelException e) {
String title= PackagesMessages.getString("GotoType.dialog.title");
String message= PackagesMessages.getString("GotoType.error.message");
ExceptionHandler.handle(e, title, message);
return;
}
dialog.setTitle(PackagesMessages.getString("GotoType.dialog.title"));
dialog.setMessage(PackagesMessages.getString("GotoType.dialog.message"));
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/GotoTypeAction.java
|
if (dialog.open() == IDialogConstants.CANCEL_ID) {
return;
}
Object[] types= dialog.getResult();
if (types != null && types.length > 0) {
gotoType((IType) types[0]);
}
}
private void gotoType(IType type) {
ICompilationUnit cu= (ICompilationUnit) type.getAncestor(IJavaElement.COMPILATION_UNIT);
IJavaElement element= null;
if (cu != null) {
if (cu.isWorkingCopy())
element= cu.getOriginalElement();
else
element= cu;
}
else {
element= type.getAncestor(IJavaElement.CLASS_FILE);
}
if (element != null) {
PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
if (view != null) {
view.selectReveal(new StructuredSelection(element));
}
}
}
}
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.internal.ui.packageview;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.MoveResourceAction;
import org.eclipse.ui.actions.NewWizardMenu;
import org.eclipse.ui.actions.OpenInNewWindowAction;
import org.eclipse.ui.actions.RefreshAction;
import org.eclipse.ui.actions.RenameResourceAction;
import org.eclipse.ui.views.framelist.BackAction;
import org.eclipse.ui.views.framelist.ForwardAction;
import org.eclipse.ui.views.framelist.FrameList;
import org.eclipse.ui.views.framelist.GoIntoAction;
import org.eclipse.ui.views.framelist.UpAction;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IOpenable;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.JavaUI;
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
import org.eclipse.jdt.ui.actions.BuildActionGroup;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.ImportActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.JdtActionConstants;
import org.eclipse.jdt.ui.actions.MemberFilterActionGroup;
import org.eclipse.jdt.ui.actions.NavigateActionGroup;
import org.eclipse.jdt.ui.actions.OpenAction;
import org.eclipse.jdt.ui.actions.ProjectActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jdt.ui.actions.ShowActionGroup;
public class PackageExplorerActionGroup extends CompositeActionGroup implements ISelectionChangedListener {
private PackageExplorerPart fPart;
private GoIntoAction fZoomInAction;
private BackAction fBackAction;
private ForwardAction fForwardAction;
private UpAction fUpAction;
private GotoTypeAction fGotoTypeAction;
private GotoPackageAction fGotoPackageAction;
private RenameResourceAction fRenameResourceAction;
private MoveResourceAction fMoveResourceAction;
private NavigateActionGroup fNavigateActionGroup;
private BuildActionGroup fBuildActionGroup;
private CCPActionGroup fCCPActionGroup;
private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup;
private MemberFilterActionGroup fMemberFilterActionGroup;
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
private ShowLibrariesAction fShowLibrariesAction;
private FilterSelectionAction fFilterAction;
public PackageExplorerActionGroup(PackageExplorerPart part) {
super();
fPart= part;
IWorkbenchPartSite site = fPart.getSite();
Shell shell= site.getShell();
ISelectionProvider provider= site.getSelectionProvider();
IStructuredSelection selection= (IStructuredSelection) provider.getSelection();
setGroups(new ActionGroup[] {
fNavigateActionGroup= new NavigateActionGroup(fPart),
new ShowActionGroup(fPart),
fCCPActionGroup= new CCPActionGroup(fPart),
new RefactorActionGroup(fPart),
new ImportActionGroup(fPart),
new GenerateActionGroup(fPart),
fBuildActionGroup= new BuildActionGroup(fPart),
new JavaSearchActionGroup(fPart),
new ProjectActionGroup(fPart),
fWorkingSetFilterActionGroup= new WorkingSetFilterActionGroup(part.getViewer(), JavaUI.ID_PACKAGES, shell, createTitleUpdater())});
PackagesFrameSource frameSource= new PackagesFrameSource(fPart);
FrameList frameList= new FrameList(frameSource);
frameSource.connectTo(frameList);
fZoomInAction= new GoIntoAction(frameList);
fBackAction= new BackAction(frameList);
fForwardAction= new ForwardAction(frameList);
fUpAction= new UpAction(frameList);
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
fRenameResourceAction= new RenameResourceAction(shell);
fMoveResourceAction= new MoveResourceAction(shell);
fGotoTypeAction= new GotoTypeAction(fPart);
fGotoPackageAction= new GotoPackageAction(fPart);
fMemberFilterActionGroup= new MemberFilterActionGroup(fPart.getViewer(), "PackageView");
fShowLibrariesAction = new ShowLibrariesAction(fPart, PackagesMessages.getString("PackageExplorer.referencedLibs"));
fFilterAction = new FilterSelectionAction(shell, fPart, PackagesMessages.getString("PackageExplorer.filters"));
provider.addSelectionChangedListener(this);
update(selection);
}
public void dispose() {
ISelectionProvider provider= fPart.getSite().getSelectionProvider();
provider.removeSelectionChangedListener(this);
super.dispose();
}
public void selectionChanged(SelectionChangedEvent event) {
fRenameResourceAction.selectionChanged(event);
fMoveResourceAction.selectionChanged(event);
IStructuredSelection selection= (IStructuredSelection)event.getSelection();
update(selection);
}
private void update(IStructuredSelection selection) {
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
int size= selection.size();
Object element= selection.getFirstElement();
IActionBars actionBars= fPart.getViewSite().getActionBars();
if (size == 1 && element instanceof IResource) {
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.RENAME, fRenameResourceAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.MOVE, fMoveResourceAction);
} else {
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.RENAME, null);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.MOVE, null);
}
actionBars.updateActionBars();
}
void restoreState(IMemento memento) {
fMemberFilterActionGroup.restoreState(memento);
fWorkingSetFilterActionGroup.restoreState(memento);
}
void saveState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
fWorkingSetFilterActionGroup.saveState(memento);
}
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
setGlobalActionHandlers(actionBars);
fillToolBar(actionBars.getToolBarManager());
fillViewMenu(actionBars.getMenuManager());
}
private void setGlobalActionHandlers(IActionBars actionBars) {
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_INTO, fZoomInAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.BACK, fBackAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.FORWARD, fForwardAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.UP, fUpAction);
actionBars.setGlobalActionHandler(JdtActionConstants.GOTO_TYPE, fGotoTypeAction);
actionBars.setGlobalActionHandler(JdtActionConstants.GOTO_PACKAGE, fGotoPackageAction);
}
void fillToolBar(IToolBarManager toolBar) {
toolBar.removeAll();
toolBar.add(fBackAction);
toolBar.add(fForwardAction);
toolBar.add(fUpAction);
if (JavaBasePreferencePage.showCompilationUnitChildren()) {
toolBar.add(new Separator());
fMemberFilterActionGroup.contributeToToolBar(toolBar);
}
}
void fillViewMenu(IMenuManager menu) {
menu.add(fFilterAction);
menu.add(fShowLibrariesAction);
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end"));
}
void handleSelectionChanged(SelectionChangedEvent event) {
fZoomInAction.update();
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
}
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection= (IStructuredSelection)getContext().getSelection();
int size= selection.size();
Object element= selection.getFirstElement();
IJavaElement jElement= element instanceof IJavaElement ? (IJavaElement)element : null;
if (size == 0 || (size == 1 && (isNewTarget(jElement) || element instanceof IContainer))) {
IMenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new"));
menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu);
new NewWizardMenu(newMenu, fPart.getSite().getWorkbenchWindow(), false);
}
addGotoMenu(menu, element, size);
addOpenNewWindowAction(menu, element);
super.fillContextMenu(menu);
}
private void addGotoMenu(IMenuManager menu, Object element, int size) {
if (size == 1 && fPart.getViewer().isExpandable(element) && (isGoIntoTarget(element) || element instanceof IContainer))
menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, fZoomInAction);
}
private boolean isNewTarget(IJavaElement element) {
if (element == null)
return false;
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
int type= element.getElementType();
return type == IJavaElement.JAVA_PROJECT ||
type == IJavaElement.PACKAGE_FRAGMENT_ROOT ||
type == IJavaElement.PACKAGE_FRAGMENT ||
type == IJavaElement.COMPILATION_UNIT ||
type == IJavaElement.TYPE;
}
private boolean isGoIntoTarget(Object element) {
if (element == null)
return false;
if (element instanceof IJavaElement) {
int type= ((IJavaElement)element).getElementType();
return type == IJavaElement.JAVA_PROJECT ||
type == IJavaElement.PACKAGE_FRAGMENT_ROOT ||
type == IJavaElement.PACKAGE_FRAGMENT;
}
return false;
}
private void addOpenNewWindowAction(IMenuManager menu, Object element) {
if (element instanceof IJavaElement) {
try {
element= ((IJavaElement)element).getCorrespondingResource();
} catch(JavaModelException e) {
}
}
if (!(element instanceof IContainer))
return;
menu.appendToGroup(
IContextMenuConstants.GROUP_OPEN,
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
new OpenInNewWindowAction(fPart.getSite().getWorkbenchWindow(), (IContainer)element));
}
void handleDoubleClick(DoubleClickEvent event) {
TreeViewer viewer= fPart.getViewer();
Object element= ((IStructuredSelection)event.getSelection()).getFirstElement();
if (viewer.isExpandable(element)) {
if (JavaBasePreferencePage.doubleClickGoesInto()) {
if (element instanceof IOpenable &&
!(element instanceof ICompilationUnit) &&
!(element instanceof IClassFile)) {
fZoomInAction.run();
}
} else {
viewer.setExpandedState(element, !viewer.getExpandedState(element));
}
}
}
void handleOpen(OpenEvent event) {
OpenAction openAction= fNavigateActionGroup.getOpenAction();
if (openAction != null && openAction.isEnabled()) {
openAction.run();
return;
}
}
void handleKeyEvent(KeyEvent event) {
if (event.stateMask != 0)
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
return;
if (event.keyCode == SWT.F5) {
RefreshAction action= fBuildActionGroup.getRefreshAction();
if (action.isEnabled())
action.run();
} else if (event.character == SWT.DEL) {
IAction delete= fCCPActionGroup.getDeleteAction();
if (delete.isEnabled())
delete.run();
}
}
private IPropertyChangeListener createTitleUpdater() {
return new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String property= event.getProperty();
if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property)) {
IWorkingSet workingSet= (IWorkingSet)event.getNewValue();
String workingSetName= null;
if (workingSet != null)
workingSetName= workingSet.getName();
fPart.setWorkingSetName(workingSetName);
fPart.updateTitle();
}
}
};
}
}
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.Iterator;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.ExportResourcesAction;
import org.eclipse.ui.actions.ImportResourcesAction;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group to add the Import and Export action to a view part's
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
|
* context menu.
*
* @sine 2.0
*/
public class ImportActionGroup extends ActionGroup {
private static final String GROUP_IMPORT= "group.import";
private ImportResourcesAction fImportAction;
private ExportResourcesAction fExportAction;
/**
* Creates a new <code>ImportActionGroup</code>.
*
* @param part the view part that owns this action group
*/
public ImportActionGroup(IViewPart part) {
IWorkbench workbench = part.getSite().getWorkbenchWindow().getWorkbench();
fImportAction= new ImportResourcesAction(workbench);
fExportAction= new ExportResourcesAction(workbench);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection= getStructuredSelection();
if (selection == null)
return;
if (checkSelection(selection)) {
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new Separator(GROUP_IMPORT));
menu.appendToGroup(GROUP_IMPORT, fImportAction);
|
9,112 |
Bug 9112 goto type presents items not visible
|
stable 20020125 In the packages view Choose Go To > Type from the popup The resulting dialog displays things you cannot go to - it shows classes in referenced libraries even if you are not currenrtly showing referenced libraries - it shows classes not in your working set As a result if you pick that class nothing actually happens and you don't know why. Some options (food for thought): - filter the dialog (classes in current view vs. all classes) - let the user pick it then warn him its not in his current view and offer to change the view
|
resolved fixed
|
4824d92
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-15T12:04:47Z | 2002-02-05T17:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
|
menu.appendToGroup(GROUP_IMPORT, fExportAction);
}
super.fillContextMenu(menu);
}
private void appendToGroup(IMenuManager menu, IAction action) {
if (action.isEnabled())
menu.appendToGroup(GROUP_IMPORT, action);
}
private IStructuredSelection getStructuredSelection() {
ISelection selection= getContext().getSelection();
if (selection instanceof IStructuredSelection)
return (IStructuredSelection)selection;
return null;
}
private boolean checkSelection(IStructuredSelection selection) {
for (Iterator iter= selection.iterator(); iter.hasNext();) {
Object element= (Object) iter.next();
if (!(element instanceof IJavaElement))
return false;
int type= ((IJavaElement)element).getElementType();
if (type != IJavaElement.JAVA_PROJECT && type != IJavaElement.PACKAGE_FRAGMENT_ROOT && type != IJavaElement.PACKAGE_FRAGMENT)
return false;
}
return true;
}
}
|
14,680 |
Bug 14680 Compare unreadable in high contrast black
|
If you are in High Contrast Black the differences in the Compare browser are shown in Grey - this is unreadable with White text. STEPS 1) Change your system colors to High Contrast Black 2) Compare two editions of a project from a repository 3) Select one of the differences - all of the highlights are shown with a grey background which is unreadable with white text.
|
resolved fixed
|
f15094c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T11:06:55Z | 2002-04-25T21:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.contentmergeviewer.ITokenComparator;
import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
public class JavaMergeViewer extends TextMergeViewer {
|
14,680 |
Bug 14680 Compare unreadable in high contrast black
|
If you are in High Contrast Black the differences in the Compare browser are shown in Grey - this is unreadable with White text. STEPS 1) Change your system colors to High Contrast Black 2) Compare two editions of a project from a repository 3) Select one of the differences - all of the highlights are shown with a grey background which is unreadable with white text.
|
resolved fixed
|
f15094c
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T11:06:55Z | 2002-04-25T21:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java
|
public JavaMergeViewer(Composite parent, int styles, CompareConfiguration mp) {
super(parent, styles, mp);
}
public String getTitle() {
return CompareMessages.getString("JavaMergeViewer.title");
}
protected ITokenComparator createTokenComparator(String s) {
return new JavaTokenComparator(s, true);
}
protected IDocumentPartitioner getDocumentPartitioner() {
return JavaCompareUtilities.createJavaPartitioner();
}
protected void configureTextViewer(TextViewer textViewer) {
if (textViewer instanceof SourceViewer) {
JavaTextTools tools= JavaCompareUtilities.getJavaTextTools();
if (tools != null)
((SourceViewer)textViewer).configure(new JavaSourceViewerConfiguration(tools, null));
}
}
}
|
16,075 |
Bug 16075 Strange Cut/Copy and Paste behavior
|
I was trying to move to compilation units from one project to another in the Java Browsing perspective. I selected them in the types brwoser and selected Cut. I then tried to Paste them in another package by selecting the target package in the packages view but paste wasn't enabled. I tried to paste them in the navigator and was told that the resource no longer existed. After restoring the files from local history, I chose Copy instead and Pasted into the new package. I had two entries for each file pasted.
|
resolved fixed
|
5032af8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T11:54:09Z | 2002-05-15T19:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/CutSourceReferencesToClipboardAction.java
|
package org.eclipse.jdt.internal.ui.reorg;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.jdt.internal.corext.refactoring.Assert;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
public class CutSourceReferencesToClipboardAction extends SourceReferenceAction {
CopySourceReferencesToClipboardAction fCopy;
DeleteSourceReferencesAction fDelete;
protected CutSourceReferencesToClipboardAction(IWorkbenchSite site, Clipboard clipboard) {
super(site);
setText(ReorgMessages.getString("CutSourceReferencesToClipboardAction.cut"));
fCopy= new CopySourceReferencesToClipboardAction(site, clipboard);
fDelete= new DeleteSourceReferencesAction(site);
update(getSelection());
}
protected void perform(IStructuredSelection selection) throws CoreException {
fCopy.perform(selection);
fDelete.perform(selection);
}
protected void selectionChanged(IStructuredSelection selection) {
fCopy.selectionChanged(selection);
fDelete.selectionChanged(selection);
setEnabled(fCopy.isEnabled() && fDelete.isEnabled());
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13: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.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
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;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
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;
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.ISourceViewer;
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.WorkbenchHelp;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
import org.eclipse.jdt.ui.text.IJavaColorConstants;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.java.ExperimentalPreference;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
/*
* The page for setting the editor options.
*/
public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
public static final String BOLD= "_bold";
public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] {
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT),
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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),
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.STRING, CompilationUnitEditor.CURRENT_LINE_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.CURRENT_LINE),
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PRINT_MARGIN_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, CompilationUnitEditor.PRINT_MARGIN_COLUMN),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PRINT_MARGIN),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.LINKED_POSITION_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PROBLEM_INDICATION_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PROBLEM_INDICATION),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, WorkInProgressPreferencePage.PREF_SHOW_TEMP_PROBLEMS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.OVERVIEW_RULER),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, JavaEditor.LINE_NUMBER_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, JavaEditor.LINE_NUMBER_RULER),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.SPACES_FOR_TABS),
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),
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_IMPORT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ExperimentalPreference.CODE_ASSIST_EXPERIMENTAL)
};
private final String[][] fSyntaxColorListModel= new String[][] {
{ JavaUIMessages.getString("JavaEditorPreferencePage.multiLineComment"), IJavaColorConstants.JAVA_MULTI_LINE_COMMENT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.singleLineComment"), IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.keywords"), IJavaColorConstants.JAVA_KEYWORD },
{ JavaUIMessages.getString("JavaEditorPreferencePage.strings"), IJavaColorConstants.JAVA_STRING },
{ JavaUIMessages.getString("JavaEditorPreferencePage.others"), IJavaColorConstants.JAVA_DEFAULT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocKeywords"), IJavaColorConstants.JAVADOC_KEYWORD },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocHtmlTags"), IJavaColorConstants.JAVADOC_TAG },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocLinks"), IJavaColorConstants.JAVADOC_LINK },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocOthers"), IJavaColorConstants.JAVADOC_DEFAULT }
};
private final String[][] fAppearanceColorListModel= new String[][] {
{"Line number foreground", JavaEditor.LINE_NUMBER_COLOR},
{"Matching brackets highlight", CompilationUnitEditor.MATCHING_BRACKETS_COLOR},
{"Current line highlight", CompilationUnitEditor.CURRENT_LINE_COLOR},
{"Problems highlight", CompilationUnitEditor.PROBLEM_INDICATION_COLOR},
{"Print margin", CompilationUnitEditor.PRINT_MARGIN_COLOR},
{"Find scope", AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE},
{"Linked position", CompilationUnitEditor.LINKED_POSITION_COLOR},
};
private OverlayPreferenceStore fOverlayStore;
private JavaTextTools fJavaTextTools;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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) {
}
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 ArrayList fNumberFields= new ArrayList();
private ModifyListener fNumberFieldListener= new ModifyListener() {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void modifyText(ModifyEvent e) {
numberFieldChanged((Text) e.widget);
}
};
private WorkbenchChainedTextFontFieldEditor fFontEditor;
private List fSyntaxColorList;
private List fAppearanceColorList;
private ColorEditor fSyntaxForegroundColorEditor;
private ColorEditor fAppearanceForegroundColorEditor;
private ColorEditor fBackgroundColorEditor;
private Button fBackgroundDefaultRadioButton;
private Button fBackgroundCustomRadioButton;
private Button fBackgroundColorButton;
private Button fBoldCheckBox;
private SourceViewer fPreviewViewer;
private Color fBackgroundColor;
public JavaEditorPreferencePage() {
setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description"));
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
}
public static void initDefaults(IPreferenceStore store) {
/*
* Ensure that the display is accessed only in the UI thread.
* Ensure that there are no side effects of switching the thread.
*/
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
final RGB[] rgbs= new RGB[3];
final Display display= Display.getDefault();
display.syncExec(new Runnable() {
public void run() {
Color c= display.getSystemColor(SWT.COLOR_GRAY);
rgbs[0]= c.getRGB();
c= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
rgbs[1]= c.getRGB();
c= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
rgbs[2]= c.getRGB();
}
});
/*
* Go on in whatever thread this is.
*/
store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true);
PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, rgbs[0]);
store.setDefault(CompilationUnitEditor.CURRENT_LINE, true);
PreferenceConverter.setDefault(store, CompilationUnitEditor.CURRENT_LINE_COLOR, new RGB(225, 235, 224));
store.setDefault(CompilationUnitEditor.PRINT_MARGIN, false);
store.setDefault(CompilationUnitEditor.PRINT_MARGIN_COLUMN, 80);
PreferenceConverter.setDefault(store, CompilationUnitEditor.PRINT_MARGIN_COLOR, new RGB(176, 180 , 185));
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE, new RGB(185, 176 , 180));
store.setDefault(CompilationUnitEditor.PROBLEM_INDICATION, true);
store.setDefault(WorkInProgressPreferencePage.PREF_SHOW_TEMP_PROBLEMS, false);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
PreferenceConverter.setDefault(store, CompilationUnitEditor.PROBLEM_INDICATION_COLOR, new RGB(255, 0 , 128));
store.setDefault(CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS, true);
store.setDefault(CompilationUnitEditor.OVERVIEW_RULER, true);
store.setDefault(JavaEditor.LINE_NUMBER_RULER, false);
PreferenceConverter.setDefault(store, JavaEditor.LINE_NUMBER_COLOR, new RGB(0, 0, 0));
WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
PreferenceConverter.setDefault(store, CompilationUnitEditor.LINKED_POSITION_COLOR, new RGB(0, 200 , 100));
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, rgbs[1]);
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true);
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, rgbs[2]);
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
store.setDefault(JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4);
store.setDefault(CompilationUnitEditor.SPACES_FOR_TABS, false);
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);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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));
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, true);
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);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false);
store.setDefault(ContentAssistPreference.ADD_IMPORT, true);
store.setDefault(ExperimentalPreference.CODE_ASSIST_EXPERIMENTAL, false);
}
/*
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
}
/*
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
private void handleSyntaxColorListSelection() {
int i= fSyntaxColorList.getSelectionIndex();
String key= fSyntaxColorListModel[i][1];
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
fSyntaxForegroundColorEditor.setColorValue(rgb);
fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD));
}
private void handleAppearanceColorListSelection() {
int i= fAppearanceColorList.getSelectionIndex();
String key= fAppearanceColorListModel[i][1];
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
fAppearanceForegroundColorEditor.setColorValue(rgb);
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private Control createColorPage(Composite parent) {
Composite colorComposite= new Composite(parent, SWT.NULL);
colorComposite.setLayout(new GridLayout());
Composite backgroundComposite= new Composite(colorComposite, SWT.NULL);
backgroundComposite.setLayout(new RowLayout());
Label label= new Label(backgroundComposite, SWT.NULL);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.backgroundColor"));
SelectionListener backgroundSelectionListener= new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
boolean custom= fBackgroundCustomRadioButton.getSelection();
fBackgroundColorButton.setEnabled(custom);
fOverlayStore.setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom);
}
public void widgetDefaultSelected(SelectionEvent e) {}
};
fBackgroundDefaultRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundDefaultRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.systemDefault"));
fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundCustomRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundCustomRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.custom"));
fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundColorEditor= new ColorEditor(backgroundComposite);
fBackgroundColorButton= fBackgroundColorEditor.getButton();
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.foreground"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite editorComposite= new Composite(colorComposite, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
GridData gd= new GridData(GridData.FILL_BOTH);
editorComposite.setLayoutData(gd);
fSyntaxColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fSyntaxColorList.setLayoutData(gd);
Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
stylesComposite.setLayout(layout);
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fSyntaxForegroundColorEditor= new ColorEditor(stylesComposite);
Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.bold"));
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
fBoldCheckBox.setLayoutData(gd);
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.preview"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Control previewer= createPreviewer(colorComposite);
gd= new GridData(GridData.FILL_BOTH);
gd.widthHint= convertWidthInCharsToPixels(80);
gd.heightHint= convertHeightInCharsToPixels(15);
previewer.setLayoutData(gd);
fSyntaxColorList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleSyntaxColorListSelection();
}
});
foregroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
public void widgetSelected(SelectionEvent e) {
int i= fSyntaxColorList.getSelectionIndex();
String key= fSyntaxColorListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue());
}
});
fBackgroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
PreferenceConverter.setValue(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, fBackgroundColorEditor.getColorValue());
}
});
fBoldCheckBox.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
int i= fSyntaxColorList.getSelectionIndex();
String key= fSyntaxColorListModel[i][1];
fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection());
}
});
return colorComposite;
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private Control createPreviewer(Composite parent) {
fJavaTextTools= new JavaTextTools(fOverlayStore);
fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null));
fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
fPreviewViewer.setEditable(false);
initializeViewerColors(fPreviewViewer);
String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt");
IDocument document= new Document(content);
IDocumentPartitioner partitioner= fJavaTextTools.createDocumentPartitioner();
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
fPreviewViewer.setDocument(document);
fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String p= event.getProperty();
if (p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND) ||
p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT))
{
initializeViewerColors(fPreviewViewer);
}
fPreviewViewer.invalidateTextPresentation();
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
});
return fPreviewViewer.getControl();
}
/**
* Initializes the given viewer's colors.
*
* @param viewer the viewer to be initialized
*/
private void initializeViewerColors(ISourceViewer viewer) {
IPreferenceStore store= fOverlayStore;
if (store != null) {
StyledText styledText= viewer.getTextWidget();
Color color= store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
? null
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
styledText.setBackground(color);
if (fBackgroundColor != null)
fBackgroundColor.dispose();
fBackgroundColor= color;
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
/**
* Creates a color from the information stored in the given preference store.
* Returns <code>null</code> if there is no such information available.
*/
private Color createColor(IPreferenceStore store, String key, Display display) {
RGB rgb= null;
if (store.contains(key)) {
if (store.isDefault(key))
rgb= PreferenceConverter.getDefaultColor(store, key);
else
rgb= PreferenceConverter.getColor(store, key);
if (rgb != null)
return new Color(display, rgb);
}
return null;
}
private static void setEnabled(Control control, boolean enable) {
control.setEnabled(enable);
if (control instanceof Composite) {
Composite composite= (Composite) control;
Control[] children= composite.getChildren();
for (int i= 0; i < children.length; i++)
setEnabled(children[i], enable);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
}
private Control createBehaviorPage(Composite parent) {
Composite behaviorComposite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
behaviorComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.textFont");
addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT);
label= JavaUIMessages.getString("JavaEditorPreferencePage.displayedTabWidth");
addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 3, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColumn");
addTextField(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN_COLUMN, 3, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.SPACES_FOR_TABS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showProblemsBeforeCompiling");
addCheckBox(behaviorComposite, label, CompilationUnitDocumentProvider.HANDLE_TEMPORARY_PROBLEMS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightProblems");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.PROBLEM_INDICATION, 0);
label= "&Indicate problems solvable with Quick Fix in vertical ruler";
addCheckBox(behaviorComposite, label, WorkInProgressPreferencePage.PREF_SHOW_TEMP_PROBLEMS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOverviewRuler");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.OVERVIEW_RULER, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showLineNumbers");
addCheckBox(behaviorComposite, label, JavaEditor.LINE_NUMBER_RULER, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightMatchingBrackets");
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightCurrentLine");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.CURRENT_LINE, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showPrintMargin");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN, 0);
Label l= new Label(behaviorComposite, SWT.LEFT);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
l.setLayoutData(gd);
l= new Label(behaviorComposite, SWT.LEFT);
l.setText("Appearance color options:");
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
l.setLayoutData(gd);
Composite editorComposite= new Composite(behaviorComposite, SWT.NONE);
layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
gd.horizontalSpan= 2;
editorComposite.setLayoutData(gd);
fAppearanceColorList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fAppearanceColorList.setLayoutData(gd);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
stylesComposite.setLayout(layout);
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
l= new Label(stylesComposite, SWT.LEFT);
l.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
l.setLayoutData(gd);
fAppearanceForegroundColorEditor= new ColorEditor(stylesComposite);
Button foregroundColorButton= fAppearanceForegroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
fAppearanceColorList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleAppearanceColorListSelection();
}
});
foregroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
public void widgetSelected(SelectionEvent e) {
int i= fAppearanceColorList.getSelectionIndex();
String key= fAppearanceColorListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fAppearanceForegroundColorEditor.getColorValue());
}
});
return behaviorComposite;
}
private Control createContentAssistPage(Composite parent) {
Composite contentAssistComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
contentAssistComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSingleProposalsAutomatically");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOnlyProposalsVisibleInTheInvocationContext");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.presentProposalsInAlphabeticalOrder");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.enableAutoActivation");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.automaticallyAddImportInsteadOfQualifiedName");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= "&Fill argument names on method completion";
addCheckBox(contentAssistComposite, label, ExperimentalPreference.CODE_ASSIST_EXPERIMENTAL, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationDelay");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJava");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 4, 0, false);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJavaDoc");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 4, 0, false);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForMethodParameters");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForMethodParameters");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0);
return contentAssistComposite;
}
/*
* @see PreferencePage#createContents(Composite)
*/
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
protected Control createContents(Composite parent) {
fOverlayStore.load();
fOverlayStore.start();
TabFolder folder= new TabFolder(parent, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.general"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createBehaviorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.colors"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createColorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.codeAssist"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createContentAssistPage(folder));
initialize();
return folder;
}
private void initialize() {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fFontEditor.setPreferenceStore(getPreferenceStore());
fFontEditor.setPreferencePage(this);
fFontEditor.load();
initializeFields();
for (int i= 0; i < fSyntaxColorListModel.length; i++)
fSyntaxColorList.add(fSyntaxColorListModel[i][0]);
fSyntaxColorList.getDisplay().asyncExec(new Runnable() {
public void run() {
fSyntaxColorList.select(0);
handleSyntaxColorListSelection();
}
});
for (int i= 0; i < fAppearanceColorListModel.length; i++)
fAppearanceColorList.add(fAppearanceColorListModel[i][0]);
fAppearanceColorList.getDisplay().asyncExec(new Runnable() {
public void run() {
fAppearanceColorList.select(0);
handleAppearanceColorListSelection();
}
});
}
private void initializeFields() {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
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));
}
RGB rgb= PreferenceConverter.getColor(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
fBackgroundColorEditor.setColorValue(rgb);
boolean default_= fOverlayStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
fBackgroundDefaultRadioButton.setSelection(default_);
fBackgroundCustomRadioButton.setSelection(!default_);
fBackgroundColorButton.setEnabled(!default_);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
/*
* @see PreferencePage#performOk()
*/
public boolean performOk() {
fFontEditor.store();
fOverlayStore.propagate();
JavaPlugin.getDefault().savePluginPreferences();
return true;
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fFontEditor.loadDefault();
fOverlayStore.loadDefaults();
initializeFields();
handleSyntaxColorListSelection();
handleAppearanceColorListSelection();
super.performDefaults();
fPreviewViewer.invalidateTextPresentation();
}
/*
* @see DialogPage#dispose()
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13: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 composite, String label, String key, int indentation) {
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
ColorEditor editor= new ColorEditor(composite);
Button button= editor.getButton();
button.setData(editor);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
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.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
gd.horizontalSpan= 2;
checkBox.setLayoutData(gd);
checkBox.addSelectionListener(fCheckBoxListener);
fCheckBoxes.put(checkBox, key);
return checkBox;
}
private Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalIndent= indentation;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
labelControl.setLayoutData(gd);
Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE);
gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
textControl.setLayoutData(gd);
textControl.setTextLimit(textLimit);
fTextFields.put(textControl, key);
if (isNumber) {
fNumberFields.add(textControl);
textControl.addModifyListener(fNumberFieldListener);
} else {
textControl.addModifyListener(fTextFieldListener);
}
return composite;
}
private void addTextFontEditor(Composite parent, String label, String key) {
Composite editorComposite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
editorComposite.setLayout(layout);
fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite);
fFontEditor.setChangeButtonText(JavaUIMessages.getString("JavaEditorPreferencePage.change"));
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
editorComposite.setLayoutData(gd);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
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();
}
private void numberFieldChanged(Text textControl) {
String number= textControl.getText();
IStatus status= validatePositiveNumber(number);
if (!status.matches(IStatus.ERROR))
fOverlayStore.setValue((String) fTextFields.get(textControl), number);
updateStatus(status);
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private IStatus validatePositiveNumber(String number) {
StatusInfo status= new StatusInfo();
if (number.length() == 0) {
status.setError(JavaUIMessages.getString("JavaEditorPreferencePage.empty_input"));
} else {
try {
int value= Integer.parseInt(number);
if (value < 0)
status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number));
} catch (NumberFormatException e) {
status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number));
}
}
return status;
}
private void updateStatus(IStatus status) {
if (!status.matches(IStatus.ERROR)) {
for (int i= 0; i < fNumberFields.size(); i++) {
Text text= (Text) fNumberFields.get(i);
IStatus s= validatePositiveNumber(text.getText());
status= StatusUtil.getMoreSevere(s, status);
}
}
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/WorkInProgressPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.StringFieldEditor;
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.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.text.java.ExperimentalPreference;
/*
* The page for setting 'work in progress' features preferences.
*/
public class WorkInProgressPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/WorkInProgressPreferencePage.java
|
public static final String PREF_SYNC_OUTLINE_ON_CURSOR_MOVE= "JavaEditor.SyncOutlineOnCursorMove";
public static final String PREF_SHOW_TEMP_PROBLEMS= "JavaEditor.ShowTemporaryProblem";
public WorkInProgressPreferencePage() {
super(GRID);
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("WorkInProgressPreferencePage.description"));
}
public static void initDefaults(IPreferenceStore store) {
store.setDefault(PREF_SYNC_OUTLINE_ON_CURSOR_MOVE, false);
}
/*
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.WORK_IN_PROGRESS_PREFERENCE_PAGE);
}
protected void createFieldEditors() {
Composite parent= getFieldEditorParent();
BooleanFieldEditor boolEditor;
boolEditor= new BooleanFieldEditor(
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/WorkInProgressPreferencePage.java
|
PREF_SYNC_OUTLINE_ON_CURSOR_MOVE,
"Synchronize &outline selection on cursor move",
parent
);
addField(boolEditor);
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
public static boolean synchronizeOutlineOnCursorMove() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(PREF_SYNC_OUTLINE_ON_CURSOR_MOVE);
}
public static boolean showTempProblems() {
return JavaPlugin.getDefault().getPreferenceStore().getBoolean(PREF_SHOW_TEMP_PROBLEMS);
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
JavaPlugin.getDefault().savePluginPreferences();
return super.performOk();
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jdt.ui.text.IColorManager;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor;
import org.eclipse.jdt.internal.ui.text.javadoc.JavaDocCompletionProcessor;
public class ContentAssistPreference {
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
public final static String AUTOACTIVATION= "content_assist_autoactivation";
public final static String AUTOACTIVATION_DELAY= "content_assist_autoactivation_delay";
public final static String PROPOSALS_FOREGROUND= "content_assist_proposals_foreground";
public final static String PROPOSALS_BACKGROUND= "content_assist_proposals_background";
public final static String PARAMETERS_FOREGROUND= "content_assist_parameters_foreground";
public final static String PARAMETERS_BACKGROUND= "content_assist_parameters_background";
public final static String AUTOINSERT= "content_assist_autoinsert";
public final static String AUTOACTIVATION_TRIGGERS_JAVA= "content_assist_autoactivation_triggers_java";
public final static String AUTOACTIVATION_TRIGGERS_JAVADOC= "content_assist_autoactivation_triggers_javadoc";
public final static String SHOW_VISIBLE_PROPOSALS= "content_assist_show_visible_proposals";
public final static String ORDER_PROPOSALS= "content_assist_order_proposals";
public final static String CASE_SENSITIVITY= "content_assist_case_sensitivity";
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
public final static String ADD_IMPORT= "content_assist_add_import";
private static Color getColor(IPreferenceStore store, String key, IColorManager manager) {
RGB rgb= PreferenceConverter.getColor(store, key);
return manager.getColor(rgb);
}
private static Color getColor(IPreferenceStore store, String key) {
JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
return getColor(store, key, textTools.getColorManager());
}
private static JavaCompletionProcessor getJavaProcessor(ContentAssistant assistant) {
IContentAssistProcessor p= assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
if (p instanceof JavaCompletionProcessor)
return (JavaCompletionProcessor) p;
return null;
}
private static JavaDocCompletionProcessor getJavaDocProcessor(ContentAssistant assistant) {
IContentAssistProcessor p= assistant.getContentAssistProcessor(JavaPartitionScanner.JAVA_DOC);
if (p instanceof JavaDocCompletionProcessor)
return (JavaDocCompletionProcessor) p;
return null;
}
private static void configureJavaProcessor(ContentAssistant assistant, IPreferenceStore store) {
JavaCompletionProcessor jcp= getJavaProcessor(assistant);
if (jcp == null)
return;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVA);
if (triggers != null)
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
boolean enabled= store.getBoolean(SHOW_VISIBLE_PROPOSALS);
jcp.restrictProposalsToVisibility(enabled);
enabled= store.getBoolean(CASE_SENSITIVITY);
jcp.restrictProposalsToMatchingCases(enabled);
enabled= store.getBoolean(ORDER_PROPOSALS);
jcp.orderProposalsAlphabetically(enabled);
enabled= store.getBoolean(ADD_IMPORT);
jcp.allowAddingImports(enabled);
}
private static void configureJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store) {
JavaDocCompletionProcessor jdcp= getJavaDocProcessor(assistant);
if (jdcp == null)
return;
String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC);
if (triggers != null)
jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
boolean enabled= store.getBoolean(CASE_SENSITIVITY);
jdcp.restrictProposalsToMatchingCases(enabled);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
enabled= store.getBoolean(ORDER_PROPOSALS);
jdcp.orderProposalsAlphabetically(enabled);
}
/**
* Configure the given content assistant from the given store.
*/
public static void configure(ContentAssistant assistant, IPreferenceStore store) {
JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
IColorManager manager= textTools.getColorManager();
boolean enabled= store.getBoolean(AUTOACTIVATION);
assistant.enableAutoActivation(enabled);
int delay= store.getInt(AUTOACTIVATION_DELAY);
assistant.setAutoActivationDelay(delay);
Color c= getColor(store, PROPOSALS_FOREGROUND, manager);
assistant.setProposalSelectorForeground(c);
c= getColor(store, PROPOSALS_BACKGROUND, manager);
assistant.setProposalSelectorBackground(c);
c= getColor(store, PARAMETERS_FOREGROUND, manager);
assistant.setContextInformationPopupForeground(c);
assistant.setContextSelectorForeground(c);
c= getColor(store, PARAMETERS_BACKGROUND, manager);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
assistant.setContextInformationPopupBackground(c);
assistant.setContextSelectorBackground(c);
enabled= store.getBoolean(AUTOINSERT);
assistant.enableAutoInsert(enabled);
configureJavaProcessor(assistant, store);
configureJavaDocProcessor(assistant, store);
}
private static void changeJavaProcessor(ContentAssistant assistant, IPreferenceStore store, String key) {
JavaCompletionProcessor jcp= getJavaProcessor(assistant);
if (jcp == null)
return;
if (AUTOACTIVATION_TRIGGERS_JAVA.equals(key)) {
String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVA);
if (triggers != null)
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
} else if (SHOW_VISIBLE_PROPOSALS.equals(key)) {
boolean enabled= store.getBoolean(SHOW_VISIBLE_PROPOSALS);
jcp.restrictProposalsToVisibility(enabled);
} else if (CASE_SENSITIVITY.equals(key)) {
boolean enabled= store.getBoolean(CASE_SENSITIVITY);
jcp.restrictProposalsToMatchingCases(enabled);
} else if (ORDER_PROPOSALS.equals(key)) {
boolean enable= store.getBoolean(ORDER_PROPOSALS);
jcp.orderProposalsAlphabetically(enable);
} else if (ADD_IMPORT.equals(key)) {
boolean enabled= store.getBoolean(ADD_IMPORT);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
jcp.allowAddingImports(enabled);
}
}
private static void changeJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store, String key) {
JavaDocCompletionProcessor jdcp= getJavaDocProcessor(assistant);
if (jdcp == null)
return;
if (AUTOACTIVATION_TRIGGERS_JAVADOC.equals(key)) {
String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC);
if (triggers != null)
jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
} else if (CASE_SENSITIVITY.equals(key)) {
boolean enabled= store.getBoolean(CASE_SENSITIVITY);
jdcp.restrictProposalsToMatchingCases(enabled);
} else if (ORDER_PROPOSALS.equals(key)) {
boolean enable= store.getBoolean(ORDER_PROPOSALS);
jdcp.orderProposalsAlphabetically(enable);
}
}
/**
* Changes the configuration of the given content assistant according to the given property
* change event and the given preference store.
*/
public static void changeConfiguration(ContentAssistant assistant, IPreferenceStore store, PropertyChangeEvent event) {
String p= event.getProperty();
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/ContentAssistPreference.java
|
if (AUTOACTIVATION.equals(p)) {
boolean enabled= store.getBoolean(AUTOACTIVATION);
assistant.enableAutoActivation(enabled);
} else if (AUTOACTIVATION_DELAY.equals(p)) {
int delay= store.getInt(AUTOACTIVATION_DELAY);
assistant.setAutoActivationDelay(delay);
} else if (PROPOSALS_FOREGROUND.equals(p)) {
Color c= getColor(store, PROPOSALS_FOREGROUND);
assistant.setProposalSelectorForeground(c);
} else if (PROPOSALS_BACKGROUND.equals(p)) {
Color c= getColor(store, PROPOSALS_BACKGROUND);
assistant.setProposalSelectorBackground(c);
} else if (PARAMETERS_FOREGROUND.equals(p)) {
Color c= getColor(store, PARAMETERS_FOREGROUND);
assistant.setContextInformationPopupForeground(c);
assistant.setContextSelectorForeground(c);
} else if (PARAMETERS_BACKGROUND.equals(p)) {
Color c= getColor(store, PARAMETERS_BACKGROUND);
assistant.setContextInformationPopupBackground(c);
assistant.setContextSelectorBackground(c);
} else if (AUTOINSERT.equals(p)) {
boolean enabled= store.getBoolean(AUTOINSERT);
assistant.enableAutoInsert(enabled);
}
changeJavaProcessor(assistant, store, p);
changeJavaDocProcessor(assistant, store, p);
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalPreference.java
|
package org.eclipse.jdt.internal.ui.text.java;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Preference for experimental code assist method completion.
*/
public class ExperimentalPreference {
public static final String CODE_ASSIST_EXPERIMENTAL= "org.eclipse.jdt.ui.text.codeassist.experimental";
public static boolean fillArgumentsOnMethodCompletion(IPreferenceStore store) {
return store.getBoolean(CODE_ASSIST_EXPERIMENTAL);
}
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
package org.eclipse.jdt.internal.ui.text.java;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
import java.util.List;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationExtension;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.ui.IEditorPart;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.internal.corext.template.ContextType;
import org.eclipse.jdt.internal.corext.template.ContextTypeRegistry;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.JavaCodeReader;
import org.eclipse.jdt.internal.ui.text.template.TemplateEngine;
/**
* Java completion processor.
*/
public class JavaCompletionProcessor implements IContentAssistProcessor {
private static class ContextInformationWrapper implements IContextInformation, IContextInformationExtension {
private final IContextInformation fContextInformation;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
private int fPosition;
public ContextInformationWrapper(IContextInformation contextInformation) {
fContextInformation= contextInformation;
}
/*
* @see IContextInformation#getContextDisplayString()
*/
public String getContextDisplayString() {
return fContextInformation.getContextDisplayString();
}
/*
* @see IContextInformation#getImage()
*/
public Image getImage() {
return fContextInformation.getImage();
}
/*
* @see IContextInformation#getInformationDisplayString()
*/
public String getInformationDisplayString() {
return fContextInformation.getInformationDisplayString();
}
/*
* @see IContextInformationExtension#getContextInformationPosition()
*/
public int getContextInformationPosition() {
return fPosition;
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
public void setContextInformationPosition(int position) {
fPosition= position;
}
};
private final static String VISIBILITY= JavaCore.CODEASSIST_VISIBILITY_CHECK;
private final static String ENABLED= "enabled";
private final static String DISABLED= "disabled";
private IEditorPart fEditor;
private ResultCollector fCollector;
private IWorkingCopyManager fManager;
private IContextInformationValidator fValidator;
private char[] fProposalAutoActivationSet;
private JavaCompletionProposalComparator fComparator;
private boolean fAllowAddImports;
private TemplateEngine fTemplateEngine;
private ExperimentalResultCollector fExperimentalCollector;
private int fNumberOfComputedResults= 0;
public JavaCompletionProcessor(IEditorPart editor) {
fEditor= editor;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
fCollector= new ResultCollector();
fManager= JavaPlugin.getDefault().getWorkingCopyManager();
ContextType contextType= ContextTypeRegistry.getInstance().getContextType("java");
if (contextType != null)
fTemplateEngine= new TemplateEngine(contextType);
fExperimentalCollector= new ExperimentalResultCollector();
fAllowAddImports= true;
fComparator= new JavaCompletionProposalComparator();
}
/**
* Sets this processor's set of characters triggering the activation of the
* completion proposal computation.
*
* @param activationSet the activation set
*/
public void setCompletionProposalAutoActivationCharacters(char[] activationSet) {
fProposalAutoActivationSet= activationSet;
}
/**
* Tells this processor to restrict its proposal to those element
* visible in the actual invocation context.
*
* @param restrict <code>true</code> if proposals should be restricted
*/
public void restrictProposalsToVisibility(boolean restrict) {
Hashtable options= JavaCore.getOptions();
Object value= options.get(VISIBILITY);
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
if (value instanceof String) {
String newValue= restrict ? ENABLED : DISABLED;
if ( !newValue.equals((String) value)) {
options.put(VISIBILITY, newValue);
JavaCore.setOptions(options);
}
}
}
/**
* Tells this processor to order the proposals alphabetically.
*
* @param order <code>true</code> if proposals should be ordered.
*/
public void orderProposalsAlphabetically(boolean order) {
fComparator.setOrderAlphabetically(order);
}
/**
* Tells this processor to restrict is proposals to those
* starting with matching cases.
*
* @param restrict <code>true</code> if proposals should be restricted
*/
public void restrictProposalsToMatchingCases(boolean restrict) {
}
/**
* Tells this processor to add import statement for proposals that have
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
* a fully qualified type name
*
* @param restrict <code>true</code> if import can be added
*/
public void allowAddingImports(boolean allowAddingImports) {
fAllowAddImports= allowAddingImports;
}
/**
* @see IContentAssistProcessor#getErrorMessage()
*/
public String getErrorMessage() {
if (fNumberOfComputedResults == 0)
return "No completions available.";
return fCollector.getErrorMessage();
}
/**
* @see IContentAssistProcessor#getContextInformationValidator()
*/
public IContextInformationValidator getContextInformationValidator() {
if (fValidator == null)
fValidator= new JavaParameterListValidator();
return fValidator;
}
/**
* @see IContentAssistProcessor#getContextInformationAutoActivationCharacters()
*/
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
/**
* @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
*/
public char[] getCompletionProposalAutoActivationCharacters() {
return fProposalAutoActivationSet;
}
private boolean looksLikeMethod(JavaCodeReader reader) throws IOException {
int curr= reader.read();
while (curr != JavaCodeReader.EOF && Character.isWhitespace((char) curr))
curr= reader.read();
if (curr == JavaCodeReader.EOF)
return false;
return Character.isJavaIdentifierPart((char) curr) || Character.isJavaIdentifierStart((char) curr);
}
private int guessContextInformationPosition(ITextViewer viewer, int offset) {
int contextPosition= offset;
IDocument document= viewer.getDocument();
try {
JavaCodeReader reader= new JavaCodeReader();
reader.configureBackwardReader(document, offset, true, true);
int nestingLevel= 0;
int curr= reader.read();
while (curr != JavaCodeReader.EOF) {
if (')' == (char) curr)
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
++ nestingLevel;
else if ('(' == (char) curr) {
-- nestingLevel;
if (nestingLevel < 0) {
int start= reader.getOffset();
if (looksLikeMethod(reader))
return start + 1;
}
}
curr= reader.read();
}
} catch (IOException e) {
}
return contextPosition;
}
private List addContextInformations(ITextViewer viewer, int offset) {
ICompletionProposal[] proposals= computeCompletionProposals(viewer, offset);
List result= new ArrayList();
for (int i= 0; i < proposals.length; i++) {
IContextInformation contextInformation= proposals[i].getContextInformation();
if (contextInformation != null) {
ContextInformationWrapper wrapper= new ContextInformationWrapper(contextInformation);
wrapper.setContextInformationPosition(offset);
result.add(wrapper);
}
}
return result;
|
15,604 |
Bug 15604 Promote Fill arguments on method completion to a real preference
|
It is still in work in progress but it has become an established feature by now. Promote the preference to the code assist preference page.
|
resolved fixed
|
4820fe3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-16T13:23:20Z | 2002-05-09T13:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
|
}
/**
* @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
*/
public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
int contextInformationPosition= guessContextInformationPosition(viewer, offset);
List result= addContextInformations(viewer, contextInformationPosition);
return (IContextInformation[]) result.toArray(new IContextInformation[result.size()]);
}
/**
* Order the given proposals.
*/
private ICompletionProposal[] order(ICompletionProposal[] proposals) {
Arrays.sort(proposals, fComparator);
return proposals;
}
/**
* @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());
IJavaCompletionProposal[] results;
if (ExperimentalPreference.fillArgumentsOnMethodCompletion(JavaPlugin.getDefault().getPreferenceStore())) {
try {
if (unit != null) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.