Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 190216 Details for
Bug 338751
Cannot find tag library descriptor if the tag file is in another mapped folder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch (HEAD)
338751.patch (text/plain), 6.69 KB, created by
Nitin Dahyabhai
on 2011-03-02 17:54:37 EST
(
hide
)
Description:
proposed patch (HEAD)
Filename:
MIME Type:
Creator:
Nitin Dahyabhai
Created:
2011-03-02 17:54:37 EST
Size:
6.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.jsp.core >Index: src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java,v >retrieving revision 1.6 >diff -u -r1.6 FacetModuleCoreSupportDelegate.java >--- src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java 3 May 2010 22:52:52 -0000 1.6 >+++ src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java 2 Mar 2011 22:54:09 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2007, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse License v1.0 > * which accompanies this distribution, and is available at >@@ -10,8 +10,10 @@ > *******************************************************************************/ > package org.eclipse.jst.jsp.core.internal.util; > >+import org.eclipse.core.resources.IContainer; > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IProject; >+import org.eclipse.core.resources.IResource; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPath; >@@ -21,6 +23,7 @@ > import org.eclipse.wst.common.componentcore.ModuleCoreNature; > import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; > import org.eclipse.wst.common.componentcore.resources.IVirtualFile; >+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; > import org.eclipse.wst.common.componentcore.resources.IVirtualResource; > import org.eclipse.wst.common.project.facet.core.IFacetedProject; > import org.eclipse.wst.common.project.facet.core.IProjectFacet; >@@ -156,25 +159,40 @@ > return null; > > if (basePath.segmentCount() > 1) { >- IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath); >- IVirtualResource[] virtualResources = ComponentCore.createResources(baseFile); >- for (int i = 0; i < virtualResources.length; i++) { >- IPath baseRuntimePath = virtualResources[i].getRuntimePath(); >- IPath referenceRuntimePath = null; >- if (reference.startsWith(SLASH)) { >- referenceRuntimePath = new Path(reference); >- } >- else { >- referenceRuntimePath = baseRuntimePath.removeLastSegments(1).append(reference); >- } >- IVirtualFile virtualFile = ComponentCore.createFile(project, referenceRuntimePath); >- if (virtualFile != null && virtualFile.exists()) { >- IFile[] underlyingFiles = virtualFile.getUnderlyingFiles(); >- for (int j = 0; j < underlyingFiles.length; j++) { >- if (underlyingFiles[j].getProject().equals(project) && underlyingFiles[j].exists()) { >- return underlyingFiles[j].getFullPath(); >- } >+ IResource baseResource = ResourcesPlugin.getWorkspace().getRoot().findMember(basePath); >+ if (baseResource != null) { >+ IVirtualResource[] virtualResources = ComponentCore.createResources(baseResource); >+ for (int i = 0; i < virtualResources.length; i++) { >+ IPath referenceRuntimePath = null; >+ if (reference.startsWith(SLASH)) { >+ referenceRuntimePath = new Path(reference); >+ } >+ else { >+ IPath baseRuntimePath = virtualResources[i].getRuntimePath(); >+ referenceRuntimePath = baseRuntimePath.removeLastSegments(1).append(reference); >+ } >+ >+ IVirtualFile virtualFile = ComponentCore.createFile(project, referenceRuntimePath); >+ if (virtualFile != null && virtualFile.exists()) { >+ IFile[] underlyingFiles = virtualFile.getUnderlyingFiles(); >+ for (int j = 0; j < underlyingFiles.length; j++) { >+ if (underlyingFiles[j].getProject().equals(project) && underlyingFiles[j].isAccessible()) { >+ return underlyingFiles[j].getFullPath(); >+ } > >+ } >+ } >+ else { >+ // http://bugs.eclipse.org/338751 >+ IVirtualFolder virtualFolder = ComponentCore.createFolder(project, referenceRuntimePath); >+ if (virtualFolder != null && virtualFolder.exists()) { >+ IContainer[] underlyingFolders = virtualFolder.getUnderlyingFolders(); >+ for (int j = 0; j < underlyingFolders.length; j++) { >+ if (underlyingFolders[j].getProject().equals(project) && underlyingFolders[j].isAccessible()) { >+ return underlyingFolders[j].getFullPath(); >+ } >+ } >+ } > } > } > } >Index: src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java,v >retrieving revision 1.59 >diff -u -r1.59 ProjectDescription.java >--- src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java 13 Jan 2011 05:28:23 -0000 1.59 >+++ src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java 2 Mar 2011 22:54:09 -0000 >@@ -663,6 +663,9 @@ > > private String fSaveStateFilename; > >+ /** >+ * String->ITaglibRecord >+ */ > Hashtable fTagDirReferences; > > Hashtable fTLDReferences; >@@ -1737,23 +1740,30 @@ > float jspVersion = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(basePath)); > > /** >- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=196177 Support >- * resolution in flexible projects >+ * http://bugs.eclipse.org/196177 - Support resolution in flexible >+ * projects > */ > IPath resourcePath = FacetModuleCoreSupport.resolve(new Path(basePath), reference); > if (resourcePath.segmentCount() > 1) { >- if (resourcePath.toString().toLowerCase(Locale.US).endsWith(".tld")) { //$NON-NLS-1$ >+ String fileExtension = resourcePath.getFileExtension(); >+ if (fileExtension != null && fileExtension.toLowerCase(Locale.US).equals("tld")) { //$NON-NLS-1$ > IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath); > if (file.isAccessible()) { > path = resourcePath.toString(); > } > } >- else if (resourcePath.toString().toLowerCase(Locale.US).endsWith(".jar")) { //$NON-NLS-1$ >+ else if (fileExtension != null && fileExtension.toLowerCase(Locale.US).equals("jar")) { //$NON-NLS-1$ > IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath); > if (file.isAccessible()) { > path = resourcePath.toString(); > } > } >+ else { >+ IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(resourcePath); >+ if (folder.isAccessible()) { >+ path = resourcePath.toString(); >+ } >+ } > } > > LOCK.acquire();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 338751
: 190216 |
190657