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 22987 Details for
Bug 99654
[5.0] JavaModel returns both IClassFile and ICompilationUnit for package-info.java
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Changed validateClassFileName to accept package-info.class
patch99654_org.eclipse.jdt.core.txt (text/plain), 2.55 KB, created by
Jerome Lanneluc
on 2005-06-13 18:01:13 EDT
(
hide
)
Description:
Changed validateClassFileName to accept package-info.class
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-06-13 18:01:13 EDT
Size:
2.55 KB
patch
obsolete
>Index: model/org/eclipse/jdt/core/JavaConventions.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java,v >retrieving revision 1.107 >diff -u -r1.107 JavaConventions.java >--- model/org/eclipse/jdt/core/JavaConventions.java 1 Jun 2005 18:56:14 -0000 1.107 >+++ model/org/eclipse/jdt/core/JavaConventions.java 13 Jun 2005 22:00:19 -0000 >@@ -19,12 +19,11 @@ > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.jdt.core.compiler.*; >-import org.eclipse.jdt.core.compiler.InvalidInputException; >+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; > import org.eclipse.jdt.internal.compiler.parser.Scanner; > import org.eclipse.jdt.internal.compiler.parser.TerminalTokens; > import org.eclipse.jdt.internal.compiler.util.SuffixConstants; > import org.eclipse.jdt.internal.core.*; >-import org.eclipse.jdt.internal.core.JavaModelStatus; > import org.eclipse.jdt.internal.core.util.Messages; > > /** >@@ -37,6 +36,7 @@ > public final class JavaConventions { > > private final static char DOT= '.'; >+ private static final String PACKAGE_INFO = new String(TypeConstants.PACKAGE_INFO_NAME); > private final static Scanner SCANNER = new Scanner(); > > private JavaConventions() { >@@ -140,7 +140,7 @@ > // JSR-175 metadata strongly recommends "package-info.java" as the > // file in which to store package annotations and > // the package-level spec (replaces package.html) >- if (!identifier.equals("package-info")) { //$NON-NLS-1$ >+ if (!identifier.equals(PACKAGE_INFO)) { > IStatus status = validateIdentifier(identifier); > if (!status.isOK()) { > return status; >@@ -183,11 +183,16 @@ > return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Messages.convention_classFile_notClassFileName, null); > } > identifier = name.substring(0, index); >- IStatus status = validateIdentifier(identifier); >- if (!status.isOK()) { >- return status; >+ // JSR-175 metadata strongly recommends "package-info.java" as the >+ // file in which to store package annotations and >+ // the package-level spec (replaces package.html) >+ if (!identifier.equals(PACKAGE_INFO)) { >+ IStatus status = validateIdentifier(identifier); >+ if (!status.isOK()) { >+ return status; >+ } > } >- status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE); >+ IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE); > if (!status.isOK()) { > return status; > }
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 99654
: 22987