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
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
while (iter.hasNext()) { Object element= iter.next(); IResource resource= null; if (element instanceof IJavaElement) { IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return count; } } else resource= (IResource)element; if (resource.getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)resource); } return count; } private int getTotalChildCount(IContainer container) { IResource[] members; try { members= container.members(); } catch (CoreException ex) { return 0; } int count= 0;
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
for (int i= 0; i < members.length; i++) { if (members[i].getType() == IResource.FILE) count++; else count += getTotalChildCount((IContainer)members[i]); } return count; } /** * Exports the passed resource to the JAR file * * @param element the resource or JavaElement to export */ protected void exportElement(Object element, IProgressMonitor progressMonitor) throws InterruptedException { int leadSegmentsToRemove= 1; IPackageFragmentRoot pkgRoot= null; boolean isInJavaProject= false; IResource resource= null; IJavaProject jProject= null; if (element instanceof IJavaElement) { isInJavaProject= true; IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); return; } jProject= je.getJavaProject(); pkgRoot= JavaModelUtil.getPackageFragmentRoot(je);
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} else resource= (IResource)element; if (!resource.isAccessible()) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotFound", resource.getFullPath()), null); return; } if (resource.getType() == IResource.FILE) { if (!resource.isLocal(IResource.DEPTH_ZERO)) try { resource.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceNotLocal", resource.getFullPath()), ex); return; } if (!isInJavaProject) { try { isInJavaProject= resource.getProject().hasNature(JavaCore.NATURE_ID); } catch (CoreException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.projectNatureNotDeterminable", resource.getFullPath()), ex); return; } if (isInJavaProject) { jProject= JavaCore.create(resource.getProject()); try { IPackageFragment pkgFragment= jProject.findPackageFragment(resource.getFullPath().removeLastSegments(1)); if (pkgFragment != null) pkgRoot= JavaModelUtil.getPackageFragmentRoot(pkgFragment); else
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
pkgRoot= jProject.findPackageFragmentRoot(resource.getFullPath().uptoSegment(2)); } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.javaPackageNotDeterminable", resource.getFullPath()), ex); return; } } } if (pkgRoot != null) { leadSegmentsToRemove= pkgRoot.getPath().segmentCount(); if (fJarPackage.useSourceFolderHierarchy()&& !pkgRoot.getElementName().equals(pkgRoot.DEFAULT_PACKAGEROOT_PATH)) leadSegmentsToRemove--; } IPath destinationPath= resource.getFullPath().removeFirstSegments(leadSegmentsToRemove); boolean isInOutputFolder= false; if (isInJavaProject) { try { isInOutputFolder= jProject.getOutputLocation().isPrefixOf(resource.getFullPath()); } catch (JavaModelException ex) { isInOutputFolder= false; } } exportClassFiles(progressMonitor, pkgRoot, resource, jProject, destinationPath); exportResourceFiles(progressMonitor, pkgRoot, isInJavaProject, resource, destinationPath, isInOutputFolder); progressMonitor.worked(1); ModalContext.checkCanceled(progressMonitor); } else
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
exportContainer(progressMonitor, resource); } private void exportContainer(IProgressMonitor progressMonitor, IResource resource) throws java.lang.InterruptedException { IResource[] children= null; try { children= ((IContainer) resource).members(); } catch (CoreException e) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringExport", resource.getFullPath()), e); } for (int i= 0; i < children.length; i++) exportElement(children[i], progressMonitor); } private void exportResourceFiles(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, boolean isInJavaProject, IResource resource, IPath destinationPath, boolean isInOutputFolder) { boolean isNonJavaResource= !isInJavaProject || (pkgRoot == null && !isInOutputFolder); boolean isInClassFolder= false; try { isInClassFolder= pkgRoot != null && !pkgRoot.isArchive() && pkgRoot.getKind() == pkgRoot.K_BINARY; } catch (JavaModelException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.cantGetRootKind", resource.getFullPath()), ex); } if ((fJarPackage.areClassFilesExported() && ((isNonJavaResource || (pkgRoot != null && !isJavaFile(resource) && !isClassFile(resource))) || isInClassFolder && isClassFile(resource))) || (fJarPackage.areJavaFilesExported() && (isNonJavaResource || (pkgRoot != null && !isClassFile(resource))))) { try { progressMonitor.subTask(destinationPath.toString()); fJarWriter.write((IFile) resource, destinationPath); } catch (IOException ex) { String message= ex.getMessage();
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringExport", resource.getFullPath()); addWarning(message , ex); } catch (CoreException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.coreErrorDuringExport", resource.getFullPath()); addWarning(message, ex); } } } private void exportClassFiles(IProgressMonitor progressMonitor, IPackageFragmentRoot pkgRoot, IResource resource, IJavaProject jProject, IPath destinationPath) { if (fJarPackage.areClassFilesExported() && isJavaFile(resource) && pkgRoot != null) { try { Iterator iter= filesOnClasspath((IFile)resource, destinationPath, jProject, progressMonitor); IPath baseDestinationPath= destinationPath.removeLastSegments(1); while (iter.hasNext()) { IFile file= (IFile)iter.next(); if (!resource.isLocal(IResource.DEPTH_ZERO)) file.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); IPath classFilePath= baseDestinationPath.append(file.getName()); progressMonitor.subTask(classFilePath.toString()); fJarWriter.write(file, classFilePath); } } catch (IOException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringExport", resource.getFullPath()); addWarning(message , ex);
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} catch (CoreException ex) { String message= ex.getMessage(); if (message == null) message= JarPackagerMessages.getFormattedString("JarFileExportOperation.coreErrorDuringExport", resource.getFullPath()); addWarning(message, ex); } } } /** * Exports the resources as specified by the JAR package. */ protected void exportSelectedElements(IProgressMonitor progressMonitor) throws InterruptedException { Iterator iter= fJarPackage.getSelectedElements().iterator(); while (iter.hasNext()) exportElement(iter.next(), progressMonitor); } /** * Returns an iterator on a list with files that correspond to the * passed file and that are on the classpath of its project. * * @param file the file for which to find the corresponding classpath resources * @param pathInJar the path that the file has in the JAR (i.e. project and source folder segments removed) * @param javaProject the javaProject that contains the file * @return the iterator over the corresponding classpath files for the given file */ protected Iterator filesOnClasspath(IFile file, IPath pathInJar, IJavaProject javaProject, IProgressMonitor progressMonitor) throws CoreException { IPath outputPath= javaProject.getOutputLocation(); IContainer outputContainer; if (javaProject.getProject().getFullPath().equals(outputPath)) outputContainer= javaProject.getProject();
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
else { outputContainer= createFolderHandle(outputPath); if (outputContainer == null || !outputContainer.isAccessible()) { String msg= JarPackagerMessages.getString("JarFileExportOperation.outputContainerNotAccessible"); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } } if (isJavaFile(file)) { boolean hasErrors= fJarPackage.hasCompileErrors(file); boolean hasWarnings= fJarPackage.hasCompileWarnings(file); boolean canBeExported= canBeExported(hasErrors, hasWarnings); reportPossibleCompileProblems(file, hasErrors, hasWarnings, canBeExported); if (!canBeExported) return Collections.EMPTY_LIST.iterator(); IContainer classContainer= outputContainer; if (pathInJar.segmentCount() > 1) classContainer= outputContainer.getFolder(pathInJar.removeLastSegments(1)); if (fClassFilesMapContainer == null || !fClassFilesMapContainer.equals(classContainer)) { fJavaNameToClassFilesMap= buildJavaToClassMap(classContainer); fClassFilesMapContainer= classContainer; } ArrayList classFiles= (ArrayList)fJavaNameToClassFilesMap.get(file.getName()); if (classFiles == null || classFiles.isEmpty()) { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileOnClasspathNotAccessible", file.getFullPath()); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } return classFiles.iterator(); } else {
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
List binaryFiles= new ArrayList(1); IFile cpFile= outputContainer.getFile(pathInJar); if (cpFile.isAccessible()) { if (!cpFile.isLocal(IResource.DEPTH_ZERO)) cpFile.setLocal(true , IResource.DEPTH_ZERO, progressMonitor); binaryFiles.add(cpFile); } else { String msg= JarPackagerMessages.getFormattedString("JarFileExportOperation.resourceOnCasspathNotAccessible", cpFile.getFullPath()); throw new CoreException(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), JavaStatusConstants.INTERNAL_ERROR, msg, null)); } return binaryFiles.iterator(); } } /** * Answers whether the given resource is a Java file. * The resource must be a file whose file name ends with ".java". * * @return a <code>true<code> if the given resource is a Java file */ boolean isJavaFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("java"); } /** * Answers whether the given resource is a class file. * The resource must be a file whose file name ends with ".class".
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
* * @return a <code>true<code> if the given resource is a class file */ boolean isClassFile(IResource file) { return file != null && file.getType() == IFile.FILE && file.getFileExtension() != null && file.getFileExtension().equalsIgnoreCase("class"); } /* * Builds and returns a map that has the class files * for each java file in a given directory */ private Map buildJavaToClassMap(IContainer container) throws CoreException { if (container == null || !container.isAccessible()) return new HashMap(0); /* * XXX: Bug 6584: Need a way to get class files for a java file (or CU) */ org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfReader; IResource[] members= container.members(); Map map= new HashMap(members.length); for (int i= 0; i < members.length; i++) { if (isClassFile(members[i])) { IFile classFile= (IFile)members[i]; try { cfReader= org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(classFile.getLocation().toFile()); } catch (org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.invalidClassFileFormat", classFile.getLocation().toFile()), ex); continue;
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} catch (IOException ex) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.ioErrorDuringClassFileLookup", classFile.getLocation().toFile()), ex); continue; } if (cfReader != null) { if (cfReader.sourceFileName() == null) { addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.classFileWithoutSourceFileAttribute", classFile.getLocation().toFile()), null); continue; } String javaName= new String(cfReader.sourceFileName()); Object classFiles= map.get(javaName); if (classFiles == null) { classFiles= new ArrayList(3); map.put(javaName, classFiles); } ((ArrayList)classFiles).add(classFile); } } } return map; } /** * 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 */
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
protected IFile createFileHandle(IPath filePath) { if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(filePath); else return null; } /** * Creates a folder resource handle for the folder with the given workspace path. * * @param folderPath the path of the folder to create a handle for * @return the new folder resource handle */ protected IFolder createFolderHandle(IPath folderPath) { if (folderPath.isValidPath(folderPath.toString()) && folderPath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFolder(folderPath); else return null; } /** * Returns the status of this operation. * If there were any errors, the result is a status object containing * individual status objects for each error. * If there were no errors, the result is a status object with error code <code>OK</code>. * * @return the status of this operation */ public IStatus getStatus() { if (fProblems.getSeverity() == IStatus.ERROR) { String message= null; if (fDescriptionFiles != null && fDescriptionFiles.length > 1)
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
message= JarPackagerMessages.getString("JarFileExportOperation.creationOfSomeJARsFailed"); else message= JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailed"); return new MultiStatus(JavaPlugin.getPluginId(), 0, fProblems.getChildren(), message, null); } return fProblems; } /** * Answer a boolean indicating whether the passed child is a descendant * of one or more members of the passed resources collection * * @param resources a List contain potential parents * @param child the resource to test * @return a <code>boolean</code> indicating if the child is a descendant */ protected boolean isDescendant(List resources, IResource child) { if (child.getType() == IResource.PROJECT) return false; IResource parent= child.getParent(); if (resources.contains(parent)) return true; return isDescendant(resources, parent); } protected boolean canBeExported(boolean hasErrors, boolean hasWarnings) throws CoreException { return (!hasErrors && !hasWarnings) || (hasErrors && fJarPackage.exportErrors()) || (hasWarnings && fJarPackage.exportWarnings()); } protected void reportPossibleCompileProblems(IFile file, boolean hasErrors, boolean hasWarnings, boolean canBeExported) {
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
if (hasErrors) { if (canBeExported) addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileErrors", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileErrors", file.getFullPath()), null); } if (hasWarnings) { if (canBeExported) addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.exportedWithCompileWarnings", file.getFullPath()), null); else addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.notExportedDueToCompileWarnings", file.getFullPath()), null); } } /** * Exports the resources as specified by the JAR package. * * @param progressMonitor the progress monitor that displays the progress * @see #getStatus() */ public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { if (fJarPackage != null) singleRun(progressMonitor); else { int jarCount= fDescriptionFiles.length; for (int i= 0; i < jarCount; i++) { fJarPackage= readJarPackage(fDescriptionFiles[i]); if (fJarPackage != null) singleRun(progressMonitor); } }
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
} public void singleRun(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { int totalWork= countSelectedElements(); progressMonitor.beginTask(JarPackagerMessages.getString("JarFileExportOperation.exporting"), totalWork); try { if (!preconditionsOK()) throw new InvocationTargetException(null, JarPackagerMessages.getString("JarFileExportOperation.jarCreationFailedSeeDetails")); fJarWriter= new JarWriter(fJarPackage, fParentShell); exportSelectedElements(progressMonitor); if (getStatus().getSeverity() != IStatus.ERROR) { progressMonitor.subTask(JarPackagerMessages.getString("JarFileExportOperation.savingFiles")); saveFiles(); } } catch (IOException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFle", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message); } catch (CoreException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCreateJarFileDueToInvalidManifest", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message); } finally { try { if (fJarWriter != null) fJarWriter.close(); } catch (IOException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCloseJarFile", ex.getMessage()); addError(message, ex); throw new InvocationTargetException(ex, message); }
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
progressMonitor.done(); } } protected boolean preconditionsOK() { if (!fJarPackage.areClassFilesExported() && !fJarPackage.areJavaFilesExported()) { addError(JarPackagerMessages.getString("JarFileExportOperation.noExportTypeChosen"), null); return false; } if (fJarPackage.getSelectedElements() == null || fJarPackage.getSelectedElements().size() == 0) { addError(JarPackagerMessages.getString("JarFileExportOperation.noResourcesSelected"), null); return false; } if (fJarPackage.getJarLocation() == null) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidJarLocation"), null); return false; } if (!fJarPackage.doesManifestExist()) { addError(JarPackagerMessages.getString("JarFileExportOperation.manifestDoesNotExist"), null); return false; } if (!fJarPackage.isMainClassValid(new BusyIndicatorRunnableContext())) { addError(JarPackagerMessages.getString("JarFileExportOperation.invalidMainClass"), null); return false; } IEditorPart[] dirtyEditors= JavaPlugin.getDirtyEditors(); if (dirtyEditors.length > 0) { List unsavedFiles= new ArrayList(dirtyEditors.length); List selection= fJarPackage.getSelectedResources(); for (int i= 0; i < dirtyEditors.length; i++) {
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile= ((IFileEditorInput)dirtyEditors[i].getEditorInput()).getFile(); if (selection.contains(dirtyFile)) { unsavedFiles.add(dirtyFile); addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.fileUnsaved", dirtyFile.getFullPath()), null); } } } if (!unsavedFiles.isEmpty()) return false; } return true; } protected void saveFiles() { if (fJarPackage.isManifestSaved()) { try { saveManifest(); } catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex); } } if (fJarPackage.isDescriptionSaved()) { try { saveDescription(); } catch (CoreException ex) {
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } catch (IOException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex); } } } protected void saveDescription() throws CoreException, IOException { if (fJarPackage.isManifestReused()) fJarPackage.setGenerateManifest(false); ByteArrayOutputStream objectStreamOutput= new ByteArrayOutputStream(); JarPackageWriter objectStream= new JarPackageWriter(objectStreamOutput); ByteArrayInputStream fileInput= null; try { objectStream.writeXML(fJarPackage); fileInput= new ByteArrayInputStream(objectStreamOutput.toByteArray()); if (fJarPackage.getDescriptionFile().isAccessible()) { if (fJarPackage.canOverwriteDescription(fParentShell)) fJarPackage.getDescriptionFile().setContents(fileInput, true, true, null); } else { fJarPackage.getDescriptionFile().create(fileInput, true, null); } } finally { if (fileInput != null) fileInput.close(); if (objectStream != null) objectStream.close(); } }
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
protected void saveManifest() throws CoreException, IOException { ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream(); ByteArrayInputStream fileInput= null; try { Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage); manifest.write(manifestOutput); fileInput= new ByteArrayInputStream(manifestOutput.toByteArray()); if (fJarPackage.getManifestFile().isAccessible()) { if (fJarPackage.canOverwriteManifest(fParentShell)) fJarPackage.getManifestFile().setContents(fileInput, true, true, null); } else { fJarPackage.getManifestFile().create(fileInput, true, null); } } finally { if (manifestOutput != null) manifestOutput.close(); if (fileInput != null) fileInput.close(); } } /** * Reads the JAR package spec from file. */ protected JarPackage readJarPackage(IFile description) { Assert.isLegal(description.isAccessible()); Assert.isNotNull(description.getFileExtension()); Assert.isLegal(description.getFileExtension().equals(JarPackage.DESCRIPTION_EXTENSION)); JarPackage jarPackage= null; JarPackageReader reader= null;
9,127
Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
resolved fixed
4dcd13b
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-05T19:30:36Z
2002-02-05T17:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
try { reader= new JarPackageReader(description.getContents()); jarPackage= reader.readXML(); jarPackage.setSaveManifest(false); jarPackage.setSaveDescription(false); } catch (CoreException ex) { addError(JarPackagerMessages.getString("JarFileExportOperation.errorReadingJarPackageFromDescription"), ex); } catch (IOException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.errorReadingFile", description.getFullPath(), ex.getMessage()); addError(message, null); } catch (SAXException ex) { String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.badXmlFormat", description.getFullPath(), ex.getMessage()); addError(message, null); } finally { if ((jarPackage == null || jarPackage.logWarnings()) && reader != null) fProblems.addAll(reader.getWarnings()); try { if (reader != null) reader.close(); } catch (IOException ex) { addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.errorClosingJarPackageDescriptionReader", description.getFullPath()), ex); } } return jarPackage; } }
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.preferences; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.swt.widgets.TabItem; import org.eclipse.swt.widgets.Text; import org.eclipse.jface.dialogs.ControlEnableState;
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.DialogPageContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.AbstractTextEditor; import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor; import org.eclipse.jdt.ui.text.IJavaColorConstants; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; import org.eclipse.jdt.internal.ui.text.ContentAssistPreference; import org.eclipse.jdt.internal.ui.util.TabFolderLayout; /* * The page for setting the editor options. */ public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] { new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_KEYWORD),
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_KEYWORD + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_STRING), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_STRING + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_DEFAULT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_KEYWORD), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_KEYWORD + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_TAG), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_TAG + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_LINK), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_LINK + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_DEFAULT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_DEFAULT + "_bold"), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.MATCHING_BRACKETS_COLOR), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.MATCHING_BRACKETS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOACTIVATION), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND),
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY), new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_IMPORT) }; private final String[][] fListModel= new String[][] { { "Multi-line comment", IJavaColorConstants.JAVA_MULTI_LINE_COMMENT }, { "Single-line comment", IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT }, { "Keywords", IJavaColorConstants.JAVA_KEYWORD }, { "Strings", IJavaColorConstants.JAVA_STRING }, { "Others", IJavaColorConstants.JAVA_DEFAULT }, { "JavaDoc keywords", IJavaColorConstants.JAVADOC_KEYWORD }, { "JavaDoc HTML tags", IJavaColorConstants.JAVADOC_TAG }, { "JavaDoc links", IJavaColorConstants.JAVADOC_LINK }, {"JavaDoc others", IJavaColorConstants.JAVADOC_DEFAULT } }; private OverlayPreferenceStore fOverlayStore; private JavaTextTools fJavaTextTools; private Map fColorButtons= new HashMap(); private SelectionListener fColorButtonListener= new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { ColorEditor editor= (ColorEditor) e.widget.getData();
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setValue(fOverlayStore, (String) fColorButtons.get(editor), editor.getColorValue()); } }; private Map fCheckBoxes= new HashMap(); private SelectionListener fCheckBoxListener= new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { Button button= (Button) e.widget; fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection()); } }; private Map fTextFields= new HashMap(); private ModifyListener fTextFieldListener= new ModifyListener() { public void modifyText(ModifyEvent e) { Text text= (Text) e.widget; fOverlayStore.setValue((String) fTextFields.get(text), text.getText()); } }; private WorkbenchChainedTextFontFieldEditor fFontEditor; private List fList; private ColorEditor fColorEditor; private Button fBoldCheckBox; private SourceViewer fPreviewViewer; public JavaEditorPreferencePage() { setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description"));
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore()); fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys); } public static void initDefaults(IPreferenceStore store) { Color color; Display display= Display.getDefault(); store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true); color= display.getSystemColor(SWT.COLOR_GRAY); PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, color.getRGB()); WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT); color= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, color.getRGB()); color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB()); store.setDefault(JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_KEYWORD, new RGB(127, 0, 85)); store.setDefault(IJavaColorConstants.JAVA_KEYWORD + "_bold", true);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_STRING, new RGB(42, 0, 255)); store.setDefault(IJavaColorConstants.JAVA_STRING + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_DEFAULT, new RGB(0, 0, 0)); store.setDefault(IJavaColorConstants.JAVA_DEFAULT + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_KEYWORD, new RGB(127, 159, 191)); store.setDefault(IJavaColorConstants.JAVADOC_KEYWORD + "_bold", true); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_TAG, new RGB(127, 127, 159)); store.setDefault(IJavaColorConstants.JAVADOC_TAG + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_LINK, new RGB(63, 63, 191)); store.setDefault(IJavaColorConstants.JAVADOC_LINK + "_bold", false); PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_DEFAULT, new RGB(63, 95, 191)); store.setDefault(IJavaColorConstants.JAVADOC_DEFAULT + "_bold", false); store.setDefault(ContentAssistPreference.AUTOACTIVATION, true); store.setDefault(ContentAssistPreference.AUTOACTIVATION_DELAY, 500); store.setDefault(ContentAssistPreference.AUTOINSERT, false); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233)); PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0)); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, ".,"); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, "@"); store.setDefault(ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, true);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false); store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false); store.setDefault(ContentAssistPreference.ADD_IMPORT, true); } /* * @see IWorkbenchPreferencePage#init() */ public void init(IWorkbench workbench) { } /* * @see PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { super.createControl(parent); WorkbenchHelp.setHelp(getControl(), new DialogPageContextComputer(this, IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE)); } private void handleListSelection() { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); fColorEditor.setColorValue(rgb); fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold")); } private Control createColorPage(Composite parent) { Composite colorComposite= new Composite(parent, SWT.NULL); colorComposite.setLayout(new GridLayout()); Label label= new Label(colorComposite, SWT.LEFT); label.setText("C&olors:");
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite editorComposite= new Composite(colorComposite, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; layout.marginHeight= 0; layout.marginWidth= 0; editorComposite.setLayout(layout); GridData gd= new GridData(GridData.FILL_BOTH); editorComposite.setLayoutData(gd); fList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL); gd= new GridData(GridData.FILL_BOTH); gd.heightHint= convertHeightInCharsToPixels(5); fList.setLayoutData(gd); Composite stylesComposite= new Composite(editorComposite, SWT.NULL); layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; stylesComposite.setLayout(layout); stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); label= new Label(stylesComposite, SWT.LEFT); label.setText("Fo&reground:"); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; label.setLayoutData(gd); fColorEditor= new ColorEditor(stylesComposite);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
Button colorButton= fColorEditor.getButton(); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; colorButton.setLayoutData(gd); label= new Label(stylesComposite, SWT.LEFT); label.setText("&Bold:"); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; label.setLayoutData(gd); fBoldCheckBox= new Button(stylesComposite, SWT.CHECK); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment= GridData.BEGINNING; fBoldCheckBox.setLayoutData(gd); label= new Label(colorComposite, SWT.LEFT); label.setText("Preview:"); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Control previewer= createPreviewer(colorComposite); gd= new GridData(GridData.FILL_BOTH); gd.widthHint= convertWidthInCharsToPixels(80); gd.heightHint= convertHeightInCharsToPixels(15); previewer.setLayoutData(gd); fList.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { }
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void widgetSelected(SelectionEvent e) { handleListSelection(); } }); colorButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; PreferenceConverter.setValue(fOverlayStore, key, fColorEditor.getColorValue()); } }); fBoldCheckBox.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { } public void widgetSelected(SelectionEvent e) { int i= fList.getSelectionIndex(); String key= fListModel[i][1]; fOverlayStore.setValue(key + "_bold", fBoldCheckBox.getSelection()); } }); return colorComposite; }
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private Control createPreviewer(Composite parent) { fJavaTextTools= new JavaTextTools(fOverlayStore); fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL); fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null)); fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); fPreviewViewer.setEditable(false); String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); IDocument document= new Document(content); IDocumentPartitioner partitioner= fJavaTextTools.createDocumentPartitioner(); partitioner.connect(document); document.setDocumentPartitioner(partitioner); fPreviewViewer.setDocument(document); fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { fPreviewViewer.invalidateTextPresentation(); } }); return fPreviewViewer.getControl(); } private Control createBehaviorPage(Composite parent) { Composite behaviorComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; behaviorComposite.setLayout(layout);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
String label= "Highlight &matching brackets"; final Button checkBox= addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0); label= "Matching &brackets highlight color:"; final Control colorControl= addColorButton(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, 0); checkBox.addSelectionListener(new SelectionListener() { Control control= colorControl; Button button= checkBox; ControlEnableState state= button.getSelection() ? null : ControlEnableState.disable(control); public void widgetSelected(SelectionEvent e) { if (button.getSelection()) { if (state != null) { state.restore(); state= null; } } else { state= ControlEnableState.disable(control); } } public void widgetDefaultSelected(SelectionEvent e) { } }); label= "Text font:"; addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT); label= "Displayed &tab width:"; addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
return behaviorComposite; } private Control createContentAssistPage(Composite parent) { Composite contentAssistComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 2; contentAssistComposite.setLayout(layout); String label= "Insert single &proposals automatically"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0); label= "Show only proposals visible in the invocation conte&xt"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0); label= "Present proposals in a&lphabetical order"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0); label= "&Enable auto activation"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0); label= "Automatically add &import instead of qualified name"; addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0); label= "Auto activation dela&y:"; addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0); label= "Auto activation &triggers for Java:"; addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 25, 0); label= "Auto activation triggers for &JavaDoc:";
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 25, 0); label= "&Background for completion proposals:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0); label= "&Foreground for completion proposals:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0); label= "Bac&kground for method parameters:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0); label= "Fo&reground for method parameters:"; addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0); return contentAssistComposite; } /* * @see PreferencePage#createContents(Composite) */ protected Control createContents(Composite parent) { fOverlayStore.load(); fOverlayStore.start(); TabFolder folder= new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item= new TabItem(folder, SWT.NONE); item.setText("&General");
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createBehaviorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText("&Colors"); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createColorPage(folder)); item= new TabItem(folder, SWT.NONE); item.setText("Code A&ssist"); item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE)); item.setControl(createContentAssistPage(folder)); initialize(); return folder; } private void initialize() { fFontEditor.setPreferenceStore(getPreferenceStore()); fFontEditor.setPreferencePage(this); fFontEditor.load(); initializeFields(); for (int i= 0; i < fListModel.length; i++) fList.add(fListModel[i][0]); fList.getDisplay().asyncExec(new Runnable() {
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void run() { fList.select(0); handleListSelection(); } }); } private void initializeFields() { Iterator e= fColorButtons.keySet().iterator(); while (e.hasNext()) { ColorEditor c= (ColorEditor) e.next(); String key= (String) fColorButtons.get(c); RGB rgb= PreferenceConverter.getColor(fOverlayStore, key); c.setColorValue(rgb); } e= fCheckBoxes.keySet().iterator(); while (e.hasNext()) { Button b= (Button) e.next(); String key= (String) fCheckBoxes.get(b); b.setSelection(fOverlayStore.getBoolean(key)); } e= fTextFields.keySet().iterator(); while (e.hasNext()) { Text t= (Text) e.next(); String key= (String) fTextFields.get(t); t.setText(fOverlayStore.getString(key)); }
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} /* * @see PreferencePage#performOk() */ public boolean performOk() { fFontEditor.store(); fOverlayStore.propagate(); return true; } /* * @see PreferencePage#performDefaults() */ protected void performDefaults() { fFontEditor.loadDefault(); fOverlayStore.loadDefaults(); initializeFields(); handleListSelection(); super.performDefaults(); fPreviewViewer.invalidateTextPresentation(); } /* * @see DialogPage#dispose() */
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void dispose() { if (fJavaTextTools != null) { fJavaTextTools= null; } fFontEditor.setPreferencePage(null); fFontEditor.setPreferenceStore(null); if (fOverlayStore != null) { fOverlayStore.stop(); fOverlayStore= null; } super.dispose(); } private Control addColorButton(Composite parent, String label, String key, int indentation) { Composite composite= new Composite(parent, SWT.NONE); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= 2; composite.setLayoutData(gd); GridLayout layout= new GridLayout(); layout.numColumns= 2; layout.marginWidth= 0; layout.marginHeight= 0; composite.setLayout(layout); Label labelControl= new Label(composite, SWT.NONE);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
labelControl.setText(label); gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); ColorEditor editor= new ColorEditor(composite); Button button= editor.getButton(); button.setData(editor); gd= new GridData(); gd.horizontalAlignment= GridData.END; button.setLayoutData(gd); button.addSelectionListener(fColorButtonListener); fColorButtons.put(editor, key); return composite; } private Button addCheckBox(Composite parent, String label, String key, int indentation) { Button checkBox= new Button(parent, SWT.CHECK); checkBox.setText(label); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; gd.horizontalSpan= 2; checkBox.setLayoutData(gd); checkBox.addSelectionListener(fCheckBoxListener);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fCheckBoxes.put(checkBox, key); return checkBox; } private void addTextField(Composite parent, String label, String key, int textLimit, int indentation) { Label labelControl= new Label(parent, SWT.NONE); labelControl.setText(label); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalIndent= indentation; labelControl.setLayoutData(gd); Text textControl= new Text(parent, SWT.BORDER | SWT.SINGLE); gd= new GridData(GridData.FILL_HORIZONTAL); gd.widthHint= convertWidthInCharsToPixels(textLimit + 1); gd.horizontalAlignment= GridData.END; textControl.setLayoutData(gd); textControl.setTextLimit(textLimit); textControl.addModifyListener(fTextFieldListener); fTextFields.put(textControl, key); } private void addTextFontEditor(Composite parent, String label, String key) { Composite editorComposite= new Composite(parent, SWT.NULL); GridLayout layout= new GridLayout(); layout.numColumns= 3; editorComposite.setLayout(layout);
8,107
Bug 8107 bracket hightlighting: can't change color
the color changing option in the preference page seems to be always disabled
verified fixed
48c416a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T10:04:59Z
2002-01-23T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite); fFontEditor.setChangeButtonText("C&hange..."); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= 2; editorComposite.setLayoutData(gd); } private String loadPreviewContentFromFile(String filename) { String line; String separator= System.getProperty("line.separator"); StringBuffer buffer= new StringBuffer(512); BufferedReader reader= null; try { reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename))); while ((line= reader.readLine()) != null) { buffer.append(line); buffer.append(separator); } } catch (IOException io) { JavaPlugin.log(io); } finally { if (reader != null) { try { reader.close(); } catch (IOException e) {} } } return buffer.toString(); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests; import junit.framework.Test; import junit.framework.TestSuite; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.ui.tests.core.AddUnimplementedMethodsTest; import org.eclipse.jdt.ui.tests.core.ImportOrganizeTest; import org.eclipse.jdt.ui.tests.core.JavaModelUtilTest; import org.eclipse.jdt.ui.tests.core.TextBufferTest; import org.eclipse.jdt.ui.tests.core.TypeHierarchyTest; import org.eclipse.jdt.ui.tests.core.TypeInfoTest; /** * Test all areas of the UI. */ public class AutomatedSuite extends TestSuite {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java
/** * Returns the suite. This is required to * use the JUnit Launcher. */ public static Test suite() { return new AutomatedSuite(); } /** * Construct the test suite. */ public AutomatedSuite() { addTest(TypeInfoTest.suite()); addTest(AddUnimplementedMethodsTest.suite()); addTest(ImportOrganizeTest.suite()); addTest(JavaModelUtilTest.suite()); addTest(TextBufferTest.suite()); addTest(TypeHierarchyTest.suite()); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), AutomatedSuite.class, args); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.core; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; 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.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedMethodsOperation; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; public class AddUnimplementedMethodsTest extends TestCase {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
private IJavaProject fJavaProject; private IPackageFragment fPackage; private IType fClassA, fInterfaceB, fClassC, fClassD, fInterfaceE; public AddUnimplementedMethodsTest(String name) { super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), AddUnimplementedMethodsTest.class, args); } public static Test suite() {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
TestSuite suite= new TestSuite(AddUnimplementedMethodsTest.class.getName()); suite.addTest(new AddUnimplementedMethodsTest("test1")); suite.addTest(new AddUnimplementedMethodsTest("test2")); suite.addTest(new AddUnimplementedMethodsTest("test3")); suite.addTest(new AddUnimplementedMethodsTest("test4")); return suite; } /** * Creates a new test Java project. */ protected void setUp() throws Exception { fJavaProject= JavaProjectHelper.createJavaProject("DummyProject", "bin"); assertNotNull(JavaProjectHelper.addRTJar(fJavaProject)); IPackageFragmentRoot root= JavaProjectHelper.addSourceContainer(fJavaProject, "src"); fPackage= root.createPackageFragment("ibm.util", true, null); ICompilationUnit cu= fPackage.getCompilationUnit("A.java"); fClassA= cu.createType("public abstract class A {\n}\n", null, true, null); fClassA.createMethod("public abstract void a();\n", null, true, null); fClassA.createMethod("public abstract void b(java.util.Vector v);\n", null, true, null); cu= fPackage.getCompilationUnit("B.java"); fInterfaceB= cu.createType("public interface B {\n}\n", null, true, null); fInterfaceB.createMethod("void c(java.util.Hashtable h);\n", null, true, null); cu= fPackage.getCompilationUnit("C.java"); fClassC= cu.createType("public abstract class C {\n}\n", null, true, null); fClassC.createMethod("public void c(java.util.Hashtable h) {\n}\n", null, true, null);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
fClassC.createMethod("public abstract java.util.Enumeration d(java.util.Hashtable h) {\n}\n", null, true, null); cu= fPackage.getCompilationUnit("D.java"); fClassD= cu.createType("public abstract class D extends C {\n}\n", null, true, null); fClassD.createMethod("public abstract void c(java.util.Hashtable h);\n", null, true, null); cu= fPackage.getCompilationUnit("E.java"); fInterfaceE= cu.createType("public interface E {\n}\n", null, true, null); fInterfaceE.createMethod("void c(java.util.Hashtable h);\n", null, true, null); fInterfaceE.createMethod("void e() throws java.util.NoSuchElementException;\n", null, true, null); } /** * Removes the test java project. */ protected void tearDown () throws Exception { JavaProjectHelper.delete(fJavaProject); fJavaProject= null; fPackage= null; fClassA= null; fInterfaceB= null; fClassC= null; fClassD= null; fInterfaceE= null; } /* * basic test: extend an abstract class and an interface */ public void test1() throws Exception { ICompilationUnit cu= fPackage.getCompilationUnit("Test1.java"); IType testClass= cu.createType("public class Test1 extends A implements B {\n}\n", null, true, null);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(testClass, new CodeGenerationSettings(), null, true); op.run(new NullProgressMonitor()); IMethod[] methods= testClass.getMethods(); checkMethods(new String[] { "a", "b", "c" }, methods); IImportDeclaration[] imports= cu.getImports(); checkImports(new String[] { "java.util.Hashtable", "java.util.Vector" }, imports); } /* * method c() of interface B is already implemented by class C */ public void test2() throws Exception { ICompilationUnit cu= fPackage.getCompilationUnit("Test2.java"); IType testClass= cu.createType("public class Test2 extends C implements B {\n}\n", null, true, null); AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(testClass, new CodeGenerationSettings(), null, true); op.run(new NullProgressMonitor()); IMethod[] methods= testClass.getMethods(); checkMethods(new String[] { "d" }, methods); IImportDeclaration[] imports= cu.getImports(); checkImports(new String[] { "java.util.Enumeration", "java.util.Hashtable" }, imports); } /* * method c() is implemented in C but made abstract again in class D
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
*/ public void test3() throws Exception { ICompilationUnit cu= fPackage.getCompilationUnit("Test3.java"); IType testClass= cu.createType("public class Test3 extends D {\n}\n", null, true, null); AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(testClass, new CodeGenerationSettings(), null, true); op.run(new NullProgressMonitor()); IMethod[] methods= testClass.getMethods(); checkMethods(new String[] { "c", "d" }, methods); IImportDeclaration[] imports= cu.getImports(); checkImports(new String[] { "java.util.Hashtable", "java.util.Enumeration" }, imports); } /* * method c() defined in both interfaces B and E */ public void test4() throws Exception { ICompilationUnit cu= fPackage.getCompilationUnit("Test4.java"); IType testClass= cu.createType("public class Test4 implements B, E {\n}\n", null, true, null); AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(testClass, new CodeGenerationSettings(), null, true); op.run(new NullProgressMonitor()); IMethod[] methods= testClass.getMethods(); checkMethods(new String[] { "c", "e" }, methods); IImportDeclaration[] imports= cu.getImports();
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedMethodsTest.java
} private void checkMethods(String[] expected, IMethod[] methods) { int nMethods= methods.length; int nExpected= expected.length; assertTrue("" + nExpected + " methods expected, is " + nMethods, nMethods == nExpected); for (int i= 0; i < nExpected; i++) { String methName= expected[i]; assertTrue("method " + methName + " expected", nameContained(methName, methods)); } } private void checkImports(String[] expected, IImportDeclaration[] imports) { int nImports= imports.length; int nExpected= expected.length; assertTrue("" + nExpected + " imports expected, is " + nImports, nImports == nExpected); for (int i= 0; i < nExpected; i++) { String impName= expected[i]; assertTrue("import " + impName + " expected", nameContained(impName, imports)); } } private boolean nameContained(String methName, IJavaElement[] methods) { for (int i= 0; i < methods.length; i++) { if (methods[i].getElementName().equals(methName)) { return true; } } return false; } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.core; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.zip.ZipFile; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMember; 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.ITypeHierarchy; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.JavaTestPlugin; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; public class JavaModelUtilTest extends TestCase {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
private IJavaProject fJProject1; private IJavaProject fJProject2; private static final IPath LIB= new Path("testresources/mylib.jar"); public JavaModelUtilTest(String name) {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), JavaModelUtilTest.class, args); } public static Test suite() { return new TestSuite(JavaModelUtilTest.class); } protected void setUp() throws Exception { fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); fJProject2= JavaProjectHelper.createJavaProject("TestProject2", "bin"); IPackageFragmentRoot jdk= JavaProjectHelper.addVariableRTJar(fJProject1, "JRE_LIB_TEST", null, null); assertTrue("jdk not found", jdk != null); File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC); assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists()); ZipFile zipfile= new ZipFile(junitSrcArchive); JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", zipfile); File mylibJar= JavaTestPlugin.getDefault().getFileInPlugin(LIB); assertTrue("lib not found", junitSrcArchive != null && junitSrcArchive.exists()); JavaProjectHelper.addLibraryWithImport(fJProject1, new Path(mylibJar.getPath()), null, null); JavaProjectHelper.addVariableEntry(fJProject2, new Path("JRE_LIB_TEST"), null, null); IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJProject2, "src"); IPackageFragment pack1= root1.createPackageFragment("pack1", true, null); ICompilationUnit cu1= pack1.getCompilationUnit("ReqProjType.java"); IType type1= cu1.createType("public class ReqProjType { static class Inner { static class InnerInner {} }\n}\n", null, true, null); JavaProjectHelper.addRequiredProject(fJProject1, fJProject2); } protected void tearDown() throws Exception {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
JavaProjectHelper.delete(fJProject1); JavaProjectHelper.delete(fJProject2); } private void assertElementName(String name, IJavaElement elem, int type) { assertNotNull(name, elem); assertEquals(name + "-name", name, elem.getElementName()); assertTrue(name + "-type", type == elem.getElementType()); } public void testFindType() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.extensions.ExceptionTestCase"); assertElementName("ExceptionTestCase", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "junit.samples.money.IMoney"); assertElementName("IMoney", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "junit.tests.TestCaseTest.TornDown"); assertElementName("TornDown", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib.Foo"); assertElementName("Foo", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib.Foo.FooInner"); assertElementName("FooInner", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib.Foo.FooInner.FooInnerInner"); assertElementName("FooInnerInner", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "pack1.ReqProjType"); assertElementName("ReqProjType", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "pack1.ReqProjType.Inner"); assertElementName("Inner", type, IJavaElement.TYPE);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
type= JavaModelUtil.findType(fJProject1, "pack1.ReqProjType.Inner.InnerInner"); assertElementName("InnerInner", type, IJavaElement.TYPE); } public void testFindType2() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.extensions", "ExceptionTestCase"); assertElementName("ExceptionTestCase", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "junit.samples.money" , "IMoney"); assertElementName("IMoney", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "junit.tests", "TestCaseTest.TornDown"); assertElementName("TornDown", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib" , "Foo"); assertElementName("Foo", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib", "Foo.FooInner"); assertElementName("FooInner", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "mylib", "Foo.FooInner.FooInnerInner"); assertElementName("FooInnerInner", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "pack1", "ReqProjType"); assertElementName("ReqProjType", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "pack1", "ReqProjType.Inner"); assertElementName("Inner", type, IJavaElement.TYPE); type= JavaModelUtil.findType(fJProject1, "pack1", "ReqProjType.Inner.InnerInner"); assertElementName("InnerInner", type, IJavaElement.TYPE); }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
public void testFindTypeContainer() throws Exception { IJavaElement elem= JavaModelUtil.findTypeContainer(fJProject1, "junit.extensions"); assertElementName("junit.extensions", elem, IJavaElement.PACKAGE_FRAGMENT); elem= JavaModelUtil.findTypeContainer(fJProject1, "junit.tests.TestCaseTest"); assertElementName("TestCaseTest", elem, IJavaElement.TYPE); elem= JavaModelUtil.findTypeContainer(fJProject1, "mylib" ); assertElementName("mylib", elem, IJavaElement.PACKAGE_FRAGMENT); elem= JavaModelUtil.findTypeContainer(fJProject1, "mylib.Foo"); assertElementName("Foo", elem, IJavaElement.TYPE); elem= JavaModelUtil.findTypeContainer(fJProject1, "mylib.Foo.FooInner"); assertElementName("FooInner", elem, IJavaElement.TYPE); elem= JavaModelUtil.findTypeContainer(fJProject1, "pack1"); assertElementName("pack1", elem, IJavaElement.PACKAGE_FRAGMENT); elem= JavaModelUtil.findTypeContainer(fJProject1, "pack1.ReqProjType"); assertElementName("ReqProjType", elem, IJavaElement.TYPE); elem= JavaModelUtil.findTypeContainer(fJProject1, "pack1.ReqProjType.Inner"); assertElementName("Inner", elem, IJavaElement.TYPE); } public void testFindTypeInCompilationUnit() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/tests/TestCaseTest.java")); assertElementName("TestCaseTest.java", cu, IJavaElement.COMPILATION_UNIT); IType type= JavaModelUtil.findTypeInCompilationUnit(cu, "TestCaseTest"); assertElementName("TestCaseTest", type, IJavaElement.TYPE);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
type= JavaModelUtil.findTypeInCompilationUnit(cu, "TestCaseTest.TornDown"); assertElementName("TornDown", type, IJavaElement.TYPE); cu= (ICompilationUnit) fJProject1.findElement(new Path("pack1/ReqProjType.java")); assertElementName("ReqProjType.java", cu, IJavaElement.COMPILATION_UNIT); type= JavaModelUtil.findTypeInCompilationUnit(cu, "ReqProjType"); assertElementName("ReqProjType", type, IJavaElement.TYPE); type= JavaModelUtil.findTypeInCompilationUnit(cu, "ReqProjType.Inner"); assertElementName("Inner", type, IJavaElement.TYPE); type= JavaModelUtil.findTypeInCompilationUnit(cu, "ReqProjType.Inner.InnerInner"); assertElementName("InnerInner", type, IJavaElement.TYPE); } public void testFindMemberInCompilationUnit() throws Exception { ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/tests/TestCaseTest.java")); assertElementName("TestCaseTest.java", cu, IJavaElement.COMPILATION_UNIT); ArrayList children= new ArrayList(); IType type= JavaModelUtil.findTypeInCompilationUnit(cu, "TestCaseTest"); assertElementName("TestCaseTest", type, IJavaElement.TYPE); children.addAll(Arrays.asList(type.getChildren())); type= JavaModelUtil.findTypeInCompilationUnit(cu, "TestCaseTest.TornDown"); assertElementName("TornDown", type, IJavaElement.TYPE);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
children.addAll(Arrays.asList(type.getChildren())); assertTrue("a", children.size() == 19); for (int i= 0; i < children.size(); i++) { Object curr= children.get(i); assertTrue("b", curr instanceof IMember); IMember member= JavaModelUtil.findMemberInCompilationUnit(cu, (IMember) curr); assertEquals("b-" + i, curr, member); } } private void assertClasspathEntry(String name, IJavaElement elem, IPath path, int type) throws Exception { IPackageFragmentRoot root= JavaModelUtil.getPackageFragmentRoot(elem); assertNotNull(name + "-noroot", root); IClasspathEntry entry= JavaModelUtil.getRawClasspathEntry(root); assertNotNull(name + "-nocp", entry); assertEquals(name + "-wrongpath", entry.getPath(), path); assertTrue(name + "-wrongtype", type == entry.getEntryKind()); } public void testGetRawClasspathEntry() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.extensions.ExceptionTestCase"); assertElementName("ExceptionTestCase", type, IJavaElement.TYPE); IPath path= fJProject1.getProject().getFullPath().append("src"); assertClasspathEntry("ExceptionTestCase", type, path, IClasspathEntry.CPE_SOURCE); type= JavaModelUtil.findType(fJProject1, "mylib.Foo"); assertElementName("Foo", type, IJavaElement.TYPE); path= fJProject1.getProject().getFullPath().append(LIB.lastSegment()); assertClasspathEntry("Foo", type, path, IClasspathEntry.CPE_LIBRARY);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
type= JavaModelUtil.findType(fJProject1, "java.lang.Object"); assertElementName("Object", type, IJavaElement.TYPE); path= new Path("JRE_LIB_TEST"); assertClasspathEntry("Object", type, path, IClasspathEntry.CPE_VARIABLE); type= JavaModelUtil.findType(fJProject1, "pack1.ReqProjType"); assertElementName("ReqProjType", type, IJavaElement.TYPE); path= fJProject2.getProject().getFullPath().append("src"); assertClasspathEntry("ReqProjType", type, path, IClasspathEntry.CPE_SOURCE); } public void testIsOnBuildPath() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.extensions.ExceptionTestCase"); assertElementName("ExceptionTestCase", type, IJavaElement.TYPE); assertTrue("ExceptionTestCase-bp1", JavaModelUtil.isOnBuildPath(fJProject1, type)); assertTrue("ExceptionTestCase-bp2", !JavaModelUtil.isOnBuildPath(fJProject2, type)); type= JavaModelUtil.findType(fJProject1, "java.lang.Object"); assertElementName("Object", type, IJavaElement.TYPE); assertTrue("Object-bp1", JavaModelUtil.isOnBuildPath(fJProject1, type)); assertTrue("Object-bp2", JavaModelUtil.isOnBuildPath(fJProject2, type)); type= JavaModelUtil.findType(fJProject1, "pack1.ReqProjType"); assertElementName("ReqProjType", type, IJavaElement.TYPE); assertTrue("ReqProjType-bp1", JavaModelUtil.isOnBuildPath(fJProject1, type)); assertTrue("ReqProjType-bp2", JavaModelUtil.isOnBuildPath(fJProject2, type)); }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
private void assertFindMethod(String methName, String[] paramTypeNames, boolean isConstructor, IType type) throws Exception { String[] sig= new String[paramTypeNames.length]; for (int i= 0; i < paramTypeNames.length; i++) { String name= Signature.getSimpleName(paramTypeNames[i]); sig[i]= Signature.createTypeSignature(name, false); assertNotNull(methName + "-ts1" + i, sig[i]); } IMethod meth= JavaModelUtil.findMethod(methName, sig, isConstructor, type); assertElementName(methName, meth, IJavaElement.METHOD); assertTrue("methName-nparam1", meth.getParameterTypes().length == paramTypeNames.length); for (int i= 0; i < paramTypeNames.length; i++) { sig[i]= Signature.createTypeSignature(paramTypeNames[i], true); assertNotNull(methName + "-ts2" + i, sig[i]); } meth= JavaModelUtil.findMethod(methName, sig, isConstructor, type); assertElementName(methName, meth, IJavaElement.METHOD); assertTrue("methName-nparam2", meth.getParameterTypes().length == paramTypeNames.length); } public void testFindMethod() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.framework.Assert"); assertElementName("Assert", type, IJavaElement.TYPE); assertFindMethod("assertNotNull", new String[] { "java.lang.Object" }, false, type); assertFindMethod("assertNotNull", new String[] { "java.lang.String", "java.lang.Object" }, false, type); assertFindMethod("assertEquals", new String[] { "java.lang.String", "double", "double", "double" }, false, type);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
assertFindMethod("assertEquals", new String[] { "java.lang.String", "long", "long" }, false, type); assertFindMethod("Assert", new String[0], true, type); type= JavaModelUtil.findType(fJProject1, "junit.samples.money.MoneyTest"); assertElementName("MoneyTest", type, IJavaElement.TYPE); assertFindMethod("main", new String[] { "java.lang.String[]" }, false, type); assertFindMethod("setUp", new String[0] , false, type); assertFindMethod("MoneyTest", new String[] { "java.lang.String" } , true, type); } private void assertFindMethodInHierarchy(String methName, String[] paramTypeNames, boolean isConstructor, IType type, String declaringTypeName) throws Exception { ITypeHierarchy hierarchy= type.newSupertypeHierarchy(null); String[] sig= new String[paramTypeNames.length]; for (int i= 0; i < paramTypeNames.length; i++) { String name= Signature.getSimpleName(paramTypeNames[i]); sig[i]= Signature.createTypeSignature(name, false); assertNotNull(methName + "-ts1" + i, sig[i]); } IMethod meth= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, type, methName, sig, isConstructor); assertElementName(methName, meth, IJavaElement.METHOD); assertTrue("methName-nparam1", meth.getParameterTypes().length == paramTypeNames.length); assertEquals("methName-decltype", declaringTypeName, JavaModelUtil.getFullyQualifiedName(meth.getDeclaringType())); for (int i= 0; i < paramTypeNames.length; i++) { sig[i]= Signature.createTypeSignature(paramTypeNames[i], true); assertNotNull(methName + "-ts2" + i, sig[i]); } meth= JavaModelUtil.findMethodDeclarationInHierarchy(hierarchy, type, methName, sig, isConstructor); assertElementName(methName, meth, IJavaElement.METHOD);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/JavaModelUtilTest.java
assertTrue("methName-nparam2", meth.getParameterTypes().length == paramTypeNames.length); assertEquals("methName-decltype", declaringTypeName, JavaModelUtil.getFullyQualifiedName(meth.getDeclaringType())); } public void testFindMethodInHierarchy() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.extensions.TestSetup"); assertElementName("TestSetup", type, IJavaElement.TYPE); assertFindMethodInHierarchy("run", new String[] { "junit.framework.TestResult" }, false, type, "junit.framework.Test"); assertFindMethodInHierarchy("toString", new String[] {} , false, type, "java.lang.Object"); } public void testHasMainMethod() throws Exception { IType type= JavaModelUtil.findType(fJProject1, "junit.samples.money.MoneyTest"); assertElementName("MoneyTest", type, IJavaElement.TYPE); assertTrue("MoneyTest-nomain", JavaModelUtil.hasMainMethod(type)); type= JavaModelUtil.findType(fJProject1, "junit.framework.TestResult"); assertElementName("TestResult", type, IJavaElement.TYPE); assertTrue("TestResult-hasmain", !JavaModelUtil.hasMainMethod(type)); type= JavaModelUtil.findType(fJProject1, "junit.samples.VectorTest"); assertElementName("VectorTest", type, IJavaElement.TYPE); assertTrue("VectorTest-nomain", JavaModelUtil.hasMainMethod(type)); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeHierarchyTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.core; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; public class TypeHierarchyTest extends TestCase {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeHierarchyTest.java
private IJavaProject fJavaProject1; private IJavaProject fJavaProject2; public TypeHierarchyTest(String name) { super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), TypeHierarchyTest.class, args); } public static Test suite() { return new TestSuite(TypeHierarchyTest.class); } protected void setUp() throws Exception { fJavaProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); fJavaProject2= JavaProjectHelper.createJavaProject("TestProject2", "bin"); } protected void tearDown () throws Exception { JavaProjectHelper.delete(fJavaProject1); JavaProjectHelper.delete(fJavaProject2);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeHierarchyTest.java
} public void test1() throws Exception { IPackageFragmentRoot jdk= JavaProjectHelper.addRTJar(fJavaProject1); assertTrue("jdk not found", jdk != null); IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJavaProject1, "src"); IPackageFragment pack1= root1.createPackageFragment("pack1", true, null); ICompilationUnit cu1= pack1.getCompilationUnit("A.java"); IType type1= cu1.createType("public class A {\n}\n", null, true, null); JavaProjectHelper.addRTJar(fJavaProject2); JavaProjectHelper.addRequiredProject(fJavaProject2, fJavaProject1); IPackageFragmentRoot root2= JavaProjectHelper.addSourceContainer(fJavaProject2, "src"); IPackageFragment pack2= root2.createPackageFragment("pack2", true, null); ICompilationUnit cu2= pack2.getCompilationUnit("B.java"); IType type2= cu2.createType("public class B extends pack1.A {\n}\n", null, true, null); ITypeHierarchy hierarchy= type2.newSupertypeHierarchy(null); IType[] allTypes= hierarchy.getAllTypes(); assertTrue("Should contain 3 types, contains: " + allTypes.length, allTypes.length == 3); IType type= JavaModelUtil.findType(fJavaProject2, "pack1.A"); assertTrue("Type not found", type != null); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved.
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
*/ package org.eclipse.jdt.ui.tests.core; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipFile; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.search.IJavaSearchConstants; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.ITypeNameRequestor; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.JavaTestPlugin; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoRequestor; public class TypeInfoTest extends TestCase { private IJavaProject fJProject1;
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
private IJavaProject fJProject2; public TypeInfoTest(String name) { super(name); } public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), TypeInfoTest.class, args); } public static Test suite() { return new TestSuite(TypeInfoTest.class); } protected void setUp() throws Exception { fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); assertNotNull("jre is null", JavaProjectHelper.addRTJar(fJProject1)); fJProject2= JavaProjectHelper.createJavaProject("TestProject2", "bin"); assertNotNull("jre is null", JavaProjectHelper.addRTJar(fJProject2)); File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC); assertTrue("Junit source", junitSrcArchive != null && junitSrcArchive.exists()); ZipFile zipfile= new ZipFile(junitSrcArchive); JavaProjectHelper.addSourceContainerWithImport(fJProject2, "src", zipfile); } protected void tearDown() throws Exception { JavaProjectHelper.delete(fJProject1); JavaProjectHelper.delete(fJProject2); } public void test1() throws Exception {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJProject1, "src"); IPackageFragment pack1= root1.createPackageFragment("com.oti", true, null); ICompilationUnit cu1= pack1.getCompilationUnit("V.java"); IType type1= cu1.createType("public class V {\n static class VInner {\n}\n}\n", null, true, null); JavaProjectHelper.addRequiredProject(fJProject1, fJProject2); ArrayList result= new ArrayList(); IJavaElement[] elements= new IJavaElement[] { fJProject1 }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements); ITypeNameRequestor requestor= new TypeInfoRequestor(result); SearchEngine engine= new SearchEngine(); engine.searchAllTypeNames( fJProject1.getJavaModel().getWorkspace(), null, new char[] {'V'}, IJavaSearchConstants.PREFIX_MATCH, IJavaSearchConstants.CASE_INSENSITIVE, IJavaSearchConstants.TYPE, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); findTypeRef(result, "com.oti.V"); findTypeRef(result, "com.oti.V.VInner"); findTypeRef(result, "java.lang.VerifyError"); findTypeRef(result, "java.lang.Void");
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
findTypeRef(result, "java.util.Vector"); findTypeRef(result, "junit.samples.VectorTest"); for (int i= 0; i < result.size(); i++) { TypeInfo ref= (TypeInfo) result.get(i); IType resolvedType= ref.resolveType(scope); if (resolvedType == null) { assertTrue("Could not be resolved: " + ref.toString(), false); } } assertTrue("Should find 9 elements, is " + result.size(), result.size() == 9); } private void findTypeRef(List refs, String fullname) { for (int i= 0; i <refs.size(); i++) { TypeInfo curr= (TypeInfo) refs.get(i); if (fullname.equals(curr.getFullyQualifiedName())) { return; } } assertTrue("Type not found: " + fullname, false); } public void test2() throws Exception { ArrayList result= new ArrayList(); IJavaProject[] elements= new IJavaProject[] { fJProject2 }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeInfoTest.java
ITypeNameRequestor requestor= new TypeInfoRequestor(result); SearchEngine engine= new SearchEngine(); engine.searchAllTypeNames( fJProject1.getJavaModel().getWorkspace(), null, new char[] {'T'}, IJavaSearchConstants.PREFIX_MATCH, IJavaSearchConstants.CASE_INSENSITIVE, IJavaSearchConstants.TYPE, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); findTypeRef(result, "junit.extensions.TestDecorator"); findTypeRef(result, "junit.framework.Test"); findTypeRef(result, "junit.framework.TestListener"); findTypeRef(result, "junit.tests.TestCaseTest.TornDown"); assertTrue("Should find 37 elements, is " + result.size(), result.size() == 37); for (int i= 0; i < result.size(); i++) { TypeInfo ref= (TypeInfo) result.get(i); IType resolvedType= ref.resolveType(scope); if (resolvedType == null) { assertTrue("Could not be resolved: " + ref.toString(), false); } } } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.ui.tests.dialogs; import java.util.ArrayList; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.resources.IProject;
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.internal.WorkbenchPlugin; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.TestPluginLauncher; import org.eclipse.jdt.testplugin.util.DialogCheck; import org.eclipse.jdt.ui.IJavaElementSearchConstants; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.tests.core.AddUnimplementedMethodsTest; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.ElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.MultiElementListSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog; import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; public class DialogsTest extends TestCase {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
private static final String PROJECT_NAME = "DummyProject"; public static void main(String[] args) { TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), DialogsTest.class, args); } public static Test suite() { TestSuite suite= new TestSuite(DialogsTest.class.getName()); suite.addTest(new DialogsTest("testElementListSelectionDialog")); suite.addTest(new DialogsTest("testMultiElementSelectionDialog")); suite.addTest(new DialogsTest("testTwoPaneSelectionDialog")); suite.addTest(new DialogsTest("testElementTreeSelectionDialog")); suite.addTest(new DialogsTest("testElementListSelectionDialog")); return suite; } public DialogsTest(String name) { super(name); } private Shell getShell() { return DialogCheck.getShell(); } private IWorkbench getWorkbench() { return WorkbenchPlugin.getDefault().getWorkbench(); } public void testTwoPaneSelectionDialog() throws Exception { IJavaProject jproject= JavaProjectHelper.createJavaProject(PROJECT_NAME, "bin"); JavaProjectHelper.addSourceContainer(jproject, "src1"); JavaProjectHelper.addRTJar(jproject);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
IProject project= jproject.getProject(); OpenTypeSelectionDialog dialog= new OpenTypeSelectionDialog(getShell(), new ProgressMonitorDialog(getShell()), SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_TYPES); dialog.setTitle(JavaUIMessages.getString("OpenTypeAction.dialogTitle")); dialog.setMessage(JavaUIMessages.getString("OpenTypeAction.dialogMessage")); DialogCheck.assertDialog(dialog, this); JavaProjectHelper.delete(jproject); } private TypeInfo[] getRefs(ArrayList list, int off, int len) { TypeInfo[] res= new TypeInfo[len]; for (int i= 0; i < len; i++) { res[i]= (TypeInfo) list.get(off + i); } return res; } public void testMultiElementSelectionDialog() throws Exception { IJavaProject jproject= JavaProjectHelper.createJavaProject(PROJECT_NAME, "bin"); JavaProjectHelper.addSourceContainer(jproject, "src1"); JavaProjectHelper.addRTJar(jproject); ILabelProvider labelProvider= new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED); ArrayList list= new ArrayList(200); IProject project= jproject.getProject(); IJavaSearchScope searchScope= SearchEngine.createJavaSearchScope(new IJavaElement[] { jproject }); AllTypesSearchEngine searchEngine= new AllTypesSearchEngine(project.getWorkspace()); searchEngine.searchTypes(list, searchScope, IJavaElementSearchConstants.CONSIDER_TYPES, null);
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
MultiElementListSelectionDialog dialog= new MultiElementListSelectionDialog(getShell(), labelProvider); dialog.setTitle("Title"); dialog.setMessage("Description:"); assertTrue(list.size() > 15); TypeInfo[][] refs= new TypeInfo[][] { getRefs(list, 0, 3), getRefs(list, 4, 6), getRefs(list, 10, 5) }; dialog.setElements(refs); dialog.setInitialSelections(new Object[refs.length]); DialogCheck.assertDialog(dialog, this); JavaProjectHelper.delete(jproject); } public void testElementTreeSelectionDialog() throws Exception { IJavaProject jproject= JavaProjectHelper.createJavaProject(PROJECT_NAME, "bin"); JavaProjectHelper.addSourceContainer(jproject, "src1"); Object initSelection= JavaProjectHelper.addSourceContainer(jproject, "src2"); IJavaProject jproject2= JavaProjectHelper.createJavaProject("Project2", "bin"); JavaProjectHelper.addSourceContainer(jproject2, "src1"); JavaProjectHelper.addSourceContainer(jproject2, "src2"); JavaElementContentProvider provider= new JavaElementContentProvider(); ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, provider); dialog.setSorter(new JavaElementSorter()); dialog.setTitle(NewWizardMessages.getString("ContainerPage.ChooseSourceContainerDialog.title")); dialog.setMessage(NewWizardMessages.getString("ContainerPage.ChooseSourceContainerDialog.description")); dialog.setInput(jproject.getJavaModel());
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
dialog.setInitialSelection(initSelection); DialogCheck.assertDialog(dialog, this); JavaProjectHelper.delete(jproject); JavaProjectHelper.delete(jproject2); } public void testElementListSelectionDialog() throws Exception { IJavaProject jproject= JavaProjectHelper.createJavaProject(PROJECT_NAME, "bin"); IPackageFragmentRoot root= JavaProjectHelper.addRTJar(jproject); assertTrue(root != null); Object[] elements= root.getChildren(); ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT)); dialog.setIgnoreCase(false); dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description")); dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty")); dialog.setElements(elements); DialogCheck.assertDialog(dialog, this); JavaProjectHelper.delete(jproject); } private static class TestLabelProvider extends LabelProvider { public Image getImage(Object element) { return null; }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/DialogsTest.java
public String getText(Object element) { Integer i= (Integer) element; return "e-" + i.toString(); } } public void testElementListSelectionDialog2() throws Exception { Object[] elements= new Integer[] { new Integer(0), new Integer(1), new Integer(2), new Integer(7), new Integer(12), new Integer(42) }; ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new TestLabelProvider()); dialog.setIgnoreCase(false); dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title")); dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description")); dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty")); dialog.setElements(elements); dialog.setInitialSelections(new Object[] {new Integer(7)}); DialogCheck.assertDialog(dialog, this); Object[] results= dialog.getResult(); assertTrue(results.length == 1); assertEquals(new Integer(7), results[0]); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenTypeAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.actions; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.core.runtime.CoreException; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil; import org.eclipse.jdt.ui.IJavaElementSearchConstants; public class OpenTypeAction extends Action implements IWorkbenchWindowActionDelegate {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenTypeAction.java
public OpenTypeAction() { super(); setText(JavaUIMessages.getString("OpenTypeAction.label")); setDescription(JavaUIMessages.getString("OpenTypeAction.description")); setToolTipText(JavaUIMessages.getString("OpenTypeAction.tooltip")); setImageDescriptor(JavaPluginImages.DESC_TOOL_OPENTYPE); } public void run() { Shell parent= JavaPlugin.getActiveWorkbenchShell(); OpenTypeSelectionDialog dialog= new OpenTypeSelectionDialog(parent, new ProgressMonitorDialog(parent), SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_TYPES); dialog.setMatchEmptyString(false); dialog.setTitle(JavaUIMessages.getString("OpenTypeAction.dialogTitle")); dialog.setMessage(JavaUIMessages.getString("OpenTypeAction.dialogMessage")); if (dialog.open() == IDialogConstants.CANCEL_ID) { return; } Object[] types= dialog.getResult(); if (types != null && types.length > 0) { IType type= (IType)types[0]; if (dialog.showInTypeHierarchy()) {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenTypeAction.java
OpenTypeHierarchyUtil.open(new IType[] { type }, JavaPlugin.getActiveWorkbenchWindow()); } else { try { IEditorPart part= EditorUtility.openInEditor(type, true); EditorUtility.revealInEditor(part, type); } catch (CoreException x) { String title= JavaUIMessages.getString("OpenTypeAction.errorTitle"); String message= JavaUIMessages.getString("OpenTypeAction.errorMessage"); ExceptionHandler.handle(x, title, message); } } } } public void run(IAction action) { run(); } public void dispose() { } public void init(IWorkbenchWindow window) { } public void selectionChanged(IAction action, ISelection selection) { } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/MultiTypeSelectionDialog.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.dialogs; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.util.Assert; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; import org.eclipse.jdt.internal.ui.JavaUIMessages; /** * A dialog to select a type from a list of types. The dialog allows * multiple selections. */ public class MultiTypeSelectionDialog extends ElementListSelectionDialog {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/MultiTypeSelectionDialog.java
private IRunnableContext fRunnableContext; private IJavaSearchScope fScope; private int fStyle; /** * Constructs an instance of <code>MultiTypeSelectionDialog</code>. * @param parent the parent shell. * @param context the context. * @param scope the java search scope. * @param style the widget style. */ public MultiTypeSelectionDialog(Shell parent, IRunnableContext context,
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/MultiTypeSelectionDialog.java
IJavaSearchScope scope, int style) { super(parent, new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_PACKAGE_POSTFIX)); setMultipleSelection(true); Assert.isNotNull(context); Assert.isNotNull(scope); fRunnableContext= context; fScope= scope; fStyle= style; } /* * @see Window#open() */ public int open() { AllTypesSearchEngine engine= new AllTypesSearchEngine(JavaPlugin.getWorkspace()); List typesFound= engine.searchTypes(fRunnableContext, fScope, fStyle); if (typesFound.size() == 0) return CANCEL; setFilter("A"); setElements(typesFound.toArray()); return super.open(); } /* * @see SelectionStatusDialog#computeResult() */ protected void computeResult() {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/MultiTypeSelectionDialog.java
List selection= Arrays.asList(getSelectedElements()); int size= selection.size(); if (size == 0) { setResult(null); return; } List result= new ArrayList(size); if (result != null) { for (int i= 0; i < size; i++) { try { IType type= ((TypeInfo)selection.get(i)).resolveType(fScope); if (type == null) { String title= JavaUIMessages.getString("MultiTypeSelectionDialog.dialogTitle"); String message= JavaUIMessages.getString("MultiTypeSelectionDialog.dialogMessage"); MessageDialog.openError(getShell(), title, message); } else { result.add(type); } } catch (JavaModelException e) { String title= JavaUIMessages.getString("MultiTypeSelectionDialog.errorTitle"); String message= JavaUIMessages.getString("MultiTypeSelectionDialog.errorMessage"); MessageDialog.openError(getShell(), title, message); } } } setResult(result); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.dialogs; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIMessages; /** * A dialog to select a type from a list of types. The selected type will be * opened in the editor. */ public class OpenTypeSelectionDialog extends TypeSelectionDialog {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog.java
private static final String SECTION_NAME= "OpenTypeSelectionDialog"; private static final String SHOW_IN_TYPE_HIERARCHY= "showInTypeHierarchy"; private boolean fShowInTypeHierarchy; /** * Constructs an instance of <code>OpenTypeSelectionDialog</code>. * @param parent the parent shell. * @param context the context. * @param scope the java search scope. * @param style the widget style.
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog.java
*/ public OpenTypeSelectionDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style) { super(parent, context, scope, style); fShowInTypeHierarchy= getDialogSetting().getBoolean(SHOW_IN_TYPE_HIERARCHY); } /** * @see Windows#configureShell(Shell) */ protected void configureShell(Shell newShell) { super.configureShell(newShell); WorkbenchHelp.setHelp(newShell, new Object[] { IJavaHelpContextIds.OPEN_TYPE_DIALOG }); } /** * Returns whether the opened type is shown in the type hierarchy as well. */ public boolean showInTypeHierarchy() { return fShowInTypeHierarchy; } private IDialogSettings getDialogSetting() { IDialogSettings mainStore= JavaPlugin.getDefault().getDialogSettings(); IDialogSettings result= mainStore.getSection(SECTION_NAME); if (result == null) { result= mainStore.addNewSection(SECTION_NAME); result.put(SHOW_IN_TYPE_HIERARCHY, true); } return result;
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog.java
} /* * @see Dialog#createDialogArea(Composite) */ public Control createDialogArea(Composite parent) { Composite contents= (Composite)super.createDialogArea(parent); final Button check= new Button(contents, SWT.CHECK); check.setText(JavaUIMessages.getString("OpenTypeSelectionDialog.checkboxtext")); check.setSelection(fShowInTypeHierarchy); check.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { fShowInTypeHierarchy= check.getSelection(); } }); return contents; } /* * @see Window#close() */ public boolean close() { if (getReturnCode() != CANCEL) getDialogSetting().put(SHOW_IN_TYPE_HIERARCHY, fShowInTypeHierarchy); return super.close(); } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.dialogs; import java.util.ArrayList; import java.util.Comparator; import java.util.Iterator; import java.util.List; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.util.Assert; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.util.AllTypesSearchEngine; import org.eclipse.jdt.internal.ui.util.StringMatcher; import org.eclipse.jdt.internal.ui.util.TypeInfo; import org.eclipse.jdt.internal.ui.util.TypeInfoLabelProvider; /** * A dialog to select a type from a list of types. */ public class TypeSelectionDialog extends TwoPaneElementSelector {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
private static class TypeFilterMatcher implements FilteredList.FilterMatcher { private StringMatcher fMatcher; private StringMatcher fQualifierMatcher; /* * @see FilteredList.FilterMatcher#setFilter(String, boolean) */ public void setFilter(String pattern, boolean ignoreCase, boolean igoreWildCards) { int qualifierIndex= pattern.lastIndexOf(".");
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
if (qualifierIndex == -1) { fQualifierMatcher= null; fMatcher= new StringMatcher(pattern + '*', ignoreCase, igoreWildCards); } else { fQualifierMatcher= new StringMatcher(pattern.substring(0, qualifierIndex), ignoreCase, igoreWildCards); fMatcher= new StringMatcher(pattern.substring(qualifierIndex + 1), ignoreCase, igoreWildCards); } } /* * @see FilteredList.FilterMatcher#match(Object) */ public boolean match(Object element) { if (!(element instanceof TypeInfo)) return false; TypeInfo type= (TypeInfo) element; if (!fMatcher.match(type.getTypeName())) return false; if (fQualifierMatcher == null) return true; return fQualifierMatcher.match(type.getTypeContainerName()); } } /* * A string comparator which is aware of obfuscated code * (type names starting with lower case characters). */ private static class StringComparator implements Comparator {
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
public int compare(Object left, Object right) { String leftString= (String) left; String rightString= (String) right; if (Character.isLowerCase(leftString.charAt(0)) && !Character.isLowerCase(rightString.charAt(0))) return +1; if (Character.isLowerCase(rightString.charAt(0)) && !Character.isLowerCase(leftString.charAt(0))) return -1; return leftString.compareToIgnoreCase(rightString); } } private IRunnableContext fRunnableContext; private IJavaSearchScope fScope; private int fStyle; /** * Constructs a type selection dialog. * @param parent the parent shell. * @param context the runnable context. * @param scope the java search scope.
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
* @param style the widget style. */ public TypeSelectionDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, int style) { super(parent, new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_ONLY), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_CONTAINER_ONLY + TypeInfoLabelProvider.SHOW_ROOT_POSTFIX)); Assert.isNotNull(context); Assert.isNotNull(scope); fRunnableContext= context; fScope= scope; fStyle= style; setUpperListLabel(JavaUIMessages.getString("TypeSelectionDialog.upperLabel")); setLowerListLabel(JavaUIMessages.getString("TypeSelectionDialog.lowerLabel")); } public void create() { if (getFilter() == null) setFilter("A"); super.create(); } /* * @see AbstractElementListSelectionDialog#createFilteredList(Composite) */ protected FilteredList createFilteredList(Composite parent) { FilteredList list= super.createFilteredList(parent); fFilteredList.setFilterMatcher(new TypeFilterMatcher()); fFilteredList.setComparator(new StringComparator());
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
return list; } /** * @see Window#open() */ public int open() { AllTypesSearchEngine engine= new AllTypesSearchEngine(JavaPlugin.getWorkspace()); List typeList= engine.searchTypes(fRunnableContext, fScope, fStyle); List filteredList= new ArrayList(typeList.size()); for (Iterator iterator = typeList.iterator(); iterator.hasNext();) { TypeInfo info = (TypeInfo) iterator.next(); if (info.getTypeName().length() != 0) filteredList.add(info); } if (filteredList.isEmpty()) { String title= JavaUIMessages.getString("TypeSelectionDialog.notypes.title"); String message= JavaUIMessages.getString("TypeSelectionDialog.notypes.message"); MessageDialog.openInformation(getShell(), title, message); return CANCEL; } TypeInfo[] typeRefs= (TypeInfo[])filteredList.toArray(new TypeInfo[filteredList.size()]); setElements(typeRefs); return super.open(); }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
/** * @see SelectionStatusDialog#computeResult() */ protected void computeResult() { TypeInfo ref= (TypeInfo) getLowerSelectedElement(); if (ref == null) return; try { IType type= ref.resolveType(fScope); if (type == null) { String title= JavaUIMessages.getString("TypeSelectionDialog.errorTitle"); String message= JavaUIMessages.getString("TypeSelectionDialog.errorMessage"); MessageDialog.openError(getShell(), title, message); setResult(null); } else { List result= new ArrayList(1); result.add(type); setResult(result); } } catch (JavaModelException e) { String title= JavaUIMessages.getString("TypeSelectionDialog.errorTitle"); String message= JavaUIMessages.getString("TypeSelectionDialog.errorMessage"); MessageDialog.openError(getShell(), title, message); setResult(null); } } }
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/FocusOnTypeAction.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.typehierarchy; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.ui.IJavaElementSearchConstants; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog; /** * Refocuses the type hierarchy on a type selection from a all types dialog. */ public class FocusOnTypeAction extends Action { private TypeHierarchyViewPart fViewPart; private ISelectionProvider fSelectionProvider;
5,755
Bug 5755 Open Type dialog is missing types
I can't find any of the classes in some of my packages in the Open Type(Ctrl- Shift-T) dialog. They just aren't there... Class files exist for them. 20011106
resolved fixed
115d4c2
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-02-07T16:52:36Z
2001-11-09T21:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/FocusOnTypeAction.java
public FocusOnTypeAction(TypeHierarchyViewPart part) { super(TypeHierarchyMessages.getString("FocusOnTypeAction.label")); setDescription(TypeHierarchyMessages.getString("FocusOnTypeAction.description")); setToolTipText(TypeHierarchyMessages.getString("FocusOnTypeAction.tooltip")); fViewPart= part; WorkbenchHelp.setHelp(this, new Object[] { IJavaHelpContextIds.FOCUS_ON_TYPE_ACTION }); } /* * @see Action#run */ public void run() { Shell parent= fViewPart.getSite().getShell(); TypeSelectionDialog dialog= new TypeSelectionDialog(parent, new ProgressMonitorDialog(parent), SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_TYPES); dialog.setTitle(TypeHierarchyMessages.getString("FocusOnTypeAction.dialog.title")); dialog.setMessage(TypeHierarchyMessages.getString("FocusOnTypeAction.dialog.message")); if (dialog.open() != IDialogConstants.OK_ID) { return; } Object[] types= dialog.getResult(); if (types != null && types.length > 0) { IType type= (IType)types[0]; fViewPart.setInputElement(type); } } }