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 74747 Details for
Bug 198047
TestingEnvironment.addProject should support 1.6 compliance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch
bug198047.txt (text/plain), 2.50 KB, created by
Walter Harley
on 2007-07-26 19:41:16 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2007-07-26 19:41:16 EDT
Size:
2.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.builder >Index: src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java,v >retrieving revision 1.53 >diff -u -r1.53 TestingEnvironment.java >--- src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java 6 Mar 2007 04:43:25 -0000 1.53 >+++ src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java 26 Jul 2007 23:41:06 -0000 >@@ -178,14 +178,31 @@ > public IPath addProject(String projectName, String compliance){ > checkAssertion("a workspace must be open", fIsOpen); //$NON-NLS-1$ > IProject project = createProject(projectName); >+ int requiredComplianceFlag = 0; >+ String compilerVersion = null; > if ("1.5".equals(compliance)) { >- if ((AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_5) == 0) >- throw new RuntimeException("This test should run on top of a 1.5 JRE"); >+ requiredComplianceFlag = AbstractCompilerTest.F_1_5; >+ compilerVersion = CompilerOptions.VERSION_1_5; >+ } >+ else if ("1.6".equals(compliance)) { >+ requiredComplianceFlag = AbstractCompilerTest.F_1_6; >+ compilerVersion = CompilerOptions.VERSION_1_6; >+ } >+ else if ("1.7".equals(compliance)) { >+ requiredComplianceFlag = AbstractCompilerTest.F_1_7; >+ compilerVersion = CompilerOptions.VERSION_1_7; >+ } >+ else if (!"1.4".equals(compliance) && !"1.3".equals(compliance)) { >+ throw new UnsupportedOperationException("Test framework doesn't support compliance level: " + compliance); >+ } >+ if (requiredComplianceFlag != 0) { >+ if ((AbstractCompilerTest.getPossibleComplianceLevels() & requiredComplianceFlag) == 0) >+ throw new RuntimeException("This test requires a " + compliance + " JRE"); > IJavaProject javaProject = JavaCore.create(project); > Map options = new HashMap(); >- options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >- options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >- options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ options.put(CompilerOptions.OPTION_Compliance, compilerVersion); >+ options.put(CompilerOptions.OPTION_Source, compilerVersion); >+ options.put(CompilerOptions.OPTION_TargetPlatform, compilerVersion); > javaProject.setOptions(options); > } > return project.getFullPath();
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 198047
: 74747