Bug 38183 - No completion failure message when should be
Summary: No completion failure message when should be
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-28 05:54 EDT by Philipe Mulet CLA
Modified: 2004-01-29 06:50 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2003-05-28 05:54:26 EDT
Build 20030520

On following code sample, completion at 30:27 (behind 'libraryFolder.' produces 
no completion which is ok since some types weren't resolved before, however no 
error message is surfaced in status bar:

/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 
*******************************************************************************/
package org.eclipse.jdt.internal.core.util;

import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;

public class LibraryFolderContainer implements IClasspathContainer {

	private static final IClasspathEntry[] NO_CLASSPATH_ENTRIES = new 
IClasspathEntry[0];
	private IClasspathEntry[] entries;
	private IPath libraryPath;

	public LibraryFolderContainer(IPath libraryPath) {
		
		this.libraryPath = libraryPath;
	}
	
	/**
	 * Compute the set of entries for this container: all archive members 
of the given library folder
	 */
	private void computeEntries() {
		this.entries = NO_CLASSPATH_ENTRIES;
		IPath libraryFolderPath = containerPath.removeFirstSegments(1);
		IWorkspaceRoot wksRoot = ResourcesPlugin.getWorkspace().getRoot
();
		Object target = JavaModel.getTarget(wksRoot, libraryFolderPath, 
true);
		if (target instanceof IFolder) {
			IFolder libraryFolder = (IFolder) target;
			libraryFolder.
			//if (target instanceof IFolder) {
				
			//}
		}		
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.core.IClasspathContainer#getClasspathEntries()
	 */
	public IClasspathEntry[] getClasspathEntries() {
		
		if (this.entries == null) {
			computeEntries();
		}
		return this.entries;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.core.IClasspathContainer#getDescription()
	 */
	public String getDescription() {

		return null; // TODO: provide description
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jdt.core.IClasspathContainer#getKind()
	 */
	public int getKind() {

		return K_APPLICATION;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jdt.core.IClasspathContainer#getPath()
	 */
	public IPath getPath() {

		return this.libraryPath;
	}
}
Comment 1 David Audel CLA 2003-05-28 08:33:16 EDT
I cannot reproduce the problem. An error message appear in status bar: "IFolder 
cannot be resolved or is not a type".
Comment 2 David Audel CLA 2004-01-22 12:16:40 EST
Same behavior as comment 1 in build 20040120.

Closed.