/** * Returns <code>true</code> if imports should be added. The return value depends on the context * and preferences only and does not take into account the contents of the compilation unit or * the kind of proposal. Even if <code>true</code> is returned, there may be cases where no * imports are added for the proposal. For example: * <ul> * <li>when completing within the import section</li> * <li>when completing informal javadoc references (e.g. within <code><code></code> * tags)</li> * <li>when completing a type that conflicts with an existing import</li> * <li>when completing an implicitly imported type (same package, <code>java.lang</code> * types)</li> * </ul> * <p> * The decision whether a qualified type or the simple type name should be inserted must take * into account these different scenarios. * </p> * * @return <code>true</code> if imports may be added, <code>false</code> if not */ private boolean shouldAddImports() { if (isInJavadoc() && !isJavadocProcessingEnabled()) return false; IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore(); return preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_ADDIMPORT); }
/** * Returns <code>true</code> if imports should be added. The return value depends on the context * and preferences only and does not take into account the contents of the compilation unit or * the kind of proposal. Even if <code>true</code> is returned, there may be cases where no * imports are added for the proposal. For example: * <ul> * <li>when completing within the import section</li> * <li>when completing informal javadoc references (e.g. within <code><code></code> * tags)</li> * <li>when completing a type that conflicts with an existing import</li> * <li>when completing an implicitly imported type (same package, <code>java.lang</code> * types)</li> * </ul> * <p> * The decision whether a qualified type or the simple type name should be inserted must take * into account these different scenarios. * </p> * * @return <code>true</code> if imports may be added, <code>false</code> if not */ private boolean shouldAddImports() { if (isInJavadoc() && !isJavadocProcessingEnabled()) return false; IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore(); return preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_ADDIMPORT); }
/** * Returns <code>true</code> if imports should be added. The return value depends on the context * and preferences only and does not take into account the contents of the compilation unit or * the kind of proposal. Even if <code>true</code> is returned, there may be cases where no * imports are added for the proposal. For example: * <ul> * <li>when completing within the import section</li> * <li>when completing informal javadoc references (e.g. within <code><code></code> * tags)</li> * <li>when completing a type that conflicts with an existing import</li> * <li>when completing an implicitly imported type (same package, <code>java.lang</code> * types)</li> * </ul> * <p> * The decision whether a qualified type or the simple type name should be inserted must take * into account these different scenarios. * </p> * * @return <code>true</code> if imports may be added, <code>false</code> if not */ private boolean shouldAddImports() { if (isInJavadoc() && !isJavadocProcessingEnabled()) return false; IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore(); return preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_ADDIMPORT); }