Community
Participate
Working Groups
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; } }
I cannot reproduce the problem. An error message appear in status bar: "IFolder cannot be resolved or is not a type".
Same behavior as comment 1 in build 20040120. Closed.