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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
getInitializerLabel((IInitializer) element, flags, buf);
break;
case IJavaElement.TYPE:
getTypeLabel((IType) element, flags, buf);
break;
case IJavaElement.CLASS_FILE:
getClassFileLabel((IClassFile) element, flags, buf);
break;
case IJavaElement.COMPILATION_UNIT:
getCompilationUnitLabel((ICompilationUnit) element, flags, buf);
break;
case IJavaElement.PACKAGE_FRAGMENT:
getPackageFragmentLabel((IPackageFragment) element, flags, buf);
break;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
getPackageFragmentRootLabel((IPackageFragmentRoot) element, flags, buf);
break;
case IJavaElement.IMPORT_CONTAINER:
case IJavaElement.IMPORT_DECLARATION:
case IJavaElement.PACKAGE_DECLARATION:
getDeclararionLabel(element, flags, buf);
break;
case IJavaElement.JAVA_PROJECT:
case IJavaElement.JAVA_MODEL:
buf.append(element.getElementName());
break;
default:
buf.append(element.getElementName());
}
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (root != null && getFlag(flags, APPEND_ROOT_PATH)) {
buf.append(CONCAT_STRING);
getPackageFragmentRootLabel(root, ROOT_QUALIFIED, buf);
}
}
/**
* Appends the label for a method to a StringBuffer. Considers the M_* flags.
*/
public static void getMethodLabel(IMethod method, int flags, StringBuffer buf) {
try {
if (getFlag(flags, M_PRE_RETURNTYPE) && method.exists() && !method.isConstructor()) {
buf.append(Signature.getSimpleName(Signature.toString(method.getReturnType())));
buf.append(' ');
}
if (getFlag(flags, M_FULLY_QUALIFIED)) {
getTypeLabel(method.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(method.getElementName());
if (getFlag(flags, M_PARAMETER_TYPES | M_PARAMETER_NAMES)) {
buf.append('(');
String[] types= getFlag(flags, M_PARAMETER_TYPES) ? method.getParameterTypes() : null;
String[] names= (getFlag(flags, M_PARAMETER_NAMES) && method.exists()) ? method.getParameterNames() : null;
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
int nParams= types != null ? types.length : names.length;
for (int i= 0; i < nParams; i++) {
if (i > 0) {
buf.append(COMMA_STRING);
}
if (types != null) {
buf.append(Signature.getSimpleName(Signature.toString(types[i])));
}
if (names != null) {
if (types != null) {
buf.append(' ');
}
buf.append(names[i]);
}
}
buf.append(')');
}
if (getFlag(flags, M_EXCEPTIONS) && method.exists()) {
String[] types= method.getExceptionTypes();
if (types.length > 0) {
buf.append(" throws ");
for (int i= 0; i < types.length; i++) {
if (i > 0) {
buf.append(COMMA_STRING);
}
buf.append(Signature.getSimpleName(Signature.toString(types[i])));
}
}
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
}
if (getFlag(flags, M_APP_RETURNTYPE) && method.exists() && !method.isConstructor()) {
buf.append(DECL_STRING);
buf.append(Signature.getSimpleName(Signature.toString(method.getReturnType())));
}
if (getFlag(flags, M_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getTypeLabel(method.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
/**
* Appends the label for a field to a StringBuffer. Considers the F_* flags.
*/
public static void getFieldLabel(IField field, int flags, StringBuffer buf) {
try {
if (getFlag(flags, F_PRE_TYPE_SIGNATURE) && field.exists()) {
buf.append(Signature.toString(field.getTypeSignature()));
buf.append(' ');
}
if (getFlag(flags, F_FULLY_QUALIFIED)) {
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
getTypeLabel(field.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(field.getElementName());
if (getFlag(flags, F_APP_TYPE_SIGNATURE) && field.exists()) {
buf.append(DECL_STRING);
buf.append(Signature.toString(field.getTypeSignature()));
}
if (getFlag(flags, F_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getTypeLabel(field.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
/**
* Appends the label for a initializer to a StringBuffer. Considers the I_* flags.
*/
public static void getInitializerLabel(IInitializer initializer, int flags, StringBuffer buf) {
if (getFlag(flags, I_FULLY_QUALIFIED)) {
getTypeLabel(initializer.getDeclaringType(), T_FULLY_QUALIFIED, buf);
buf.append('.');
}
buf.append(JavaUIMessages.getString("JavaElementLabels.initializer"));
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (getFlag(flags, I_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getTypeLabel(initializer.getDeclaringType(), T_FULLY_QUALIFIED, buf);
}
}
/**
* Appends the label for a type to a StringBuffer. Considers the T_* flags.
*/
public static void getTypeLabel(IType type, int flags, StringBuffer buf) {
if (getFlag(flags, T_FULLY_QUALIFIED)) {
buf.append(JavaModelUtil.getFullyQualifiedName(type));
} else if (getFlag(flags, T_CONTAINER_QUALIFIED)) {
buf.append(JavaModelUtil.getTypeQualifiedName(type));
} else {
buf.append(type.getElementName());
}
if (getFlag(flags, T_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
IType declaringType= type.getDeclaringType();
if (declaringType != null) {
buf.append(JavaModelUtil.getFullyQualifiedName(declaringType));
} else {
getPackageFragmentLabel(type.getPackageFragment(), 0, buf);
}
}
}
/**
* Appends the label for a declaration to a StringBuffer. Considers the D_* flags.
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
*/
public static void getDeclararionLabel(IJavaElement declaration, int flags, StringBuffer buf) {
if (getFlag(flags, D_QUALIFIED)) {
IJavaElement openable= (IJavaElement) JavaModelUtil.getOpenable(declaration);
if (openable != null) {
buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED));
buf.append('/');
}
}
if (declaration.getElementType() == IJavaElement.IMPORT_CONTAINER) {
buf.append(JavaUIMessages.getString("JavaElementLabels.import_container"));
} else {
buf.append(declaration.getElementName());
}
if (getFlag(flags, D_POST_QUALIFIED)) {
IJavaElement openable= (IJavaElement) JavaModelUtil.getOpenable(declaration);
if (openable != null) {
buf.append(CONCAT_STRING);
buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED));
}
}
}
/**
* Appends the label for a class file to a StringBuffer. Considers the CF_* flags.
*/
public static void getClassFileLabel(IClassFile classFile, int flags, StringBuffer buf) {
if (getFlag(flags, CF_QUALIFIED)) {
IPackageFragment pack= (IPackageFragment) classFile.getParent();
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
if (!pack.isDefaultPackage()) {
buf.append(pack.getElementName());
buf.append('.');
}
}
buf.append(classFile.getElementName());
if (getFlag(flags, CF_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getPackageFragmentLabel((IPackageFragment) classFile.getParent(), 0, buf);
}
}
/**
* Appends the label for a compilation unit to a StringBuffer. Considers the CU_* flags.
*/
public static void getCompilationUnitLabel(ICompilationUnit cu, int flags, StringBuffer buf) {
if (getFlag(flags, CU_QUALIFIED)) {
IPackageFragment pack= (IPackageFragment) cu.getParent();
if (!pack.isDefaultPackage()) {
buf.append(pack.getElementName());
buf.append('.');
}
}
buf.append(cu.getElementName());
if (getFlag(flags, CU_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getPackageFragmentLabel((IPackageFragment) cu.getParent(), 0, buf);
}
}
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
/**
* Appends the label for a package fragment to a StringBuffer. Considers the P_* flags.
*/
public static void getPackageFragmentLabel(IPackageFragment pack, int flags, StringBuffer buf) {
if (getFlag(flags, P_QUALIFIED)) {
getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
buf.append('/');
}
if (pack.isDefaultPackage()) {
buf.append(JavaUIMessages.getString("JavaElementLabels.default_package"));
} else if (getFlag(flags, P_COMPRESSED)) {
String name= pack.getElementName();
refreshPackageNamePattern();
int start= 0;
int dot= name.indexOf('.', start);
while (dot > 0) {
buf.append(fgPkgNamePrefix);
if (fgPkgNameChars > 0)
buf.append(name.substring(start, Math.min(start+ fgPkgNameChars, dot)));
buf.append(fgPkgNamePostfix);
start= dot + 1;
dot= name.indexOf('.', start);
}
buf.append(name.substring(start));
} else {
buf.append(pack.getElementName());
}
if (getFlag(flags, P_POST_QUALIFIED)) {
buf.append(CONCAT_STRING);
getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
}
}
/**
* Appends the label for a package fragment root to a StringBuffer. Considers the ROOT_* flags.
*/
public static void getPackageFragmentRootLabel(IPackageFragmentRoot root, int flags, StringBuffer buf) {
if (root.isArchive() && getFlag(flags, ROOT_VARIABLE)) {
try {
IClasspathEntry rawEntry= JavaModelUtil.getRawClasspathEntry(root);
if (rawEntry != null) {
if (rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
buf.append(rawEntry.getPath().makeRelative());
buf.append(CONCAT_STRING);
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
if (root.isExternal()) {
buf.append(root.getPath().toOSString());
} else {
if (getFlag(flags, ROOT_QUALIFIED)) {
buf.append(root.getPath().makeRelative().toString());
} else {
buf.append(root.getElementName());
}
if (getFlag(flags, ROOT_POST_QUALIFIED)) {
|
11,314 |
Bug 11314 Replace package name fragments should always be smaller
|
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
|
verified fixed
|
1d7fa44
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:47:52Z | 2002-03-13T22:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
|
buf.append(CONCAT_STRING);
buf.append(root.getParent().getElementName());
}
}
}
private static void refreshPackageNamePattern() {
String pattern= WorkInProgressPreferencePage.getPkgNamePatternForPackagesView();
if (pattern.equals(fgPkgNamePattern))
return;
fgPkgNamePattern= pattern;
int i= 0;
fgPkgNameChars= 0;
fgPkgNamePrefix= "";
fgPkgNamePostfix= "";
while (i < pattern.length()) {
char ch= pattern.charAt(i);
if (Character.isDigit(ch)) {
fgPkgNameChars= ch-48;
if (i > 0 && i < pattern.length() - 1)
fgPkgNamePrefix= pattern.substring(0, i);
if (i >= 0 && i < pattern.length())
fgPkgNamePostfix= pattern.substring(i+1);
return;
}
i++;
}
fgPkgNamePrefix= pattern;
}
}
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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.lang.reflect.InvocationTargetException;
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
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;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.wizard.IWizardPage;
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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.IMethod;
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.corext.util.JavaModelUtil;
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.MainMethodSearchEngine;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
/**
* Page 3 of the JAR Package wizard
*/
public class JarManifestWizardPage extends WizardPage implements IJarPackageWizardPage {
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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 IType[] fMainTypes;
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;
private Label fManifestFileLabel;
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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
*/
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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);
update();
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
WorkbenchHelp.setHelp(composite, 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);
fReuseManifestCheckbox.setText(JarPackagerMessages.getString("JarManifestWizardPage.reuseManifest.text"));
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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);
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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);
fManifestFileText.setLayoutData(data);
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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.
*
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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);
fSealPackagesLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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);
fMainClassText.addListener(SWT.Modify, fUntypedListener);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint= convertWidthInCharsToPixels(40);
fMainClassText.setLayoutData(data);
fMainClassText.addKeyListener(new KeyAdapter() {
/*
* @see KeyListener#keyReleased(KeyEvent)
*/
public void keyReleased(KeyEvent e) {
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
fJarPackage.setMainClass(findMainMethodByName(fMainClassText.getText()));
update();
}
});
fMainClassBrowseButton= new Button(mainClassGroup, SWT.PUSH);
fMainClassBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.mainClassBrowseButton.text"));
fMainClassBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
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());
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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());
}
}
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());
}
}
}
private IType findMainMethodByName(String name) {
if (fMainTypes == null) {
List resources= fJarPackage.getSelectedResources();
if (resources == null)
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.noResourceSelected"));
IJavaSearchScope searchScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope((IResource[])resources.toArray(new IResource[resources.size()]));
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
MainMethodSearchEngine engine= new MainMethodSearchEngine();
try {
fMainTypes= engine.searchMainMethods(getContainer(), searchScope, 0);
} catch (InvocationTargetException ex) {
} catch (InterruptedException e) {
}
}
for (int i= 0; i < fMainTypes.length; i++) {
if (fMainTypes[i].getFullyQualifiedName().equals(name))
return fMainTypes[i];
}
return null;
}
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]);
fMainClassText.setText(fJarPackage.getMainClassName());
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
} 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();
boolean save= generate && fSaveManifestCheckbox.getSelection();
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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"));
else if (i == 1)
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
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;
}
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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;
}
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
|
if (!fJarPackage.isMainClassValid(getContainer()) || (fJarPackage.getMainClass() == null && fMainClassText.getText().length() > 0)) {
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);
fMainTypes= null;
if (getContainer() != null)
updatePageCompletion();
}
/*
* Implements method from IJarPackageWizardPage.
*/
public void finish() {
saveWidgetValues();
}
/**
* Persists resource specification control setting that are to be restored
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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();
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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)
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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.
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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);
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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) {
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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>.
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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());
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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.
|
11,437 |
Bug 11437 jar packager: no error message but buttons disabled
|
20020314 on the 'jar manifest' wizard page, if you select to use existing manifest file there's no error message but next and finish are disabled user should be informed what to do to make the wizard happy
|
resolved fixed
|
76a8215
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-15T13:50:11Z | 2002-03-15T11:00:00Z |
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;
}
}
|
11,416 |
Bug 11416 Error markers not shown in parents when resource added
|
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
|
resolved fixed
|
c3d3e3a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-18T14:56:22Z | 2002-03-14T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.viewsupport;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.resources.IProject;
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.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Listens to resource deltas and filters for marker changes of type IMarker.PROBLEM
* Viewers showing error ticks should register as listener to
* this type.
*/
public class ProblemMarkerManager implements IResourceChangeListener {
|
11,416 |
Bug 11416 Error markers not shown in parents when resource added
|
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
|
resolved fixed
|
c3d3e3a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-18T14:56:22Z | 2002-03-14T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
|
/**
* Visitors used to filter the element delta changes
*/
private static class ProjectErrorVisitor implements IResourceDeltaVisitor {
private HashSet fChangedElements;
public ProjectErrorVisitor(HashSet changedElements) {
fChangedElements= changedElements;
}
public boolean visit(IResourceDelta delta) throws CoreException {
IResource res= delta.getResource();
if (res instanceof IProject && delta.getKind() == IResourceDelta.CHANGED) {
try {
IProject project= (IProject) res;
if (!(project.hasNature(JavaCore.NATURE_ID) && project.isOpen())) {
return false;
|
11,416 |
Bug 11416 Error markers not shown in parents when resource added
|
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
|
resolved fixed
|
c3d3e3a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-18T14:56:22Z | 2002-03-14T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
|
}
} catch (CoreException e) {
JavaPlugin.log(e.getStatus());
return false;
}
}
checkInvalidate(delta, res.getFullPath());
return true;
}
private void checkInvalidate(IResourceDelta delta, IPath path) {
int kind= delta.getKind();
if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) {
while (!path.isEmpty() && !path.isRoot() && !fChangedElements.contains(path)) {
fChangedElements.add(path);
path= path.removeLastSegments(1);
}
}
}
private boolean isErrorDelta(IResourceDelta delta) {
if ((delta.getFlags() & IResourceDelta.MARKERS) != 0) {
IMarkerDelta[] markerDeltas= delta.getMarkerDeltas();
for (int i= 0; i < markerDeltas.length; i++) {
if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM)) {
int kind= markerDeltas[i].getKind();
if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED)
return true;
int severity= markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
|
11,416 |
Bug 11416 Error markers not shown in parents when resource added
|
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
|
resolved fixed
|
c3d3e3a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-18T14:56:22Z | 2002-03-14T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
|
int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
if (newSeverity != severity)
return true;
}
}
}
return false;
}
}
private ListenerList fListeners;
public ProblemMarkerManager() {
fListeners= new ListenerList(5);
}
/*
* @see IResourceChangeListener#resourceChanged
*/
public void resourceChanged(IResourceChangeEvent event) {
HashSet changedElements= new HashSet();
try {
IResourceDelta delta= event.getDelta();
if (delta != null)
delta.accept(new ProjectErrorVisitor(changedElements));
} catch (CoreException e) {
JavaPlugin.log(e.getStatus());
}
if (changedElements.size() > 0) {
fireChanges(changedElements);
|
11,416 |
Bug 11416 Error markers not shown in parents when resource added
|
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
|
resolved fixed
|
c3d3e3a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-18T14:56:22Z | 2002-03-14T21:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
|
}
}
/**
* Adds a listener for problem marker changes.
*/
public void addListener(IProblemChangedListener listener) {
if (fListeners.isEmpty()) {
JavaPlugin.getWorkspace().addResourceChangeListener(this);
}
fListeners.add(listener);
}
/**
* Removes a <code>IProblemChangedListener</code>.
*/
public void removeListener(IProblemChangedListener listener) {
fListeners.remove(listener);
if (fListeners.isEmpty()) {
JavaPlugin.getWorkspace().removeResourceChangeListener(this);
}
}
private void fireChanges(Set changes) {
Object[] listeners= fListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
IProblemChangedListener curr= (IProblemChangedListener) listeners[i];
curr.problemsChanged(changes);
}
}
}
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalResultCollector.java
|
package org.eclipse.jdt.internal.ui.text.java;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jface.text.ITextViewer;
/**
* Bin to collect the proposal of the infrastructure on code assist in a java text.
*/
public class ExperimentalResultCollector extends ResultCollector {
private ITextViewer fViewer;
protected JavaCompletionProposal createMethodCallCompletion(char[] declaringTypeName, char[] name, char[][] parameterTypeNames, char[][] parameterNames, char[] returnTypeName, char[] completionName, int modifiers, int start, int end) {
JavaCompletionProposal original= super.createMethodCallCompletion(declaringTypeName, name, parameterTypeNames, parameterNames, returnTypeName, completionName, modifiers, start, end);
if ((completionName.length == 0) || ((completionName.length == 1) && completionName[0] == ')'))
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalResultCollector.java
|
return original;
int count= parameterNames.length;
int[] offsets= new int[count];
int[] lengths= new int[count];
StringBuffer buffer= new StringBuffer();
buffer.append(name);
buffer.append('(');
for (int i= 0; i != count; i++) {
if (i != 0)
buffer.append(", ");
offsets[i]= buffer.length();
buffer.append(parameterNames[i]);
lengths[i]= buffer.length() - offsets[i];
}
buffer.append(')');
return new ExperimentalProposal(buffer.toString(), start, end - start, original.getImage(),
original.getDisplayString(), offsets, lengths, fViewer);
}
/**
* Sets the viewer.
* @param viewer The viewer to set
*/
public void setViewer(ITextViewer viewer) {
fViewer= viewer;
}
}
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.link;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.MessageDialog;
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.util.Assert;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* A user interface for <code>LinkedPositionManager</code>, using <code>ITextViewer</code>.
*/
public class LinkedPositionUI implements LinkedPositionListener,
ITextInputListener, ModifyListener, VerifyListener, VerifyKeyListener, PaintListener {
/**
* A listener for notification when the user cancelled the edit operation.
*/
public interface ExitListener {
void exit(boolean accept);
}
private static final int UNINSTALL= 1;
private static final int COMMIT= 2;
private static final int DOCUMENT_CHANGED= 4;
private static final int UPDATE_CARET= 8;
private static final String CARET_POSITION= "LinkedPositionUI.caret.position";
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
private final ITextViewer fViewer;
private final LinkedPositionManager fManager;
private final Color fFrameColor;
private int fFinalCaretOffset= -1;
private Position fFramePosition;
private int fCaretOffset;
private ExitListener fExitListener;
/**
* Creates a user interface for <code>LinkedPositionManager</code>.
*
* @param viewer the text viewer.
* @param manager the <code>LinkedPositionManager</code> managing a <code>IDocument</code> of the <code>ITextViewer</code>.
*/
public LinkedPositionUI(ITextViewer viewer, LinkedPositionManager manager) {
Assert.isNotNull(viewer);
Assert.isNotNull(manager);
fViewer= viewer;
fManager= manager;
fManager.setLinkedPositionListener(this);
fFrameColor= viewer.getTextWidget().getDisplay().getSystemColor(SWT.COLOR_RED);
}
/**
* Sets the final position of the caret when the linked mode is exited
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
* successfully by leaving the last linked position using TAB.
*/
public void setFinalCaretOffset(int offset) {
fFinalCaretOffset= offset;
}
/**
* Sets a <code>CancelListener</code> which is notified if the linked mode
* is exited unsuccessfully by hitting ESC.
*/
public void setCancelListener(ExitListener listener) {
fExitListener= listener;
}
/*
* @see LinkedPositionManager.LinkedPositionListener#setCurrentPositions(Position, int)
*/
public void setCurrentPosition(Position position, int caretOffset) {
if (!fFramePosition.equals(position)) {
redrawRegion();
fFramePosition= position;
}
fCaretOffset= caretOffset;
}
/**
* Enters the linked mode. The linked mode can be left by calling
* <code>exit</code>.
*
* @see exit(boolean)
*/
public void enter() {
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
IDocument document= fViewer.getDocument();
document.addPositionCategory(CARET_POSITION);
document.addPositionUpdater(fgUpdater);
try {
if (fFinalCaretOffset != -1)
document.addPosition(CARET_POSITION, new Position(fFinalCaretOffset));
} catch (BadLocationException e) {
openErrorDialog(fViewer.getTextWidget().getShell(), e);
} catch (BadPositionCategoryException e) {
JavaPlugin.log(e);
Assert.isTrue(false);
}
fViewer.addTextInputListener(this);
StyledText text= fViewer.getTextWidget();
text.addVerifyListener(this);
text.addVerifyKeyListener(this);
text.addModifyListener(this);
text.addPaintListener(this);
text.showSelection();
fFramePosition= fManager.getFirstPosition();
if (fFramePosition == null)
leave(UNINSTALL | COMMIT | UPDATE_CARET);
}
/**
* @see LinkedPositionManager.LinkedPositionListener#exit(boolean)
*/
public void exit(boolean success) {
leave((success ? COMMIT : 0) | UPDATE_CARET);
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
}
/**
* Returns the cursor selection, after having entered the linked mode.
* <code>enter()</code> must be called prior to a call to this method.
*/
public IRegion getSelectedRegion() {
if (fFramePosition == null)
return new Region(fFinalCaretOffset, 0);
else
return new Region(fFramePosition.getOffset(), fFramePosition.getLength());
}
private void leave(int flags) {
if ((flags & UNINSTALL) != 0)
fManager.uninstall((flags & COMMIT) != 0);
StyledText text= fViewer.getTextWidget();
text.removePaintListener(this);
text.removeModifyListener(this);
text.removeVerifyKeyListener(this);
text.removeVerifyListener(this);
fViewer.removeTextInputListener(this);
try {
IRegion region= fViewer.getVisibleRegion();
IDocument document= fViewer.getDocument();
if (((flags & COMMIT) != 0) &&
((flags & DOCUMENT_CHANGED) == 0) &&
((flags & UPDATE_CARET) != 0))
{
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
Position[] positions= document.getPositions(CARET_POSITION);
if ((positions != null) && (positions.length != 0)) {
int offset= positions[0].getOffset() - region.getOffset();
if ((offset >= 0) && (offset <= region.getLength()))
text.setSelection(offset, offset);
}
}
document.removePositionUpdater(fgUpdater);
document.removePositionCategory(CARET_POSITION);
if (fExitListener != null)
fExitListener.exit(
((flags & COMMIT) != 0) ||
((flags & DOCUMENT_CHANGED) != 0));
} catch (BadPositionCategoryException e) {
JavaPlugin.log(e);
Assert.isTrue(false);
}
if ((flags & DOCUMENT_CHANGED) == 0)
text.redraw();
}
private void next() {
redrawRegion();
fFramePosition= fManager.getNextPosition(fFramePosition.getOffset());
if (fFramePosition == null) {
leave(UNINSTALL | COMMIT | UPDATE_CARET);
} else {
selectRegion();
redrawRegion();
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
}
}
private void previous() {
redrawRegion();
Position position= fManager.getPreviousPosition(fFramePosition.getOffset());
if (position == null) {
fViewer.getTextWidget().getDisplay().beep();
} else {
fFramePosition= position;
selectRegion();
redrawRegion();
}
}
/*
* @see VerifyKeyListener#verifyKey(VerifyEvent)
*/
public void verifyKey(VerifyEvent event) {
switch (event.character) {
case 0x09:
{
Point selection= fViewer.getTextWidget().getSelection();
IRegion region= fViewer.getVisibleRegion();
int offset= selection.x + region.getOffset();
int length= selection.y - selection.x;
if (!LinkedPositionManager.includes(fFramePosition, offset, length)) {
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
leave(UNINSTALL | COMMIT | UPDATE_CARET);
return;
}
}
if (event.stateMask == SWT.SHIFT)
previous();
else
next();
event.doit= false;
break;
case 0x1B:
leave(UNINSTALL);
event.doit= false;
break;
}
}
/*
* @see VerifyListener#verifyText(VerifyEvent)
*/
public void verifyText(VerifyEvent event) {
if (!event.doit)
return;
IRegion region= fViewer.getVisibleRegion();
int offset= event.start + region.getOffset();
int length= event.end - event.start;
if (!fManager.anyPositionIncludes(offset, length))
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
leave(UNINSTALL | COMMIT);
}
/*
* @see PaintListener#paintControl(PaintEvent)
*/
public void paintControl(PaintEvent event) {
if (fFramePosition == null)
return;
IRegion region= fViewer.getVisibleRegion();
if (!includes(region, fFramePosition)) {
leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
return;
}
int offset= fFramePosition.getOffset() - region.getOffset();
int length= fFramePosition.getLength();
StyledText text= fViewer.getTextWidget();
Point minLocation= getMinimumLocation(text, offset, length);
Point maxLocation= getMaximumLocation(text, offset, length);
int x1= minLocation.x;
int x2= minLocation.x + maxLocation.x - minLocation.x - 1;
int y= minLocation.y + text.getLineHeight() - 1;
GC gc= event.gc;
gc.setForeground(fFrameColor);
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
gc.drawLine(x1, y, x2, y);
}
private static Point getMinimumLocation(StyledText text, int offset, int length) {
Point minLocation= new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
for (int i= 0; i <= length; i++) {
Point location= text.getLocationAtOffset(offset + i);
if (location.x < minLocation.x)
minLocation.x= location.x;
if (location.y < minLocation.y)
minLocation.y= location.y;
}
return minLocation;
}
private static Point getMaximumLocation(StyledText text, int offset, int length) {
Point maxLocation= new Point(Integer.MIN_VALUE, Integer.MIN_VALUE);
for (int i= 0; i <= length; i++) {
Point location= text.getLocationAtOffset(offset + i);
if (location.x > maxLocation.x)
maxLocation.x= location.x;
if (location.y > maxLocation.y)
maxLocation.y= location.y;
}
return maxLocation;
}
private void redrawRegion() {
IRegion region= fViewer.getVisibleRegion();
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
if (!includes(region, fFramePosition)) {
leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
return;
}
int offset= fFramePosition.getOffset() - region.getOffset();
int length= fFramePosition.getLength();
fViewer.getTextWidget().redrawRange(offset, length, true);
}
private void selectRegion() {
IRegion region= fViewer.getVisibleRegion();
if (!includes(region, fFramePosition)) {
leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
return;
}
int start= fFramePosition.getOffset() - region.getOffset();
int end= fFramePosition.getLength() + start;
fViewer.getTextWidget().setSelection(start, end);
}
private void updateCaret() {
IRegion region= fViewer.getVisibleRegion();
if (!includes(region, fFramePosition)) {
leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
return;
}
int offset= fFramePosition.getOffset() + fCaretOffset - region.getOffset();
if ((offset >= 0) && (offset <= region.getLength()))
fViewer.getTextWidget().setCaretOffset(offset);
}
|
10,247 |
Bug 10247 Template - code assist ends template editing
|
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
|
verified fixed
|
c0eba38
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-19T12:09:42Z | 2002-02-26T13:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
/*
* @see ModifyListener#modifyText(ModifyEvent)
*/
public void modifyText(ModifyEvent e) {
redrawRegion();
updateCaret();
}
private static void openErrorDialog(Shell shell, Exception e) {
MessageDialog.openError(shell, LinkedPositionMessages.getString("LinkedPositionUI.error.title"), e.getMessage());
}
/*
* @see ITextInputListener#inputDocumentAboutToBeChanged(IDocument, IDocument)
*/
public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
int flags= UNINSTALL | COMMIT | (oldInput.equals(newInput) ? 0 : DOCUMENT_CHANGED);
leave(flags);
}
/*
* @see ITextInputListener#inputDocumentChanged(IDocument, IDocument)
*/
public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
}
private static boolean includes(IRegion region, Position position) {
return
position.getOffset() >= region.getOffset() &&
position.getOffset() + position.getLength() <= region.getOffset() + region.getLength();
}
}
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import java.util.Collection;
import java.util.Comparator;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.NewWizardMenu;
import org.eclipse.ui.actions.OpenPerspectiveMenu;
import org.eclipse.ui.actions.OpenWithMenu;
import org.eclipse.ui.actions.RefreshAction;
import org.eclipse.ui.dialogs.PropertyDialogAction;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.views.internal.framelist.BackAction;
import org.eclipse.ui.views.internal.framelist.ForwardAction;
import org.eclipse.ui.views.internal.framelist.GoIntoAction;
import org.eclipse.ui.views.internal.framelist.UpAction;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.IWorkingCopy;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.internal.core.JavaElement;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup;
import org.eclipse.jdt.internal.ui.actions.GenerateGroup;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
import org.eclipse.jdt.internal.ui.packageview.BuildGroup;
import org.eclipse.jdt.internal.ui.packageview.OpenResourceAction;
import org.eclipse.jdt.internal.ui.packageview.PackagesMessages;
import org.eclipse.jdt.internal.ui.packageview.ShowInNavigatorAction;
import org.eclipse.jdt.internal.ui.refactoring.actions.IRefactoringAction;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup;
import org.eclipse.jdt.internal.ui.reorg.ReorgGroup;
import org.eclipse.jdt.internal.ui.search.JavaSearchGroup;
import org.eclipse.jdt.internal.ui.util.JavaUIHelp;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider;
import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
private ILabelProvider fLabelProvider;
private ILabelProvider fTitleProvider;
private StructuredViewer fViewer;
private IMemento fMemento;
private JavaElementTypeComparator fTypeComparator;
private ContextMenuGroup[] fStandardGroups;
private Menu fContextMenu;
private OpenResourceAction fOpenCUAction;
private Action fOpenToAction;
private Action fShowNavigatorAction;
private PropertyDialogAction fPropertyDialogAction;
private IRefactoringAction fDeleteAction;
private RefreshAction fRefreshAction;
private BackAction fBackAction;
private ForwardAction fForwardAction;
private GoIntoAction fZoomInAction;
private UpAction fUpAction;
private IWorkbenchPart fPreviousSelectionProvider;
private Image fOriginalTitleImage;
/*
* Ensure selection changed events being processed only if
* initiated by user interaction with this part.
*/
private boolean fProcessSelectionEvents= true;
private IPartListener fPartListener= new IPartListener() {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
public void partActivated(IWorkbenchPart part) {
setSelectionFromEditor(part);
}
public void partBroughtToTop(IWorkbenchPart part) {
}
public void partClosed(IWorkbenchPart part) {
}
public void partDeactivated(IWorkbenchPart part) {
}
public void partOpened(IWorkbenchPart part) {
}
};
/*
* Implements method from IViewPart.
*/
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
}
/*
* Implements method from IViewPart.
*/
public void saveState(IMemento memento) {
if (fViewer == null) {
if (fMemento != null)
memento.putMemento(fMemento);
return;
}
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
}
/**
* Creates the search list inner viewer.
*/
public void createPartControl(Composite parent) {
Assert.isTrue(fViewer == null);
if (fMemento != null)
fMemento= null;
fTypeComparator= new JavaElementTypeComparator();
fViewer= createViewer(parent);
fLabelProvider= createLabelProvider();
ILabelDecorator decorationMgr= getViewSite().getDecoratorManager();
fViewer.setLabelProvider(new DecoratingLabelProvider(fLabelProvider, decorationMgr));
fViewer.setSorter(new JavaElementSorter());
fViewer.setUseHashlookup(true);
JavaPlugin.getDefault().getProblemMarkerManager().addListener((IProblemChangedListener)fViewer);
fTitleProvider= createTitleProvider();
MenuManager menuMgr= new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(this);
fContextMenu= menuMgr.createContextMenu(fViewer.getControl());
fViewer.getControl().setMenu(fContextMenu);
getSite().registerContextMenu(menuMgr, fViewer);
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
createActions();
addKeyListener();
getSite().setSelectionProvider(fViewer);
IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager();
fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager));
hookViewerListeners();
fViewer.setContentProvider(createContentProvider());
setInitialInput();
setInitialSelection();
addFilters();
fillToolBar(getViewSite().getActionBars().getToolBarManager());
getViewSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
getViewSite().getPage().addPartListener(fPartListener);
setHelp();
}
public void setFocus() {
fViewer.getControl().setFocus();
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
}
public void dispose() {
if (fViewer != null) {
JavaPlugin.getDefault().getProblemMarkerManager().removeListener((IProblemChangedListener)fViewer);
getViewSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this);
getViewSite().getPage().removePartListener(fPartListener);
fViewer= null;
}
super.dispose();
}
/**
* Adds the KeyListener
*/
protected void addKeyListener() {
fViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
handleKeyReleased(event);
}
});
}
protected void handleKeyReleased(KeyEvent event) {
if (event.stateMask != 0)
return;
int key= event.keyCode;
if (key == SWT.F5) {
fRefreshAction.selectionChanged(
(IStructuredSelection) fViewer.getSelection());
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
if (fRefreshAction.isEnabled())
fRefreshAction.run();
} else if (key == SWT.F4) {
OpenTypeHierarchyUtil.open(getSelectionProvider().getSelection(), getSite().getWorkbenchWindow());
} else if (key == SWT.F3) {
fOpenCUAction.update();
if (fOpenCUAction.isEnabled())
fOpenCUAction.run();
}
else if (event.character == SWT.DEL) {
fDeleteAction.update();
if (fDeleteAction.isEnabled())
fDeleteAction.run();
}
}
protected void fillToolBar(IToolBarManager tbm) {
}
/**
* Called when the context menu is about to open.
* Override to add your own context dependent menu contributions.
*/
public void menuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection();
fPropertyDialogAction.selectionChanged(selection);
MenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new"));
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu);
new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false);
fOpenCUAction.update();
if (fOpenCUAction.isEnabled())
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenCUAction);
addOpenWithMenu(menu, selection);
addOpenToMenu(menu, selection);
addRefactoring(menu);
ContextMenuGroup.add(menu, fStandardGroups, fViewer);
menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, fRefreshAction);
fRefreshAction.selectionChanged(selection);
menu.add(new Separator());
if (fPropertyDialogAction.isApplicableForSelection())
menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fPropertyDialogAction);
}
private void addRefactoring(IMenuManager menu){
MenuManager refactoring= new MenuManager(PackagesMessages.getString("PackageExplorer.refactoringTitle"));
ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, fViewer);
if (!refactoring.isEmpty())
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring);
}
private void createActions() {
ISelectionProvider provider= getSelectionProvider();
fOpenCUAction= new OpenResourceAction(provider);
fPropertyDialogAction= new PropertyDialogAction(getShell(), provider);
fShowNavigatorAction= new ShowInNavigatorAction(provider);
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
fStandardGroups= new ContextMenuGroup[] {
new BuildGroup(),
new ReorgGroup(),
new GenerateGroup(),
new JavaSearchGroup()
};
fDeleteAction= ReorgGroup.createDeleteAction(provider);
fRefreshAction= new RefreshAction(getShell());
IActionBars actionService= getViewSite().getActionBars();
actionService.setGlobalActionHandler(IWorkbenchActionConstants.DELETE, fDeleteAction);
ReorgGroup.addGlobalReorgActions(actionService, provider);
}
private void addOpenToMenu(IMenuManager menu, IStructuredSelection selection) {
if (selection.size() != 1)
return;
IAdaptable element= (IAdaptable) selection.getFirstElement();
IResource resource= (IResource)element.getAdapter(IResource.class);
if ((resource instanceof IContainer)) {
MenuManager submenu = new MenuManager(PackagesMessages.getString("PackageExplorer.openPerspective"));
submenu.add(new OpenPerspectiveMenu(getSite().getWorkbenchWindow(), resource));
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu);
}
OpenTypeHierarchyUtil.addToMenu(getSite().getWorkbenchWindow(), menu, element);
}
private void addOpenWithMenu(IMenuManager menu, IStructuredSelection selection) {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
if (selection.size() != 1)
return;
IAdaptable element= (IAdaptable)selection.getFirstElement();
Object resource= element.getAdapter(IResource.class);
if (!(resource instanceof IFile))
return;
MenuManager submenu= new MenuManager(PackagesMessages.getString("PackageExplorer.openWith"));
submenu.add(new OpenWithMenu(getSite().getPage(), (IFile) resource));
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu);
}
/**
* Returns the shell to use for opening dialogs.
* Used in this class, and in the actions.
*/
private Shell getShell() {
return fViewer.getControl().getShell();
}
protected final Display getDisplay() {
return fViewer.getControl().getDisplay();
}
/**
* Returns the selection provider.
*/
private ISelectionProvider getSelectionProvider() {
return fViewer;
}
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
/**
* Answers if the given <code>element</code> is a valid
* input for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid input
*/
abstract protected boolean isValidInput(Object element);
/**
* Answers if the given <code>element</code> is a valid
* element for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid element
*/
protected boolean isValidElement(Object element) {
if (element == null)
return false;
element= getSuitableJavaElement(element);
if (element == null)
return false;
Object input= getViewer().getInput();
if (input == null)
return false;
if (input instanceof Collection)
return ((Collection)input).contains(element);
else
return input.equals(element);
}
private boolean isInputResetBy(Object newInput, Object input, IWorkbenchPart part) {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
if (newInput == null)
return part == fPreviousSelectionProvider;
if (input instanceof IJavaElement && newInput instanceof IJavaElement)
return getTypeComparator().compare(newInput, input) > 0;
else
return false;
}
protected boolean isAncestorOf(Object ancestor, Object element) {
if (element instanceof IJavaElement && ancestor instanceof IJavaElement)
return !element.equals(ancestor) && internalIsAncestorOf((IJavaElement)ancestor, (IJavaElement)element);
return false;
}
private boolean internalIsAncestorOf(IJavaElement ancestor, IJavaElement element) {
if (element != null)
return element.equals(ancestor) || internalIsAncestorOf(ancestor, element.getParent());
else
return false;
}
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (!fProcessSelectionEvents || part == this || !(selection instanceof IStructuredSelection))
return;
if (selection.isEmpty() && part instanceof JavaBrowsingPart && !(part instanceof ProjectsView))
return;
Object newInput= getElementFromSingleSelection(selection);
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
Object currentInput= (IJavaElement)getViewer().getInput();
if (newInput != null && newInput.equals(currentInput)) {
IJavaElement elementToSelect= findElementToSelect(getElementFromSingleSelection(selection));
if (elementToSelect != null && getTypeComparator().compare(newInput, elementToSelect) < 0)
setSelection(new StructuredSelection(elementToSelect), true);
fPreviousSelectionProvider= part;
return;
}
if (part != fPreviousSelectionProvider && newInput != null && !newInput.equals(currentInput) && isInputResetBy(newInput, currentInput, part)) {
if (!isAncestorOf(newInput, currentInput))
setInput(null);
fPreviousSelectionProvider= part;
return;
} else if (newInput == null && part == fPreviousSelectionProvider) {
setInput(null);
fPreviousSelectionProvider= part;
return;
}
fPreviousSelectionProvider= part;
if (newInput instanceof IJavaElement)
adjustInputAndSetSelection((IJavaElement)newInput);
else
setSelection(StructuredSelection.EMPTY, true);
}
protected void setInput(Object input) {
if (input == null)
setTitleImage(fOriginalTitleImage);
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
else if (input instanceof Collection) {
if (((Collection)input).isEmpty())
setTitleImage(fOriginalTitleImage);
else {
Object firstElement= ((Collection)input).iterator().next();
setTitleImage(fTitleProvider.getImage(firstElement));
}
} else
setTitleImage(fTitleProvider.getImage(input));
setViewerInput(input);
}
private void setViewerInput(Object input) {
fProcessSelectionEvents= false;
fViewer.setInput(input);
fProcessSelectionEvents= true;
}
/**
* Sets or clears the title image of this part and
* store the orignal image on the first call.
*/
protected void setTitleImage(Image titleImage) {
if (fOriginalTitleImage == null)
fOriginalTitleImage= getTitleImage();
if (titleImage == null)
titleImage= fOriginalTitleImage;
super.setTitleImage(titleImage);
}
protected final StructuredViewer getViewer() {
return fViewer;
}
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
protected ILabelProvider createLabelProvider() {
return new StandardJavaUILabelProvider(
StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS,
StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS,
StandardJavaUILabelProvider.getAdornmentProviders(true, null)
);
}
protected ILabelProvider createTitleProvider() {
return new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_SMALL_ICONS);
}
protected final ILabelProvider getLabelProvider() {
return fLabelProvider;
}
protected final ILabelProvider getTitleProvider() {
return fTitleProvider;
}
/**
* Creates the the viewer of this part.
*
* @param parent the parent for the viewer
*/
protected StructuredViewer createViewer(Composite parent) {
return new ProblemTableViewer(parent, SWT.SINGLE);
}
protected int getLabelProviderFlags() {
return JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS |
JavaElementLabelProvider.SHOW_SMALL_ICONS | JavaElementLabelProvider.SHOW_VARIABLE | JavaElementLabelProvider.SHOW_PARAMETERS;
}
/**
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
* Adds filters the viewer of this part.
*/
protected void addFilters() {
}
/**
* Creates the the content provider of this part.
*/
protected BaseJavaElementContentProvider createContentProvider() {
return new JavaElementContentProvider(true, this);
}
protected void setInitialInput() {
ISelection selection= getSite().getPage().getSelection();
Object input= getElementFromSingleSelection(selection);
if (!(input instanceof IJavaElement)) {
input= getSite().getPage().getInput();
if (!(input instanceof IJavaElement) && input instanceof IAdaptable)
input= ((IAdaptable)input).getAdapter(IJavaElement.class);
}
setInput(findInputForJavaElement((JavaElement)input));
}
protected void setInitialSelection() {
Object input;
ISelection selection= getSite().getPage().getSelection();
if (selection != null && !selection.isEmpty())
input= getElementFromSingleSelection(selection);
else {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
input= getSite().getPage().getInput();
if (!(input instanceof IJavaElement) && input instanceof IAdaptable)
input= ((IAdaptable)input).getAdapter(IJavaElement.class);
else
return;
}
if (findElementToSelect((IJavaElement)input) != null)
adjustInputAndSetSelection((IJavaElement)input);
}
final protected void setHelp() {
JavaUIHelp.setHelp(fViewer, getHelpContextId());
}
/**
* Returns the context ID for the Help system
*
* @return the string used as ID for the Help context
*/
abstract protected String getHelpContextId();
/**
* Adds additional listeners to this view.
*/
protected void hookViewerListeners() {
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
if (!fProcessSelectionEvents)
return;
if (JavaBrowsingPreferencePage.openEditorOnSingleClick())
new ShowInEditorAction().run(event.getSelection(), getSite().getPage());
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
else
linkToEditor((IStructuredSelection)event.getSelection());
}
});
fViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
if (fProcessSelectionEvents && !JavaBrowsingPreferencePage.openEditorOnSingleClick())
new ShowInEditorAction().run(event.getSelection(), getSite().getPage());
}
});
}
void adjustInputAndSetSelection(IJavaElement je) {
je= getSuitableJavaElement(je);
IJavaElement elementToSelect= findElementToSelect(je);
IJavaElement newInput= findInputForJavaElement(je);
if (elementToSelect == null && !isValidInput(newInput))
setInput(null);
else if (elementToSelect == null || getViewer().testFindItem(elementToSelect) == null)
setInput(findInputForJavaElement(je));
if (elementToSelect != null)
setSelection(new StructuredSelection(elementToSelect), true);
else
setSelection(StructuredSelection.EMPTY, true);
}
/**
* Finds the closest Java element which can be used as input for
* this part and has the given Java element as child
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
*
* @param je the Java element for which to search the closest input
* @return the closest Java element used as input for this part
*/
protected IJavaElement findInputForJavaElement(IJavaElement je) {
if (je == null)
return null;
if (isValidInput(je))
return je;
return findInputForJavaElement(je.getParent());
}
final protected IJavaElement findElementToSelect(Object obj) {
if (obj instanceof IJavaElement)
return findElementToSelect((IJavaElement)obj);
return null;
}
/**
* Finds the element which has to be selected in this part.
*
* @param je the Java element which has the focus
*/
abstract protected IJavaElement findElementToSelect(IJavaElement je);
private Object getElementFromSingleSelection(ISelection selection) {
if (selection instanceof StructuredSelection
&& ((StructuredSelection)selection).size() == 1)
return ((StructuredSelection)selection).getFirstElement();
return null;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
}
/**
* Gets the typeComparator.
* @return Returns a JavaElementTypeComparator
*/
protected Comparator getTypeComparator() {
return fTypeComparator;
}
/**
* Links to editor (if option enabled)
*/
private void linkToEditor(IStructuredSelection selection) {
if (selection == null || selection.isEmpty())
return;
Object obj= selection.getFirstElement();
Object element= null;
if (selection.size() == 1) {
if (obj instanceof IJavaElement) {
IJavaElement cu= JavaModelUtil.findElementOfKind((IJavaElement)obj, IJavaElement.COMPILATION_UNIT);
if (cu != null)
element= getResourceFor(cu);
if (element == null)
element= JavaModelUtil.findElementOfKind((IJavaElement)obj, IJavaElement.CLASS_FILE);
}
else if (obj instanceof IFile)
element= obj;
if (element == null)
return;
IWorkbenchPage page= getSite().getPage();
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
IEditorPart editorArray[]= page.getEditors();
for (int i= 0; i < editorArray.length; ++i) {
IEditorPart editor= editorArray[i];
Object input= getElementOfInput(editor.getEditorInput());
if (input != null && input.equals(element)) {
page.bringToTop(editor);
if (obj instanceof IJavaElement)
EditorUtility.revealInEditor(editor, (IJavaElement) obj);
return;
}
}
}
}
private void setSelectionFromEditor(IWorkbenchPart part) {
if (part == null)
return;
IWorkbenchPartSite site= part.getSite();
if (site == null)
return;
ISelectionProvider provider= site.getSelectionProvider();
if (provider != null)
setSelectionFromEditor(part, provider.getSelection());
}
private void setSelectionFromEditor(IWorkbenchPart part, ISelection selection) {
if (part instanceof IEditorPart && JavaBrowsingPreferencePage.linkViewSelectionToEditor()) {
IEditorInput ei= ((IEditorPart)part).getEditorInput();
if (selection instanceof ITextSelection) {
int offset= ((ITextSelection)selection).getOffset();
IJavaElement element= getElementForInputAt(ei, offset);
if (element != null) {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
adjustInputAndSetSelection(element);
return;
}
}
if (ei instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput)ei).getFile();
IJavaElement je= (IJavaElement)file.getAdapter(IJavaElement.class);
if (je == null) {
setSelection(null, false);
return;
}
adjustInputAndSetSelection(je);
} else if (ei instanceof IClassFileEditorInput) {
IClassFile cf= ((IClassFileEditorInput)ei).getClassFile();
adjustInputAndSetSelection(cf);
}
return;
}
}
/**
* Returns the element contained in the EditorInput
*/
Object getElementOfInput(IEditorInput input) {
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
else if (input instanceof IFileEditorInput)
return ((IFileEditorInput)input).getFile();
else if (input instanceof JarEntryEditorInput)
return ((JarEntryEditorInput)input).getStorage();
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
return null;
}
private IResource getResourceFor(Object element) {
if (element instanceof IJavaElement) {
if (element instanceof IWorkingCopy) {
IWorkingCopy wc= (IWorkingCopy)element;
IJavaElement original= wc.getOriginalElement();
if (original != null)
element= original;
}
try {
element= ((IJavaElement)element).getUnderlyingResource();
} catch (JavaModelException e) {
return null;
}
}
if (!(element instanceof IResource) || ((IResource)element).isPhantom()) {
return null;
}
return (IResource)element;
}
private void setSelection(ISelection selection, boolean reveal) {
if (selection != null && selection.equals(fViewer.getSelection()))
return;
fProcessSelectionEvents= false;
fViewer.setSelection(selection, reveal);
fProcessSelectionEvents= true;
}
/**
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
* Tries to find the given element in a workingcopy.
*/
protected static IJavaElement getWorkingCopy(IJavaElement input) {
try {
if (input instanceof ICompilationUnit)
return EditorUtility.getWorkingCopy((ICompilationUnit)input);
else
return EditorUtility.getWorkingCopy(input, true);
} catch (JavaModelException ex) {
}
return null;
}
/**
* Returns the original element from which the specified working copy
* element was created from. This is a handle only method, the
* returned element may or may not exist.
*
* @param workingCopy the element for which to get the original
* @return the original Java element or <code>null</code> if this is not a working copy element
*/
protected static IJavaElement getOriginal(IJavaElement workingCopy) {
ICompilationUnit cu= getCompilationUnit(workingCopy);
if (cu != null)
return ((IWorkingCopy)cu).getOriginal(workingCopy);
return null;
}
/**
* Returns the compilation unit for the given java element.
*
* @param element the java element whose compilation unit is searched for
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
* @return the compilation unit of the given java element
*/
protected static ICompilationUnit getCompilationUnit(IJavaElement element) {
if (element == null)
return null;
if (element instanceof IMember)
return ((IMember) element).getCompilationUnit();
int type= element.getElementType();
if (IJavaElement.COMPILATION_UNIT == type)
return (ICompilationUnit) element;
if (IJavaElement.CLASS_FILE == type)
return null;
return getCompilationUnit(element.getParent());
}
/**
* Converts the given Java element to one which is suitable for this
* view. It takes into account wether the view shows working copies or not.
*
* @param element the Java element to be converted
* @return an element suitable for this view
*/
protected IJavaElement getSuitableJavaElement(Object obj) {
if (!(obj instanceof IJavaElement))
return null;
IJavaElement element= (IJavaElement)obj;
if (fTypeComparator.compare(element, IJavaElement.COMPILATION_UNIT) > 0)
return element;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
if (element.getElementType() == IJavaElement.CLASS_FILE)
return element;
if (((BaseJavaElementContentProvider)getViewer().getContentProvider()).getProvideWorkingCopy()) {
IJavaElement wc= getWorkingCopy(element);
if (wc != null)
element= wc;
return element;
}
else {
ICompilationUnit cu= getCompilationUnit(element);
if (cu != null && ((IWorkingCopy)cu).isWorkingCopy())
return ((IWorkingCopy)cu).getOriginal(element);
else
return element;
}
}
/**
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementForInputAt(IEditorInput input, int offset) {
if (input instanceof IClassFileEditorInput) {
try {
return ((IClassFileEditorInput)input).getClassFile().getElementAt(offset);
} catch (JavaModelException ex) {
return null;
}
}
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(input);
if (unit != null)
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
synchronized (unit) {
try {
unit.reconcile(null);
return unit.getElementAt(offset);
} catch (JavaModelException x) {
}
}
return null;
}
protected IType getTypeForCU(ICompilationUnit cu) {
cu= (ICompilationUnit)getSuitableJavaElement(cu);
IType primaryType= JavaModelUtil.findPrimaryType(cu);
if (primaryType != null)
return primaryType;
try {
IType[] types= cu.getTypes();
if (types.length > 0)
return types[0];
else
return null;
} catch (JavaModelException ex) {
return null;
}
}
}
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.Widget;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IParent;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup;
import org.eclipse.jdt.internal.ui.actions.GenerateGroup;
import org.eclipse.jdt.internal.ui.actions.OpenHierarchyAction;
import org.eclipse.jdt.internal.ui.refactoring.actions.IRefactoringAction;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup;
import org.eclipse.jdt.internal.ui.reorg.ReorgGroup;
import org.eclipse.jdt.internal.ui.search.JavaSearchGroup;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.MemberFilterActionGroup;
import org.eclipse.jdt.internal.ui.viewsupport.OverrideAdornmentProvider;
import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
/**
* The content outline page of the Java editor. The viewer implements a proprietary
* update mechanism based on Java model deltas. It does not react on domain changes.
* It is specified to show the content of ICompilationUnits and IClassFiles.
* Pulishes its context menu under <code>JavaPlugin.getDefault().getPluginId() + ".outliner"</code>.
*/
class JavaOutlinePage extends Page implements IContentOutlinePage {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
/**
* The element change listener of the java outline viewer.
* @see IElementChangedListener
*/
class ElementChangedListener implements IElementChangedListener {
public void elementChanged(final ElementChangedEvent e) {
Display d= getControl().getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
IJavaElementDelta delta= findElement( (ICompilationUnit) fInput, e.getDelta());
if (delta != null && fOutlineViewer != null) {
fOutlineViewer.reconcile(delta);
}
}
});
}
}
protected IJavaElementDelta findElement(ICompilationUnit unit, IJavaElementDelta delta) {
if (delta == null || unit == null)
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
return null;
IJavaElement element= delta.getElement();
if (unit.equals(element))
return delta;
if (element.getElementType() > IJavaElement.CLASS_FILE)
return null;
IJavaElementDelta[] children= delta.getAffectedChildren();
if (children == null || children.length == 0)
return null;
for (int i= 0; i < children.length; i++) {
IJavaElementDelta d= findElement(unit, children[i]);
if (d != null)
return d;
}
return null;
}
};
/**
* Content provider for the children of an ICompilationUnit or
* an IClassFile
* @see ITreeContentProvider
*/
class ChildrenProvider implements ITreeContentProvider {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
private ElementChangedListener fListener;
private JavaOutlineErrorTickUpdater fErrorTickUpdater;
protected boolean matches(IJavaElement element) {
if (element.getElementType() == IJavaElement.METHOD) {
String name= element.getElementName();
return (name != null && name.indexOf('<') >= 0);
}
return false;
}
protected IJavaElement[] filter(IJavaElement[] children) {
boolean initializers= false;
for (int i= 0; i < children.length; i++) {
if (matches(children[i])) {
initializers= true;
break;
}
}
if (!initializers)
return children;
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
Vector v= new Vector();
for (int i= 0; i < children.length; i++) {
if (matches(children[i]))
continue;
v.addElement(children[i]);
}
IJavaElement[] result= new IJavaElement[v.size()];
v.copyInto(result);
return result;
}
public Object[] getChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
return filter(c.getChildren());
} catch (JavaModelException x) {
JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.getChildren.message1"), x.getStatus());
}
}
return new Object[0];
}
public Object[] getElements(Object parent) {
return getChildren(parent);
}
public Object getParent(Object child) {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
if (child instanceof IJavaElement) {
IJavaElement e= (IJavaElement) child;
return e.getParent();
}
return null;
}
public boolean hasChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
IJavaElement[] children= filter(c.getChildren());
return (children != null && children.length > 0);
} catch (JavaModelException x) {
JavaPlugin.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.hasChildren.message1"), x.getStatus());
}
}
return false;
}
public boolean isDeleted(Object o) {
return false;
}
public void dispose() {
if (fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
if (fErrorTickUpdater != null) {
|
11,748 |
Bug 11748 switch to new DecoratorManager API
|
From the workbench change notes: API changes IWorkbenchPartSite.getDecoratorManager() - As the DecoratorManager has proven to be required for more than just IWorkbenchPartSites we have moved getDecoratorManager() to IWorkbench and deprecated the getDecoratorManager() in IWorkbenchPartSite. The one in IWorkbenchPartSite will be removed after the other Eclipse components have had a chance to switch to the new API.
|
resolved fixed
|
1035d37
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-20T16:58:55Z | 2002-03-19T23:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
fErrorTickUpdater.setAnnotationModel(null);
fErrorTickUpdater= null;
}
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
boolean isCU= (newInput instanceof ICompilationUnit);
if (isCU && fListener == null) {
fListener= new ElementChangedListener();
JavaCore.addElementChangedListener(fListener);
fErrorTickUpdater= new JavaOutlineErrorTickUpdater(fOutlineViewer);
fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput()));
} else if (isCU && fErrorTickUpdater != null) {
fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput()));
} else if (!isCU && fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
fErrorTickUpdater.setAnnotationModel(null);
fErrorTickUpdater= null;
}
}
};
class JavaOutlineViewer extends TreeViewer {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.