Skip to content

Commit

Permalink
Check if a Framework installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ishimoto committed Aug 3, 2012
1 parent 7c3ba8a commit fa3babc
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,27 @@ public void didFinishInitialization() {
public String toString() {
return ERXStringUtilities.lastPropertyKeyInKeyPath(getClass().getName());
}

/**
* <span class="ja">
* 指定フレームワークがインストールされているかどうかを確認します。
*
* @return ある場合には true が戻ります。
* </span>
*/
public static boolean hasFrameworkInstalled(String frameworkName) {
if(ERXStringUtilities.stringIsNullOrEmpty(frameworkName)) {
return false;
}

for (ERXFrameworkPrincipal frameworkPrincipal : ERXFrameworkPrincipal.launchingFrameworks) {
String s = frameworkPrincipal.toString();
if(frameworkName.equalsIgnoreCase(s)) {
return true;
}
}

return false;
}

}

0 comments on commit fa3babc

Please sign in to comment.