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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
run(type, new IField[0]);
return;
}
}
}
MessageDialog.openInformation(getShell(), dialogTitle,
ActionMessages.getString("AddGetterSetterAction.not_applicable"));
} catch (CoreException e) {
JavaPlugin.log(e.getStatus());
showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed"));
}
}
private boolean checkCu(IMember member) throws JavaModelException{
if (JavaModelUtil.isEditable(member.getCompilationUnit()))
return true;
MessageDialog.openInformation(getShell(), dialogTitle,
ActionMessages.getFormattedString("AddGetterSetterAction.read_only", member.getElementName()));
return false;
}
private void run(IField[] getterFields, IField[] setterFields, IEditorPart editor) {
try{
AddGetterSetterOperation op= createAddGetterSetterOperation(getterFields, setterFields);
new ProgressMonitorDialog(getShell()).run(false, true, new WorkbenchRunnableAdapter(op));
IMethod[] createdMethods= op.getCreatedAccessors();
if (createdMethods.length > 0) {
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
EditorUtility.revealInEditor(editor, createdMethods[0]);
}
} catch (InvocationTargetException e) {
JavaPlugin.log(e);
showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed"));
} catch (InterruptedException e) {
}
}
private AddGetterSetterOperation createAddGetterSetterOperation(IField[] getterFields, IField[] setterFields) {
IRequestQuery skipSetterForFinalQuery= skipSetterForFinalQuery();
IRequestQuery skipReplaceQuery= skipReplaceQuery();
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
return new AddGetterSetterOperation(getterFields, setterFields, createNameProposer(), settings, skipSetterForFinalQuery, skipReplaceQuery);
}
private IRequestQuery skipSetterForFinalQuery() {
return new IRequestQuery() {
public int doQuery(IMember field) {
int[] returnCodes= {IRequestQuery.YES, IRequestQuery.NO, IRequestQuery.YES_ALL, IRequestQuery.CANCEL};
String[] options= {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL};
String fieldName= JavaElementLabels.getElementLabel(field, 0);
String formattedMessage= ActionMessages.getFormattedString("AddGetterSetterAction.SkipSetterForFinalDialog.message", fieldName);
return showQueryDialog(formattedMessage, options, returnCodes);
}
};
}
private IRequestQuery skipReplaceQuery() {
return new IRequestQuery() {
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
public int doQuery(IMember method) {
int[] returnCodes= {IRequestQuery.YES, IRequestQuery.NO, IRequestQuery.YES_ALL, IRequestQuery.CANCEL};
String skipLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.skip.label");
String replaceLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.replace.label");
String skipAllLabel= ActionMessages.getString("AddGetterSetterAction.SkipExistingDialog.skipAll.label");
String[] options= { skipLabel, replaceLabel, skipAllLabel, IDialogConstants.CANCEL_LABEL};
String methodName= JavaElementLabels.getElementLabel(method, JavaElementLabels.M_PARAMETER_TYPES);
String formattedMessage= ActionMessages.getFormattedString("AddGetterSetterAction.SkipExistingDialog.message", methodName);
return showQueryDialog(formattedMessage, options, returnCodes);
}
};
}
private int showQueryDialog(final String message, final String[] buttonLabels, int[] returnCodes) {
final Shell shell= getShell();
if (shell == null) {
JavaPlugin.logErrorMessage("AddGetterSetterAction.showQueryDialog: No active shell found");
return IRequestQuery.CANCEL;
}
final int[] result= { MessageDialog.CANCEL };
shell.getDisplay().syncExec(new Runnable() {
public void run() {
String title= ActionMessages.getString("AddGetterSetterAction.QueryDialog.title");
MessageDialog dialog= new MessageDialog(shell, title, null, message, MessageDialog.QUESTION, buttonLabels, 0);
result[0]= dialog.open();
}
});
int returnVal= result[0];
return returnVal < 0 ? IRequestQuery.CANCEL : returnCodes[returnVal];
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
}
private void showError(String message) {
MessageDialog.openError(getShell(), dialogTitle, message);
}
/*
* Returns fields in the selection or <code>null</code> if the selection is
* empty or not valid.
*/
private IField[] getSelectedFields(IStructuredSelection selection) {
List elements= selection.toList();
int nElements= elements.size();
if (nElements > 0) {
IField[] res= new IField[nElements];
ICompilationUnit cu= null;
for (int i= 0; i < nElements; i++) {
Object curr= elements.get(i);
if (curr instanceof IField) {
IField fld= (IField)curr;
if (i == 0) {
cu= fld.getCompilationUnit();
if (cu == null) {
return null;
}
} else if (!cu.equals(fld.getCompilationUnit())) {
return null;
}
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
try {
if (fld.getDeclaringType().isInterface()) {
return null;
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
return null;
}
res[i]= fld;
} else {
return null;
}
}
return res;
}
return null;
}
private static class GetterSetterEntry {
public final IField field;
public final boolean isGetterEntry;
GetterSetterEntry(IField field, boolean isGetterEntry){
this.field= field;
this.isGetterEntry= isGetterEntry;
}
}
private static class AddGetterSetterLabelProvider extends JavaElementLabelProvider{
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
private final NameProposer fNameProposer;
private static final Image IMAGE= new JavaElementImageProvider().getImageLabel(new JavaElementImageDescriptor(JavaPluginImages.DESC_MISC_PUBLIC, 0, JavaElementImageProvider.BIG_SIZE));
AddGetterSetterLabelProvider(NameProposer nameProposer){
fNameProposer= nameProposer;
}
/*
* @see ILabelProvider#getText(Object)
*/
public String getText(Object element) {
try {
if (! (element instanceof GetterSetterEntry))
return super.getText(element);
GetterSetterEntry entry= (GetterSetterEntry)element;
if (entry.isGetterEntry)
return fNameProposer.proposeGetterSignature(entry.field);
else
return fNameProposer.proposeSetterSignature(entry.field);
} catch (JavaModelException e) {
return "";
}
}
/*
* @see ILabelProvider#getImage(Object)
*/
public Image getImage(Object element) {
if (element instanceof GetterSetterEntry)
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
return IMAGE;
return super.getImage(element);
}
}
/**
* @return map IField -> GetterSetterEntry[]
*/
private static Map createGetterSetterMapping(IType type) throws JavaModelException{
IField[] fields= type.getFields();
Map result= new HashMap();
String[] prefixes= AddGetterSetterAction.getGetterSetterPrefixes();
String[] suffixes= AddGetterSetterAction.getGetterSetterSuffixes();
for (int i= 0; i < fields.length; i++) {
List l= new ArrayList(2);
if (GetterSetterUtil.getGetter(fields[i], prefixes, suffixes) == null)
l.add(new GetterSetterEntry(fields[i], true));
if (GetterSetterUtil.getSetter(fields[i], prefixes, suffixes) == null)
l.add(new GetterSetterEntry(fields[i], false));
if (! l.isEmpty())
result.put(fields[i], (GetterSetterEntry[]) l.toArray(new GetterSetterEntry[l.size()]));
}
return result;
}
private static class AddGetterSetterContentProvider implements ITreeContentProvider{
private static final Object[] EMPTY= new Object[0];
private Map fGetterSetterEntries;
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
public AddGetterSetterContentProvider(Map entries) throws JavaModelException {
fGetterSetterEntries= entries;
}
/*
* @see ITreeContentProvider#getChildren(Object)
*/
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof IField)
return (Object[])fGetterSetterEntries.get(parentElement);
return EMPTY;
}
/*
* @see ITreeContentProvider#getParent(Object)
*/
public Object getParent(Object element) {
if (element instanceof IMember)
return ((IMember)element).getDeclaringType();
if (element instanceof GetterSetterEntry)
return ((GetterSetterEntry)element).field;
return null;
}
/*
* @see ITreeContentProvider#hasChildren(Object)
*/
public boolean hasChildren(Object element) {
return getChildren(element).length > 0;
}
/*
* @see IStructuredContentProvider#getElements(Object)
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
|
*/
public Object[] getElements(Object inputElement) {
try {
IType type= (IType)inputElement;
IField[] fields= type.getFields();
List fieldList= new ArrayList(fields.length);
for (int i = 0; i < fields.length; i++) {
if (fGetterSetterEntries.containsKey(fields[i]))
fieldList.add(fields[i]);
}
return (IField[]) fieldList.toArray(new IField[fieldList.size()]);
} catch (JavaModelException e) {
return EMPTY;
}
}
/*
* @see IContentProvider#dispose()
*/
public void dispose() {
fGetterSetterEntries.clear();
fGetterSetterEntries= null;
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
}
}
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.AddBookmarkAction;
import org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.AddTaskAction;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group that adds the source and generate actions to a context menu and
* action bar.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class GenerateActionGroup extends ActionGroup {
private boolean fEditorIsOwner;
private IWorkbenchSite fSite;
private String fGroupName= IContextMenuConstants.GROUP_SOURCE;
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
private List fRegisteredSelectionListeners;
private AddImportOnSelectionAction fAddImport;
private OverrideMethodsAction fOverrideMethods;
private AddGetterSetterAction fAddGetterSetter;
private AddUnimplementedConstructorsAction fAddUnimplementedConstructors;
private AddJavaDocStubAction fAddJavaDocStub;
private AddBookmarkAction fAddBookmark;
private AddTaskAction fAddTaskAction;
private ExternalizeStringsAction fExternalizeStrings;
private FindStringsToExternalizeAction fFindStringsToExternalize;
private SurroundWithTryCatchAction fSurroundWithTryCatch;
private OrganizeImportsAction fOrganizeImports;
private ConvertLineDelimitersAction fConvertToWindows;
private ConvertLineDelimitersAction fConvertToUNIX;
private ConvertLineDelimitersAction fConvertToMac;
/**
* Creates a new <code>GenerateActionGroup</code>.
* <p>
* Note: This constructor is for internal use only. Clients should not call this constructor.
* </p>
*/
public GenerateActionGroup(CompilationUnitEditor editor, String groupName) {
fSite= editor.getSite();
fEditorIsOwner= true;
fGroupName= groupName;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
fAddImport= new AddImportOnSelectionAction(editor);
fAddImport.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_IMPORT);
fAddImport.update();
editor.setAction("AddImport", fAddImport);
fOrganizeImports= new OrganizeImportsAction(editor);
fOrganizeImports.setActionDefinitionId(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS);
fOrganizeImports.editorStateChanged();
editor.setAction("OrganizeImports", fOrganizeImports);
fOverrideMethods= new OverrideMethodsAction(editor);
fOverrideMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.OVERRIDE_METHODS);
fOverrideMethods.editorStateChanged();
editor.setAction("OverrideMethods", fOverrideMethods);
fAddGetterSetter= new AddGetterSetterAction(editor);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor);
fAddUnimplementedConstructors.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS);
fAddUnimplementedConstructors.editorStateChanged();
editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors);
fAddJavaDocStub= new AddJavaDocStubAction(editor);
fAddJavaDocStub.editorStateChanged();
fSurroundWithTryCatch= new SurroundWithTryCatchAction(editor);
fSurroundWithTryCatch.setActionDefinitionId(IJavaEditorActionDefinitionIds.SURROUND_WITH_TRY_CATCH);
fSurroundWithTryCatch.update(selection);
provider.addSelectionChangedListener(fSurroundWithTryCatch);
editor.setAction("SurroundWithTryCatch", fSurroundWithTryCatch);
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
fExternalizeStrings= new ExternalizeStringsAction(editor);
fExternalizeStrings.setActionDefinitionId(IJavaEditorActionDefinitionIds.EXTERNALIZE_STRINGS);
fExternalizeStrings.editorStateChanged();
editor.setAction("ExternalizeStrings", fExternalizeStrings);
fConvertToWindows= new ConvertLineDelimitersAction(editor, "\r\n");
fConvertToWindows.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
editor.setAction("ConvertLineDelimitersToWindows", fConvertToWindows);
fConvertToUNIX= new ConvertLineDelimitersAction(editor, "\n");
fConvertToUNIX.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_UNIX);
editor.setAction("ConvertLineDelimitersToUNIX", fConvertToUNIX);
fConvertToMac= new ConvertLineDelimitersAction(editor, "\r");
fConvertToMac.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_MAC);
editor.setAction("ConvertLineDelimitersToMac", fConvertToMac);
}
/**
* Creates a new <code>GenerateActionGroup</code>.
*
* @param page the page that owns this action group
*/
public GenerateActionGroup(Page page) {
this(page.getSite());
}
/**
* Creates a new <code>GenerateActionGroup</code>.
*
* @param part the view part that owns this action group
*/
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
public GenerateActionGroup(IViewPart part) {
this(part.getSite());
}
private GenerateActionGroup(IWorkbenchSite site) {
fSite= site;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fOverrideMethods= new OverrideMethodsAction(site);
fAddGetterSetter= new AddGetterSetterAction(site);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site);
fAddJavaDocStub= new AddJavaDocStubAction(site);
fAddBookmark= new AddBookmarkAction(site.getShell());
fAddTaskAction= new AddTaskAction(site);
fExternalizeStrings= new ExternalizeStringsAction(site);
fFindStringsToExternalize= new FindStringsToExternalizeAction(site);
fOrganizeImports= new OrganizeImportsAction(site);
fOverrideMethods.update(selection);
fAddGetterSetter.update(selection);
fAddUnimplementedConstructors.update(selection);
fAddJavaDocStub.update(selection);
fExternalizeStrings.update(selection);
fFindStringsToExternalize.update(selection);
fAddTaskAction.update(selection);
fOrganizeImports.update(selection);
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection)selection;
fAddBookmark.selectionChanged(ss);
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
} else {
fAddBookmark.setEnabled(false);
}
registerSelectionListener(provider, fOverrideMethods);
registerSelectionListener(provider, fAddGetterSetter);
registerSelectionListener(provider, fAddUnimplementedConstructors);
registerSelectionListener(provider, fAddJavaDocStub);
registerSelectionListener(provider, fAddBookmark);
registerSelectionListener(provider, fExternalizeStrings);
registerSelectionListener(provider, fFindStringsToExternalize);
registerSelectionListener(provider, fOrganizeImports);
registerSelectionListener(provider, fAddTaskAction);
}
private void registerSelectionListener(ISelectionProvider provider, ISelectionChangedListener listener) {
if (fRegisteredSelectionListeners == null)
fRegisteredSelectionListeners= new ArrayList(12);
provider.addSelectionChangedListener(listener);
fRegisteredSelectionListeners.add(listener);
}
/**
* The state of the editor owning this action group has changed.
* This method does nothing if the group's owner isn't an
* editor.
* <p>
* Note: This method is for internal use only. Clients should not call this method.
* </p>
*/
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
public void editorStateChanged() {
Assert.isTrue(fEditorIsOwner);
fAddImport.update();
fExternalizeStrings.editorStateChanged();
fOrganizeImports.editorStateChanged();
fOverrideMethods.editorStateChanged();
fAddUnimplementedConstructors.editorStateChanged();
fAddJavaDocStub.editorStateChanged();
fSurroundWithTryCatch.editorStateChanged();
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillActionBars(IActionBars actionBar) {
super.fillActionBars(actionBar);
setGlobalActionHandlers(actionBar);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
IMenuManager target= menu;
IMenuManager generateMenu= null;
if (fEditorIsOwner) {
generateMenu= new MenuManager(ActionMessages.getString("SourceMenu.label"));
generateMenu.add(new GroupMarker(fGroupName));
target= generateMenu;
}
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
int added= 0;
if (fEditorIsOwner)
added+= appendToGroup(target, fAddImport);
added+= appendToGroup(target, fOrganizeImports);
if (fEditorIsOwner)
added+= appendToGroup(target, fSurroundWithTryCatch);
added+= appendToGroup(target, fOverrideMethods);
added+= appendToGroup(target, fAddGetterSetter);
added+= appendToGroup(target, fAddUnimplementedConstructors);
added+= appendToGroup(target, fAddJavaDocStub);
added+= appendToGroup(target, fAddBookmark);
if (fEditorIsOwner)
added+= appendToGroup(target, fExternalizeStrings);
if (generateMenu != null && added > 0)
menu.appendToGroup(fGroupName, generateMenu);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void dispose() {
if (fRegisteredSelectionListeners != null) {
ISelectionProvider provider= fSite.getSelectionProvider();
for (Iterator iter= fRegisteredSelectionListeners.iterator(); iter.hasNext();) {
ISelectionChangedListener listener= (ISelectionChangedListener) iter.next();
provider.removeSelectionChangedListener(listener);
}
}
super.dispose();
}
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
private void setGlobalActionHandlers(IActionBars actionBar) {
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_IMPORT, fAddImport);
actionBar.setGlobalActionHandler(JdtActionConstants.SURROUND_WITH_TRY_CATCH, fSurroundWithTryCatch);
actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_GETTER_SETTER, fAddGetterSetter);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_CONSTRUCTOR_FROM_SUPERCLASS, fAddUnimplementedConstructors);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_JAVA_DOC_COMMENT, fAddJavaDocStub);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.BOOKMARK, fAddBookmark);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.ADD_TASK, fAddTaskAction);
actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings);
actionBar.setGlobalActionHandler(JdtActionConstants.FIND_STRINGS_TO_EXTERNALIZE, fFindStringsToExternalize);
actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, fConvertToWindows);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_UNIX, fConvertToUNIX);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_MAC, fConvertToMac);
}
private int appendToGroup(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.appendToGroup(fGroupName, action);
return 1;
}
return 0;
}
private void addAction(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled())
menu.add(action);
}
}
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
|
package org.eclipse.jdt.ui.actions;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
/**
* Defines the definition IDs for the java editor actions.
*/
public interface IJavaEditorActionDefinitionIds extends ITextEditorActionDefinitionIds {
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
|
public static final String SELECT_ENCLOSING= "org.eclipse.jdt.ui.edit.text.java.select.enclosing";
public static final String SELECT_NEXT= "org.eclipse.jdt.ui.edit.text.java.select.next";
public static final String SELECT_PREVIOUS= "org.eclipse.jdt.ui.edit.text.java.select.previous";
public static final String SELECT_LAST= "org.eclipse.jdt.ui.edit.text.java.select.last";
public static final String CORRECTION_ASSIST_PROPOSALS= "org.eclipse.jdt.ui.edit.text.java.correction.assist.proposals";
public static final String CONTENT_ASSIST_PROPOSALS= "org.eclipse.jdt.ui.edit.text.java.content.assist.proposals";
public static final String CONTENT_ASSIST_CONTEXT_INFORMATION= "org.eclipse.jdt.ui.edit.text.java.content.assist.context.information";
public static final String SHOW_JAVADOC= "org.eclipse.jdt.ui.edit.text.java.show.javadoc";
public static final String COMMENT= "org.eclipse.jdt.ui.edit.text.java.comment";
public static final String UNCOMMENT= "org.eclipse.jdt.ui.edit.text.java.uncomment";
public static final String FORMAT= "org.eclipse.jdt.ui.edit.text.java.format";
public static final String ADD_IMPORT= "org.eclipse.jdt.ui.edit.text.java.add.import";
public static final String ORGANIZE_IMPORTS= "org.eclipse.jdt.ui.edit.text.java.organize.imports";
public static final String SURROUND_WITH_TRY_CATCH= "org.eclipse.jdt.ui.edit.text.java.surround.with.try.catch";
public static final String OVERRIDE_METHODS= "org.eclipse.jdt.ui.edit.text.java.override.methods";
public static final String ADD_UNIMPLEMENTED_CONTRUCTORS= "org.eclipse.jdt.ui.edit.text.java.add.unimplemented.constructors";
public static final String EXTERNALIZE_STRINGS= "org.eclipse.jdt.ui.edit.text.java.externalize.strings";
public static final String SHOW_NEXT_PROBLEM= "org.eclipse.jdt.ui.edit.text.java.show.next.problem";
public static final String SHOW_PREVIOUS_PROBLEM= "org.eclipse.jdt.ui.edit.text.java.show.previous.problem";
public static final String PULL_UP= "org.eclipse.jdt.ui.edit.text.java.pull.up";
public static final String RENAME_ELEMENT= "org.eclipse.jdt.ui.edit.text.java.rename.element";
public static final String MODIFY_METHOD_PARAMETERS= "org.eclipse.jdt.ui.edit.text.java.modify.method.parameters";
public static final String MOVE_ELEMENT= "org.eclipse.jdt.ui.edit.text.java.move.element";
public static final String EXTRACT_LOCAL_VARIABLE= "org.eclipse.jdt.ui.edit.text.java.extract.local.variable";
public static final String INLINE_LOCAL_VARIABLE= "org.eclipse.jdt.ui.edit.text.java.inline.local.variable";
|
17,598 |
Bug 17598 Source->Generate Getter and Setter enabled for read only file
|
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
|
verified fixed
|
6b03c57
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:51:22Z | 2002-05-24T11:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
|
public static final String SELF_ENCAPSULATE_FIELD= "org.eclipse.jdt.ui.edit.text.java.self.encapsulate.field";
public static final String EXTRACT_METHOD= "org.eclipse.jdt.ui.edit.text.java.extract.method";
public static final String OPEN_EDITOR= "org.eclipse.jdt.ui.edit.text.java.open.editor";
public static final String OPEN_SUPER_IMPLEMENTATION= "org.eclipse.jdt.ui.edit.text.java.open.super.implementation";
public static final String OPEN_EXTERNAL_JAVADOC= "org.eclipse.jdt.ui.edit.text.java.open.external.javadoc";
public static final String OPEN_TYPE_HIERARCHY= "org.eclipse.jdt.ui.edit.text.java.open.type.hierarchy";
public static final String SHOW_IN_PACKAGE_VIEW= "org.eclipse.jdt.ui.edit.text.java.show.in.package.view";
public static final String SHOW_IN_NAVIGATOR_VIEW= "org.eclipse.jdt.ui.edit.text.java.show.in.navigator.view";
public static final String SEARCH_REFERENCES_IN_WORKSPACE= "org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace";
public static final String SEARCH_REFERENCES_IN_HIERARCHY= "org.eclipse.jdt.ui.edit.text.java.search.references.in.hierarchy";
public static final String SEARCH_REFERENCES_IN_WORKING_SET= "org.eclipse.jdt.ui.edit.text.java.search.references.in.working.set";
public static final String SEARCH_READ_ACCESS_IN_WORKSPACE= "org.eclipse.jdt.ui.edit.text.java.search.read.access.in.workspace";
public static final String SEARCH_READ_ACCESS_IN_HIERARCHY= "org.eclipse.jdt.ui.edit.text.java.search.read.access.in.hierarchy";
public static final String SEARCH_READ_ACCESS_IN_WORKING_SET= "org.eclipse.jdt.ui.edit.text.java.search.read.access.in.working.set";
public static final String SEARCH_WRITE_ACCESS_IN_WORKSPACE= "org.eclipse.jdt.ui.edit.text.java.search.write.access.in.workspace";
public static final String SEARCH_WRITE_ACCESS_IN_HIERARCHY= "org.eclipse.jdt.ui.edit.text.java.search.write.access.in.hierarchy";
public static final String SEARCH_WRITE_ACCESS_IN_WORKING_SET= "org.eclipse.jdt.ui.edit.text.java.search.write.access.in.working.set";
public static final String SEARCH_DECLARATIONS_IN_WORKSPACE= "org.eclipse.jdt.ui.edit.text.java.search.declarations.in.workspace";
public static final String SEARCH_DECLARATIONS_IN_HIERARCHY= "org.eclipse.jdt.ui.edit.text.java.search.declarations.in.hierarchy";
public static final String SEARCH_DECLARATIONS_IN_WORKING_SET= "org.eclipse.jdt.ui.edit.text.java.search.declarations.in.working.set";
public static final String SEARCH_IMPLEMENTORS_IN_WORKSPACE= "org.eclipse.jdt.ui.edit.text.java.search.implementors.in.workspace";
public static final String SEARCH_IMPLEMENTORS_IN_WORKING_SET= "org.eclipse.jdt.ui.edit.text.java.seach.implementors.in.working.set";
public static final String TOGGLE_PRESENTATION= "org.eclipse.jdt.ui.edit.text.java.toggle.presentation";
public static final String TOGGLE_TEXT_HOVER= "org.eclipse.jdt.ui.edit.text.java.toggle.text.hover";
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards.buildpaths;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
import org.eclipse.ui.help.WorkbenchHelp;
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
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.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
import org.eclipse.jdt.internal.ui.util.PixelConverter;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
import org.eclipse.jdt.internal.ui.viewsupport.ImageDisposer;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.CheckedListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
public class BuildPathsBlock {
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
public static interface IRemoveOldBinariesQuery {
/**
* Do the callback. Returns <code>true</code> if .class files should be removed from the
* old output location.
*/
boolean doQuery(IPath oldOutputLocation) throws InterruptedException;
}
private IWorkspaceRoot fWorkspaceRoot;
private CheckedListDialogField fClassPathList;
private StringButtonDialogField fBuildPathDialogField;
private StatusInfo fClassPathStatus;
private StatusInfo fBuildPathStatus;
private IJavaProject fCurrJProject;
private IPath fOutputLocationPath;
private IStatusChangeListener fContext;
private Control fSWTWidget;
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
private boolean fShowSourceFolderPage;
private SourceContainerWorkbookPage fSourceContainerPage;
private ProjectsWorkbookPage fProjectsPage;
private LibrariesWorkbookPage fLibrariesPage;
private BuildPathBasePage fCurrPage;
public BuildPathsBlock(IWorkspaceRoot root, IStatusChangeListener context, boolean showSourceFolders) {
fWorkspaceRoot= root;
fContext= context;
fShowSourceFolderPage= showSourceFolders;
fSourceContainerPage= null;
fLibrariesPage= null;
fProjectsPage= null;
fCurrPage= null;
BuildPathAdapter adapter= new BuildPathAdapter();
String[] buttonLabels= new String[] {
NewWizardMessages.getString("BuildPathsBlock.classpath.up.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.down.button"),
null,
NewWizardMessages.getString("BuildPathsBlock.classpath.checkall.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.uncheckall.button")
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
};
fClassPathList= new CheckedListDialogField(null, buttonLabels, new CPListLabelProvider());
fClassPathList.setDialogFieldListener(adapter);
fClassPathList.setLabelText(NewWizardMessages.getString("BuildPathsBlock.classpath.label"));
fClassPathList.setUpButtonIndex(0);
fClassPathList.setDownButtonIndex(1);
fClassPathList.setCheckAllButtonIndex(3);
fClassPathList.setUncheckAllButtonIndex(4);
fBuildPathDialogField= new StringButtonDialogField(adapter);
fBuildPathDialogField.setButtonLabel(NewWizardMessages.getString("BuildPathsBlock.buildpath.button"));
fBuildPathDialogField.setDialogFieldListener(adapter);
fBuildPathDialogField.setLabelText(NewWizardMessages.getString("BuildPathsBlock.buildpath.label"));
fBuildPathStatus= new StatusInfo();
fClassPathStatus= new StatusInfo();
fCurrJProject= null;
}
public Control createControl(Composite parent) {
fSWTWidget= parent;
PixelConverter converter= new PixelConverter(parent);
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
layout.marginWidth= 0;
layout.numColumns= 1;
composite.setLayout(layout);
TabFolder folder= new TabFolder(composite, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
folder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
tabChanged(e.item);
}
});
ImageRegistry imageRegistry= JavaPlugin.getDefault().getImageRegistry();
TabItem item;
fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.source"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT));
item.setData(fSourceContainerPage);
item.setControl(fSourceContainerPage.getControl(folder));
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
Image projectImage= workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT);
fProjectsPage= new ProjectsWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.projects"));
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
item.setImage(projectImage);
item.setData(fProjectsPage);
item.setControl(fProjectsPage.getControl(folder));
fLibrariesPage= new LibrariesWorkbookPage(fWorkspaceRoot, fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.libraries"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_LIBRARY));
item.setData(fLibrariesPage);
item.setControl(fLibrariesPage.getControl(folder));
Image cpoImage= JavaPluginImages.DESC_TOOL_CLASSPATH_ORDER.createImage();
composite.addDisposeListener(new ImageDisposer(cpoImage));
ClasspathOrderingWorkbookPage ordpage= new ClasspathOrderingWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.order"));
item.setImage(cpoImage);
item.setData(ordpage);
item.setControl(ordpage.getControl(folder));
if (fCurrJProject != null) {
fSourceContainerPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
}
Composite editorcomp= new Composite(composite, SWT.NONE);
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
DialogField[] editors= new DialogField[] { fBuildPathDialogField };
LayoutUtil.doDefaultLayout(editorcomp, editors, true, 0, 0);
int maxFieldWidth= converter.convertWidthInCharsToPixels(40);
LayoutUtil.setWidthHint(fBuildPathDialogField.getTextControl(null), maxFieldWidth);
LayoutUtil.setHorizontalGrabbing(fBuildPathDialogField.getTextControl(null));
editorcomp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (fShowSourceFolderPage) {
folder.setSelection(0);
fCurrPage= fSourceContainerPage;
} else {
folder.setSelection(3);
fCurrPage= ordpage;
fClassPathList.selectFirstElement();
}
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.BUILD_PATH_BLOCK);
return composite;
}
private Shell getShell() {
if (fSWTWidget != null) {
return fSWTWidget.getShell();
}
return JavaPlugin.getActiveWorkbenchShell();
}
/**
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
* Initializes the classpath for the given project. Multiple calls to init are allowed,
* but all existing settings will be cleared and replace by the given or default paths.
* @param project The java project to configure. Does not have to exist.
* @param outputLocation The output location to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project- the
* output location of the existing project
* @param classpathEntries The classpath entries to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project - the
* classpath entries of the existing project
*/
public void init(IJavaProject jproject, IPath outputLocation, IClasspathEntry[] classpathEntries) {
fCurrJProject= jproject;
boolean projectExists= false;
List newClassPath= null;
try {
IProject project= fCurrJProject.getProject();
projectExists= (project.exists() && project.getFile(".classpath").exists());
if (projectExists) {
if (outputLocation == null) {
outputLocation= fCurrJProject.getOutputLocation();
}
if (classpathEntries == null) {
classpathEntries= fCurrJProject.getRawClasspath();
}
}
if (outputLocation == null) {
outputLocation= getDefaultBuildPath(jproject);
}
if (classpathEntries != null) {
newClassPath= getExistingEntries(classpathEntries);
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
} catch (CoreException e) {
JavaPlugin.log(e);
}
if (newClassPath == null) {
newClassPath= getDefaultClassPath(jproject);
}
List exportedEntries = new ArrayList();
for (int i= 0; i < newClassPath.size(); i++) {
CPListElement curr= (CPListElement) newClassPath.get(i);
if (curr.isExported() || curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
exportedEntries.add(curr);
}
}
fBuildPathDialogField.setText(outputLocation.makeRelative().toString());
fClassPathList.setElements(newClassPath);
fClassPathList.setCheckedElements(exportedEntries);
if (fSourceContainerPage != null) {
fSourceContainerPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
}
doStatusLineUpdate();
}
private ArrayList getExistingEntries(IClasspathEntry[] classpathEntries) {
ArrayList newClassPath= new ArrayList();
boolean projectExists= fCurrJProject.exists();
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
for (int i= 0; i < classpathEntries.length; i++) {
IClasspathEntry curr= classpathEntries[i];
IPath path= curr.getPath();
IResource res= null;
boolean isMissing= false;
switch (curr.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
res= null;
try {
isMissing= (JavaCore.getClasspathContainer(path, fCurrJProject) == null);
} catch (JavaModelException e) {
isMissing= true;
}
break;
case IClasspathEntry.CPE_VARIABLE:
IPath resolvedPath= JavaCore.getResolvedVariablePath(path);
res= null;
isMissing= fWorkspaceRoot.findMember(resolvedPath) == null && !resolvedPath.toFile().isFile();
break;
case IClasspathEntry.CPE_LIBRARY:
res= fWorkspaceRoot.findMember(path);
if (res == null) {
if (!ArchiveFileFilter.isArchivePath(path)) {
if (fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) {
res= fWorkspaceRoot.getFolder(path);
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
isMissing= !path.toFile().isFile();
}
case IClasspathEntry.CPE_SOURCE:
res= fWorkspaceRoot.findMember(path);
if (res == null) {
if (fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) {
res= fWorkspaceRoot.getFolder(path);
}
isMissing= true;
}
break;
case IClasspathEntry.CPE_PROJECT:
res= fWorkspaceRoot.findMember(path);
isMissing= (res == null);
break;
}
boolean isExported= curr.isExported();
CPListElement elem= new CPListElement(fCurrJProject, curr.getEntryKind(), path, res, curr.getSourceAttachmentPath(), curr.getSourceAttachmentRootPath(), isExported);
if (projectExists) {
elem.setIsMissing(isMissing);
}
newClassPath.add(elem);
}
return newClassPath;
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
/**
* Returns the Java project. Can return <code>null<code> if the page has not
* been initialized.
*/
public IJavaProject getJavaProject() {
return fCurrJProject;
}
/**
* Returns the current output location. Note that the path returned must not be valid.
*/
public IPath getOutputLocation() {
return new Path(fBuildPathDialogField.getText()).makeAbsolute();
}
/**
* Returns the current class path (raw). Note that the entries returned must not be valid.
*/
public IClasspathEntry[] getRawClassPath() {
List elements= fClassPathList.getElements();
int nElements= elements.size();
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
for (int i= 0; i < nElements; i++) {
CPListElement currElement= (CPListElement) elements.get(i);
entries[i]= currElement.getClasspathEntry();
}
return entries;
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
private List getDefaultClassPath(IJavaProject jproj) {
List list= new ArrayList();
IResource srcFolder;
if (JavaBasePreferencePage.useSrcAndBinFolders()) {
String sourceFolderName= JavaBasePreferencePage.getSourceFolderName();
srcFolder= jproj.getProject().getFolder(sourceFolderName);
} else {
srcFolder= jproj.getProject();
}
list.add(new CPListElement(jproj, IClasspathEntry.CPE_SOURCE, srcFolder.getFullPath(), srcFolder));
IPath libPath= new Path(JavaRuntime.JRELIB_VARIABLE);
IPath attachPath= new Path(JavaRuntime.JRESRC_VARIABLE);
IPath attachRoot= new Path(JavaRuntime.JRESRCROOT_VARIABLE);
CPListElement elem= new CPListElement(jproj, IClasspathEntry.CPE_VARIABLE, libPath, null, attachPath, attachRoot, false);
list.add(elem);
return list;
}
private IPath getDefaultBuildPath(IJavaProject jproj) {
if (JavaBasePreferencePage.useSrcAndBinFolders()) {
String outputLocationName= JavaBasePreferencePage.getOutputLocationName();
return jproj.getProject().getFullPath().append(outputLocationName);
} else {
return jproj.getProject().getFullPath();
}
}
private class BuildPathAdapter implements IStringButtonAdapter, IDialogFieldListener {
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
public void changeControlPressed(DialogField field) {
buildPathChangeControlPressed(field);
}
public void dialogFieldChanged(DialogField field) {
buildPathDialogFieldChanged(field);
}
}
private void buildPathChangeControlPressed(DialogField field) {
if (field == fBuildPathDialogField) {
IContainer container= chooseContainer();
if (container != null) {
fBuildPathDialogField.setText(container.getFullPath().toString());
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
}
}
private void buildPathDialogFieldChanged(DialogField field) {
if (field == fClassPathList) {
updateClassPathStatus();
updateBuildPathStatus();
} else if (field == fBuildPathDialogField) {
updateBuildPathStatus();
}
doStatusLineUpdate();
}
private void doStatusLineUpdate() {
IStatus res= findMostSevereStatus();
fContext.statusChanged(res);
}
private IStatus findMostSevereStatus() {
return StatusUtil.getMoreSevere(fClassPathStatus, fBuildPathStatus);
}
/**
* Validates the build path.
*/
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
private void updateClassPathStatus() {
fClassPathStatus.setOK();
List elements= fClassPathList.getElements();
boolean entryMissing= false;
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
for (int i= elements.size()-1 ; i >= 0 ; i--) {
CPListElement currElement= (CPListElement)elements.get(i);
boolean isChecked= fClassPathList.isChecked(currElement);
if (currElement.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
if (!isChecked) {
fClassPathList.setCheckedWithoutUpdate(currElement, true);
}
} else {
currElement.setExported(isChecked);
}
entries[i]= currElement.getClasspathEntry();
entryMissing= entryMissing || currElement.isMissing();
}
if (entryMissing) {
fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.EntryMissing"));
}
if (fCurrJProject.hasClasspathCycle(entries)) {
fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.CycleInClassPath"));
}
}
/**
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
* Validates output location & build path.
*/
private void updateBuildPathStatus() {
fOutputLocationPath= null;
String text= fBuildPathDialogField.getText();
if ("".equals(text)) {
fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.EnterBuildPath"));
return;
}
IPath path= getOutputLocation();
IResource res= fWorkspaceRoot.findMember(path);
if (res != null) {
if (res.getType() == IResource.FILE) {
fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.InvalidBuildPath"));
return;
}
}
fOutputLocationPath= path;
List elements= fClassPathList.getElements();
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
boolean outputFolderAlsoSourceFolder= false;
for (int i= elements.size()-1 ; i >= 0 ; i--) {
CPListElement currElement= (CPListElement)elements.get(i);
entries[i]= currElement.getClasspathEntry();
if (currElement.getEntryKind() == IClasspathEntry.CPE_SOURCE && fOutputLocationPath.equals(currElement.getPath())) {
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
outputFolderAlsoSourceFolder= true;
}
}
IStatus status= JavaConventions.validateClasspath(fCurrJProject, entries, path);
if (!status.isOK()) {
fBuildPathStatus.setError(status.getMessage());
return;
}
if (res != null && res.exists() && fCurrJProject.exists()) {
try {
IPath oldOutputLocation= fCurrJProject.getOutputLocation();
if (!oldOutputLocation.equals(fOutputLocationPath) && !outputFolderAlsoSourceFolder) {
if (((IContainer)res).members().length > 0) {
fBuildPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.OutputFolderNotEmpty"));
return;
}
}
} catch (CoreException e) {
JavaPlugin.log(e);
}
}
fBuildPathStatus.setOK();
}
public static void createProject(IProject project, IPath locationPath, IProgressMonitor monitor) throws CoreException {
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
try {
if (!project.exists()) {
IProjectDescription desc= project.getWorkspace().newProjectDescription(project.getName());
if (Platform.getLocation().equals(locationPath)) {
locationPath= null;
}
desc.setLocation(locationPath);
project.create(desc, monitor);
monitor= null;
}
if (!project.isOpen()) {
project.open(monitor);
monitor= null;
}
} finally {
if (monitor != null) {
monitor.done();
}
}
}
public static void addJavaNature(IProject project, IProgressMonitor monitor) throws CoreException {
if (!project.hasNature(JavaCore.NATURE_ID)) {
IProjectDescription description = project.getDescription();
String[] prevNatures= description.getNatureIds();
String[] newNatures= new String[prevNatures.length + 1];
System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
newNatures[prevNatures.length]= JavaCore.NATURE_ID;
description.setNatureIds(newNatures);
project.setDescription(description, monitor);
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
public void configureJavaProject(IProgressMonitor monitor) throws CoreException, InterruptedException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
monitor.beginTask(NewWizardMessages.getString("BuildPathsBlock.operationdesc"), 10);
try {
Shell shell= null;
if (fSWTWidget != null && !fSWTWidget.getShell().isDisposed()) {
shell= fSWTWidget.getShell();
}
internalConfigureJavaProject(fClassPathList.getElements(), getOutputLocation(), shell, monitor);
} finally {
monitor.done();
}
}
/**
* Creates the Java project and sets the configured build path and output location.
* If the project already exists only build paths are updated.
*/
private void internalConfigureJavaProject(List classPathEntries, IPath outputLocation, Shell shell, IProgressMonitor monitor) throws CoreException, InterruptedException {
IRemoveOldBinariesQuery reorgQuery= null;
if (shell != null) {
reorgQuery= getRemoveOldBinariesQuery(shell);
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
if (reorgQuery != null) {
IPath oldOutputLocation= fCurrJProject.getOutputLocation();
if (!outputLocation.equals(oldOutputLocation)) {
IResource res= fWorkspaceRoot.findMember(oldOutputLocation);
if (res instanceof IContainer && hasClassfiles(res)) {
if (reorgQuery.doQuery(oldOutputLocation)) {
removeOldClassfiles(res);
}
}
}
}
if (!fWorkspaceRoot.exists(outputLocation)) {
IFolder folder= fWorkspaceRoot.getFolder(outputLocation);
CoreUtility.createFolder(folder, true, true, null);
}
monitor.worked(2);
int nEntries= classPathEntries.size();
IClasspathEntry[] classpath= new IClasspathEntry[nEntries];
for (int i= 0; i < nEntries; i++) {
CPListElement entry= ((CPListElement)classPathEntries.get(i));
IResource res= entry.getResource();
if ((res instanceof IFolder) && !res.exists()) {
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
CoreUtility.createFolder((IFolder)res, true, true, null);
}
classpath[i]= entry.getClasspathEntry();
URL javadocLocation= entry.getJavadocLocation();
if (javadocLocation != null) {
IPath path= entry.getPath();
if (entry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
path= JavaCore.getResolvedVariablePath(path);
}
if (path != null) {
JavaDocLocations.setLibraryJavadocLocation(path, javadocLocation);
}
}
}
monitor.worked(1);
fCurrJProject.setRawClasspath(classpath, outputLocation, new SubProgressMonitor(monitor, 7));
}
public static boolean hasClassfiles(IResource resource) throws CoreException {
if (resource.isDerived() && "class".equals(resource.getFileExtension())) {
return true;
}
if (resource instanceof IContainer) {
IResource[] members= ((IContainer) resource).members();
for (int i= 0; i < members.length; i++) {
if (hasClassfiles(members[i])) {
return true;
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
}
}
return false;
}
public static void removeOldClassfiles(IResource resource) throws CoreException {
if (resource.isDerived() && "class".equals(resource.getFileExtension())) {
resource.delete(false, null);
}
if (resource instanceof IContainer) {
IResource[] members= ((IContainer) resource).members();
for (int i= 0; i < members.length; i++) {
removeOldClassfiles(members[i]);
}
}
}
public static IRemoveOldBinariesQuery getRemoveOldBinariesQuery(final Shell shell) {
return new IRemoveOldBinariesQuery() {
public boolean doQuery(final IPath oldOutputLocation) throws InterruptedException {
final int[] res= new int[] { 1 };
shell.getDisplay().syncExec(new Runnable() {
public void run() {
String title= NewWizardMessages.getString("BuildPathsBlock.RemoveBinariesDialog.title");
String message= NewWizardMessages.getFormattedString("BuildPathsBlock.RemoveBinariesDialog.description", oldOutputLocation.toString());
MessageDialog dialog= new MessageDialog(shell, title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2);
res[0]= dialog.open();
}
});
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
if (res[0] == 0) {
return true;
} else if (res[0] == 1) {
return false;
}
throw new InterruptedException();
}
};
}
private IContainer chooseContainer() {
Class[] acceptedClasses= new Class[] { IProject.class, IFolder.class };
ISelectionStatusValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);
IProject[] allProjects= fWorkspaceRoot.getProjects();
ArrayList rejectedElements= new ArrayList(allProjects.length);
IProject currProject= fCurrJProject.getProject();
for (int i= 0; i < allProjects.length; i++) {
if (!allProjects[i].equals(currProject)) {
rejectedElements.add(allProjects[i]);
}
}
ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
ILabelProvider lp= new WorkbenchLabelProvider();
ITreeContentProvider cp= new WorkbenchContentProvider();
IResource initSelection= null;
if (fOutputLocationPath != null) {
initSelection= fWorkspaceRoot.findMember(fOutputLocationPath);
}
|
17,149 |
Bug 17149 Libraries-Path in Java Build Path gets broken
|
eclipse-version: F1, linux-gtk bug: "Libraries-Path" of external JARs in "Java Build Path" gets broken I observed the following bug: 1) Call the "Java Build Path"-Dialog via selecting a project, "Properties" via right mouse button and then "Java Build Path". 2) Enter a library path via "Add External JARs..." and press "OK" Everything is ok so far. 3) Call the "Java Build Path"-Dialog again: The path to the library I entered before is broken and eclipse does not find the library any more. The path in the project's .classpath-file is ok. example: I created the project "dummy". Tried to add the external JAR "jdom.jar" to the Library-Path. jdom.jar resides in the directory "/home/mike/java/workspace/jdom/build". I selected the path as an "external JAR" . The path is shown correctly in the libraries-list. When I called the "Java Build Path"-Dialog again the path listed in the "Java Build Path"-Dialog / "Libraries" is changed to "home/mike/java/workspace/jdom/build/jdom.jar" (without the first slash). When selecting this entry and clicking on "Edit" the path shown in the "Edit Class Folder"-dialog is "mike/java/workspace/jdom/build/jdom.jar" (without "/home/"). After trying to correct the path manually in the "Edit Class Folder"-dialog the path shown in "Java Build Path"-Dialog / "Libraries" is "dummy/home/mike/java/workspace/jdom/build/jdom.jar". My workaround so far is to create variables for each library and to enter the library paths as variables.
|
verified fixed
|
59a1d0a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T16:52:06Z | 2002-05-23T07:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);
dialog.setTitle(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.title"));
dialog.setValidator(validator);
dialog.setMessage(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.description"));
dialog.addFilter(filter);
dialog.setInput(fWorkspaceRoot);
dialog.setInitialSelection(initSelection);
if (dialog.open() == dialog.OK) {
return (IContainer)dialog.getFirstResult();
}
return null;
}
private void tabChanged(Widget widget) {
if (widget instanceof TabItem) {
BuildPathBasePage newPage= (BuildPathBasePage) ((TabItem) widget).getData();
if (fCurrPage != null) {
List selection= fCurrPage.getSelection();
if (!selection.isEmpty()) {
newPage.setSelection(selection);
}
}
fCurrPage= newPage;
}
}
}
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
package org.eclipse.jdt.internal.ui.text.correction;
import java.util.ArrayList;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.Assignment;
import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.ReturnStatement;
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.Statement;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.codemanipulation.ImportEdit;
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
import org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange;
import org.eclipse.jdt.internal.corext.refactoring.nls.NLSRefactoring;
import org.eclipse.jdt.internal.corext.refactoring.surround.SurroundWithTryCatchRefactoring;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
import org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizard;
/**
*/
public class LocalCorrectionsSubProcessor {
public static void addCastProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
String[] args= problemPos.getArguments();
if (args.length != 2) {
return;
}
ICompilationUnit cu= problemPos.getCompilationUnit();
String castDestType= args[1];
CompilationUnit astRoot= AST.parseCompilationUnit(cu, false);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
int pos= problemPos.getOffset();
if (selectedNode != null && selectedNode.getParent() != null) {
int parentNodeType= selectedNode.getParent().getNodeType();
if (parentNodeType == ASTNode.ASSIGNMENT) {
Assignment assign= (Assignment) selectedNode.getParent();
if (selectedNode.equals(assign.getLeftHandSide())) {
pos= assign.getRightHandSide().getStartPosition();
}
} else if (parentNodeType == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {
VariableDeclarationFragment frag= (VariableDeclarationFragment) selectedNode.getParent();
if (selectedNode.equals(frag.getName())) {
pos= frag.getInitializer().getStartPosition();
}
}
}
String simpleCastDestType= Signature.getSimpleName(castDestType);
String cast= '(' + simpleCastDestType + ')';
String formatted= StubUtility.codeFormat(cast + 'x', 0, "");
if (formatted.charAt(formatted.length() - 1) == 'x') {
cast= formatted.substring(0, formatted.length() - 1);
}
String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.addcast.description", castDestType);
InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, cast, 1);
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
ImportEdit edit= new ImportEdit(cu, settings);
edit.addImport(castDestType);
proposal.getCompilationUnitChange().addTextEdit("import", edit);
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
proposals.add(proposal);
if (selectedNode != null && selectedNode.getParent() instanceof VariableDeclarationFragment) {
VariableDeclarationFragment fragment= (VariableDeclarationFragment) selectedNode.getParent();
VariableDeclarationStatement statement= (VariableDeclarationStatement) fragment.getParent();
if (statement.fragments().size() == 1) {
String castType= args[0];
String simpleCastType= Signature.getSimpleName(castType);
Type type= statement.getType();
label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.addcast_var.description", simpleCastType);
ReplaceCorrectionProposal varProposal= new ReplaceCorrectionProposal(label, cu, type.getStartPosition(), type.getLength(), simpleCastType, 1);
edit= new ImportEdit(cu, settings);
edit.addImport(castType);
varProposal.getCompilationUnitChange().addTextEdit("import", edit);
proposals.add(varProposal);
}
}
}
public static void addUncaughtExceptionProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
if (selectedNode == null) {
return;
}
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
while (selectedNode != null && !(selectedNode instanceof Statement)) {
selectedNode= selectedNode.getParent();
}
if (selectedNode != null) {
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
SurroundWithTryCatchRefactoring refactoring= new SurroundWithTryCatchRefactoring(cu, selectedNode.getStartPosition(), selectedNode.getLength(), settings, null);
refactoring.setSaveChanges(false);
if (refactoring.checkActivationBasics(astRoot, null).isOK()) {
String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.surroundwith.description");
CUCorrectionProposal proposal= new CUCorrectionProposal(label, (CompilationUnitChange) refactoring.createChange(null), 0);
proposals.add(proposal);
}
}
BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);
if (decl instanceof MethodDeclaration) {
String uncaughtName= problemPos.getArguments()[0];
MethodDeclaration methodDecl= (MethodDeclaration) decl;
SimpleName name= methodDecl.getName();
int pos= name.getStartPosition() + name.getLength();
StringBuffer insertString= new StringBuffer();
if (methodDecl.thrownExceptions().isEmpty()) {
insertString.append(" throws ");
} else {
insertString.append(", ");
}
insertString.append(Signature.getSimpleName(uncaughtName));
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.addthrows.description");
InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, insertString.toString(), 0);
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
ImportEdit edit= new ImportEdit(cu, settings);
edit.addImport(uncaughtName);
proposal.getCompilationUnitChange().addTextEdit("import", edit);
proposals.add(proposal);
}
}
public static void addMethodWithConstrNameProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, false);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof MethodDeclaration) {
MethodDeclaration declaration= (MethodDeclaration) selectedNode.getParent();
int start= declaration.getReturnType().getStartPosition();
int end= declaration.getName().getStartPosition();
String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.constrnamemethod.description");
ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, start, end - start, "", 0);
proposals.add(proposal);
}
}
public static void addVoidMethodReturnsProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
if (selectedNode != null) {
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
if (selectedNode.getParent() instanceof ReturnStatement) {
ReturnStatement returnStatement= (ReturnStatement) selectedNode.getParent();
Expression expr= returnStatement.getExpression();
if (expr != null) {
ITypeBinding binding= expr.resolveTypeBinding();
if (binding != null) {
if ("null".equals(binding.getName())) {
binding= selectedNode.getAST().resolveWellKnownType("java.lang.Object");
}
BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(returnStatement);
if (decl instanceof MethodDeclaration) {
ASTNode returnType= ((MethodDeclaration) decl).getReturnType();
String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.voidmethodreturns.description") + binding.getName();
ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, returnType.getStartPosition(), returnType.getLength(), binding.getName(), 0);
proposals.add(proposal);
}
}
}
}
}
}
public static void addMissingReturnTypeProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
ICompilationUnit cu= problemPos.getCompilationUnit();
CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());
if (selectedNode != null) {
BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);
if (decl instanceof MethodDeclaration) {
final ITypeBinding[] res= new ITypeBinding[1];
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
res[0]= null;
decl.accept(new GenericVisitor() {
public boolean visit(ReturnStatement node) {
if (res[0] == null) {
Expression expr= node.getExpression();
if (expr != null) {
ITypeBinding binding= expr.resolveTypeBinding();
if (binding != null) {
res[0]= binding;
} else {
res[0]= node.getAST().resolveWellKnownType("java.lang.Object");
}
} else {
res[0]= node.getAST().resolveWellKnownType("void");
}
}
return false;
}
});
ITypeBinding type= res[0];
if (type == null) {
type= decl.getAST().resolveWellKnownType("void");
}
String str= type.getName() + " ";
int pos= ((MethodDeclaration) decl).getName().getStartPosition();
String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.missingreturntype.description", type.getName());
InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, str, 1);
|
17,171 |
Bug 17171 Quickfix: no proposal for wrong inst var initialization
|
- create the following code: public class Test { int fFoo= 1.2; } - a Quickfix bulb and a wiggly line appears for fFoo. However, pressing Cntr-1 does not show any proposals but the .log contains: java.lang.ClassCastException: org.eclipse.jdt.core.dom.FieldDeclaration at org.eclipse.jdt.internal.ui.text.correction.LocalCorrectionsSubProcessor.addCast Proposals(LocalCorrectionsSubProcessor.java:90) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorre ctions(JavaCorrectionProcessor.java:193) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeCompl etionProposals(JavaCorrectionProcessor.java:127) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1205) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:104) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:72) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:67) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1140) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer.doOperati on(JavaCorrectionSourceViewer.java:47) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer .doOperation(CompilationUnitEditor.java:217) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:88) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:127) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476)
|
verified fixed
|
1fee925
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T17:44:19Z | 2002-05-23T10:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
|
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
ImportEdit edit= new ImportEdit(problemPos.getCompilationUnit(), settings);
edit.addImport(type.getName());
proposal.getCompilationUnitChange().addTextEdit("import", edit);
proposals.add(proposal);
}
}
}
public static void addNLSProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {
final ICompilationUnit cu= problemPos.getCompilationUnit();
String name= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.description");
ChangeCorrectionProposal proposal= new ChangeCorrectionProposal(name, null, 0) {
public void apply(IDocument document) {
try {
NLSRefactoring refactoring= new NLSRefactoring(cu);
ExternalizeWizard wizard= new ExternalizeWizard(refactoring);
String dialogTitle= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.dialog.title");
new RefactoringStarter().activate(refactoring, wizard, dialogTitle, true);
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
};
proposals.add(proposal);
}
}
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage;
public class JavaElementLabels {
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Method names contain parameter types.
* e.g. <code>foo(int)</code>
*/
public final static int M_PARAMETER_TYPES= 1 << 0;
/**
* Method names contain parameter names.
* e.g. <code>foo(index)</code>
*/
public final static int M_PARAMETER_NAMES= 1 << 1;
/**
* Method names contain thrown exceptions.
* e.g. <code>foo throws IOException</code>
*/
public final static int M_EXCEPTIONS= 1 << 2;
/**
* Method names contain return type (appended)
* e.g. <code>foo : int</code>
*/
public final static int M_APP_RETURNTYPE= 1 << 3;
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Method names contain return type (appended)
* e.g. <code>int foo</code>
*/
public final static int M_PRE_RETURNTYPE= 1 << 4;
/**
* Method names are fully qualified.
* e.g. <code>java.util.Vector.size</code>
*/
public final static int M_FULLY_QUALIFIED= 1 << 5;
/**
* Method names are post qualified.
* e.g. <code>size - java.util.Vector</code>
*/
public final static int M_POST_QUALIFIED= 1 << 6;
/**
* Initializer names are fully qualified.
* e.g. <code>java.util.Vector.{ ... }</code>
*/
public final static int I_FULLY_QUALIFIED= 1 << 7;
/**
* Type names are post qualified.
* e.g. <code>{ ... } - java.util.Map</code>
*/
public final static int I_POST_QUALIFIED= 1 << 8;
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Field names contain the declared type (appended)
* e.g. <code>int fHello</code>
*/
public final static int F_APP_TYPE_SIGNATURE= 1 << 9;
/**
* Field names contain the declared type (prepended)
* e.g. <code>fHello : int</code>
*/
public final static int F_PRE_TYPE_SIGNATURE= 1 << 10;
/**
* Fields names are fully qualified.
* e.g. <code>java.lang.System.out</code>
*/
public final static int F_FULLY_QUALIFIED= 1 << 11;
/**
* Fields names are post qualified.
* e.g. <code>out - java.lang.System</code>
*/
public final static int F_POST_QUALIFIED= 1 << 12;
/**
* Type names are fully qualified.
* e.g. <code>java.util.Map.MapEntry</code>
*/
public final static int T_FULLY_QUALIFIED= 1 << 13;
/**
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
* Type names are type container qualified.
* e.g. <code>Map.MapEntry</code>
*/
public final static int T_CONTAINER_QUALIFIED= 1 << 14;
/**
* Type names are post qualified.
* e.g. <code>MapEntry - java.util.Map</code>
*/
public final static int T_POST_QUALIFIED= 1 << 15;
/**
* Declarations (import container / declarartion, package declarartion) are qualified.
* e.g. <code>java.util.Vector.class/import container</code>
*/
public final static int D_QUALIFIED= 1 << 16;
/**
* Declarations (import container / declarartion, package declarartion) are post qualified.
* e.g. <code>import container - java.util.Vector.class</code>
*/
public final static int D_POST_QUALIFIED= 1 << 17;
/**
* Class file names are fully qualified.
* e.g. <code>java.util.Vector.class</code>
*/
public final static int CF_QUALIFIED= 1 << 18;
/**
* Class file names are post qualified.
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
* e.g. <code>Vector.class - java.util</code>
*/
public final static int CF_POST_QUALIFIED= 1 << 19;
/**
* Compilation unit names are fully qualified.
* e.g. <code>java.util.Vector.java</code>
*/
public final static int CU_QUALIFIED= 1 << 20;
/**
* Compilation unit names are post qualified.
* e.g. <code>Vector.java - java.util</code>
*/
public final static int CU_POST_QUALIFIED= 1 << 21;
/**
* Package names are qualified.
* e.g. <code>MyProject/src/java.util</code>
*/
public final static int P_QUALIFIED= 1 << 22;
/**
* Package names are post qualified.
* e.g. <code>java.util - MyProject/src</code>
*/
public final static int P_POST_QUALIFIED= 1 << 23;
/**
* Package Fragment Roots contain variable name if from a variable.
* e.g. <code>JRE_LIB - c:\java\lib\rt.jar</code>
*/
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
public final static int ROOT_VARIABLE= 1 << 24;
/**
* Package Fragment Roots contain the project name if not an archive (prepended).
* e.g. <code>MyProject/src</code>
*/
public final static int ROOT_QUALIFIED= 1 << 25;
/**
* Package Fragment Roots contain the project name if not an archive (appended).
* e.g. <code>src - MyProject</code>
*/
public final static int ROOT_POST_QUALIFIED= 1 << 26;
/**
* Add root path to all elements except Package Fragment Roots and Java projects.
* e.g. <code>java.lang.Vector - c:\java\lib\rt.jar</code>
* Option only applies to getElementLabel
*/
public final static int APPEND_ROOT_PATH= 1 << 27;
/**
* Add root path to all elements except Package Fragment Roots and Java projects.
* e.g. <code>java.lang.Vector - c:\java\lib\rt.jar</code>
* Option only applies to getElementLabel
*/
public final static int PREPEND_ROOT_PATH= 1 << 28;
/**
* Package names are compressed.
* e.g. <code>o*.e*.search</code>
*/
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
public final static int P_COMPRESSED= 1 << 29;
/**
* Qualify all elements
*/
public final static int ALL_FULLY_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED | P_QUALIFIED | ROOT_QUALIFIED;
/**
* Post qualify all elements
*/
public final static int ALL_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED | P_POST_QUALIFIED | ROOT_POST_QUALIFIED;
/**
* Default options (M_PARAMETER_TYPES enabled)
*/
public final static int ALL_DEFAULT= M_PARAMETER_TYPES;
/**
* Default qualify options (All except Root and Package)
*/
public final static int DEFAULT_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED;
/**
* Default post qualify options (All except Root and Package)
*/
public final static int DEFAULT_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED;
private final static String CONCAT_STRING= JavaUIMessages.getString("JavaElementLabels.concat_string");
private final static String COMMA_STRING= JavaUIMessages.getString("JavaElementLabels.comma_string");
private final static String DECL_STRING= JavaUIMessages.getString("JavaElementLabels.declseparator_string");
/*
* Package name compression
*/
private static String fgPkgNamePattern= "";
private static String fgPkgNamePrefix;
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
private static String fgPkgNamePostfix;
private static int fgPkgNameChars;
private static int fgPkgNameLength;
private JavaElementLabels() {
}
private static boolean getFlag(int flags, int flag) {
return (flags & flag) != 0;
}
public static String getTextLabel(Object obj, int flags) {
if (obj instanceof IJavaElement) {
return getElementLabel((IJavaElement) obj, flags);
} else if (obj instanceof IAdaptable) {
IWorkbenchAdapter wbadapter= (IWorkbenchAdapter) ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
if (wbadapter != null) {
return wbadapter.getLabel(obj);
}
}
return "";
}
/**
* Returns the label for a Java element. Flags as defined above.
*/
public static String getElementLabel(IJavaElement element, int flags) {
StringBuffer buf= new StringBuffer();
getElementLabel(element, flags, buf);
return buf.toString();
}
/**
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
* Returns the label for a Java element. Flags as defined above.
*/
public static void getElementLabel(IJavaElement element, int flags, StringBuffer buf) {
int type= element.getElementType();
IPackageFragmentRoot root= null;
if (type != IJavaElement.JAVA_MODEL && type != IJavaElement.JAVA_PROJECT && type != IJavaElement.PACKAGE_FRAGMENT_ROOT)
root= JavaModelUtil.getPackageFragmentRoot(element);
if (root != null && getFlag(flags, PREPEND_ROOT_PATH)) {
getPackageFragmentRootLabel(root, ROOT_QUALIFIED, buf);
buf.append(CONCAT_STRING);
}
switch (type) {
case IJavaElement.METHOD:
getMethodLabel((IMethod) element, flags, buf);
break;
case IJavaElement.FIELD:
getFieldLabel((IField) element, flags, buf);
break;
case IJavaElement.INITIALIZER:
getInitializerLabel((IInitializer) element, flags, buf);
break;
case IJavaElement.TYPE:
getTypeLabel((IType) element, flags, buf);
break;
case IJavaElement.CLASS_FILE:
getClassFileLabel((IClassFile) element, flags, buf);
break;
case IJavaElement.COMPILATION_UNIT:
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
getCompilationUnitLabel((ICompilationUnit) element, flags, buf);
break;
case IJavaElement.PACKAGE_FRAGMENT:
getPackageFragmentLabel((IPackageFragment) element, flags, buf);
break;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
getPackageFragmentRootLabel((IPackageFragmentRoot) element, flags, buf);
break;
case IJavaElement.IMPORT_CONTAINER:
case IJavaElement.IMPORT_DECLARATION:
case IJavaElement.PACKAGE_DECLARATION:
getDeclararionLabel(element, flags, buf);
break;
case IJavaElement.JAVA_PROJECT:
case IJavaElement.JAVA_MODEL:
buf.append(element.getElementName());
break;
default:
buf.append(element.getElementName());
}
if (root != null && getFlag(flags, APPEND_ROOT_PATH)) {
buf.append(CONCAT_STRING);
getPackageFragmentRootLabel(root, ROOT_QUALIFIED, buf);
}
}
/**
* Appends the label for a method to a StringBuffer. Considers the M_* flags.
*/
public static void getMethodLabel(IMethod method, int flags, StringBuffer buf) {
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
try {
if (getFlag(flags, M_PRE_RETURNTYPE) && method.exists() && !method.isConstructor()) {
buf.append(Signature.getSimpleName(Signature.toString(method.getReturnType())));
buf.append(' ');
}
if (getFlag(flags, M_FULLY_QUALIFIED)) {
getTypeLabel(method.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(method.getElementName());
if (getFlag(flags, M_PARAMETER_TYPES | M_PARAMETER_NAMES)) {
buf.append('(');
String[] types= getFlag(flags, M_PARAMETER_TYPES) ? method.getParameterTypes() : null;
String[] names= (getFlag(flags, M_PARAMETER_NAMES) && method.exists()) ? method.getParameterNames() : null;
int nParams= types != null ? types.length : names.length;
for (int i= 0; i < nParams; i++) {
if (i > 0) {
buf.append(COMMA_STRING);
}
if (types != null) {
buf.append(Signature.getSimpleName(Signature.toString(types[i])));
}
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (names != null) {
if (types != null) {
buf.append(' ');
}
buf.append(names[i]);
}
}
buf.append(')');
}
if (getFlag(flags, M_EXCEPTIONS) && method.exists()) {
String[] types= method.getExceptionTypes();
if (types.length > 0) {
buf.append(" throws ");
for (int i= 0; i < types.length; i++) {
if (i > 0) {
buf.append(COMMA_STRING);
}
buf.append(Signature.getSimpleName(Signature.toString(types[i])));
}
}
}
if (getFlag(flags, M_APP_RETURNTYPE) && method.exists() && !method.isConstructor()) {
buf.append(DECL_STRING);
buf.append(Signature.getSimpleName(Signature.toString(method.getReturnType())));
}
if (getFlag(flags, M_POST_QUALIFIED)) {
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
buf.append(CONCAT_STRING);
getTypeLabel(method.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
/**
* Appends the label for a field to a StringBuffer. Considers the F_* flags.
*/
public static void getFieldLabel(IField field, int flags, StringBuffer buf) {
try {
if (getFlag(flags, F_PRE_TYPE_SIGNATURE) && field.exists()) {
buf.append(Signature.toString(field.getTypeSignature()));
buf.append(' ');
}
if (getFlag(flags, F_FULLY_QUALIFIED)) {
getTypeLabel(field.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(field.getElementName());
if (getFlag(flags, F_APP_TYPE_SIGNATURE) && field.exists()) {
buf.append(DECL_STRING);
buf.append(Signature.toString(field.getTypeSignature()));
}
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (getFlag(flags, F_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getTypeLabel(field.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
/**
* Appends the label for a initializer to a StringBuffer. Considers the I_* flags.
*/
public static void getInitializerLabel(IInitializer initializer, int flags, StringBuffer buf) {
if (getFlag(flags, I_FULLY_QUALIFIED)) {
getTypeLabel(initializer.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(JavaUIMessages.getString("JavaElementLabels.initializer"));
if (getFlag(flags, I_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getTypeLabel(initializer.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
}
/**
* Appends the label for a type to a StringBuffer. Considers the T_* flags.
*/
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
public static void getTypeLabel(IType type, int flags, StringBuffer buf) {
if (getFlag(flags, T_FULLY_QUALIFIED)) {
buf.append(JavaModelUtil.getFullyQualifiedName(type));
} else if (getFlag(flags, T_CONTAINER_QUALIFIED)) {
buf.append(JavaModelUtil.getTypeQualifiedName(type));
} else {
buf.append(type.getElementName());
}
if (getFlag(flags, T_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
IType declaringType= type.getDeclaringType();
if (declaringType != null) {
buf.append(JavaModelUtil.getFullyQualifiedName(declaringType));
} else {
getPackageFragmentLabel(type.getPackageFragment(), 0, buf);
}
}
}
/**
* Appends the label for a declaration to a StringBuffer. Considers the D_* flags.
*/
public static void getDeclararionLabel(IJavaElement declaration, int flags, StringBuffer buf) {
if (getFlag(flags, D_QUALIFIED)) {
IJavaElement openable= (IJavaElement) declaration.getOpenable();
if (openable != null) {
buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED));
buf.append('/');
}
}
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (declaration.getElementType() == IJavaElement.IMPORT_CONTAINER) {
buf.append(JavaUIMessages.getString("JavaElementLabels.import_container"));
} else {
buf.append(declaration.getElementName());
}
if (getFlag(flags, D_POST_QUALIFIED)) {
IJavaElement openable= (IJavaElement) declaration.getOpenable();
if (openable != null) {
buf.append(CONCAT_STRING);
buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED));
}
}
}
/**
* Appends the label for a class file to a StringBuffer. Considers the CF_* flags.
*/
public static void getClassFileLabel(IClassFile classFile, int flags, StringBuffer buf) {
if (getFlag(flags, CF_QUALIFIED)) {
IPackageFragment pack= (IPackageFragment) classFile.getParent();
if (!pack.isDefaultPackage()) {
buf.append(pack.getElementName());
buf.append('.');
}
}
buf.append(classFile.getElementName());
if (getFlag(flags, CF_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
getPackageFragmentLabel((IPackageFragment) classFile.getParent(), 0, buf);
}
}
/**
* Appends the label for a compilation unit to a StringBuffer. Considers the CU_* flags.
*/
public static void getCompilationUnitLabel(ICompilationUnit cu, int flags, StringBuffer buf) {
if (getFlag(flags, CU_QUALIFIED)) {
IPackageFragment pack= (IPackageFragment) cu.getParent();
if (!pack.isDefaultPackage()) {
buf.append(pack.getElementName());
buf.append('.');
}
}
buf.append(cu.getElementName());
if (getFlag(flags, CU_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getPackageFragmentLabel((IPackageFragment) cu.getParent(), 0, buf);
}
}
/**
* Appends the label for a package fragment to a StringBuffer. Considers the P_* flags.
*/
public static void getPackageFragmentLabel(IPackageFragment pack, int flags, StringBuffer buf) {
if (getFlag(flags, P_QUALIFIED)) {
getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
buf.append('/');
}
refreshPackageNamePattern();
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (pack.isDefaultPackage()) {
buf.append(JavaUIMessages.getString("JavaElementLabels.default_package"));
} else if (getFlag(flags, P_COMPRESSED) && fgPkgNameLength >= 0) {
String name= pack.getElementName();
int start= 0;
int dot= name.indexOf('.', start);
while (dot > 0) {
if (dot - start > fgPkgNameLength-1) {
buf.append(fgPkgNamePrefix);
if (fgPkgNameChars > 0)
buf.append(name.substring(start, Math.min(start+ fgPkgNameChars, dot)));
buf.append(fgPkgNamePostfix);
} else
buf.append(name.substring(start, dot + 1));
start= dot + 1;
dot= name.indexOf('.', start);
}
buf.append(name.substring(start));
} else {
buf.append(pack.getElementName());
}
if (getFlag(flags, P_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
}
}
/**
* Appends the label for a package fragment root to a StringBuffer. Considers the ROOT_* flags.
*/
public static void getPackageFragmentRootLabel(IPackageFragmentRoot root, int flags, StringBuffer buf) {
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (root.isArchive() && getFlag(flags, ROOT_VARIABLE)) {
try {
IClasspathEntry rawEntry= root.getRawClasspathEntry();
if (rawEntry != null) {
if (rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
buf.append(rawEntry.getPath().makeRelative());
buf.append(CONCAT_STRING);
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
if (root.isExternal()) {
buf.append(root.getPath().toOSString());
} else {
if (getFlag(flags, ROOT_QUALIFIED)) {
buf.append(root.getPath().makeRelative().toString());
} else {
buf.append(root.getElementName());
}
if (getFlag(flags, ROOT_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
buf.append(root.getParent().getElementName());
}
}
}
private static void refreshPackageNamePattern() {
|
16,858 |
Bug 16858 Preceding space in package compression pattern sometimes ignored
|
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
|
verified fixed
|
90d99d6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:01:49Z | 2002-05-22T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
String pattern= AppearancePreferencePage.getPkgNamePatternForPackagesView();
if (pattern.equals(fgPkgNamePattern))
return;
else if (pattern.equals("")) {
fgPkgNameLength= -1;
return;
}
fgPkgNamePattern= pattern;
int i= 0;
fgPkgNameChars= 0;
fgPkgNamePrefix= "";
fgPkgNamePostfix= "";
while (i < pattern.length()) {
char ch= pattern.charAt(i);
if (Character.isDigit(ch)) {
fgPkgNameChars= ch-48;
if (i > 0 && i < pattern.length() - 1)
fgPkgNamePrefix= pattern.substring(0, i);
if (i >= 0 && i < pattern.length())
fgPkgNamePostfix= pattern.substring(i+1);
fgPkgNameLength= fgPkgNamePrefix.length() + fgPkgNameChars + fgPkgNamePostfix.length();
return;
}
i++;
}
fgPkgNamePrefix= pattern;
fgPkgNameLength= pattern.length();
}
}
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.lang.reflect.InvocationTargetException;
import java.util.Hashtable;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IResource;
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
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.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
public class JavaBuilderPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
private StringDialogField fResourceFilterField;
private StatusInfo fResourceFilterStatus;
private SelectionButtonDialogField fAbortInvalidClasspathField;
private Hashtable fWorkingValues;
private static final String PREF_RESOURCE_FILTER= JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER;
private static final String PREF_BUILD_INVALID_CLASSPATH= JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH;
private static final String ABORT= JavaCore.ABORT;
private static final String IGNORE= JavaCore.IGNORE;
private static String[] getAllKeys() {
return new String[] {
PREF_RESOURCE_FILTER, PREF_BUILD_INVALID_CLASSPATH
};
}
public JavaBuilderPreferencePage() {
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(JavaUIMessages.getString("JavaBuilderPreferencePage.description"));
fWorkingValues= JavaCore.getOptions();
IDialogFieldListener listener= new IDialogFieldListener() {
public void dialogFieldChanged(DialogField field) {
updateValues();
}
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
};
fResourceFilterField= new StringDialogField();
fResourceFilterField.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.filter.label"));
fAbortInvalidClasspathField= new SelectionButtonDialogField(SWT.CHECK);
fAbortInvalidClasspathField.setDialogFieldListener(listener);
fAbortInvalidClasspathField.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.abortinvalidprojects.label"));
updateControls();
fResourceFilterField.setDialogFieldListener(listener);
fAbortInvalidClasspathField.setDialogFieldListener(listener);
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
Composite composite= new Composite(parent, SWT.NONE);
composite.setLayout(layout);
DialogField resourceFilterLabel= new DialogField();
resourceFilterLabel.setLabelText(JavaUIMessages.getString("JavaBuilderPreferencePage.filter.description"));
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
resourceFilterLabel.doFillIntoGrid(composite, 2);
LayoutUtil.setWidthHint(resourceFilterLabel.getLabelControl(null), convertWidthInCharsToPixels(80));
fResourceFilterField.doFillIntoGrid(composite, 2);
LayoutUtil.setHorizontalGrabbing(fResourceFilterField.getTextControl(null));
LayoutUtil.setWidthHint(fResourceFilterField.getTextControl(null), convertWidthInCharsToPixels(50));
fAbortInvalidClasspathField.doFillIntoGrid(composite, 2);
return composite;
}
/**
* Initializes the current options (read from preference store)
*/
public static void initDefaults(IPreferenceStore store) {
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
String[] allKeys= getAllKeys();
Hashtable actualOptions= JavaCore.getOptions();
boolean hasChanges= false;
for (int i= 0; i < allKeys.length; i++) {
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
String key= allKeys[i];
String val= (String) fWorkingValues.get(key);
String oldVal= (String) actualOptions.get(key);
hasChanges= hasChanges | !val.equals(oldVal);
actualOptions.put(key, val);
}
if (hasChanges) {
String title= JavaUIMessages.getString("JavaBuilderPreferencePage.needsbuild.title");
String message= JavaUIMessages.getString("JavaBuilderPreferencePage.needsbuild.message");
MessageDialog dialog= new MessageDialog(getShell(), title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2);
int res= dialog.open();
if (res != 0 && res != 1) {
JavaPlugin.getDefault().savePluginPreferences();
return false;
}
JavaCore.setOptions(actualOptions);
if (res == 0) {
doFullBuild();
}
}
JavaPlugin.getDefault().savePluginPreferences();
return super.performOk();
}
private void updateValues() {
IStatus status= validateResourceFilters();
fWorkingValues.put(PREF_BUILD_INVALID_CLASSPATH, fAbortInvalidClasspathField.isSelected() ? ABORT : IGNORE);
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
updateStatus(status);
}
private String[] getFilters(String text) {
StringTokenizer tok= new StringTokenizer(text, ",");
int nTokens= tok.countTokens();
String[] res= new String[nTokens];
for (int i= 0; i < res.length; i++) {
res[i]= tok.nextToken().trim();
}
return res;
}
private IStatus validateResourceFilters() {
IWorkspace workspace= ResourcesPlugin.getWorkspace();
String text= fResourceFilterField.getText();
String[] filters= getFilters(text);
for (int i= 0; i < filters.length; i++) {
String fileName= filters[i].replace('*', 'x');
IStatus status= workspace.validateName(fileName, IResource.FILE);
if (status.matches(IStatus.ERROR)) {
String message= JavaUIMessages.getFormattedString("JavaBuilderPreferencePage.filter.invalidsegment.error", status.getMessage());
return new StatusInfo(IStatus.ERROR, message);
}
}
StringBuffer buf= new StringBuffer();
for (int i= 0; i < filters.length; i++) {
if (i > 0) {
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
buf.append(',');
}
buf.append(filters[i]);
}
fWorkingValues.put(PREF_RESOURCE_FILTER, buf.toString());
return new StatusInfo();
}
private void updateStatus(IStatus status) {
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private void doFullBuild() {
ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
try {
dialog.run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
});
} catch (InterruptedException e) {
} catch (InvocationTargetException e) {
String title= JavaUIMessages.getString("JavaBuilderPreferencePage.builderror.title");
String message= JavaUIMessages.getString("JavaBuilderPreferencePage.builderror.message");
ExceptionHandler.handle(e, getShell(), title, message);
|
16,733 |
Bug 16733 Builder pref - Cannot exclude folder from resource copying
|
Build 20020521 - F1 UI builder pref page currently prevents enter a folder name for the resource copy exclusion filter (folder is specified with a '/' suffix). Since 20020521, JDT/Core now supports excluding folders: The setting allowing for filtering resource copy now also supports folder filtering. Folder names are recognized by their '/' suffix, e.g. "META-INF/" specifies filtering out all folder named 'META-INF' (and their contents)
|
verified fixed
|
a189576
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:07:32Z | 2002-05-22T09:33:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
|
}
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fWorkingValues= JavaCore.getDefaultOptions();
updateControls();
updateValues();
super.performDefaults();
}
private void updateControls() {
String[] filters= getFilters((String) fWorkingValues.get(PREF_RESOURCE_FILTER));
StringBuffer buf= new StringBuffer();
for (int i= 0; i < filters.length; i++) {
if (i > 0) {
buf.append(", ");
}
buf.append(filters[i]);
}
fResourceFilterField.setText(buf.toString());
String build= (String) fWorkingValues.get(PREF_BUILD_INVALID_CLASSPATH);
fAbortInvalidClasspathField.setSelection(ABORT.equals(build));
}
}
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards.buildpaths;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
import org.eclipse.ui.help.WorkbenchHelp;
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
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.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
import org.eclipse.jdt.internal.ui.util.PixelConverter;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
import org.eclipse.jdt.internal.ui.viewsupport.ImageDisposer;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.CheckedListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
public class BuildPathsBlock {
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
public static interface IRemoveOldBinariesQuery {
/**
* Do the callback. Returns <code>true</code> if .class files should be removed from the
* old output location.
*/
boolean doQuery(IPath oldOutputLocation) throws InterruptedException;
}
private IWorkspaceRoot fWorkspaceRoot;
private CheckedListDialogField fClassPathList;
private StringButtonDialogField fBuildPathDialogField;
private StatusInfo fClassPathStatus;
private StatusInfo fBuildPathStatus;
private IJavaProject fCurrJProject;
private IPath fOutputLocationPath;
private IStatusChangeListener fContext;
private Control fSWTWidget;
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
private boolean fShowSourceFolderPage;
private SourceContainerWorkbookPage fSourceContainerPage;
private ProjectsWorkbookPage fProjectsPage;
private LibrariesWorkbookPage fLibrariesPage;
private BuildPathBasePage fCurrPage;
public BuildPathsBlock(IWorkspaceRoot root, IStatusChangeListener context, boolean showSourceFolders) {
fWorkspaceRoot= root;
fContext= context;
fShowSourceFolderPage= showSourceFolders;
fSourceContainerPage= null;
fLibrariesPage= null;
fProjectsPage= null;
fCurrPage= null;
BuildPathAdapter adapter= new BuildPathAdapter();
String[] buttonLabels= new String[] {
NewWizardMessages.getString("BuildPathsBlock.classpath.up.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.down.button"),
null,
NewWizardMessages.getString("BuildPathsBlock.classpath.checkall.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.uncheckall.button")
};
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
fClassPathList= new CheckedListDialogField(null, buttonLabels, new CPListLabelProvider());
fClassPathList.setDialogFieldListener(adapter);
fClassPathList.setLabelText(NewWizardMessages.getString("BuildPathsBlock.classpath.label"));
fClassPathList.setUpButtonIndex(0);
fClassPathList.setDownButtonIndex(1);
fClassPathList.setCheckAllButtonIndex(3);
fClassPathList.setUncheckAllButtonIndex(4);
fBuildPathDialogField= new StringButtonDialogField(adapter);
fBuildPathDialogField.setButtonLabel(NewWizardMessages.getString("BuildPathsBlock.buildpath.button"));
fBuildPathDialogField.setDialogFieldListener(adapter);
fBuildPathDialogField.setLabelText(NewWizardMessages.getString("BuildPathsBlock.buildpath.label"));
fBuildPathStatus= new StatusInfo();
fClassPathStatus= new StatusInfo();
fCurrJProject= null;
}
public Control createControl(Composite parent) {
fSWTWidget= parent;
PixelConverter converter= new PixelConverter(parent);
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
layout.numColumns= 1;
composite.setLayout(layout);
TabFolder folder= new TabFolder(composite, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
folder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
tabChanged(e.item);
}
});
ImageRegistry imageRegistry= JavaPlugin.getDefault().getImageRegistry();
TabItem item;
fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.source"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT));
item.setData(fSourceContainerPage);
item.setControl(fSourceContainerPage.getControl(folder));
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
Image projectImage= workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT);
fProjectsPage= new ProjectsWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.projects"));
item.setImage(projectImage);
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
item.setData(fProjectsPage);
item.setControl(fProjectsPage.getControl(folder));
fLibrariesPage= new LibrariesWorkbookPage(fWorkspaceRoot, fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.libraries"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_LIBRARY));
item.setData(fLibrariesPage);
item.setControl(fLibrariesPage.getControl(folder));
Image cpoImage= JavaPluginImages.DESC_TOOL_CLASSPATH_ORDER.createImage();
composite.addDisposeListener(new ImageDisposer(cpoImage));
ClasspathOrderingWorkbookPage ordpage= new ClasspathOrderingWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.order"));
item.setImage(cpoImage);
item.setData(ordpage);
item.setControl(ordpage.getControl(folder));
if (fCurrJProject != null) {
fSourceContainerPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
}
Composite editorcomp= new Composite(composite, SWT.NONE);
DialogField[] editors= new DialogField[] { fBuildPathDialogField };
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
LayoutUtil.doDefaultLayout(editorcomp, editors, true, 0, 0);
int maxFieldWidth= converter.convertWidthInCharsToPixels(40);
LayoutUtil.setWidthHint(fBuildPathDialogField.getTextControl(null), maxFieldWidth);
LayoutUtil.setHorizontalGrabbing(fBuildPathDialogField.getTextControl(null));
editorcomp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (fShowSourceFolderPage) {
folder.setSelection(0);
fCurrPage= fSourceContainerPage;
} else {
folder.setSelection(3);
fCurrPage= ordpage;
fClassPathList.selectFirstElement();
}
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.BUILD_PATH_BLOCK);
return composite;
}
private Shell getShell() {
if (fSWTWidget != null) {
return fSWTWidget.getShell();
}
return JavaPlugin.getActiveWorkbenchShell();
}
/**
* Initializes the classpath for the given project. Multiple calls to init are allowed,
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
* but all existing settings will be cleared and replace by the given or default paths.
* @param project The java project to configure. Does not have to exist.
* @param outputLocation The output location to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project- the
* output location of the existing project
* @param classpathEntries The classpath entries to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project - the
* classpath entries of the existing project
*/
public void init(IJavaProject jproject, IPath outputLocation, IClasspathEntry[] classpathEntries) {
fCurrJProject= jproject;
boolean projectExists= false;
List newClassPath= null;
try {
IProject project= fCurrJProject.getProject();
projectExists= (project.exists() && project.getFile(".classpath").exists());
if (projectExists) {
if (outputLocation == null) {
outputLocation= fCurrJProject.getOutputLocation();
}
if (classpathEntries == null) {
classpathEntries= fCurrJProject.getRawClasspath();
}
}
if (outputLocation == null) {
outputLocation= getDefaultBuildPath(jproject);
}
if (classpathEntries != null) {
newClassPath= getExistingEntries(classpathEntries);
}
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
} catch (CoreException e) {
JavaPlugin.log(e);
}
if (newClassPath == null) {
newClassPath= getDefaultClassPath(jproject);
}
List exportedEntries = new ArrayList();
for (int i= 0; i < newClassPath.size(); i++) {
CPListElement curr= (CPListElement) newClassPath.get(i);
if (curr.isExported() || curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
exportedEntries.add(curr);
}
}
fBuildPathDialogField.setText(outputLocation.makeRelative().toString());
fClassPathList.setElements(newClassPath);
fClassPathList.setCheckedElements(exportedEntries);
if (fSourceContainerPage != null) {
fSourceContainerPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
}
doStatusLineUpdate();
}
private ArrayList getExistingEntries(IClasspathEntry[] classpathEntries) {
ArrayList newClassPath= new ArrayList();
boolean projectExists= fCurrJProject.exists();
for (int i= 0; i < classpathEntries.length; i++) {
|
17,618 |
Bug 17618 Changing output location should delete all derived resources
|
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
|
verified fixed
|
bf1a15f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-05-27T18:25:28Z | 2002-05-24T14:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
IClasspathEntry curr= classpathEntries[i];
IPath path= curr.getPath();
IResource res= null;
boolean isMissing= false;
switch (curr.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
res= null;
try {
isMissing= (JavaCore.getClasspathContainer(path, fCurrJProject) == null);
} catch (JavaModelException e) {
isMissing= true;
}
break;
case IClasspathEntry.CPE_VARIABLE:
IPath resolvedPath= JavaCore.getResolvedVariablePath(path);
res= null;
isMissing= fWorkspaceRoot.findMember(resolvedPath) == null && !resolvedPath.toFile().isFile();
break;
case IClasspathEntry.CPE_LIBRARY:
res= fWorkspaceRoot.findMember(path);
if (res == null) {
if (!ArchiveFileFilter.isArchivePath(path)) {
if (fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) {
res= fWorkspaceRoot.getFolder(path);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.