src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java
changeset 55263 830ca7b43b95
parent 53227 f15d443f9731
child 58109 ee07de0d2c16
child 58713 ad69fd32778e
equal deleted inserted replaced
55262:7d83cf1cfa74 55263:830ca7b43b95
   165      * @return true, if given feature is a preview feature.
   165      * @return true, if given feature is a preview feature.
   166      */
   166      */
   167     public boolean isPreview(Feature feature) {
   167     public boolean isPreview(Feature feature) {
   168         if (feature == Feature.SWITCH_EXPRESSION ||
   168         if (feature == Feature.SWITCH_EXPRESSION ||
   169             feature == Feature.SWITCH_MULTIPLE_CASE_LABELS ||
   169             feature == Feature.SWITCH_MULTIPLE_CASE_LABELS ||
   170             feature == Feature.SWITCH_RULE)
   170             feature == Feature.SWITCH_RULE ||
       
   171             feature == Feature.TEXT_BLOCKS)
   171             return true;
   172             return true;
   172         //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing).
   173         //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing).
   173         //When real preview features will be added, this method can be implemented to return 'true'
   174         //When real preview features will be added, this method can be implemented to return 'true'
   174         //for those selected features, and 'false' for all the others.
   175         //for those selected features, and 'false' for all the others.
   175         return forcePreview;
   176         return forcePreview;