List of usage examples for org.eclipse.jdt.core JavaCore VERSION_1_3
String VERSION_1_3
To view the source code for org.eclipse.jdt.core JavaCore VERSION_1_3.
Click Source Link
From source file:com.google.gdt.eclipse.appengine.rpc.util.JavaUtils.java
License:Open Source License
public static IStatus validateJavaTypeName(String name) { return JavaConventions.validateJavaTypeName(name, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3); }
From source file:com.siteview.mde.internal.core.builders.BuildErrorReporter.java
License:Open Source License
private String findMatchingEE(String srcCompatibility, String clsCompatibility, boolean ee) { String executionEnv = null;// w ww . j av a 2 s . c o m String complaince = null; if (JavaCore.VERSION_1_1.equals(srcCompatibility) && JavaCore.VERSION_1_1.equals(clsCompatibility)) { executionEnv = JRE_1_1; complaince = JavaCore.VERSION_1_1; } else if (JavaCore.VERSION_1_2.equals(srcCompatibility) && JavaCore.VERSION_1_1.equals(clsCompatibility)) { executionEnv = J2SE_1_2; complaince = JavaCore.VERSION_1_2; } else if (JavaCore.VERSION_1_3.equals(srcCompatibility) && JavaCore.VERSION_1_1.equals(clsCompatibility)) { executionEnv = J2SE_1_3; complaince = JavaCore.VERSION_1_3; } else if (JavaCore.VERSION_1_3.equals(srcCompatibility) && JavaCore.VERSION_1_2.equals(clsCompatibility)) { executionEnv = J2SE_1_4; complaince = JavaCore.VERSION_1_4; } else if (JavaCore.VERSION_1_5.equals(srcCompatibility) && JavaCore.VERSION_1_5.equals(clsCompatibility)) { executionEnv = J2SE_1_5; complaince = JavaCore.VERSION_1_5; } else if (JavaCore.VERSION_1_6.equals(srcCompatibility) && JavaCore.VERSION_1_6.equals(clsCompatibility)) { executionEnv = JavaSE_1_6; complaince = JavaCore.VERSION_1_6; } else if (JavaCore.VERSION_1_7.equals(srcCompatibility) && JavaCore.VERSION_1_7.equals(clsCompatibility)) { executionEnv = JavaSE_1_7; complaince = JavaCore.VERSION_1_7; } if (ee) { return executionEnv; } return complaince; }
From source file:com.siteview.mde.internal.core.ClasspathComputer.java
License:Open Source License
/** * Sets compiler compliance options on the given project to match the default compliance settings * for the specified execution environment. Only sets options that do not already have an explicit * setting based on the given override flag. * <p>//from w w w. j a v a2 s .com * If the specified execution environment is <code>null</code> and override is <code>true</code>, * all compliance options are removed from the options map before applying to the project. * </p> * @param project project to set compiler compliance options for * @param eeId execution environment identifier, or <code>null</code> * @param overrideExisting whether to override a setting if already present */ public static void setComplianceOptions(IJavaProject project, String eeId, boolean overrideExisting) { Map projectMap = project.getOptions(false); IExecutionEnvironment ee = null; Map options = null; if (eeId != null) { ee = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(eeId); if (ee != null) { options = ee.getComplianceOptions(); } } if (options == null) { if (overrideExisting && projectMap.size() > 0) { projectMap.remove(JavaCore.COMPILER_COMPLIANCE); projectMap.remove(JavaCore.COMPILER_SOURCE); projectMap.remove(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM); projectMap.remove(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER); projectMap.remove(JavaCore.COMPILER_PB_ENUM_IDENTIFIER); } else { return; } } else { String compliance = (String) options.get(JavaCore.COMPILER_COMPLIANCE); Iterator iterator = options.entrySet().iterator(); while (iterator.hasNext()) { Entry entry = (Entry) iterator.next(); String option = (String) entry.getKey(); String value = (String) entry.getValue(); if (JavaCore.VERSION_1_3.equals(compliance) || JavaCore.VERSION_1_4.equals(compliance)) { if (JavaCore.COMPILER_PB_ASSERT_IDENTIFIER.equals(option) || JavaCore.COMPILER_PB_ENUM_IDENTIFIER.equals(option)) { // for 1.3 & 1.4 projects, only override the existing setting if the default setting // is a greater severity than the existing setting setMinimumCompliance(projectMap, option, value, overrideExisting); } else { setCompliance(projectMap, option, value, overrideExisting); } } else { setCompliance(projectMap, option, value, overrideExisting); } } } project.setOptions(projectMap); }
From source file:com.siteview.mde.internal.core.util.PDEJavaHelper.java
License:Open Source License
/** * Precedence order from high to low: (1) Project specific option; * (2) General preference option; (3) Default option; (4) Java 1.3 * @param project/* w w w .j a v a 2 s . c o m*/ * @param optionName */ public static String getJavaLevel(IProject project, String optionName) { // Returns the corresponding java project // No need to check for null, will return null IJavaProject javaProject = JavaCore.create(project); String value = null; // Preferred to use the project if ((javaProject != null) && javaProject.exists()) { // Get the project specific option if one exists. Rolls up to the // general preference option if no project specific option exists. value = javaProject.getOption(optionName, true); if (value != null) { return value; } } // Get the general preference option value = new MDEPreferencesManager(JavaCore.PLUGIN_ID).getString(optionName); if (value != null) { return value; } // Get the default option value = JavaCore.getOption(optionName); if (value != null) { return value; } // Return the default return JavaCore.VERSION_1_3; }
From source file:de.loskutov.bco.ui.JdtUtils.java
License:Open Source License
/** * Modified copy from JavaModelUtil./*from w w w.j ava 2 s . c om*/ * @param javaElt * @return true, if corresponding java project has compiler setting to generate * bytecode for jdk 1.5 and above */ public static boolean is50OrHigher(IJavaElement javaElt) { IJavaProject project = javaElt.getJavaProject(); String option = project.getOption(JavaCore.COMPILER_COMPLIANCE, true); boolean result = JavaCore.VERSION_1_5.equals(option); if (result) { return result; } // probably > 1.5? result = JavaCore.VERSION_1_4.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_3.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_2.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_1.equals(option); if (result) { return false; } // unknown = > 1.5 return true; }
From source file:de.tobject.findbugs.reporter.JdtUtils.java
License:Open Source License
/** * @param javaElt/*from ww w . j av a 2s.c om*/ * @return true, if corresponding java project has compiler setting to * generate bytecode for jdk 1.5 and above */ private static boolean is50OrHigher(IJavaElement javaElt) { IJavaProject project = javaElt.getJavaProject(); String option = project.getOption(JavaCore.COMPILER_COMPLIANCE, true); boolean result = JavaCore.VERSION_1_5.equals(option); if (result) { return result; } // probably > 1.5? result = JavaCore.VERSION_1_4.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_3.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_2.equals(option); if (result) { return false; } result = JavaCore.VERSION_1_1.equals(option); if (result) { return false; } // unknown = > 1.5 return true; }
From source file:es.bsc.servicess.ide.Checker.java
License:Apache License
/**Check the correct name of a package * @param packageName Name of the package to be evaluated * @return Status.OK if name is correct and Status.ERROR if the name is not correct *//*w w w . ja v a 2 s. c o m*/ public static IStatus validatePackageName(String packageName) { return JavaConventions.validatePackageName(packageName, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3); }
From source file:es.bsc.servicess.ide.Checker.java
License:Apache License
/** Check if class name is correct * @param className Name of the class to be evaluated * @return Status.OK if name is correct and Status.ERROR if the name is not correct *///from w w w .j a v a2s. c o m public static IStatus validateClassName(String className) { return JavaConventions.validateJavaTypeName(className, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3); }
From source file:es.bsc.servicess.ide.Checker.java
License:Apache License
/** Check if method name is correct * @param methodName Name of the method to be evaluated * @return Status.OK if name is correct and Status.ERROR if the name is not correct *///from ww w. j a va2 s . c o m public static IStatus validateMethodName(String methodName) { return JavaConventions.validateMethodName(methodName, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3); }
From source file:es.bsc.servicess.ide.wizards.ServiceSsCommonWizardPage.java
License:Apache License
private static IStatus validateJavaTypeName(String text, IJavaProject project) { if (project == null || !project.exists()) { return JavaConventions.validateJavaTypeName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3); }/*from w w w. j av a 2s. com*/ return JavaConventionsUtil.validateJavaTypeName(text, project); }