#188705 - Smarty framework can be recognized from project.properties property
authorMartin Fousek <marfous@netbeans.org>
Tue, 20 Jul 2010 10:08:55 +0200
changeset 16357f64ee62fe532
parent 16356 dd2226d3b419
child 16359 bb5507a7c799
#188705 - Smarty framework can be recognized from project.properties property
php.smarty/manifest.mf
php.smarty/src/org/netbeans/modules/php/smarty/SmartyPhpFrameworkProvider.java
     1.1 --- a/php.smarty/manifest.mf	Mon Jul 19 10:59:43 2010 +0200
     1.2 +++ b/php.smarty/manifest.mf	Tue Jul 20 10:08:55 2010 +0200
     1.3 @@ -2,5 +2,5 @@
     1.4  OpenIDE-Module: org.netbeans.modules.php.smarty
     1.5  OpenIDE-Module-Layer: org/netbeans/modules/php/smarty/resources/layer.xml
     1.6  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/php/smarty/resources/Bundle.properties
     1.7 -OpenIDE-Module-Specification-Version: 1.35
     1.8 +OpenIDE-Module-Specification-Version: 1.36
     1.9  
     2.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/SmartyPhpFrameworkProvider.java	Mon Jul 19 10:59:43 2010 +0200
     2.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/SmartyPhpFrameworkProvider.java	Tue Jul 20 10:08:55 2010 +0200
     2.3 @@ -62,6 +62,7 @@
     2.4   * @author Martin Fousek
     2.5   */
     2.6  public final class SmartyPhpFrameworkProvider extends PhpFrameworkProvider {
     2.7 +    public static final String SMARTY_AVAILABLE = "smarty-framework"; // NOI18N
     2.8      private static final String ICON_PATH = "org/netbeans/modules/php/smarty/resources/smarty-badge-8.png"; // NOI18N
     2.9      private static final SmartyPhpFrameworkProvider INSTANCE = new SmartyPhpFrameworkProvider();
    2.10  
    2.11 @@ -137,6 +138,10 @@
    2.12          // get php files within the module
    2.13          final FoundSmarty fs = new FoundSmarty();
    2.14  
    2.15 +        if (phpModule.getPreferences(SmartyPhpFrameworkProvider.class, true).get(SMARTY_AVAILABLE, "0").equals("1")) {
    2.16 +            fs.setFound(true);
    2.17 +        }
    2.18 +
    2.19          if (fs.isFound()) {
    2.20              return true;
    2.21          } else {
    2.22 @@ -227,11 +232,11 @@
    2.23              setFound(false);
    2.24          }
    2.25  
    2.26 -        public synchronized void setFound(boolean isFound) {
    2.27 +        public final synchronized void setFound(boolean isFound) {
    2.28              this.isFound = isFound;
    2.29          }
    2.30  
    2.31 -        public synchronized boolean isFound() {
    2.32 +        public final synchronized boolean isFound() {
    2.33              return this.isFound;
    2.34          }
    2.35      }