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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,834 |
Bug 7834 Methods-override dialog should present methods sorted (abc..)
|
Imagine a class extending JPanel. I want to override setBackgroundColor(Color c). I don't know where in the class-hierarchy the method is declared, so i've to search more or less to all entries in the tree, eye-scanning setBa.. . It's not so easy, as there are quite a few methods. So it would be nice to sort the method names in alphabeticall order, and really great would be a method searching. Could the code assist used for that?
|
verified fixed
|
66fae4e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-22T16:54:46Z | 2002-01-17T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OverrideMethodQuery.java
|
if (element instanceof IMethod) {
return ((IMethod)element).getDeclaringType();
}
return null;
}
/*
* @see ITreeContentProvider#hasChildren(Object)
*/
public boolean hasChildren(Object element) {
return getChildren(element).length > 0;
}
/*
* @see IStructuredContentProvider#getElements(Object)
*/
public Object[] getElements(Object inputElement) {
return fTypes;
}
/*
* @see IContentProvider#dispose()
*/
public void dispose() {
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
}
private static class OverrideMethodSorter extends ViewerSorter {
|
7,834 |
Bug 7834 Methods-override dialog should present methods sorted (abc..)
|
Imagine a class extending JPanel. I want to override setBackgroundColor(Color c). I don't know where in the class-hierarchy the method is declared, so i've to search more or less to all entries in the tree, eye-scanning setBa.. . It's not so easy, as there are quite a few methods. So it would be nice to sort the method names in alphabeticall order, and really great would be a method searching. Could the code assist used for that?
|
verified fixed
|
66fae4e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-22T16:54:46Z | 2002-01-17T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OverrideMethodQuery.java
|
private IType[] fAllTypes;
public OverrideMethodSorter(ITypeHierarchy typeHierarchy) {
IType curr= typeHierarchy.getType();
IType[] superTypes= typeHierarchy.getAllSupertypes(curr);
fAllTypes= new IType[superTypes.length + 1];
fAllTypes[0]= curr;
System.arraycopy(superTypes, 0, fAllTypes, 1, superTypes.length);
}
/*
* @see ViewerSorter#compare(Viewer, Object, Object)
*/
public int compare(Viewer viewer, Object e1, Object e2) {
if (e1 instanceof IType && e2 instanceof IType) {
if (e1.equals(e2)) {
return 0;
}
for (int i= 0; i < fAllTypes.length; i++) {
IType curr= fAllTypes[i];
if (curr.equals(e1)) {
|
7,834 |
Bug 7834 Methods-override dialog should present methods sorted (abc..)
|
Imagine a class extending JPanel. I want to override setBackgroundColor(Color c). I don't know where in the class-hierarchy the method is declared, so i've to search more or less to all entries in the tree, eye-scanning setBa.. . It's not so easy, as there are quite a few methods. So it would be nice to sort the method names in alphabeticall order, and really great would be a method searching. Could the code assist used for that?
|
verified fixed
|
66fae4e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-22T16:54:46Z | 2002-01-17T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OverrideMethodQuery.java
|
return -1;
}
if (curr.equals(e2)) {
return 1;
}
}
}
return 0;
}
}
private class OverrideMethodValidator implements ISelectionValidator {
/*
* @see ISelectionValidator#validate(Object[])
*/
public IStatus validate(Object[] selection) {
int count= 0;
for (int i= 0; i < selection.length; i++) {
if (selection[i] instanceof IMethod) {
count++;
}
}
if (count == 0 && !fEmptySelectionAllowed) {
return new StatusInfo(IStatus.ERROR, "");
}
String message;
if (count == 1) {
message= JavaUIMessages.getFormattedString("OverrideMethodQuery.selectioninfo.one", String.valueOf(count));
} else {
|
7,834 |
Bug 7834 Methods-override dialog should present methods sorted (abc..)
|
Imagine a class extending JPanel. I want to override setBackgroundColor(Color c). I don't know where in the class-hierarchy the method is declared, so i've to search more or less to all entries in the tree, eye-scanning setBa.. . It's not so easy, as there are quite a few methods. So it would be nice to sort the method names in alphabeticall order, and really great would be a method searching. Could the code assist used for that?
|
verified fixed
|
66fae4e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-22T16:54:46Z | 2002-01-17T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OverrideMethodQuery.java
|
message= JavaUIMessages.getFormattedString("OverrideMethodQuery.selectioninfo.more", String.valueOf(count));
}
return new StatusInfo(IStatus.INFO, message);
}
}
private boolean fEmptySelectionAllowed;
private Shell fShell;
public OverrideMethodQuery(Shell shell, boolean emptySelectionAllowed) {
fShell= shell;
fEmptySelectionAllowed= emptySelectionAllowed;
}
/*
* @see IOverrideMethodQuery#select(IMethod[], IMethod[], ITypeHierarchy)
*/
public IMethod[] select(IMethod[] methods, IMethod[] defaultSelected, ITypeHierarchy typeHierarchy) {
HashSet types= new HashSet(methods.length);
for (int i= 0; i < methods.length; i++) {
types.add(methods[i].getDeclaringType());
}
Object[] typesArrays= types.toArray();
ViewerSorter sorter= new OverrideMethodSorter(typeHierarchy);
sorter.sort(null, typesArrays);
HashSet expanded= new HashSet(defaultSelected.length);
for (int i= 0; i < defaultSelected.length; i++) {
expanded.add(defaultSelected[i].getDeclaringType());
}
if (expanded.isEmpty() && typesArrays.length > 0) {
|
7,834 |
Bug 7834 Methods-override dialog should present methods sorted (abc..)
|
Imagine a class extending JPanel. I want to override setBackgroundColor(Color c). I don't know where in the class-hierarchy the method is declared, so i've to search more or less to all entries in the tree, eye-scanning setBa.. . It's not so easy, as there are quite a few methods. So it would be nice to sort the method names in alphabeticall order, and really great would be a method searching. Could the code assist used for that?
|
verified fixed
|
66fae4e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-22T16:54:46Z | 2002-01-17T15:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OverrideMethodQuery.java
|
expanded.add(typesArrays[0]);
}
ILabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
ITreeContentProvider cprovider= new OverrideMethodContentProvider(methods, typesArrays);
CheckedTreeSelectionDialog dialog= new CheckedTreeSelectionDialog(fShell, lprovider, cprovider);
dialog.setValidator(new OverrideMethodValidator());
dialog.setTitle(JavaUIMessages.getString("OverrideMethodQuery.dialog.title"));
dialog.setMessage(JavaUIMessages.getString("OverrideMethodQuery.dialog.description"));
dialog.setInitialSelections(defaultSelected);
dialog.setExpandedElements(expanded.toArray());
dialog.setContainerMode(true);
dialog.setSize(60, 25);
dialog.setInput(this);
if (dialog.open() == dialog.OK) {
Object[] checkedElements= dialog.getResult();
ArrayList result= new ArrayList(checkedElements.length);
for (int i= 0; i < checkedElements.length; i++) {
Object curr= checkedElements[i];
if (curr instanceof IMethod) {
result.add(curr);
}
}
return (IMethod[]) result.toArray(new IMethod[result.size()]);
}
return null;
}
}
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerLabelProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import org.eclipse.core.resources.IStorage;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jdt.internal.ui.preferences.WorkInProgressPreferencePage;
import org.eclipse.jdt.internal.ui.viewsupport.ErrorTickImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.StorageLabelProvider;
/**
* Standard label provider for Java elements used by the PackageExplorerPart
* Use this class when you want to present the Java elements in a viewer.
* <p>
* The implementation also handles non-Java elements by forwarding the requests to an
* internal <code>WorkbenchLabelProvider</code>.
* </p>
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @see org.eclipse.ui.model.WorkbenchLabelProvider
*/
class PackageExplorerLabelProvider extends LabelProvider {
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerLabelProvider.java
|
private JavaElementImageProvider fImageLabelProvider;
private StorageLabelProvider fStorageLabelProvider;
private int fImageFlags;
private int fTextFlags;
/**
* Create new JavaElementLabelProvider for the PackageExplorerPart
*/
public PackageExplorerLabelProvider() {
fStorageLabelProvider= new StorageLabelProvider();
fImageLabelProvider= new ErrorTickImageProvider();
fImageFlags= JavaElementImageProvider.OVERLAY_ICONS | JavaElementImageProvider.SMALL_ICONS;
fTextFlags= JavaElementLabels.ROOT_VARIABLE | JavaElementLabels.M_PARAMETER_TYPES;
if (WorkInProgressPreferencePage.isCompressingPkgNameInPackagesView())
fTextFlags |= JavaElementLabels.P_COMPRESSED;
}
void setCompressingPkgNameInPackagesView(boolean state) {
if (state)
fTextFlags |= JavaElementLabels.P_COMPRESSED;
else
fTextFlags &= ~JavaElementLabels.P_COMPRESSED;
}
/* (non-Javadoc)
* @see ILabelProvider#getImage
*/
public Image getImage(Object element) {
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerLabelProvider.java
|
Image result= fImageLabelProvider.getImageLabel(element, fImageFlags);
if (result != null) {
return result;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getImage(element);
return super.getImage(element);
}
/* (non-Javadoc)
* @see ILabelProvider#getText
*/
public String getText(Object element) {
String text= JavaElementLabels.getTextLabel(element, fTextFlags);
if (text.length() > 0) {
return text;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getText(element);
return super.getText(element);
}
/* (non-Javadoc)
*
* @see IBaseLabelProvider#dispose
*/
public void dispose() {
fStorageLabelProvider.dispose();
fImageLabelProvider.dispose();
}
}
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.resources.IStorage;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.viewers.LabelProvider;
public class JavaUILabelProvider extends LabelProvider {
private JavaElementImageProvider fImageLabelProvider;
private StorageLabelProvider fStorageLabelProvider;
private int fImageFlags;
private int fTextFlags;
/**
* Creates a new label provider with default flags.
*/
public JavaUILabelProvider() {
this(JavaElementLabels.M_PARAMETER_TYPES, JavaElementImageProvider.OVERLAY_ICONS);
}
public JavaUILabelProvider(int textFlags, int imageFlags, JavaElementImageProvider imageLabelProvider) {
fImageLabelProvider= imageLabelProvider;
fStorageLabelProvider= new StorageLabelProvider();
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
fImageFlags= imageFlags;
fTextFlags= textFlags;
}
public JavaUILabelProvider(int textFlags, int imageFlags) {
this(textFlags, imageFlags, new JavaElementImageProvider());
}
public JavaUILabelProvider(JavaElementImageProvider imageLabelProvider) {
this(JavaElementLabels.M_PARAMETER_TYPES, JavaElementImageProvider.OVERLAY_ICONS, imageLabelProvider);
}
/**
* Sets the text flags to use
*/
public void setTextFlags(int flags) {
fTextFlags= flags;
}
/**
* Sets the text flags to use
*/
public void setImageFlags(int flags) {
fImageFlags= flags;
}
/* (non-Javadoc)
* @see ILabelProvider#getImage
*/
public Image getImage(Object element) {
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaUILabelProvider.java
|
Image result= fImageLabelProvider.getImageLabel(element, fImageFlags);
if (result != null) {
return result;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getImage(element);
return super.getImage(element);
}
/* (non-Javadoc)
* @see ILabelProvider#getText
*/
public String getText(Object element) {
String text= JavaElementLabels.getTextLabel(element, fTextFlags);
if (text.length() > 0) {
return text;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getText(element);
return super.getText(element);
}
/* (non-Javadoc)
*
* @see IBaseLabelProvider#dispose
*/
public void dispose() {
fStorageLabelProvider.dispose();
fImageLabelProvider.dispose();
}
}
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.ui;
import org.eclipse.core.resources.IStorage;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.StorageLabelProvider;
/**
* Standard label provider for Java elements.
* Use this class when you want to present the Java elements in a viewer.
* <p>
* The implementation also handles non-Java elements by forwarding the requests to an
* internal <code>WorkbenchLabelProvider</code>.
* </p>
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @see org.eclipse.ui.model.WorkbenchLabelProvider
*/
public class JavaElementLabelProvider extends LabelProvider {
/**
* Flag (bit mask) indicating that methods labels include the method return type. (prepended)
*/
public final static int SHOW_RETURN_TYPE= 0x001;
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
/**
* Flag (bit mask) indicating that method label include method parameter types.
*/
public final static int SHOW_PARAMETERS= 0x002;
/**
* Flag (bit mask) indicating that the label of a member should include the container.
* For example, include the name of the type enclosing a field.
* @deprecated Use SHOW_QUALIFIED or SHOW_ROOT instead
*/
public final static int SHOW_CONTAINER= 0x004;
/**
* Flag (bit mask) indicating that the label of a type should be fully qualified.
* For example, include the fully qualified name of the type enclosing a type.
* @deprecated Use SHOW_QUALIFIED instead
*/
public final static int SHOW_CONTAINER_QUALIFICATION= 0x008;
/**
* Flag (bit mask) indicating that the label should include overlay icons
* for element type and modifiers.
*/
public final static int SHOW_OVERLAY_ICONS= 0x010;
/**
* Flag (bit mask) indicating thata field label should include the declared type.
*/
public final static int SHOW_TYPE= 0x020;
/**
* Flag (bit mask) indicating that the label should include the name of the
* package fragment root (appended).
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
*/
public final static int SHOW_ROOT= 0x040;
/**
* Flag (bit mask) indicating that the label qualification of a type should
* be shown after the name.
* @deprecated SHOW_POST_QUALIFIED instead
*/
public final static int SHOW_POSTIFIX_QUALIFICATION= 0x080;
/**
* Flag (bit mask) indicating that the label should show the icons with no space
* reserved for overlays.
*/
public final static int SHOW_SMALL_ICONS= 0x100;
/**
* Flag (bit mask) indicating that the packagefragment roots from variables should
* be rendered with the variable in the name
*/
public final static int SHOW_VARIABLE= 0x200;
/**
* Flag (bit mask) indicating that Complation Units, Class Files, Types, Declarations and Members
* should be rendered qualified.
* Examples: java.lang.String, java.util.Vector.size()
*/
public final static int SHOW_QUALIFIED= 0x400;
/**
* Flag (bit mask) indicating that Complation Units, Class Files, Types, Declarations and Members
* should be rendered qualified. The qualifcation is appended
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
* Examples: String - java.lang, size() - java.util.Vector
*/
public final static int SHOW_POST_QUALIFIED= 0x800;
/**
* Constant (value <code>0</code>) indicating that the label should show
* the basic images only.
*/
public final static int SHOW_BASICS= 0x000;
/**
* Constant indicating the default label rendering.
* Currently the default is equivalent to
* <code>SHOW_PARAMETERS | SHOW_OVERLAY_ICONS</code>.
*/
public final static int SHOW_DEFAULT= new Integer(SHOW_PARAMETERS | SHOW_OVERLAY_ICONS).intValue();
private JavaElementImageProvider fImageLabelProvider;
private StorageLabelProvider fStorageLabelProvider;
private int fFlags;
private int fImageFlags;
private int fTextFlags;
/**
* Creates a new label provider with <code>SHOW_DEFAULT</code> flag.
*
* @see #SHOW_DEFAULT
* @since 2.0
*/
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
public JavaElementLabelProvider() {
this(SHOW_DEFAULT);
}
/**
* Creates a new label provider.
*
* @param flags the initial options; a bitwise OR of <code>SHOW_* </code> constants
*/
public JavaElementLabelProvider(int flags) {
fImageLabelProvider= new JavaElementImageProvider();
fStorageLabelProvider= new StorageLabelProvider();
fFlags= flags;
updateImageProviderFlags();
updateTextProviderFlags();
}
private boolean getFlag( int flag) {
return (fFlags & flag) != 0;
}
/**
* Turns on the rendering options specified in the given flags.
*
* @param flags the options; a bitwise OR of <code>SHOW_* </code> constants
*/
public void turnOn(int flags) {
fFlags |= flags;
updateImageProviderFlags();
updateTextProviderFlags();
}
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
/**
* Turns off the rendering options specified in the given flags.
*
* @param flags the initial options; a bitwise OR of <code>SHOW_* </code> constants
*/
public void turnOff(int flags) {
fFlags &= (~flags);
updateImageProviderFlags();
updateTextProviderFlags();
}
private void updateImageProviderFlags() {
fImageFlags= 0;
if (getFlag(SHOW_OVERLAY_ICONS)) {
fImageFlags |= JavaElementImageProvider.OVERLAY_ICONS;
}
if (getFlag(SHOW_SMALL_ICONS)) {
fImageFlags |= JavaElementImageProvider.SMALL_ICONS;
}
}
private void updateTextProviderFlags() {
fTextFlags= 0;
if (getFlag(SHOW_RETURN_TYPE)) {
fTextFlags |= JavaElementLabels.M_PRE_RETURNTYPE;
}
if (getFlag(SHOW_PARAMETERS)) {
fTextFlags |= JavaElementLabels.M_PARAMETER_TYPES;
}
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
if (getFlag(SHOW_CONTAINER)) {
fTextFlags |= JavaElementLabels.P_POST_QUALIFIED | JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED | JavaElementLabels.M_POST_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
}
if (getFlag(SHOW_POSTIFIX_QUALIFICATION)) {
fTextFlags |= (JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED);
} else if (getFlag(SHOW_CONTAINER_QUALIFICATION)) {
fTextFlags |=(JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.CF_QUALIFIED | JavaElementLabels.CU_QUALIFIED);
}
if (getFlag(SHOW_TYPE)) {
fTextFlags |= JavaElementLabels.F_APP_TYPE_SIGNATURE;
}
if (getFlag(SHOW_ROOT)) {
fTextFlags |= JavaElementLabels.APPEND_ROOT_PATH;
}
if (getFlag(SHOW_VARIABLE)) {
fTextFlags |= JavaElementLabels.ROOT_VARIABLE;
}
if (getFlag(SHOW_QUALIFIED)) {
fTextFlags |= (JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.I_FULLY_QUALIFIED
| JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.D_QUALIFIED | JavaElementLabels.CF_QUALIFIED | JavaElementLabels.CU_QUALIFIED);
}
if (getFlag(SHOW_POST_QUALIFIED)) {
fTextFlags |= (JavaElementLabels.F_POST_QUALIFIED | JavaElementLabels.M_POST_QUALIFIED | JavaElementLabels.I_POST_QUALIFIED
| JavaElementLabels.T_POST_QUALIFIED | JavaElementLabels.D_POST_QUALIFIED | JavaElementLabels.CF_POST_QUALIFIED | JavaElementLabels.CU_POST_QUALIFIED);
}
}
/* (non-Javadoc)
* @see ILabelProvider#getImage
*/
public Image getImage(Object element) {
|
8,280 |
Bug 8280 Package view back/forward/up arrow hover help
|
Start up Eclipse with some existing Java Projects in the workspace. Select a package in one of these projects. Right-click and select Go Into. Hover over the Back arrow. Notice that a very tall tool-tip (full screen height) text appears, the first line being "Back to Java Model" and the remaining lines being package names (?). Immediately after being displayed, the tool-tip text disappears. The text will flash into and out of existance consitently until the pointer leaves the button's frame. The same behaviour can occur when hovering over the Up arrow or the Forward arrow when these lead to the workspace root.
|
verified fixed
|
6b99f94
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T10:59:22Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabelProvider.java
|
Image result= fImageLabelProvider.getImageLabel(element, fImageFlags);
if (result != null) {
return result;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getImage(element);
return super.getImage(element);
}
/* (non-Javadoc)
* @see ILabelProvider#getText
*/
public String getText(Object element) {
String text= JavaElementLabels.getTextLabel(element, fTextFlags);
if (text.length() > 0) {
return text;
}
if (element instanceof IStorage)
return fStorageLabelProvider.getText(element);
return super.getText(element);
}
/* (non-Javadoc)
*
* @see IBaseLabelProvider#dispose
*/
public void dispose() {
fStorageLabelProvider.dispose();
fImageLabelProvider.dispose();
}
}
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
package org.eclipse.jdt.internal.ui.preferences;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.template.Template;
import org.eclipse.jdt.internal.ui.text.template.TemplateContentProvider;
import org.eclipse.jdt.internal.ui.text.template.TemplateContext;
import org.eclipse.jdt.internal.ui.text.template.TemplateLabelProvider;
import org.eclipse.jdt.internal.ui.text.template.TemplateMessages;
import org.eclipse.jdt.internal.ui.text.template.TemplateSet;
import org.eclipse.jdt.internal.ui.text.template.Templates;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
public class TemplatePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
private static final String PREF_FORMAT_TEMPLATES= JavaUI.ID_PLUGIN + ".template.format";
private Templates fTemplates;
private CheckboxTableViewer fTableViewer;
private Button fAddButton;
private Button fEditButton;
private Button fImportButton;
private Button fExportButton;
private Button fExportAllButton;
private Button fRemoveButton;
private Button fEnableAllButton;
private Button fDisableAllButton;
private SourceViewer fPatternViewer;
private Button fFormatButton;
public TemplatePreferencePage() {
super();
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
setDescription(TemplateMessages.getString("TemplatePreferencePage.message"));
fTemplates= Templates.getInstance();
}
/**
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite ancestor) {
Composite parent= new Composite(ancestor, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
parent.setLayout(layout);
Table table= new Table(parent, SWT.CHECK | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
GridData data= new GridData(GridData.FILL_BOTH);
data.widthHint= convertWidthInCharsToPixels(80);
data.heightHint= convertHeightInCharsToPixels(10);
table.setLayoutData(data);
table.setHeaderVisible(true);
table.setLinesVisible(true);
TableLayout tableLayout= new TableLayout();
table.setLayout(tableLayout);
TableColumn column1= new TableColumn(table, SWT.NONE);
column1.setText(TemplateMessages.getString("TemplatePreferencePage.column.name"));
TableColumn column2= new TableColumn(table, SWT.NONE);
column2.setText(TemplateMessages.getString("TemplatePreferencePage.column.context"));
TableColumn column3= new TableColumn(table, SWT.NONE);
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
column3.setText(TemplateMessages.getString("TemplatePreferencePage.column.description"));
tableLayout.addColumnData(new ColumnWeightData(30));
tableLayout.addColumnData(new ColumnWeightData(20));
tableLayout.addColumnData(new ColumnWeightData(70));
fTableViewer= new CheckboxTableViewer(table);
fTableViewer.setLabelProvider(new TemplateLabelProvider());
fTableViewer.setContentProvider(new TemplateContentProvider());
fTableViewer.setSorter(new ViewerSorter() {
public int compare(Viewer viewer, Object object1, Object object2) {
if ((object1 instanceof Template) && (object2 instanceof Template)) {
Template left= (Template) object1;
Template right= (Template) object2;
int result= left.getName().compareToIgnoreCase(right.getName());
if (result != 0)
return result;
return left.getDescription().compareToIgnoreCase(right.getDescription());
}
return super.compare(viewer, object1, object2);
}
public boolean isSorterProperty(Object element, String property) {
return true;
}
});
fTableViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent e) {
edit();
}
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
});
fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent e) {
selectionChanged1();
}
});
fTableViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
Template template= (Template) event.getElement();
template.setEnabled(event.getChecked());
}
});
Composite buttons= new Composite(parent, SWT.NULL);
buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
buttons.setLayout(layout);
fAddButton= new Button(buttons, SWT.PUSH);
fAddButton.setLayoutData(getButtonGridData(fAddButton));
fAddButton.setText(TemplateMessages.getString("TemplatePreferencePage.new"));
fAddButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
add();
}
});
fEditButton= new Button(buttons, SWT.PUSH);
fEditButton.setLayoutData(getButtonGridData(fEditButton));
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
fEditButton.setText(TemplateMessages.getString("TemplatePreferencePage.edit"));
fEditButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
edit();
}
});
fRemoveButton= new Button(buttons, SWT.PUSH);
fRemoveButton.setLayoutData(getButtonGridData(fRemoveButton));
fRemoveButton.setText(TemplateMessages.getString("TemplatePreferencePage.remove"));
fRemoveButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
remove();
}
});
createSpacer(buttons);
fImportButton= new Button(buttons, SWT.PUSH);
fImportButton.setLayoutData(getButtonGridData(fImportButton));
fImportButton.setText(TemplateMessages.getString("TemplatePreferencePage.import"));
fImportButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
import_();
}
});
fExportButton= new Button(buttons, SWT.PUSH);
fExportButton.setLayoutData(getButtonGridData(fExportButton));
fExportButton.setText(TemplateMessages.getString("TemplatePreferencePage.export"));
fExportButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
export();
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
}
});
fExportAllButton= new Button(buttons, SWT.PUSH);
fExportAllButton.setLayoutData(getButtonGridData(fExportAllButton));
fExportAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.export.all"));
fExportAllButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
exportAll();
}
});
createSpacer(buttons);
fEnableAllButton= new Button(buttons, SWT.PUSH);
fEnableAllButton.setLayoutData(getButtonGridData(fEnableAllButton));
fEnableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.enable.all"));
fEnableAllButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
enableAll(true);
}
});
fDisableAllButton= new Button(buttons, SWT.PUSH);
fDisableAllButton.setLayoutData(getButtonGridData(fDisableAllButton));
fDisableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.disable.all"));
fDisableAllButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
enableAll(false);
}
});
fPatternViewer= createViewer(parent);
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
createSpacer(parent);
fFormatButton= new Button(parent, SWT.CHECK);
fFormatButton.setText(TemplateMessages.getString("TemplatePreferencePage.use.code.formatter"));
fTableViewer.setInput(fTemplates);
fTableViewer.setAllChecked(false);
fTableViewer.setCheckedElements(getEnabledTemplates());
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
fFormatButton.setSelection(prefs.getBoolean(PREF_FORMAT_TEMPLATES));
updateButtons();
WorkbenchHelp.setHelp(parent, new DialogPageContextComputer(this, IJavaHelpContextIds.TEMPLATE_PREFERENCE_PAGE));
return parent;
}
private Template[] getEnabledTemplates() {
Template[] templates= fTemplates.getTemplates();
List list= new ArrayList(templates.length);
for (int i= 0; i != templates.length; i++)
if (templates[i].isEnabled())
list.add(templates[i]);
return (Template[]) list.toArray(new Template[list.size()]);
}
private SourceViewer createViewer(Composite parent) {
SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();
viewer.configure(new JavaSourceViewerConfiguration(tools, null));
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
viewer.setEditable(false);
viewer.setDocument(new Document());
Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT);
viewer.getTextWidget().setFont(font);
Control control= viewer.getControl();
GridData data= new GridData(GridData.FILL_BOTH);
data.heightHint= convertHeightInCharsToPixels(5);
control.setLayoutData(data);
return viewer;
}
public void createSpacer(Composite parent) {
Label spacer= new Label(parent, SWT.NONE);
GridData data= new GridData();
data.horizontalAlignment= GridData.FILL;
data.verticalAlignment= GridData.BEGINNING;
data.heightHint= 4;
spacer.setLayoutData(data);
}
private static GridData getButtonGridData(Button button) {
GridData data= new GridData(GridData.FILL_HORIZONTAL);
data.widthHint= SWTUtil.getButtonWidthHint(button);
data.heightHint= SWTUtil.getButtonHeigthHint(button);
return data;
}
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
private void selectionChanged1() {
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
if (selection.size() == 1) {
Template template= (Template) selection.getFirstElement();
fPatternViewer.getTextWidget().setText(template.getPattern());
} else {
fPatternViewer.getTextWidget().setText("");
}
updateButtons();
}
private void updateButtons() {
int selectionCount= ((IStructuredSelection) fTableViewer.getSelection()).size();
int itemCount= fTableViewer.getTable().getItemCount();
fEditButton.setEnabled(selectionCount == 1);
fExportButton.setEnabled(selectionCount > 0);
fRemoveButton.setEnabled(selectionCount > 0 && selectionCount <= itemCount);
fEnableAllButton.setEnabled(itemCount > 0);
fDisableAllButton.setEnabled(itemCount > 0);
}
private void add() {
Template template= new Template();
template.setContext(TemplateContext.JAVA);
EditTemplateDialog dialog= new EditTemplateDialog(getShell(), template, false);
if (dialog.open() == dialog.OK) {
fTemplates.add(template);
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
fTableViewer.refresh();
fTableViewer.setChecked(template, template.isEnabled());
fTableViewer.setSelection(new StructuredSelection(template));
}
}
private void edit() {
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
Object[] objects= selection.toArray();
if ((objects == null) || (objects.length != 1))
return;
Template template= (Template) selection.getFirstElement();
edit(template);
}
private void edit(Template template) {
EditTemplateDialog dialog= new EditTemplateDialog(getShell(), template, true);
if (dialog.open() == dialog.OK) {
fTableViewer.refresh(template);
fTableViewer.setChecked(template, template.isEnabled());
fTableViewer.setSelection(new StructuredSelection(template));
}
}
private void import_() {
FileDialog dialog= new FileDialog(getShell());
dialog.setText(TemplateMessages.getString("TemplatePreferencePage.import.title"));
dialog.setFilterExtensions(new String[] {TemplateMessages.getString("TemplatePreferencePage.import.extension")});
String path= dialog.open();
if (path == null)
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
return;
try {
fTemplates.addFromFile(new File(path));
fTableViewer.refresh();
fTableViewer.setAllChecked(false);
fTableViewer.setCheckedElements(getEnabledTemplates());
} catch (CoreException e) {
JavaPlugin.log(e);
openReadErrorDialog(e);
}
}
private void exportAll() {
export(fTemplates);
}
private void export() {
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
Object[] templates= selection.toArray();
TemplateSet templateSet= new TemplateSet();
for (int i= 0; i != templates.length; i++)
templateSet.add((Template) templates[i]);
export(templateSet);
}
private void export(TemplateSet templateSet) {
FileDialog dialog= new FileDialog(getShell(), SWT.SAVE);
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
dialog.setText(TemplateMessages.getFormattedString("TemplatePreferencePage.export.title", new Integer(templateSet.getTemplates().length)));
dialog.setFilterExtensions(new String[] {TemplateMessages.getString("TemplatePreferencePage.export.extension")});
dialog.setFileName(TemplateMessages.getString("TemplatePreferencePage.export.filename"));
String path= dialog.open();
if (path == null)
return;
try {
templateSet.saveToFile(new File(path));
} catch (CoreException e) {
JavaPlugin.log(e);
openWriteErrorDialog(e);
}
}
private void remove() {
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
Iterator elements= selection.iterator();
while (elements.hasNext()) {
Template template= (Template) elements.next();
fTemplates.remove(template);
}
fTableViewer.refresh();
}
private void enableAll(boolean enable) {
Template[] templates= fTemplates.getTemplates();
for (int i= 0; i != templates.length; i++)
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
templates[i].setEnabled(enable);
fTableViewer.setAllChecked(enable);
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {}
/*
* @see Control#setVisible(boolean)
*/
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible)
setTitle(TemplateMessages.getString("TemplatePreferencePage.title"));
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
fFormatButton.setSelection(prefs.getDefaultBoolean(PREF_FORMAT_TEMPLATES));
try {
fTemplates.restoreDefaults();
} catch (CoreException e) {
JavaPlugin.log(e);
openReadErrorDialog(e);
}
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
fTableViewer.refresh();
fTableViewer.setAllChecked(false);
fTableViewer.setCheckedElements(getEnabledTemplates());
}
/*
* @see PreferencePage#performOk()
*/
public boolean performOk() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
prefs.setValue(PREF_FORMAT_TEMPLATES, fFormatButton.getSelection());
try {
fTemplates.save();
} catch (CoreException e) {
JavaPlugin.log(e);
openWriteErrorDialog(e);
}
return super.performOk();
}
/*
* @see PreferencePage#performCancel()
*/
public boolean performCancel() {
try {
fTemplates.reset();
} catch (CoreException e) {
JavaPlugin.log(e);
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
|
openReadErrorDialog(e);
}
return super.performCancel();
}
/**
* Initializes the default values of this page in the preference bundle.
* Will be called on startup of the JavaPlugin
*/
public static void initDefaults(IPreferenceStore prefs) {
prefs.setDefault(PREF_FORMAT_TEMPLATES, true);
}
public static boolean useCodeFormatter() {
IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
return prefs.getBoolean(PREF_FORMAT_TEMPLATES);
}
private void openReadErrorDialog(CoreException e) {
ErrorDialog.openError(getShell(),
TemplateMessages.getString("TemplatePreferencePage.error.read.title"),
e.getMessage(), e.getStatus());
}
private void openWriteErrorDialog(CoreException e) {
ErrorDialog.openError(getShell(),
TemplateMessages.getString("TemplatePreferencePage.error.write.title"),
e.getMessage(), e.getStatus());
}
}
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.Serializer;
import org.apache.xml.serialize.SerializerFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.eclipse.jdt.internal.ui.JavaStatusConstants;
import org.eclipse.jdt.internal.ui.JavaUIErrorStatus;
import org.eclipse.jdt.internal.ui.JavaUIException;
/**
* <code>TemplateSet</code> manages a collection of templates and makes them
* persistent.
*/
public class TemplateSet {
private static class TemplateComparator implements Comparator {
public int compare(Object arg0, Object arg1) {
if (arg0 == arg1)
return 0;
if (arg0 == null)
return -1;
Template template0= (Template) arg0;
Template template1= (Template) arg1;
return template0.getName().compareTo(template1.getName());
}
}
private static final String TEMPLATE_TAG= "template";
private static final String NAME_ATTRIBUTE= "name";
private static final String DESCRIPTION_ATTRIBUTE= "description";
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
private static final String CONTEXT_ATTRIBUTE= "context";
private static final String ENABLED_ATTRIBUTE= "enabled";
private List fTemplates= new ArrayList();
private Comparator fTemplateComparator= new TemplateComparator();
private Template[] fSortedTemplates= new Template[0];
/**
* Convenience method for reading templates from a file.
*
* @see addFromStream(InputStream)
*/
public void addFromFile(File file) throws CoreException {
InputStream stream= null;
try {
stream= new FileInputStream(file);
addFromStream(stream);
} catch (IOException e) {
throwReadException(e);
} finally {
try {
if (stream != null)
stream.close();
} catch (IOException e) {}
}
}
/**
* Reads templates from a XML stream and adds them to the template set.
*/
public void addFromStream(InputStream stream) throws CoreException {
try {
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
DocumentBuilder parser= factory.newDocumentBuilder();
Document document= parser.parse(new InputSource(stream));
NodeList elements= document.getElementsByTagName(TEMPLATE_TAG);
int count= elements.getLength();
for (int i= 0; i != count; i++) {
Node node= elements.item(i);
NamedNodeMap attributes= node.getAttributes();
if (attributes == null)
continue;
String name= attributes.getNamedItem(NAME_ATTRIBUTE).getNodeValue();
String description= attributes.getNamedItem(DESCRIPTION_ATTRIBUTE).getNodeValue();
String context= attributes.getNamedItem(CONTEXT_ATTRIBUTE).getNodeValue();
Node enabledNode= attributes.getNamedItem(ENABLED_ATTRIBUTE);
boolean enabled= (enabledNode == null) || (enabledNode.getNodeValue().equals("true"));
StringBuffer buffer= new StringBuffer();
NodeList children= node.getChildNodes();
for (int j= 0; j != children.getLength(); j++) {
String value= children.item(j).getNodeValue();
if (value != null)
buffer.append(value);
}
String pattern= buffer.toString().trim();
Template template= new Template(name, description, context, pattern);
template.setEnabled(enabled);
add(template);
}
sort();
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
} catch (ParserConfigurationException e) {
throwReadException(e);
} catch (IOException e) {
throwReadException(e);
} catch (SAXException e) {
throwReadException(e);
}
}
/**
* Convenience method for saving to a file.
*
* @see saveToStream(OutputStream)
*/
public void saveToFile(File file) throws CoreException {
OutputStream stream= null;
try {
stream= new FileOutputStream(file);
saveToStream(stream);
} catch (IOException e) {
throwWriteException(e);
} finally {
try {
if (stream != null)
stream.close();
} catch (IOException e) {}
}
}
/**
* Saves the template set as XML.
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
*/
public void saveToStream(OutputStream stream) throws CoreException {
try {
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
DocumentBuilder builder= factory.newDocumentBuilder();
Document document= builder.newDocument();
Node root= document.createElement("templates");
document.appendChild(root);
for (int i= 0; i != fTemplates.size(); i++) {
Template template= (Template) fTemplates.get(i);
Node node= document.createElement("template");
root.appendChild(node);
NamedNodeMap attributes= node.getAttributes();
Attr name= document.createAttribute(NAME_ATTRIBUTE);
name.setValue(template.getName());
attributes.setNamedItem(name);
Attr description= document.createAttribute(DESCRIPTION_ATTRIBUTE);
description.setValue(template.getDescription());
attributes.setNamedItem(description);
Attr context= document.createAttribute(CONTEXT_ATTRIBUTE);
context.setValue(template.getContext());
attributes.setNamedItem(context);
Attr enabled= document.createAttribute(ENABLED_ATTRIBUTE);
enabled.setValue(template.isEnabled() ? "true" : "false");
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
attributes.setNamedItem(enabled);
Text pattern= document.createTextNode(template.getPattern());
node.appendChild(pattern);
}
OutputFormat format = new OutputFormat();
format.setPreserveSpace(true);
Serializer serializer = SerializerFactory.getSerializerFactory("xml").makeSerializer(stream, format);
serializer.asDOMSerializer().serialize(document);
} catch (ParserConfigurationException e) {
throwWriteException(e);
} catch (IOException e) {
throwWriteException(e);
}
}
private static void throwReadException(Throwable t) throws CoreException {
IStatus status= new JavaUIErrorStatus(JavaStatusConstants.TEMPLATE_IO_EXCEPTION,
TemplateMessages.getString("TemplateSet.error.read"), t);
throw new JavaUIException(status);
}
private static void throwWriteException(Throwable t) throws CoreException {
IStatus status= new JavaUIErrorStatus(JavaStatusConstants.TEMPLATE_IO_EXCEPTION,
TemplateMessages.getString("TemplateSet.error.write"), t);
throw new JavaUIException(status);
}
/**
* Adds a template to the set.
*/
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
public void add(Template template) {
if (exists(template))
return;
fTemplates.add(template);
sort();
}
private boolean exists(Template template) {
for (Iterator iterator = fTemplates.iterator(); iterator.hasNext();) {
Template anotherTemplate = (Template) iterator.next();
if (template.equals(anotherTemplate))
return true;
}
return false;
}
/**
* Removes a template to the set.
*/
public void remove(Template template) {
fTemplates.remove(template);
sort();
}
/**
* Empties the set.
*/
public void clear() {
fTemplates.clear();
sort();
|
8,085 |
Bug 8085 template pref page: exception while importing incorrect file
|
i tried to import this: <?xml version="1.0" encoding="UTF-8"?> <templatfes><template context="javadoc" description="author name" enabled="true" name="@author">@author ${user}</template></templates> which has an error i got an error dialog and this: 4 org.eclipse.jdt.ui 1 Internal Error org.eclipse.jdt.internal.ui.JavaUIException[2]: org.xml.sax.SAXParseException: The element type "templatfes" must be terminated by the matching end- tag "</templatfes>". at org.apache.xerces.framework.XMLParser.reportError (XMLParser.java:1196) at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError (XMLDocumentScanner.java:579) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLDocumentScanner.parseSome (XMLDocumentScanner.java(Compiled Code)) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:195) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromStream (TemplateSet.java:103) at org.eclipse.jdt.internal.ui.text.template.TemplateSet.addFromFile (TemplateSet.java:83) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.import_ (TemplatePreferencePage.java:389) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage.access$4 (TemplatePreferencePage.java:379) at org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage$8.handleEvent (TemplatePreferencePage.java:212) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.OpenPreferencesAction.run (OpenPreferencesAction.java:47) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
|
verified fixed
|
c333a9d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T11:05:15Z | 2002-01-23T12:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
|
}
/**
* Returns all templates.
*/
public Template[] getTemplates() {
return (Template[]) fTemplates.toArray(new Template[fTemplates.size()]);
}
/**
* Returns templates matching a prefix.
*/
public Template[] getMatchingTemplates(TemplateContext context) {
String prefix= context.getKey();
String type= context.getType();
List results= new ArrayList(fSortedTemplates.length);
for (int i= 0; i != fSortedTemplates.length; i++) {
Template template= fSortedTemplates[i];
if (template.matches(prefix, type))
results.add(template);
}
return (Template[]) results.toArray(new Template[results.size()]);
}
private void sort() {
fSortedTemplates= (Template[]) fTemplates.toArray(new Template[fTemplates.size()]);
Arrays.sort(fSortedTemplates, fTemplateComparator);
}
}
|
3,658 |
Bug 3658 JDT change listener efficiency issue (1GEMN5F)
|
ClassFileMarkerAnnotationModel.visit is very much less than optimal if fMarkerResource is set. It traverses the entire delta only looking for a particular resource! I don't understand when fMarkerResource is set and when it is not but in the case I saw, it was set to be a particular project resource which was not even in the list of resources which changed in the large delta I was processing. The net result of this was that the listener traversed the entire delta (~1500 resources) checking at each node to see if the node was equal to fMarkerResource. Since the listener knows that it is only interested in that one resource, it should just take the delta and look in it to see if the resource in question is there. The current IResourceDelta api is not optimal for doing this but it certainly can be done and would be very much more efficient than the current approach. We will look at adding the required API but this late in the game I would not hope for too much. NOTES: JBL (6/1/2001 11:47:09 AM) ClassFileMarkerAnnotationModel is JUI. Moving to ITPJUI. KUM (8/6/2001 4:41:57 PM) Sent mail to JMA regarding expected core support.
|
resolved fixed
|
f938ef0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:12:45Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.JavaCore;
/**
*
*/
public class ClassFileMarkerAnnotationModel extends AbstractMarkerAnnotationModel implements IResourceChangeListener, IResourceDeltaVisitor {
protected IClassFile fClassFile;
protected IWorkspace fWorkspace;
protected IResource fMarkerResource;
|
3,658 |
Bug 3658 JDT change listener efficiency issue (1GEMN5F)
|
ClassFileMarkerAnnotationModel.visit is very much less than optimal if fMarkerResource is set. It traverses the entire delta only looking for a particular resource! I don't understand when fMarkerResource is set and when it is not but in the case I saw, it was set to be a particular project resource which was not even in the list of resources which changed in the large delta I was processing. The net result of this was that the listener traversed the entire delta (~1500 resources) checking at each node to see if the node was equal to fMarkerResource. Since the listener knows that it is only interested in that one resource, it should just take the delta and look in it to see if the resource in question is there. The current IResourceDelta api is not optimal for doing this but it certainly can be done and would be very much more efficient than the current approach. We will look at adding the required API but this late in the game I would not hope for too much. NOTES: JBL (6/1/2001 11:47:09 AM) ClassFileMarkerAnnotationModel is JUI. Moving to ITPJUI. KUM (8/6/2001 4:41:57 PM) Sent mail to JMA regarding expected core support.
|
resolved fixed
|
f938ef0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:12:45Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java
|
protected boolean fChangesApplied;
public ClassFileMarkerAnnotationModel(IResource markerResource) {
super();
fMarkerResource= markerResource;
fWorkspace= fMarkerResource.getWorkspace();
}
public void setClassFile(IClassFile classFile) {
fClassFile= classFile;
}
/**
* @see AbstractMarkerAnnotationModel#isAcceptable
*/
protected boolean isAcceptable(IMarker marker) {
try {
return JavaCore.getJavaCore().isReferencedBy(fClassFile, marker);
} catch (CoreException x) {
handleCoreException(x, JavaEditorMessages.getString("ClassFileMarkerAnnotationModel.error.isAcceptable"));
return false;
}
}
protected boolean isAffected(IMarkerDelta markerDelta) {
try {
return JavaCore.getJavaCore().isReferencedBy(fClassFile, markerDelta);
} catch (CoreException x) {
handleCoreException(x, JavaEditorMessages.getString("ClassFileMarkerAnnotationModel.error.isAffected"));
return false;
|
3,658 |
Bug 3658 JDT change listener efficiency issue (1GEMN5F)
|
ClassFileMarkerAnnotationModel.visit is very much less than optimal if fMarkerResource is set. It traverses the entire delta only looking for a particular resource! I don't understand when fMarkerResource is set and when it is not but in the case I saw, it was set to be a particular project resource which was not even in the list of resources which changed in the large delta I was processing. The net result of this was that the listener traversed the entire delta (~1500 resources) checking at each node to see if the node was equal to fMarkerResource. Since the listener knows that it is only interested in that one resource, it should just take the delta and look in it to see if the resource in question is there. The current IResourceDelta api is not optimal for doing this but it certainly can be done and would be very much more efficient than the current approach. We will look at adding the required API but this late in the game I would not hope for too much. NOTES: JBL (6/1/2001 11:47:09 AM) ClassFileMarkerAnnotationModel is JUI. Moving to ITPJUI. KUM (8/6/2001 4:41:57 PM) Sent mail to JMA regarding expected core support.
|
resolved fixed
|
f938ef0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:12:45Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java
|
}
}
/**
* @see AbstractMarkerAnnotationModel#createMarkerAnnotation(IMarker)
*/
protected MarkerAnnotation createMarkerAnnotation(IMarker marker) {
return new JavaMarkerAnnotation(marker);
}
/**
* @see AbstractMarkerAnnotationModel#listenToMarkerChanges(boolean)
*/
protected void listenToMarkerChanges(boolean listen) {
if (listen)
fWorkspace.addResourceChangeListener(this);
else
fWorkspace.removeResourceChangeListener(this);
}
/**
* @see AbstractMarkerAnnotationModel#deleteMarkers(IMarker[])
*/
protected void deleteMarkers(IMarker[] markers) throws CoreException {
}
/**
* @see AbstractMarkerAnnotationModel#retrieveMarkers()
*/
protected IMarker[] retrieveMarkers() throws CoreException {
|
3,658 |
Bug 3658 JDT change listener efficiency issue (1GEMN5F)
|
ClassFileMarkerAnnotationModel.visit is very much less than optimal if fMarkerResource is set. It traverses the entire delta only looking for a particular resource! I don't understand when fMarkerResource is set and when it is not but in the case I saw, it was set to be a particular project resource which was not even in the list of resources which changed in the large delta I was processing. The net result of this was that the listener traversed the entire delta (~1500 resources) checking at each node to see if the node was equal to fMarkerResource. Since the listener knows that it is only interested in that one resource, it should just take the delta and look in it to see if the resource in question is there. The current IResourceDelta api is not optimal for doing this but it certainly can be done and would be very much more efficient than the current approach. We will look at adding the required API but this late in the game I would not hope for too much. NOTES: JBL (6/1/2001 11:47:09 AM) ClassFileMarkerAnnotationModel is JUI. Moving to ITPJUI. KUM (8/6/2001 4:41:57 PM) Sent mail to JMA regarding expected core support.
|
resolved fixed
|
f938ef0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:12:45Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java
|
return fMarkerResource.findMarkers(IMarker.MARKER, true, IResource.DEPTH_INFINITE);
}
/**
* @see IResourceDeltaVisitor#visit
*/
public boolean visit(IResourceDelta delta) throws CoreException {
if (delta != null) {
if (fMarkerResource != null && !fMarkerResource.equals(delta.getResource()))
return true;
IMarkerDelta[] markerDeltas= delta.getMarkerDeltas();
for (int i= 0; i < markerDeltas.length; i++) {
if (isAffected(markerDeltas[i])) {
IMarker marker= markerDeltas[i].getMarker();
switch (markerDeltas[i].getKind()) {
case IResourceDelta.ADDED :
addMarkerAnnotation(marker);
fChangesApplied= true;
break;
case IResourceDelta.REMOVED :
removeMarkerAnnotation(marker);
fChangesApplied= true;
break;
case IResourceDelta.CHANGED:
modifyMarkerAnnotation(marker);
fChangesApplied= true;
break;
|
3,658 |
Bug 3658 JDT change listener efficiency issue (1GEMN5F)
|
ClassFileMarkerAnnotationModel.visit is very much less than optimal if fMarkerResource is set. It traverses the entire delta only looking for a particular resource! I don't understand when fMarkerResource is set and when it is not but in the case I saw, it was set to be a particular project resource which was not even in the list of resources which changed in the large delta I was processing. The net result of this was that the listener traversed the entire delta (~1500 resources) checking at each node to see if the node was equal to fMarkerResource. Since the listener knows that it is only interested in that one resource, it should just take the delta and look in it to see if the resource in question is there. The current IResourceDelta api is not optimal for doing this but it certainly can be done and would be very much more efficient than the current approach. We will look at adding the required API but this late in the game I would not hope for too much. NOTES: JBL (6/1/2001 11:47:09 AM) ClassFileMarkerAnnotationModel is JUI. Moving to ITPJUI. KUM (8/6/2001 4:41:57 PM) Sent mail to JMA regarding expected core support.
|
resolved fixed
|
f938ef0
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:12:45Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java
|
}
}
}
return (fMarkerResource == null);
}
return false;
}
/**
* @see IResourceChangeListener#resourceChanged
*/
public void resourceChanged(IResourceChangeEvent e) {
IResourceDelta delta= e.getDelta();
try {
if (delta != null) {
fChangesApplied= false;
delta.accept(this);
if (fChangesApplied)
fireModelChanged();
}
} catch (CoreException x) {
handleCoreException(x, JavaEditorMessages.getString("ClassFileMarkerAnnotationModel.error.resourceChanged"));
}
}
}
|
8,221 |
Bug 8221 NPE in refactoring preview page (Pull up)
|
1. select TestCase.setUp and invoke 'Pull Up' 2. In the delete tree check all elements, press next 3. Open the 'VectorTest.java' tree and select the node 'Delete....' -> 4 org.eclipse.core.runtime 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.ComparePreviewer$CompareInput.<init> (ComparePreviewer.java:42) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getCompareInput (PreviewWizardPage.java:211) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getPreviewer (PreviewWizardPage.java:254) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$1 (PreviewWizardPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:363) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java (Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:999) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:466) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:233) at org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetSelected (AbstractTreeViewer.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.actions.OpenRefactoringWizardAction.run (OpenRefactoringWizardAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
|
verified fixed
|
c2780ff
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:15:40Z | 2002-01-23T18:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteInCompilationUnitEdit.java
|
package org.eclipse.jdt.internal.ui.reorg;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportContainer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.textmanipulation.SimpleTextEdit;
import org.eclipse.jdt.internal.corext.textmanipulation.TextBufferEditor;
import org.eclipse.jdt.internal.corext.textmanipulation.TextEdit;
import org.eclipse.jdt.internal.corext.textmanipulation.TextRange;
import org.eclipse.jdt.internal.corext.refactoring.Assert;
class PasteInCompilationUnitEdit extends SimpleTextEdit {
|
8,221 |
Bug 8221 NPE in refactoring preview page (Pull up)
|
1. select TestCase.setUp and invoke 'Pull Up' 2. In the delete tree check all elements, press next 3. Open the 'VectorTest.java' tree and select the node 'Delete....' -> 4 org.eclipse.core.runtime 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.ComparePreviewer$CompareInput.<init> (ComparePreviewer.java:42) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getCompareInput (PreviewWizardPage.java:211) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getPreviewer (PreviewWizardPage.java:254) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$1 (PreviewWizardPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:363) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java (Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:999) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:466) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:233) at org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetSelected (AbstractTreeViewer.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.actions.OpenRefactoringWizardAction.run (OpenRefactoringWizardAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
|
verified fixed
|
c2780ff
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:15:40Z | 2002-01-23T18:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteInCompilationUnitEdit.java
|
private String fSource;
private int fType;
private ICompilationUnit fCu;
protected PasteInCompilationUnitEdit(String source, int type, ICompilationUnit cu) {
Assert.isNotNull(source);
fSource= source;
Assert.isTrue(type == IJavaElement.PACKAGE_DECLARATION
|| type == IJavaElement.IMPORT_CONTAINER
|| type == IJavaElement.IMPORT_DECLARATION
|| type == IJavaElement.TYPE);
fType= type;
Assert.isTrue(cu.exists());
fCu= cu;
}
/*
* @see TextEdit#copy()
*/
public TextEdit copy() {
|
8,221 |
Bug 8221 NPE in refactoring preview page (Pull up)
|
1. select TestCase.setUp and invoke 'Pull Up' 2. In the delete tree check all elements, press next 3. Open the 'VectorTest.java' tree and select the node 'Delete....' -> 4 org.eclipse.core.runtime 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.ComparePreviewer$CompareInput.<init> (ComparePreviewer.java:42) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getCompareInput (PreviewWizardPage.java:211) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getPreviewer (PreviewWizardPage.java:254) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$1 (PreviewWizardPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:363) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java (Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:999) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:466) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:233) at org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetSelected (AbstractTreeViewer.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.actions.OpenRefactoringWizardAction.run (OpenRefactoringWizardAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
|
verified fixed
|
c2780ff
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:15:40Z | 2002-01-23T18:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteInCompilationUnitEdit.java
|
return new PasteInCompilationUnitEdit(fSource, fType, fCu);
}
/* non Java-doc
* @see TextEdit#connect
*/
public void connect(TextBufferEditor editor) throws CoreException {
setText(fSource);
setTextRange(new TextRange(computeOffset(), 0));
}
private int computeOffset() throws JavaModelException{
switch(fType){
case IJavaElement.PACKAGE_DECLARATION:
return computeOffsetForPackageDeclaration();
case IJavaElement.IMPORT_CONTAINER:
return computeOffsetForImportContainer();
case IJavaElement.IMPORT_DECLARATION:
return computeOffsetForImportContainer();
case IJavaElement.TYPE:
return computeOffsetForType();
default:
Assert.isTrue(false);
return -1;
}
}
private int computeOffsetForPackageDeclaration() throws JavaModelException{
IPackageDeclaration[] declarations= fCu.getPackageDeclarations();
if (declarations.length == 0)
|
8,221 |
Bug 8221 NPE in refactoring preview page (Pull up)
|
1. select TestCase.setUp and invoke 'Pull Up' 2. In the delete tree check all elements, press next 3. Open the 'VectorTest.java' tree and select the node 'Delete....' -> 4 org.eclipse.core.runtime 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.ComparePreviewer$CompareInput.<init> (ComparePreviewer.java:42) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getCompareInput (PreviewWizardPage.java:211) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.getPreviewer (PreviewWizardPage.java:254) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:374) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$1 (PreviewWizardPage.java:372) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:363) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java (Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:999) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:466) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:233) at org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetSelected (AbstractTreeViewer.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.actions.OpenRefactoringWizardAction.run (OpenRefactoringWizardAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:452) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:827) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:878) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
|
verified fixed
|
c2780ff
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T16:15:40Z | 2002-01-23T18:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteInCompilationUnitEdit.java
|
return 0;
return declarations[0].getSourceRange().getOffset();
}
private int computeOffsetForImportContainer() throws JavaModelException{
IImportContainer container= fCu.getImportContainer();
if (container.exists())
return container.getSourceRange().getOffset();
IPackageDeclaration[] declarations= fCu.getPackageDeclarations();
if (declarations.length != 0)
return declarations[declarations.length - 1].getSourceRange().getOffset()
+ declarations[declarations.length - 1].getSourceRange().getLength();
return 0;
}
private int computeOffsetForType() throws JavaModelException{
IType[] types= fCu.getTypes();
if (types.length != 0)
return types[0].getSourceRange().getOffset();
return fCu.getSourceRange().getLength();
}
}
|
4,914 |
Bug 4914 can't extract class expression
|
class B{ Object m(){ return /*[*/B.class/*]*/; } } cannot extract the selected fragment
|
verified fixed
|
3688645
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T18:51:39Z | 2001-10-12T09:46:40Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/A.java
|
public class A{
String f(int y, int z, boolean ff){
try{
} catch (Exception e){
}
return null;
}
void f(){}
}
|
4,914 |
Bug 4914 can't extract class expression
|
class B{ Object m(){ return /*[*/B.class/*]*/; } } cannot extract the selected fragment
|
verified fixed
|
3688645
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T18:51:39Z | 2001-10-12T09:46:40Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/X.java
|
import java.io.*;
public class X {
void foo(final int out){
new Object(){
void bar(){
System.out.println(out);
}
};
}
}
|
6,680 |
Bug 6680 extract method: incorrect return statement inserted - compile errors
|
class A { int i(){ return 0;} void m(){ /*[*/i(); m();/*]*/ } } refactors incorectly to: class A { int i(){ return 0;} void m(){ xxx();/*]*/ } private int xxx() { return /*[*/i(); m(); } }
|
resolved fixed
|
166ec63
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-24T19:47:15Z | 2001-12-07T18:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/A.java
|
class A{
void m(){
int i= 1 + 1;
if (i < 0){
i += i;
return;
} else
m();
}
}
|
4,131 |
Bug 4131 extract method: missing exception declaration (1GIUPJ3)
|
AK (8/22/2001 10:23:30 AM) 1. public class A { void m() throws Exception{ /*[*/try{ for (;;){ } }catch(Exception e){ throw new Exception(); }/*]*/ } } 2. extract from /*[*/ to /*]*/ 3. the new method is missing the exception declaratio which results in compile error NOTES:
|
resolved fixed
|
0a63615
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T15:49:14Z | 2001-10-11T03:13:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/A.java
|
class A {
int i(){ return 0;}
void m(){
i();
m();
}
}
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenHierarchyOnSelectionAction.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
/**
* This action opens a java editor on the element represented by text selection of
* the connected java source editor. In addition, if the element is a type, it also
* opens shows the element in the type hierarchy viewer.
*/
public class OpenHierarchyOnSelectionAction extends OpenOnSelectionAction {
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenHierarchyOnSelectionAction.java
|
public OpenHierarchyOnSelectionAction(ImageDescriptor image, ITextEditor editor) {
this();
setImageDescriptor(image);
setContentEditor(editor);
}
public OpenHierarchyOnSelectionAction() {
super();
setText(JavaEditorMessages.getString("OpenHierarchy.label"));
setToolTipText(JavaEditorMessages.getString("OpenHierarchy.tooltip"));
setDescription(JavaEditorMessages.getString("OpenHierarchy.description"));
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenHierarchyOnSelectionAction.java
|
setDialogTitle(JavaEditorMessages.getString("OpenHierarchy.dialog.title"));
setDialogMessage(JavaEditorMessages.getString("OpenHierarchy.dialog.message"));
}
/**
* Overwrites OpenOnSelectionAction#setContentEditor
* No installation of a selection listener -> empty selection ok
*/
public void setContentEditor(ITextEditor editor) {
fEditor= editor;
setEnabled(editor != null);
}
/**
* @see AbstractOpenJavaElementAction#open
*/
protected void open(IJavaElement element) throws JavaModelException, PartInitException {
OpenTypeHierarchyUtil.open(element, fEditor.getSite().getWorkbenchWindow());
}
/**
* @see OpenOnSelectionAction#openOnEmptySelection(ITextSelection)
*/
protected void openOnEmptySelection(ITextSelection selection) throws JavaModelException, PartInitException {
if (fEditor instanceof JavaEditor) {
JavaEditor editor= (JavaEditor) fEditor;
open(editor.getElementAt(selection.getOffset()));
}
}
}
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenOnSelectionAction.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.List;
import java.util.ResourceBundle;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.AbstractOpenJavaElementAction;
/**
* This action opens a java editor on the element represented by text selection of
* the connected java source viewer.
*/
public class OpenOnSelectionAction extends AbstractOpenJavaElementAction {
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenOnSelectionAction.java
|
class SelectionChangedListener implements ISelectionChangedListener {
/*
* @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
*/
public void selectionChanged(SelectionChangedEvent event) {
ISelection s= event.getSelection();
if (s instanceof ITextSelection) {
ITextSelection ts= (ITextSelection) s;
setEnabled(ts.getLength() > 0);
}
}
};
private String fDialogTitle;
private String fDialogMessage;
protected ITextEditor fEditor;
protected ISelectionChangedListener fListener= new SelectionChangedListener();
/**
* Creates a new action with the given label and image.
*/
protected OpenOnSelectionAction() {
super();
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenOnSelectionAction.java
|
setText(JavaEditorMessages.getString("OpenOnSelection.label"));
setToolTipText(JavaEditorMessages.getString("OpenOnSelection.tooltip"));
setDescription(JavaEditorMessages.getString("OpenOnSelection.description"));
setDialogTitle(JavaEditorMessages.getString("OpenOnSelection.dialog.title"));
setDialogMessage(JavaEditorMessages.getString("OpenOnSelection.dialog.message"));
}
/**
* Creates a new action with the given image.
*/
public OpenOnSelectionAction(ImageDescriptor image) {
this();
setImageDescriptor(image);
}
protected void setDialogTitle(String title) {
fDialogTitle= title;
}
protected void setDialogMessage(String message) {
fDialogMessage= message;
}
public void setContentEditor(ITextEditor editor) {
if (fEditor != null) {
ISelectionProvider p= fEditor.getSelectionProvider();
if (p != null) p.removeSelectionChangedListener(fListener);
}
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenOnSelectionAction.java
|
fEditor= editor;
if (fEditor != null) {
ISelectionProvider p= fEditor.getSelectionProvider();
if (p != null) p.addSelectionChangedListener(fListener);
}
}
protected ICodeAssist getCodeAssist() {
IEditorInput input= fEditor.getEditorInput();
if (input instanceof IClassFileEditorInput) {
IClassFileEditorInput cfInput= (IClassFileEditorInput) input;
return cfInput.getClassFile();
}
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
/**
* @see IAction#actionPerformed
*/
public void run() {
ICodeAssist resolve= getCodeAssist();
if (resolve != null && fEditor.getSelectionProvider() != null) {
ITextSelection selection= (ITextSelection) fEditor.getSelectionProvider().getSelection();
try {
if (selection.getLength() > 0) {
IJavaElement[] result= resolve.codeSelect(selection.getOffset(), selection.getLength());
|
6,064 |
Bug 6064 Open on selection shouldn't require selection
|
Build 20011116 - move the text insertion point into the middle of a type name in a Java editor - press F3 - it has no effect It would be better if it opened on the current word. (I notice that it currently works for a partial selection, if the selection includes the start of the type name, as if it's doing code-assist or something.) This is an issue for keyboard accessibility. It currently requires you to move the cursor to the start of the word, hit CTRL+SHIFT+RIGHT to select the word, then F3. It would be better if you could just move to the word and hit F3.
|
resolved fixed
|
b7e598e
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T17:36:44Z | 2001-11-19T14:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OpenOnSelectionAction.java
|
if (result != null && result.length > 0) {
List filtered= filterResolveResults(result);
IJavaElement selected= selectJavaElement(filtered, getShell(), fDialogTitle, fDialogMessage);
if (selected != null) {
open(selected);
return;
}
}
} else {
openOnEmptySelection(selection);
return;
}
} catch (JavaModelException x) {
JavaPlugin.log(x.getStatus());
} catch (PartInitException x) {
JavaPlugin.log(x);
}
}
getShell().getDisplay().beep();
}
protected void openOnEmptySelection(ITextSelection selection) throws JavaModelException, PartInitException {
getShell().getDisplay().beep();
}
protected Shell getShell() {
return fEditor.getSite().getShell();
}
}
|
8,321 |
Bug 8321 Refactoring Preferences Page should capitalize button titles
|
The button titles on the Java->Refactoring preference page should be capitalized
|
verified fixed
|
6a5fadc
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-25T19:14:27Z | 2002-01-23T21:06:40Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/A.java
|
public class A {
void m() throws Exception{
try{
for (;;){
}
}catch(Exception e){
throw new Exception();
}
}
}
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.jarpackager;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.resource.JFaceResources;
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.ui.JavaElementContentProvider;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.packageview.EmptyInnerPackageFilter;
import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
/**
* Page 3 of the JAR Package wizard
*/
public class JarManifestWizardPage extends WizardPage implements IJarPackageWizardPage {
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
private class UntypedListener implements Listener {
/*
* Implements method from Listener
*/
public void handleEvent(Event e) {
if (getControl() == null)
return;
update();
}
}
private UntypedListener fUntypedListener= new UntypedListener();
private JarPackage fJarPackage;
private Composite fManifestGroup;
private Button fGenerateManifestRadioButton;
private Button fSaveManifestCheckbox;
private Button fReuseManifestCheckbox;
private Text fNewManifestFileText;
private Label fNewManifestFileLabel;
private Button fNewManifestFileBrowseButton;
private Button fUseManifestRadioButton;
private Text fManifestFileText;
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
private Label fManifestFileLabel;
private Button fManifestFileBrowseButton;
private Label fSealingHeaderLabel;
private Button fSealJarRadioButton;
private Label fSealJarLabel;
private Button fSealedPackagesDetailsButton;
private Button fSealPackagesRadioButton;
private Label fSealPackagesLabel;
private Button fUnSealedPackagesDetailsButton;
private Label fMainClassHeaderLabel;
private Label fMainClassLabel;
private Text fMainClassText;
private Button fMainClassBrowseButton;
private final static String PAGE_NAME= "JarManifestWizardPage";
private final static String STORE_GENERATE_MANIFEST= PAGE_NAME + ".GENERATE_MANIFEST";
private final static String STORE_SAVE_MANIFEST= PAGE_NAME + ".SAVE_MANIFEST";
private final static String STORE_REUSE_MANIFEST= PAGE_NAME + ".REUSE_MANIFEST";
private final static String STORE_MANIFEST_LOCATION= PAGE_NAME + ".MANIFEST_LOCATION";
private final static String STORE_SEAL_JAR= PAGE_NAME + ".SEAL_JAR";
/**
* Create an instance of this class
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*/
public JarManifestWizardPage(JarPackage jarPackage) {
super(PAGE_NAME);
setTitle(JarPackagerMessages.getString("JarManifestWizardPage.title"));
setDescription(JarPackagerMessages.getString("JarManifestWizardPage.description"));
fJarPackage= jarPackage;
}
/*
* Method declared on IDialogPage.
*/
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite= new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.manifestSource.label"), false);
createManifestGroup(composite);
createSpacer(composite);
fSealingHeaderLabel= createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.sealingHeader.label"), false);
createSealingGroup(composite);
createSpacer(composite);
fMainClassHeaderLabel= createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.mainClassHeader.label"), false);
createMainClassGroup(composite);
setEqualButtonSizes();
restoreWidgetValues();
setControl(composite);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
update();
WorkbenchHelp.setHelp(composite, new DialogPageContextComputer(this, IJavaHelpContextIds.JARMANIFEST_WIZARD_PAGE));
}
/**
* Create the export options specification widgets.
*
* @param parent org.eclipse.swt.widgets.Composite
*/
protected void createManifestGroup(Composite parent) {
fManifestGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
fManifestGroup.setLayout(layout);
fManifestGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fGenerateManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT);
fGenerateManifestRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.genetateManifest.text"));
fGenerateManifestRadioButton.addListener(SWT.Selection, fUntypedListener);
Composite saveOptions= new Composite(fManifestGroup, SWT.NONE);
GridLayout saveOptionsLayout= new GridLayout();
saveOptionsLayout.marginWidth= 0;
saveOptions.setLayout(saveOptionsLayout);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.horizontalIndent=20;
saveOptions.setLayoutData(data);
fSaveManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT);
fSaveManifestCheckbox.setText(JarPackagerMessages.getString("JarManifestWizardPage.saveManifest.text"));
fSaveManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener);
fReuseManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fReuseManifestCheckbox.setText(JarPackagerMessages.getString("JarManifestWizardPage.reuseManifest.text"));
fReuseManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener);
createNewManifestFileGroup(saveOptions);
fUseManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT);
fUseManifestRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.useManifest.text"));
fUseManifestRadioButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite existingManifestGroup= new Composite(fManifestGroup, SWT.NONE);
GridLayout existingManifestLayout= new GridLayout();
existingManifestLayout.marginWidth= 0;
existingManifestGroup.setLayout(existingManifestLayout);
data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.horizontalIndent=20;
existingManifestGroup.setLayoutData(data);
createManifestFileGroup(existingManifestGroup);
}
protected void createNewManifestFileGroup(Composite parent) {
Composite manifestFileGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
layout.numColumns= 3;
manifestFileGroup.setLayout(layout);
manifestFileGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fNewManifestFileLabel= new Label(manifestFileGroup, SWT.NONE);
fNewManifestFileLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.newManifestFile.text"));
fNewManifestFileText= new Text(manifestFileGroup, SWT.SINGLE | SWT.BORDER);
fNewManifestFileText.addListener(SWT.Modify, fUntypedListener);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= convertWidthInCharsToPixels(40);
fNewManifestFileText.setLayoutData(data);
fNewManifestFileBrowseButton= new Button(manifestFileGroup, SWT.PUSH);
fNewManifestFileBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.newManifestFileBrowseButton.text"));
fNewManifestFileBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
fNewManifestFileBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleNewManifestFileBrowseButtonPressed();
}
});
}
protected void createManifestFileGroup(Composite parent) {
Composite manifestFileGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
layout.marginWidth= 0;
manifestFileGroup.setLayout(layout);
manifestFileGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fManifestFileLabel= new Label(manifestFileGroup, SWT.NONE);
fManifestFileLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.manifestFile.text"));
fManifestFileText= new Text(manifestFileGroup, SWT.SINGLE | SWT.BORDER);
fManifestFileText.addListener(SWT.Modify, fUntypedListener);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= convertWidthInCharsToPixels(40);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fManifestFileText.setLayoutData(data);
fManifestFileBrowseButton= new Button(manifestFileGroup, SWT.PUSH);
fManifestFileBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.manifestFileBrowse.text"));
fManifestFileBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
fManifestFileBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleManifestFileBrowseButtonPressed();
}
});
}
/**
* Creates the JAR sealing specification controls.
*
* @param parent the parent control
*/
protected void createSealingGroup(Composite parent) {
Composite sealingGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
layout.horizontalSpacing += 3;
sealingGroup.setLayout(layout);
sealingGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
createSealJarGroup(sealingGroup);
createSealPackagesGroup(sealingGroup);
}
/**
* Creates the JAR sealing specification controls to seal the whole JAR.
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*
* @param parent the parent control
*/
protected void createSealJarGroup(Composite sealGroup) {
fSealJarRadioButton= new Button(sealGroup, SWT.RADIO);
fSealJarRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealJar.text"));
fSealJarRadioButton.addListener(SWT.Selection, fUntypedListener);
fSealJarLabel= new Label(sealGroup, SWT.RIGHT);
fSealJarLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fSealJarLabel.setText("");
fUnSealedPackagesDetailsButton= new Button(sealGroup, SWT.PUSH);
fUnSealedPackagesDetailsButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
fUnSealedPackagesDetailsButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.unsealPackagesButton.text"));
fUnSealedPackagesDetailsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleUnSealPackagesDetailsButtonPressed();
}
});
}
/**
* Creates the JAR sealing specification controls to seal packages.
*
* @param parent the parent control
*/
protected void createSealPackagesGroup(Composite sealGroup) {
fSealPackagesRadioButton= new Button(sealGroup, SWT.RADIO);
fSealPackagesRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealPackagesButton.text"));
fSealPackagesLabel= new Label(sealGroup, SWT.RIGHT);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fSealPackagesLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fSealPackagesLabel.setText("");
fSealedPackagesDetailsButton= new Button(sealGroup, SWT.PUSH);
fSealedPackagesDetailsButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
fSealedPackagesDetailsButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesDetailsButton.text"));
fSealedPackagesDetailsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleSealPackagesDetailsButtonPressed();
}
});
}
protected void createMainClassGroup(Composite parent) {
Composite mainClassGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
mainClassGroup.setLayout(layout);
mainClassGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
fMainClassLabel= new Label(mainClassGroup, SWT.NONE);
fMainClassLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.mainClass.label"));
fMainClassText= new Text(mainClassGroup, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
fMainClassText.addListener(SWT.Modify, fUntypedListener);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= convertWidthInCharsToPixels(40);
fMainClassText.setLayoutData(data);
fMainClassBrowseButton= new Button(mainClassGroup, SWT.PUSH);
fMainClassBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.mainClassBrowseButton.text"));
fMainClassBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fMainClassBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleMainClassBrowseButtonPressed();
}
});
}
private void update() {
updateModel();
updateEnableState();
updatePageCompletion();
}
/**
* Open an appropriate dialog so that the user can specify a manifest
* to save
*/
protected void handleNewManifestFileBrowseButtonPressed() {
SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell());
dialog.create();
dialog.getShell().setText(JarPackagerMessages.getString("JarManifestWizardPage.saveAsDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.saveAsDialog.message"));
dialog.setOriginalFile(createFileHandle(fJarPackage.getManifestLocation()));
if (dialog.open() == dialog.OK) {
fJarPackage.setManifestLocation(dialog.getResult());
fNewManifestFileText.setText(dialog.getResult().toString());
}
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
}
protected void handleManifestFileBrowseButtonPressed() {
ElementTreeSelectionDialog dialog= createWorkspaceFileSelectionDialog(JarPackagerMessages.getString("JarManifestWizardPage.manifestSelectionDialog.title"), JarPackagerMessages.getString("JarManifestWizardPage.manifestSelectionDialog.message"));
if (fJarPackage.doesManifestExist())
dialog.setInitialSelections(new IResource[] {fJarPackage.getManifestFile()});
if (dialog.open() == dialog.OK) {
Object[] resources= dialog.getResult();
if (resources.length != 1)
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.onlyOneManifestMustBeSelected"));
else {
setErrorMessage("");
fJarPackage.setManifestLocation(((IResource)resources[0]).getFullPath());
fManifestFileText.setText(fJarPackage.getManifestLocation().toString());
}
}
}
protected void handleMainClassBrowseButtonPressed() {
List resources= fJarPackage.getSelectedResources();
if (resources == null) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.noResourceSelected"));
return;
}
IJavaSearchScope searchScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope((IResource[])resources.toArray(new IResource[resources.size()]));
SelectionDialog dialog= JavaUI.createMainTypeDialog(getContainer().getShell(), getContainer(), searchScope, 0, false, "");
dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.mainTypeSelectionDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.mainTypeSelectionDialog.message"));
if (fJarPackage.getMainClass() != null)
dialog.setInitialSelections(new Object[] {fJarPackage.getMainClass()});
if (dialog.open() == dialog.OK) {
fJarPackage.setMainClass((IType)dialog.getResult()[0]);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fMainClassText.setText(fJarPackage.getMainClassName());
} else if (!fJarPackage.isMainClassValid(getContainer())) {
fJarPackage.setMainClass(null);
fMainClassText.setText(fJarPackage.getMainClassName());
}
}
protected void handleSealPackagesDetailsButtonPressed() {
SelectionDialog dialog= createPackageDialog(fJarPackage.getPackagesForSelectedResources());
dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesSelectionDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesSelectionDialog.message"));
dialog.setInitialSelections(fJarPackage.getPackagesToSeal());
if (dialog.open() == dialog.OK)
fJarPackage.setPackagesToSeal(getPackagesFromDialog(dialog));
updateSealingInfo();
}
protected void handleUnSealPackagesDetailsButtonPressed() {
SelectionDialog dialog= createPackageDialog(fJarPackage.getPackagesForSelectedResources());
dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.unsealedPackagesSelectionDialog.title"));
dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.unsealedPackagesSelectionDialog.message"));
dialog.setInitialSelections(fJarPackage.getPackagesToUnseal());
if (dialog.open() == dialog.OK)
fJarPackage.setPackagesToUnseal(getPackagesFromDialog(dialog));
updateSealingInfo();
}
/**
* Updates the enable state of this page's controls. Subclasses may extend.
*/
protected void updateEnableState() {
boolean generate= fGenerateManifestRadioButton.getSelection();
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
boolean save= generate && fSaveManifestCheckbox.getSelection();
fSaveManifestCheckbox.setEnabled(generate);
fReuseManifestCheckbox.setEnabled(fJarPackage.isDescriptionSaved() && save);
fNewManifestFileText.setEnabled(save);
fNewManifestFileLabel.setEnabled(save);
fNewManifestFileBrowseButton.setEnabled(save);
fManifestFileText.setEnabled(!generate);
fManifestFileLabel.setEnabled(!generate);
fManifestFileBrowseButton.setEnabled(!generate);
fSealingHeaderLabel.setEnabled(generate);
boolean sealState= fSealJarRadioButton.getSelection();
fSealJarRadioButton.setEnabled(generate);
fSealJarLabel.setEnabled(generate);
fUnSealedPackagesDetailsButton.setEnabled(sealState && generate);
fSealPackagesRadioButton.setEnabled(generate);
fSealPackagesLabel.setEnabled(generate);
fSealedPackagesDetailsButton.setEnabled(!sealState && generate);
fMainClassHeaderLabel.setEnabled(generate);
fMainClassLabel.setEnabled(generate);
fMainClassText.setEnabled(generate);
fMainClassBrowseButton.setEnabled(generate);
updateSealingInfo();
}
protected void updateSealingInfo() {
if (fJarPackage.isJarSealed()) {
fSealPackagesLabel.setText("");
int i= fJarPackage.getPackagesToUnseal().length;
if (i == 0)
fSealJarLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.jarSealed"));
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
else if (i == 1)
fSealJarLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.jarSealedExceptOne"));
else
fSealJarLabel.setText(JarPackagerMessages.getFormattedString("JarManifestWizardPage.jarSealedExceptSome", new Integer(i)));
}
else {
fSealJarLabel.setText("");
int i= fJarPackage.getPackagesToSeal().length;
if (i == 0)
fSealPackagesLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.nothingSealed"));
else if (i == 1)
fSealPackagesLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.onePackageSealed"));
else
fSealPackagesLabel.setText(JarPackagerMessages.getFormattedString("JarManifestWizardPage.somePackagesSealed", new Integer(i)));
}
}
/*
* Implements method from IJarPackageWizardPage
*/
public boolean isPageComplete() {
boolean incompleteButNotAnError= false;
if (fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) {
if (fJarPackage.getManifestLocation().toString().length() == 0)
incompleteButNotAnError= true;
else {
IPath location= fJarPackage.getManifestLocation();
if (!location.toString().startsWith("/")) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestPathMustBeAbsolute"));
return false;
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
}
IResource resource= findResource(location);
if (resource != null && resource.getType() != IResource.FILE) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestMustNotBeExistingContainer"));
return false;
}
resource= findResource(location.removeLastSegments(1));
if (resource == null || resource.getType() == IResource.FILE) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestContainerDoesNotExist"));
return false;
}
}
}
if (!fJarPackage.isManifestGenerated() && !fJarPackage.doesManifestExist()) {
if (fJarPackage.getManifestLocation().toString().length() == 0)
incompleteButNotAnError= true;
else {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.invalidManifestFile"));
return false;
}
}
if (fJarPackage.isJarSealed()
&& !fJarPackage.getPackagesForSelectedResources().containsAll(Arrays.asList(fJarPackage.getPackagesToUnseal()))) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.unsealedPackagesNotInSelection"));
return false;
}
if (!fJarPackage.isJarSealed()
&& !fJarPackage.getPackagesForSelectedResources().containsAll(Arrays.asList(fJarPackage.getPackagesToSeal()))) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.sealedPackagesNotInSelection"));
return false;
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
}
if (!fJarPackage.isMainClassValid(getContainer())) {
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.invalidMainClass"));
return false;
}
if (incompleteButNotAnError) {
setErrorMessage(null);
return false;
}
setErrorMessage(null);
return true;
}
/*
* Implements method from IWizardPage.
*/
public void setPreviousPage(IWizardPage page) {
super.setPreviousPage(page);
if (getContainer() != null)
updatePageCompletion();
}
/*
* Implements method from IJarPackageWizardPage.
*/
public void finish() {
saveWidgetValues();
}
/**
* Persists resource specification control setting that are to be restored
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
* in the next instance of this page. Subclasses wishing to persist
* settings for their controls should extend the hook method
* <code>internalSaveWidgetValues</code>.
*/
public final void saveWidgetValues() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
settings.put(STORE_GENERATE_MANIFEST, fJarPackage.isManifestGenerated());
settings.put(STORE_SAVE_MANIFEST, fJarPackage.isManifestSaved());
settings.put(STORE_REUSE_MANIFEST, fJarPackage.isManifestReused());
settings.put(STORE_MANIFEST_LOCATION, fJarPackage.getManifestLocation().toString());
settings.put(STORE_SEAL_JAR, fJarPackage.isJarSealed());
}
internalSaveWidgetValues();
}
/**
* Hook method for subclasses to persist their settings.
*/
protected void internalSaveWidgetValues() {
}
/**
* Hook method for restoring widget values to the values that they held
* last time this wizard was used to completion.
*/
protected void restoreWidgetValues() {
if (!fJarPackage.isUsedToInitialize())
initializeJarPackage();
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
if (fJarPackage.isManifestGenerated())
fGenerateManifestRadioButton.setSelection(true);
else
fUseManifestRadioButton.setSelection(true);
fSaveManifestCheckbox.setSelection(fJarPackage.isManifestSaved());
fReuseManifestCheckbox.setSelection(fJarPackage.isManifestReused());
fManifestFileText.setText(fJarPackage.getManifestLocation().toString());
fNewManifestFileText.setText(fJarPackage.getManifestLocation().toString());
if (fJarPackage.isJarSealed())
fSealJarRadioButton.setSelection(true);
else
fSealPackagesRadioButton.setSelection(true);
fMainClassText.setText(fJarPackage.getMainClassName());
}
/**
* Initializes the JAR package from last used wizard page values.
*/
protected void initializeJarPackage() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
fJarPackage.setGenerateManifest(settings.getBoolean(STORE_GENERATE_MANIFEST));
fJarPackage.setSaveManifest(settings.getBoolean(STORE_SAVE_MANIFEST));
fJarPackage.setReuseManifest(settings.getBoolean(STORE_REUSE_MANIFEST));
String pathStr= settings.get(STORE_MANIFEST_LOCATION);
if (pathStr == null)
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
pathStr= "";
fJarPackage.setManifestLocation(new Path(pathStr));
fJarPackage.setSealJar(settings.getBoolean(STORE_SEAL_JAR));
}
}
/**
* Stores the widget values in the JAR package.
*/
protected void updateModel() {
if (getControl() == null)
return;
fJarPackage.setGenerateManifest(fGenerateManifestRadioButton.getSelection());
fJarPackage.setSaveManifest(fSaveManifestCheckbox.getSelection());
fJarPackage.setReuseManifest(fReuseManifestCheckbox.getSelection());
String path;
if (fJarPackage.isManifestGenerated())
path= fNewManifestFileText.getText();
else
path= fManifestFileText.getText();
if (path == null)
path= "";
fJarPackage.setManifestLocation(new Path(path));
fJarPackage.setSealJar(fSealJarRadioButton.getSelection());
}
/**
* Determine if the page is complete and update the page appropriately.
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*/
protected void updatePageCompletion() {
boolean pageComplete= isPageComplete();
setPageComplete(pageComplete);
if (pageComplete) {
setErrorMessage(null);
}
}
/**
* Creates a file resource handle for the file with the given workspace path.
* This method does not create the file resource; this is the responsibility
* of <code>createFile</code>.
*
* @param filePath the path of the file resource to create a handle for
* @return the new file resource handle
* @see #createFile
*/
protected IFile createFileHandle(IPath filePath) {
if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2)
return JavaPlugin.getWorkspace().getRoot().getFile(filePath);
else
return null;
}
/**
* Creates a new label with a bold font.
*
* @param parent the parent control
* @param text the label text
* @return the new label control
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*/
protected Label createLabel(Composite parent, String text, boolean bold) {
Label label= new Label(parent, SWT.NONE);
if (bold)
label.setFont(JFaceResources.getBannerFont());
label.setText(text);
GridData data= new GridData();
data.verticalAlignment= GridData.FILL;
data.horizontalAlignment= GridData.FILL;
label.setLayoutData(data);
return label;
}
/**
* Sets the size of a control.
*
* @param control the control for which to set the size
* @param width the new width of the control
* @param height the new height of the control
*/
protected void setSize(Control control, int width, int height) {
GridData gd= new GridData(GridData.END);
gd.widthHint= width ;
gd.heightHint= height;
control.setLayoutData(gd);
}
/**
* Makes the size of all buttons equal.
*/
protected void setEqualButtonSizes() {
int width= SWTUtil.getButtonWidthHint(fManifestFileBrowseButton);
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
int height= SWTUtil.getButtonHeigthHint(fManifestFileBrowseButton);
int width2= SWTUtil.getButtonWidthHint(fNewManifestFileBrowseButton);
int height2= SWTUtil.getButtonHeigthHint(fNewManifestFileBrowseButton);
width= Math.max(width, width2);
height= Math.max(height, height2);
width2= SWTUtil.getButtonWidthHint(fSealedPackagesDetailsButton);
height2= SWTUtil.getButtonHeigthHint(fSealedPackagesDetailsButton);
width= Math.max(width, width2);
height= Math.max(height, height2);
width2= SWTUtil.getButtonWidthHint(fUnSealedPackagesDetailsButton);
height2= SWTUtil.getButtonHeigthHint(fUnSealedPackagesDetailsButton);
width= Math.max(width, width2);
height= Math.max(height, height2);
width2= SWTUtil.getButtonWidthHint(fMainClassBrowseButton);
height2= SWTUtil.getButtonHeigthHint(fMainClassBrowseButton);
width= Math.max(width, width2);
height= Math.max(height, height2);
setSize(fManifestFileBrowseButton, width, height);
setSize(fNewManifestFileBrowseButton, width, height);
setSize(fSealedPackagesDetailsButton, width, height);
setSize(fUnSealedPackagesDetailsButton, width, height);
setSize(fMainClassBrowseButton, width, height);
}
/**
* Creates a horizontal spacer line that fills the width of its container.
*
* @param parent the parent control
*/
protected void createSpacer(Composite parent) {
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
Label spacer= new Label(parent, SWT.NONE);
GridData data= new GridData();
data.horizontalAlignment= GridData.FILL;
data.verticalAlignment= GridData.BEGINNING;
spacer.setLayoutData(data);
}
/**
* Returns the resource for the specified path.
*
* @param path the path for which the resource should be returned
* @return the resource specified by the path or <code>null</code>
*/
protected IResource findResource(IPath path) {
IWorkspace workspace= JavaPlugin.getWorkspace();
IStatus result= workspace.validatePath(
path.toString(),
IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
if (result.isOK() && workspace.getRoot().exists(path))
return workspace.getRoot().findMember(path);
return null;
}
protected IPath getPathFromString(String text) {
return new Path(text).makeAbsolute();
}
/**
* Creates a selection dialog that lists all packages under the given package
* fragment root.
* The caller is responsible for opening the dialog with <code>Window.open</code>,
* and subsequently extracting the selected packages (of type
* <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>.
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*
* @param packageFragments the package fragments
* @return a new selection dialog
*/
protected SelectionDialog createPackageDialog(Set packageFragments) {
List packages= new ArrayList(packageFragments.size());
for (Iterator iter= packageFragments.iterator(); iter.hasNext();) {
IPackageFragment fragment= (IPackageFragment)iter.next();
boolean containsJavaElements= false;
int kind;
try {
kind= fragment.getKind();
containsJavaElements= fragment.getChildren().length > 0;
} catch (JavaModelException ex) {
ExceptionHandler.handle(ex, getContainer().getShell(), JarPackagerMessages.getString("JarManifestWizardPage.error.jarPackageWizardError.title"), JarPackagerMessages.getFormattedString("JarManifestWizardPage.error.jarPackageWizardError.message", fragment.getElementName()));
continue;
}
if (kind != IPackageFragmentRoot.K_BINARY && containsJavaElements)
packages.add(fragment);
}
JavaElementContentProvider cp= new JavaElementContentProvider() {
public boolean hasChildren(Object element) {
return !(element instanceof IPackageFragment) && super.hasChildren(element);
}
};
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getContainer().getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT), cp);
dialog.setDoubleClickSelects(false);
dialog.setInput(JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot()));
dialog.addFilter(new EmptyInnerPackageFilter());
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
dialog.addFilter(new LibraryFilter());
dialog.addFilter(new SealPackagesFilter(packages));
dialog.setValidator(new ISelectionValidator() {
public IStatus validate(Object[] selection) {
StatusInfo res= new StatusInfo();
for (int i= 0; i < selection.length; i++) {
if (!(selection[i] instanceof IPackageFragment)) {
res.setError(JarPackagerMessages.getString("JarManifestWizardPage.error.mustContainPackages"));
return res;
}
}
res.setOK();
return res;
}
});
return dialog;
}
/**
* Converts selection dialog results into an array of IPackageFragments.
* An empty array is returned in case of errors.
* @throws ClassCastException if results are not IPackageFragments
*/
protected IPackageFragment[] getPackagesFromDialog(SelectionDialog dialog) {
if (dialog.getReturnCode() == dialog.OK && dialog.getResult().length > 0)
return (IPackageFragment[])Arrays.asList(dialog.getResult()).toArray(new IPackageFragment[dialog.getResult().length]);
else
return new IPackageFragment[0];
}
/**
* Creates and returns a dialog to choose an existing workspace file.
|
8,476 |
Bug 8476 JAR Packager: Make main class field editable
| null |
resolved fixed
|
9d526a8
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:05Z | 2002-01-25T14:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
*/
protected ElementTreeSelectionDialog createWorkspaceFileSelectionDialog(String title, String message) {
int labelFlags= JavaElementLabelProvider.SHOW_BASICS
| JavaElementLabelProvider.SHOW_OVERLAY_ICONS
| JavaElementLabelProvider.SHOW_SMALL_ICONS;
ITreeContentProvider contentProvider= new JavaElementContentProvider();
ILabelProvider labelProvider= new JavaElementLabelProvider(labelFlags);
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
dialog.setAllowMultiple(false);
dialog.setValidator(new ISelectionValidator() {
public IStatus validate(Object[] selection) {
StatusInfo res= new StatusInfo();
if (selection.length == 1 && (selection[0] instanceof IFile))
res.setOK();
else
res.setError("");
return res;
}
});
dialog.addFilter(new EmptyInnerPackageFilter());
dialog.addFilter(new LibraryFilter());
dialog.setTitle(title);
dialog.setMessage(message);
dialog.setStatusLineAboveButtons(true);
dialog.setInput(JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot()));
return dialog;
}
}
|
8,604 |
Bug 8604 J Search opens type selection dialog if code resolve has > 1 result
| null |
resolved fixed
|
7c11c22
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:40Z | 2002-01-28T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.search;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.DialogPage;
|
8,604 |
Bug 8604 J Search opens type selection dialog if code resolve has > 1 result
| null |
resolved fixed
|
7c11c22
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:40Z | 2002-01-28T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.search.ui.ISearchPage;
import org.eclipse.search.ui.ISearchPageContainer;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
|
8,604 |
Bug 8604 J Search opens type selection dialog if code resolve has > 1 result
| null |
resolved fixed
|
7c11c22
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:40Z | 2002-01-28T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.util.RowLayouter;
public class JavaSearchPage extends DialogPage implements ISearchPage, IJavaSearchConstants {
public static final String EXTENSION_POINT_ID= "org.eclipse.jdt.ui.JavaSearchPage";
private final static String PAGE_NAME= "JavaSearchPage";
private final static String STORE_CASE_SENSITIVE= PAGE_NAME + "CASE_SENSITIVE";
private static List fgPreviousSearchPatterns= new ArrayList(20);
private SearchPatternData fInitialData;
private IJavaElement fJavaElement;
private boolean fFirstTime= true;
private IDialogSettings fDialogSettings;
private boolean fIsCaseSensitive;
private Combo fPattern;
private ISearchPageContainer fContainer;
private Button fCaseSensitive;
private Button[] fSearchFor;
private String[] fSearchForText= {
SearchMessages.getString("SearchPage.searchFor.type"),
SearchMessages.getString("SearchPage.searchFor.method"),
SearchMessages.getString("SearchPage.searchFor.package"),
|
8,604 |
Bug 8604 J Search opens type selection dialog if code resolve has > 1 result
| null |
resolved fixed
|
7c11c22
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:40Z | 2002-01-28T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
SearchMessages.getString("SearchPage.searchFor.constructor"),
SearchMessages.getString("SearchPage.searchFor.field")};
private Button[] fLimitTo;
private String[] fLimitToText= {
SearchMessages.getString("SearchPage.limitTo.declarations"),
SearchMessages.getString("SearchPage.limitTo.implementors"),
SearchMessages.getString("SearchPage.limitTo.references"),
SearchMessages.getString("SearchPage.limitTo.allOccurrences"),
SearchMessages.getString("SearchPage.limitTo.readReferences"),
SearchMessages.getString("SearchPage.limitTo.writeReferences")};
private class SearchPatternData {
int searchFor;
int limitTo;
String pattern;
boolean isCaseSensitive;
IJavaElement javaElement;
int scope;
IWorkingSet workingSet;
public SearchPatternData(int s, int l, String p, IJavaElement element) {
this(s, l, p, fIsCaseSensitive || element != null, element, ISearchPageContainer.WORKSPACE_SCOPE, null);
}
public SearchPatternData(int s, int l, String p, boolean i, IJavaElement element, int scope, IWorkingSet workingSet) {
searchFor= s;
limitTo= l;
pattern= p;
isCaseSensitive= i;
javaElement= element;
|
8,604 |
Bug 8604 J Search opens type selection dialog if code resolve has > 1 result
| null |
resolved fixed
|
7c11c22
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-01-28T18:26:40Z | 2002-01-28T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
|
this.scope= scope;
this.workingSet= workingSet;
}
}
public boolean performAction() {
SearchUI.activateSearchResultView();
SearchPatternData data= getPatternData();
IWorkspace workspace= JavaPlugin.getWorkspace();
IJavaSearchScope scope= null;
String scopeDescription= "";
switch (getContainer().getSelectedScope()) {
case ISearchPageContainer.WORKSPACE_SCOPE:
scopeDescription= SearchMessages.getString("WorkspaceScope");
scope= SearchEngine.createWorkspaceScope();
break;
case ISearchPageContainer.SELECTION_SCOPE:
scopeDescription= SearchMessages.getString("SelectionScope");
scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getSelection());
break;
case ISearchPageContainer.WORKING_SET_SCOPE:
IWorkingSet workingSet= getContainer().getSelectedWorkingSet();
if (workingSet == null)
return false;
scopeDescription= SearchMessages.getFormattedString("WorkingSetScope", new String[] {workingSet.getName()});
scope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(getContainer().getSelectedWorkingSet());
ElementSearchAction.updateLRUWorkingSet(getContainer().getSelectedWorkingSet());
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.