text:
package jp.riken.kscope.menu;

import java.awt.event.ActionListener;
import java.util.EventListener;
import java.util.List;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import javax.swing.tree.DefaultMutableTreeNode;

import jp.riken.kscope.Message;
import jp.riken.kscope.action.ActionBase;
import jp.riken.kscope.action.AllAnalysisMemoryAction;
import jp.riken.kscope.action.AnalysisMemoryAction;
import jp.riken.kscope.action.AnalysisOperandAction;
import jp.riken.kscope.action.AnalysisReferenceAction;
import jp.riken.kscope.action.AnalysisScopeAction;
import jp.riken.kscope.action.AnalysisTraceAction;
import jp.riken.kscope.action.AnalysisVariableAction;
import jp.riken.kscope.action.EditClipboardCopyAction;
import jp.riken.kscope.action.EditInformationEditAction;
import jp.riken.kscope.action.ErrorOpenFileAction;
import jp.riken.kscope.action.FileExitAction;
import jp.riken.kscope.action.FileExportAnalysisAction;
import jp.riken.kscope.action.FileExportExploreAction;
import jp.riken.kscope.action.FileExportSourceFileAction;
import jp.riken.kscope.action.FileOpenSourceFileAction;
import jp.riken.kscope.action.FileProjectCloseAction;
import jp.riken.kscope.action.FileProjectNewAction;
import jp.riken.kscope.action.FileProjectOpenAction;
import jp.riken.kscope.action.FileProjectSaveAction;
import jp.riken.kscope.action.HelpVersionAction;
import jp.riken.kscope.action.ProfilerAddEprofAction;
import jp.riken.kscope.action.ProfilerClearAction;
import jp.riken.kscope.action.ProfilerOpenFileAction;
import jp.riken.kscope.action.ProfilerSaveFileAction;
import jp.riken.kscope.action.ProfilerSaveFolderAction;
import jp.riken.kscope.action.ProfilerViewRulerAction;
import jp.riken.kscope.action.ProjectAddFileAction;
import jp.riken.kscope.action.ProjectAddFolderAction;
import jp.riken.kscope.action.ProjectBuildAction;
import jp.riken.kscope.action.ProjectClearLanguageAction;
import jp.riken.kscope.action.ProjectDeleteFileAction;
import jp.riken.kscope.action.ProjectPropertyAction;
import jp.riken.kscope.action.ProjectRebuildAction;
import jp.riken.kscope.action.ProjectSettingKeywordAction;
import jp.riken.kscope.action.ProjectSettingRequiredBFAction;
import jp.riken.kscope.action.ProjectSettingOperationAction;
import jp.riken.kscope.action.ProjectSettingProfilerAction;
import jp.riken.kscope.action.ProjectSettingProjectAction;
import jp.riken.kscope.action.ProjectSettingToolsAction;
import jp.riken.kscope.action.ProjectSettingViewAction;
import jp.riken.kscope.action.SearchFindAction;
import jp.riken.kscope.action.SearchGrepAction;
import jp.riken.kscope.action.SearchResultAction;
import jp.riken.kscope.action.SearchTreeAction;
import jp.riken.kscope.action.ThreadCancelAction;
import jp.riken.kscope.action.TreeCollapseAllAction;
import jp.riken.kscope.action.TreeExpandAllAction;
import jp.riken.kscope.action.TreeExpandSelectAction;
import jp.riken.kscope.action.ViewCloseAction;
import jp.riken.kscope.action.ViewLangugeFilterAction;
import jp.riken.kscope.action.ViewOpenAnalysisLineAction;
import jp.riken.kscope.action.ViewOpenExploreBlockAction;
import jp.riken.kscope.action.ViewOpenLanguageTreeAction;
import jp.riken.kscope.action.ProfilerViewBargraphAction;
import jp.riken.kscope.action.WindowProfilerLegendAction;
import jp.riken.kscope.action.WindowProgressAction;
import jp.riken.kscope.action.WindowSourceAction;
import jp.riken.kscope.action.WindowViewAction;
import jp.riken.kscope.common.ANALYSIS_PANEL;
import jp.riken.kscope.common.EXPLORE_PANEL;
import jp.riken.kscope.common.FILTER_TYPE;
import jp.riken.kscope.common.FRAME_VIEW;
import jp.riken.kscope.common.TRACE_DIR;
import jp.riken.kscope.data.SourceFile;
import jp.riken.kscope.language.IBlock;
import jp.riken.kscope.language.Procedure;
import jp.riken.kscope.model.LanguageTreeModel;
import jp.riken.kscope.model.TraceResultModel;
import jp.riken.kscope.properties.ProfilerProperties;
import jp.riken.kscope.service.AppController;

/**
 * メインメニューバークラス
 * @author RIKEN
 *
 */
public class MainMenu extends JMenuBar implements  MenuListener {

    /** シリアル番号 */
    private static final long serialVersionUID = 1L;
    /** プロジェクトメニュー */
    private JMenu menuProject;
    /** プロジェクト:XMLファイル削除 */
    private JMenuItem menuProjectDeleteXmlFile;
    /** 構造解析キャンセルメニュー */
    private JMenuItem menuProjectCancel;
    /** ウィンドウメニュー */
    private JMenu menuWindow;
    /** ウィンドウ:進捗状況 */
    private JMenuItem menuWindowProgress;
    /** ウィンドウ:エクスプローラビュー */
    private JMenu menuWindowExplore;
    /** ウィンドウ:ソースビュー */
    private JMenu menuWindowSource;
    /** アプリケーションコントローラ */
    private AppController controller;
    /** ウィンドウ:エクスプローラビュー:構造 */
    private JMenuItem menuWindowExploreLanguage;
    /** ウィンドウ:分析ビュー:トレース */
    private JMenuItem menuWindowAnalysisTrace;
    /** ウィンドウ:分析ビュー */
    private JMenu menuWindowAnalysis;
    /** 表示 */
    private JMenu menuView;
    /** 表示:構造フィルタ */
    private JMenu menuViewFilter;
    /** プロファイラバーグラフ表示 */
    private JCheckBoxMenuItem menuProfilerBarVisibled;
    /** プロファイラコストルーラ表示 */
    private JCheckBoxMenuItem menuProfilerRulerVisibled;
    /** 付加情報編集アクション */
    private EditInformationEditAction actionEditInformation;
    /** 分析情報エクスポートアクション */
    private FileExportAnalysisAction actionExportAnalysis;
    /** エラー箇所を開くアクション */
    private ErrorOpenFileAction actionErrorOpenFile;
    /** 分析結果該当個所を開くアクション */
    private ViewOpenAnalysisLineAction actionOpenAnalysisLine;
    /** 分析:変数特性一覧アクション */
    private AnalysisVariableAction actionAnalysisVariable;
    /** 分析:演算カウントアクション */
    private AnalysisOperandAction actionAnalysisOperand;
    /** すべて収納アクション */
    private TreeCollapseAllAction actionTreeCollapseAll;
    /** 新規構造ツリーアクション */
    private ViewOpenLanguageTreeAction actionOpenLanguageTree;

    /**
     * コンストラクタ
     */
    public MainMenu() {
        // メニューの作成を行う。
        initialize();
    }

    /**
     * コンストラクタ
     * @param controller		アプリケーションコントローラ
     */
    public MainMenu(AppController controller) {
        this.controller = controller;
        // メニューの作成を行う。
        initialize();
    }

    /**
     * メニューの作成を行う。
     */
    private void initialize() {

        // ファイル
        JMenu menuFile = new JMenu(Message.getString("mainmenu.file")); //ファイル
        this.add(menuFile);
        menuFile.addMenuListener(this);

        // ファイル:プロジェクトの新規作成
        JMenuItem menuFileProjectNew = new JMenuItem(Message.getString("mainmenu.file.newproject")); //プロジェクトの新規作成
        menuFileProjectNew.addActionListener(new FileProjectNewAction(this.controller));

        menuFile.add(menuFileProjectNew);
        // ファイル:プロジェクトを開く
        JMenuItem menuFileProjectOpen = new JMenuItem(Message.getString("mainmenu.file.openproject")); //プロジェクトを開く
        menuFile.add(menuFileProjectOpen);
        menuFileProjectOpen.addActionListener(new FileProjectOpenAction(this.controller));

        // ファイル:プロジェクトを閉じる
        JMenuItem menuFileProjectClose = new JMenuItem(Message.getString("mainmenu.file.closeproject")); //プロジェクトを閉じる
        menuFile.add(menuFileProjectClose);
        menuFileProjectClose.addActionListener(new FileProjectCloseAction(this.controller));

        // ファイル:プロジェクトの保存
        JMenuItem menuFileProjectSave = new JMenuItem(Message.getString("mainmenu.file.saveproject")); //プロジェクトの保存
        menuFile.add(menuFileProjectSave);
        menuFileProjectSave.addActionListener(new FileProjectSaveAction(this.controller));

        // セパレータ
        menuFile.addSeparator();

        // ファイル:エクスポート
        JMenu menuFileExport = new JMenu(Message.getString("mainmenu.file.export")); //エクスポート
        menuFile.add(menuFileExport);

        // ファイル:エクスポート:構造情報(TEXT)
        JMenuItem menuFileExportLanguage = new JMenuItem(Message.getString("mainmenu.file.export.structure")); //構造情報(TEXT)
        menuFileExport.add(menuFileExportLanguage);
        menuFileExportLanguage.addActionListener(new FileExportExploreAction(this.controller));

        // ファイル:エクスポート:分析情報
        JMenuItem menuFileExportAnalysis = new JMenuItem(Message.getString("mainmenu.file.export.analysis")); //分析情報
        menuFileExport.add(menuFileExportAnalysis);
        actionExportAnalysis = new FileExportAnalysisAction(this.controller);
        menuFileExportAnalysis.addActionListener(actionExportAnalysis);

        // ファイル:エクスポート:ソースファイル
        JMenuItem menuFileExportSourceFile = new JMenuItem(Message.getString("mainmenu.file.export.source")); //ソースファイル
        menuFileExport.add(menuFileExportSourceFile);
        menuFileExportSourceFile.addActionListener(new FileExportSourceFileAction(controller));

        menuFile.add(menuFileExport);

        // ファイル:外部ツールでソースファイルを開く
        JMenuItem menuFileOpenSourceFile = new JMenuItem(Message.getString("mainmenu.file.program")); //外部ツールで開く
        menuFile.add(menuFileOpenSourceFile);
        menuFileOpenSourceFile.addActionListener(new FileOpenSourceFileAction(this.controller, FRAME_VIEW.EXPLORE_VIEW));

        // セパレータ
        menuFile.addSeparator();

        // ファイル:終了
        JMenuItem menuFileExit = new JMenuItem(Message.getString("mainmenu.file.close")); //終了
        menuFile.add(menuFileExit);
        menuFileExit.addActionListener(new FileExitAction(this.controller));

        // 編集
        JMenu menuEdit = new JMenu(Message.getString("mainmenu.edit")); //編集
        this.add(menuEdit);
        menuEdit.addMenuListener(this);
        // 編集:切り取り
        JMenuItem menuEditCut = new JMenuItem(Message.getString("mainmenu.edit.cut")); //切り取り
        menuEdit.add(menuEditCut);
        // 編集:切り取り機能は未使用の為DisEnableにする。
        menuEditCut.setEnabled(false);

        // 編集:コピー
        JMenuItem menuEditCopy = new JMenuItem(Message.getString("mainmenu.edit.copy")); //コピー
        menuEdit.add(menuEditCopy);
        menuEditCopy.addActionListener(new EditClipboardCopyAction(this.controller, FRAME_VIEW.SOURCE_VIEW));
        // 編集:貼り付け
        JMenuItem menuEditPaste = new JMenuItem(Message.getString("mainmenu.edit.paste")); //貼り付け
        menuEdit.add(menuEditPaste);
        // 編集:貼り付け機能は未使用の為DisEnableにする。
        menuEditPaste.setEnabled(false);

        // セパレータ
        menuEdit.addSeparator();

        // 編集:付加情報編集
        JMenuItem menuEditInformationEdit = new JMenuItem(Message.getString("mainmenu.edit.info")); //付加情報編集
        menuEdit.add(menuEditInformationEdit);
        actionEditInformation = new EditInformationEditAction(this.controller, FRAME_VIEW.EXPLORE_VIEW);
        menuEditInformationEdit.addActionListener(actionEditInformation);

        // 検索
        JMenu menuSearch = new JMenu(Message.getString("mainmenu.search")); //検索
        this.add(menuSearch);
        menuSearch.addMenuListener(this);
        // 検索:ソース検索
        JMenuItem menuSearchFind = new JMenuItem(Message.getString("mainmenu.search.source")); //ソース検索
        menuSearch.add(menuSearchFind);
        menuSearchFind.addActionListener(new SearchFindAction(this.controller));
        // 検索:ファイル検索...
        JMenuItem menuSearchGrep = new JMenuItem(Message.getString("mainmenu.search.file")); //ファイル検索
        menuSearch.add(menuSearchGrep);
        menuSearchGrep.addActionListener(new SearchGrepAction(this.controller));
        // 検索:ツリー検索...
        JMenuItem menuSearchTree = new JMenuItem(Message.getString("mainmenu.search.tree")); //ツリー検索
        menuSearch.add(menuSearchTree);
        menuSearchTree.addActionListener(new SearchTreeAction(this.controller));
        // セパレータ
        menuSearch.addSeparator();
        // 検索:前を検索
        JMenuItem menuSearchUp = new JMenuItem(Message.getString("mainmenu.search.backward")); //前を検索
        menuSearch.add(menuSearchUp);
        menuSearchUp.addActionListener(new SearchResultAction(this.controller, TRACE_DIR.UP));
        // 検索:次を検索
        JMenuItem menuSearchBackward = new JMenuItem(Message.getString("mainmenu.search.forward")); //次を検索
        menuSearch.add(menuSearchBackward);
        menuSearchBackward.addActionListener(new SearchResultAction(this.controller, TRACE_DIR.DOWN));
        // 検索:リフレッシュ
        JMenuItem menuSearchRefresh = new JMenuItem(Message.getString("mainmenu.search.refresh"));//検索結果更新
        menuSearch.add(menuSearchRefresh);
        menuSearchRefresh.addActionListener(new SearchResultAction(this.controller, TRACE_DIR.REFRESH));
        // 検索:検索結果クリア
        JMenuItem menuSearchClear = new JMenuItem(Message.getString("mainmenu.search.clear"));//検索結果クリア
        menuSearch.add(menuSearchClear);
        menuSearchClear.addActionListener(new SearchResultAction(this.controller, TRACE_DIR.END));

        // プロジェクト
        this.menuProject = new JMenu(Message.getString("mainmenu.project"));//プロジェクト
        this.add(menuProject);
        menuProject.addMenuListener(this);

        // プロジェクト:構造解析実行
        JMenuItem menuProjectBuild = new JMenuItem(Message.getString("mainmenu.project.startanalysis"));//構造解析実行
        menuProject.add(menuProjectBuild);
        menuProjectBuild.addActionListener(new ProjectBuildAction((this.controller)));

        // プロジェクト:構造解析キャンセル
        menuProjectCancel = new JMenuItem(Message.getString("mainmenu.project.endanalysis"));//構造解析キャンセル
        menuProject.add(menuProjectCancel);
        menuProjectCancel.addActionListener(new ThreadCancelAction((this.controller)));

        // プロジェクト:構造解析クリア
        JMenuItem menuProjectClear = new JMenuItem(Message.getString("mainmenu.project.clearanalysis"));//構造解析クリア
        menuProject.add(menuProjectClear);
        menuProjectClear.addActionListener(new ProjectClearLanguageAction((this.controller)));

        // プロジェクト:構造解析再実行
        JMenuItem menuProjectRebuild = new JMenuItem(Message.getString("mainmenu.project.restertanalysis"));//構造解析再実行
        menuProject.add(menuProjectRebuild);
        menuProjectRebuild.addActionListener(new ProjectRebuildAction((this.controller)));

        // セパレータ
        menuProject.addSeparator();
        // プロジェクト:フォルダ追加...
        JMenuItem menuProjectAddXmlFolder = new JMenuItem(Message.getString("mainmenu.project.addxmlfolder"));//フォルダ追加...
        menuProject.add(menuProjectAddXmlFolder);
        menuProjectAddXmlFolder.addActionListener(new ProjectAddFolderAction(this.controller, null));
        // プロジェクト:ファイル追加...
        JMenuItem menuProjectAddXmlFile = new JMenuItem(Message.getString("mainmenu.project.addxmlfile"));//ファイル追加...
        menuProject.add(menuProjectAddXmlFile);
        menuProjectAddXmlFile.addActionListener(new ProjectAddFileAction(this.controller, null));
        // プロジェクト:ファイル削除...
        this.menuProjectDeleteXmlFile = new JMenuItem(Message.getString("mainmenu.project.removexmlfile"));//ファイル削除...
        menuProject.add(menuProjectDeleteXmlFile);
        menuProjectDeleteXmlFile.addActionListener(new ProjectDeleteFileAction(this.controller, null));
        // セパレータ
        menuProject.addSeparator();

        // プロジェクト:プロパティ
        JMenuItem menuProjectProperty = new JMenuItem(Message.getString("mainmenu.project.property"));//プロパティ
        menuProject.add(menuProjectProperty);
        menuProjectProperty.addActionListener(new ProjectPropertyAction(this.controller));

        // プロジェクト:設定
        JMenu menuProjectSetting = new JMenu(Message.getString("mainmenu.project.config"));//設定
        menuProject.add(menuProjectSetting);

        // プロジェクト:設定:プロジェクト
        JMenuItem menuProjectSettingProject = new JMenuItem(Message.getString("mainmenu.project.config.project")); // プロジェクト
        menuProjectSetting.add(menuProjectSettingProject);
        menuProjectSettingProject.addActionListener(new ProjectSettingProjectAction(this.controller));

        // プロジェクト:設定:キーワード
        JMenuItem menuProjectSettingKeyword = new JMenuItem(Message.getString("mainmenu.project.config.keyword"));//キーワード
        menuProjectSetting.add(menuProjectSettingKeyword);
        menuProjectSettingKeyword.addActionListener(new ProjectSettingKeywordAction(this.controller));

        // プロジェクト:設定:ソースビュー
        JMenuItem menuProjectSettingView = new JMenuItem(Message.getString("mainmenu.project.config.display"));//ソースビュー
        menuProjectSetting.add(menuProjectSettingView);
        menuProjectSettingView.addActionListener(new ProjectSettingViewAction(this.controller));

        // プロジェクト:設定:演算カウント
        JMenuItem menuProjectSettingOperation = new JMenuItem(Message.getString("mainmenu.project.config.operation"));//演算カウント
        menuProjectSetting.add(menuProjectSettingOperation);
        menuProjectSettingOperation.addActionListener(new ProjectSettingOperationAction(this.controller));

        // プロジェクト:設定:外部ツール
        JMenuItem menuProjectSettingTools = new JMenuItem(Message.getString("mainmenu.project.config.program"));//外部ツール
        menuProjectSetting.add(menuProjectSettingTools);
        menuProjectSettingTools.addActionListener(new ProjectSettingToolsAction(this.controller));

        // プロジェクト:設定:プロファイラ設定
        JMenuItem menuProjectSettingProfiler = new JMenuItem(Message.getString("mainmenu.project.config.profiler"));//プロファイラ
        menuProjectSetting.add(menuProjectSettingProfiler);
        menuProjectSettingProfiler.addActionListener(new ProjectSettingProfilerAction(this.controller));

        // プロジェクト:設定:要求Bye/FLOP設定
        JMenuItem menuProjectSettingRequiredBF = new JMenuItem(Message.getString("mainmenu.project.config.requiredbf"));//要求Bye/FLOP
        menuProjectSetting.add(menuProjectSettingRequiredBF);
        menuProjectSettingRequiredBF.addActionListener(new ProjectSettingRequiredBFAction(this.controller));

        // 分析
        JMenu menuAnalysis = new JMenu(Message.getString("mainmenu.analysis"));//分析
        this.add(menuAnalysis);
        menuAnalysis.addMenuListener(this);

        // 分析:変数特性一覧
        JMenuItem menuAnalysisVariable = new JMenuItem(Message.getString("mainmenu.analysis.valiableproperty"));//変数特性一覧
        menuAnalysis.add(menuAnalysisVariable);
        actionAnalysisVariable = new AnalysisVariableAction(this.controller);
        menuAnalysisVariable.addActionListener(actionAnalysisVariable);
        this.controller.setActionVariable(actionAnalysisVariable);

        // 分析:演算カウント
        JMenuItem menuAnalysisCount = new JMenuItem(Message.getString("mainmenu.analysis.operation"));//演算カウント
        actionAnalysisOperand = new AnalysisOperandAction(this.controller, FRAME_VIEW.EXPLORE_VIEW);
        menuAnalysis.add(menuAnalysisCount);
        menuAnalysisCount.addActionListener(actionAnalysisOperand);

        // 分析:変数有効域
        JMenuItem menuAnalysisValid = new JMenuItem(Message.getString("mainmenu.analysis.valiablescope"));//変数有効域
        menuAnalysis.add(menuAnalysisValid);
        menuAnalysisValid.addActionListener(new AnalysisScopeAction(this.controller, FRAME_VIEW.EXPLORE_VIEW));

        // セパレータ
        menuAnalysis.addSeparator();

        // 分析:宣言・定義・参照
        JMenuItem menuAnalysisReference = new JMenuItem(Message.getString("mainmenu.analysis.dec-def-ref"));//宣言・定義・参照
        menuAnalysis.add(menuAnalysisReference);
        menuAnalysisReference.addActionListener(new AnalysisReferenceAction(this.controller, FRAME_VIEW.EXPLORE_VIEW));

        // セパレータ
        menuAnalysis.addSeparator();
        // 分析:トレース:開始
        JMenuItem menuAnalysisTraceStart = new JMenuItem(Message.getString("mainmenu.analysis.starttrace"));//トレース:開始
        menuAnalysis.add(menuAnalysisTraceStart);
        menuAnalysisTraceStart.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.START));

        // 分析:トレース:更新
        JMenuItem menuAnalysisTraceRefresh = new JMenuItem(Message.getString("mainmenu.analysis.updatetrace"));//トレース:更新
        menuAnalysis.add(menuAnalysisTraceRefresh);
        menuAnalysisTraceRefresh.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.REFRESH));

        // 分析:トレース:クリア
        JMenuItem menuAnalysisTraceClear = new JMenuItem(Message.getString("mainmenu.analysis.cleartrace"));//トレース:クリア
        menuAnalysis.add(menuAnalysisTraceClear);
        menuAnalysisTraceClear.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.END));

        // セパレータ
        menuAnalysis.addSeparator();

        // 分析:トレース:前へ
        JMenuItem menuAnalysisUp = new JMenuItem(Message.getString("mainmenu.analysis.up"));//トレース:アップ
        menuAnalysis.add(menuAnalysisUp);
        menuAnalysisUp.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.UP));

        // 分析:トレース:次へ
        JMenuItem menuAnalysisDown = new JMenuItem(Message.getString("mainmenu.analysis.down"));//トレース:ダウン
        menuAnalysis.add(menuAnalysisDown);
        menuAnalysisDown.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.DOWN));

        // 分析:トレース:イン
        JMenuItem menuAnalysisInside = new JMenuItem(Message.getString("mainmenu.analysis.in"));//トレース:イン
        menuAnalysis.add(menuAnalysisInside);
        menuAnalysisInside.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.IN));

        // 分析:トレース:アウト
        JMenuItem menuAnalysisOutside = new JMenuItem(Message.getString("mainmenu.analysis.out"));//トレース:アウト
        menuAnalysis.add(menuAnalysisOutside);
        menuAnalysisOutside.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.OUT));

        // 分析:トレース:フォワード
        JMenuItem menuAnalysisForward = new JMenuItem(Message.getString("mainmenu.analysis.forward"));//トレース:フォワード
        menuAnalysis.add(menuAnalysisForward);
        menuAnalysisForward.addActionListener(new AnalysisTraceAction(this.controller, TRACE_DIR.FORWARD));

        // セパレータ
        menuAnalysis.addSeparator();

        // 分析:アクセス先設定
        JMenuItem menuAnalysisMemoryAccess = new JMenuItem(Message.getString("mainmenu.analysis.access"));  // 変数アクセス先設定
        menuAnalysis.add(menuAnalysisMemoryAccess);
        menuAnalysisMemoryAccess.addActionListener(
        				new AnalysisMemoryAction(
        							this.controller,
        							AnalysisMemoryAction.ACTION_MODE.ACCESS_SETTING,
        							FRAME_VIEW.EXPLORE_VIEW));

        // 分析:要求Byte/FLOP算出
        JMenuItem menuAnalysisMemoryCalculate = new JMenuItem(Message.getString("mainmenu.analysis.calculate"));  // 要求Byte/FLOP算出
        menuAnalysis.add(menuAnalysisMemoryCalculate);
        menuAnalysisMemoryCalculate.addActionListener(
						new AnalysisMemoryAction(
									this.controller,
									AnalysisMemoryAction.ACTION_MODE.MEMORY_CALCULATE,
									FRAME_VIEW.EXPLORE_VIEW));

        //分析:要求Byte/FLOP算出  (2014/4/8追加 ohichi)
        JMenuItem menuAllAMC = new JMenuItem(Message.getString("mainmenu.analysis.allcalculate"));
        menuAnalysis.add(menuAllAMC);
        menuAllAMC.addActionListener(new AllAnalysisMemoryAction((this.controller)));

        // プロファイラ
        JMenu menuProfiler = new JMenu(Message.getString("mainmenu.project.profiler"));
        this.add(menuProfiler);
        menuProfiler.addMenuListener(this);

        // プロファイラ:プロファイラの読込
        JMenuItem menuProfilerOpen = new JMenuItem(Message.getString("mainmenu.profiler.read"));
        menuProfiler.add(menuProfilerOpen);
        menuProfilerOpen.addActionListener(new ProfilerOpenFileAction(this.controller));

        // プロファイラ:プロファイラのクリア
        JMenuItem menuProfilerClear = new JMenuItem(Message.getString("mainmenu.profiler.clear"));
        menuProfiler.add(menuProfilerClear);
        menuProfilerClear.addActionListener(new ProfilerClearAction(this.controller));

        // プロファイラ:コスト表示
        this.menuProfilerBarVisibled = new JCheckBoxMenuItem(Message.getString("mainmenu.profiler.cost"));
        menuProfiler.add(menuProfilerBarVisibled);
        menuProfilerBarVisibled.addActionListener(new ProfilerViewBargraphAction(this.controller));

        // プロファイラ:コストルーラ表示
        this.menuProfilerRulerVisibled = new JCheckBoxMenuItem(Message.getString("mainmenu.profiler.costruler"));
        menuProfiler.add(menuProfilerRulerVisibled);
        menuProfilerRulerVisibled.addActionListener(new ProfilerViewRulerAction(this.controller));

        // セパレータ
        menuProfiler.addSeparator();

        // プロファイラ:測定区間設定
        JMenuItem menuProfilerAddEprofArea = new JMenuItem(Message.getString("mainmenu.profiler.set-mesuermentrange"));
        menuProfiler.add(menuProfilerAddEprofArea);
        menuProfilerAddEprofArea.addActionListener(new ProfilerAddEprofAction(this.controller, FRAME_VIEW.EXPLORE_VIEW));
        // プロファイラ:測定区間上書き保存
        JMenuItem menuProfilerSavefile = new JMenuItem(Message.getString("mainmenu.profiler.save-mesuermentrange"));
        menuProfiler.add(menuProfilerSavefile);
        menuProfilerSavefile.addActionListener(new ProfilerSaveFileAction(this.controller));
        // プロファイラ:測定区間フォルダ保存
        JMenuItem menuProfilerSavefolder = new JMenuItem(Message.getString("mainmenu.profiler.savefolder-mesuermentrange"));
        menuProfiler.add(menuProfilerSavefolder);
        menuProfilerSavefolder.addActionListener(new ProfilerSaveFolderAction(this.controller));

        // 表示
        menuView = new JMenu(Message.getString("mainmenu.view"));//表示
        this.add(menuView);
        menuView.addMenuListener(this);

        // 表示:ツリー収納・展開
        JMenu menuViewTreeNode = new JMenu(Message.getString("mainmenu.view.collapse-expand"));//ツリー収納・展開
        menuView.add(menuViewTreeNode);
        // 表示:ツリー収納・展開:すべて収納
        JMenuItem menuViewTreeNodeAllCollapse = new JMenuItem(Message.getString("mainmenu.view.collapse-expand.collapse-all"));//すべて収納
        menuViewTreeNode.add(menuViewTreeNodeAllCollapse);
        this.actionTreeCollapseAll = new TreeCollapseAllAction(this.controller);
        menuViewTreeNodeAllCollapse.addActionListener(this.actionTreeCollapseAll);

        // 表示:ツリー収納・展開:すべて収納
        JMenuItem menuViewTreeNodeAllExpand = new JMenuItem(Message.getString("mainmenu.view.collapse-expand.expand-all"));//すべて展開
        menuViewTreeNode.add(menuViewTreeNodeAllExpand);
        menuViewTreeNodeAllExpand.addActionListener(new TreeExpandAllAction(this.controller));
        // 表示:ツリー収納・展開:展開
        JMenuItem menuViewTreeNodeExpand = new JMenuItem(Message.getString("mainmenu.view.collapse-expand.selective"));//選択展開
        menuViewTreeNode.add(menuViewTreeNodeExpand);
        menuViewTreeNodeExpand.addActionListener(new TreeExpandSelectAction(this.controller));

        // 表示:新規構造ツリー
        JMenuItem menuViewOpenTree = new JMenuItem(Message.getString("mainmenu.view.newtree"));//新規構造ツリー
        menuView.add(menuViewOpenTree);
        this.actionOpenLanguageTree = new ViewOpenLanguageTreeAction(this.controller);
        menuViewOpenTree.addActionListener(this.actionOpenLanguageTree);

        // 表示:ファイルを開く
        JMenuItem menuViewOpenFile = new JMenuItem(Message.getString("mainmenu.view.openfile"));//ファイルを開く
        menuView.add(menuViewOpenFile);
        menuViewOpenFile.addActionListener(new ViewOpenExploreBlockAction(this.controller));
        // 表示:閉じる
        JMenuItem menuViewClose = new JMenuItem(Message.getString("mainmenu.view.closefile"));//ファイルを閉じる
        menuView.add(menuViewClose);
        menuViewClose.addActionListener(new ViewCloseAction(this.controller));
        // 表示:すべて閉じる
        JMenuItem menuViewAllClose = new JMenuItem(Message.getString("mainmenu.view.close-all-file"));//すべて閉じる
        menuView.add(menuViewAllClose);
        menuViewAllClose.addActionListener(new ViewCloseAction(this.controller, true));

        // セパレータ
        menuView.addSeparator();
        // 表示:構造フィルタ
        menuViewFilter = new JMenu(Message.getString("mainmenu.view.filter"));//構造フィルタ
        menuView.add(menuViewFilter);
        // 表示:構造フィルタ:すべて表示
        JCheckBoxMenuItem menuViewFilterAll = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.viewall"));//すべて表示
        menuViewFilter.add(menuViewFilterAll);
        menuViewFilterAll.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.ALL));
        // 表示:構造フィルタ:サブルーチン・関数
        JCheckBoxMenuItem menuViewFilterSubroutine = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.subroutine-function"));//サブルーチン・関数
        menuViewFilter.add(menuViewFilterSubroutine);
        menuViewFilterSubroutine.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.PROCEDURE));
        // 表示:構造フィルタ:CALL文・関数呼出文
        JCheckBoxMenuItem menuViewFilterCall = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.call"));//CALL文・関数呼出文
        menuViewFilter.add(menuViewFilterCall);
        menuViewFilterCall.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.PROCEDUREUSAGE));
        // 表示:構造フィルタ:DO文
        JCheckBoxMenuItem menuViewFilterDo = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.do"));//DO文
        menuViewFilter.add(menuViewFilterDo);
        menuViewFilterDo.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.REPETITION));
        // 表示:構造フィルタ:IF文
        JCheckBoxMenuItem menuViewFilterIf = new JCheckBoxMenuItem(FILTER_TYPE.SELECTION_IF.getName());
        menuViewFilter.add(menuViewFilterIf);
        menuViewFilterIf.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.SELECTION_IF));
        // 表示:構造フィルタ:SELECT文
        JCheckBoxMenuItem menuViewFilterSelect = new JCheckBoxMenuItem(FILTER_TYPE.SELECTION_SELECT.getName());
        menuViewFilter.add(menuViewFilterSelect);
        menuViewFilterSelect.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.SELECTION_SELECT));
        // 表示:構造フィルタ:代入文
        JCheckBoxMenuItem menuViewFilterAssignment = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.expression-array"));//代入文
        menuViewFilter.add(menuViewFilterAssignment);
        menuViewFilterAssignment.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.SUBSTITUTION));
        // 表示:構造フィルタ:フロー制御文
        JCheckBoxMenuItem menuViewFilterFlow = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.other-flow-control"));//フロー制御文
        menuViewFilter.add(menuViewFilterFlow);
        menuViewFilterFlow.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.FLOW));
        // 表示:構造フィルタ:ディレクティブ文
        JMenu menuViewFilterDirective = new JMenu(Message.getString("mainmenu.view.filter.directive"));//ディレクティブ文
        JCheckBoxMenuItem menuViewFilterDirectiveOmp = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.openmp"));//OPENMP
        JCheckBoxMenuItem menuViewFilterDirectiveOcl = new JCheckBoxMenuItem(Message.getString("mainmenu.view.filter.ocl"));//OCL
        menuViewFilterDirective.add(menuViewFilterDirectiveOmp);
        menuViewFilterDirective.add(menuViewFilterDirectiveOcl);
        menuViewFilter.add(menuViewFilterDirective);
        menuViewFilterDirectiveOmp.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.DIRECTIVE_OPENML));
        menuViewFilterDirectiveOcl.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.DIRECTIVE_OCL));

        // セパレータ
        menuViewFilter.addSeparator();

        // 表示:構造フィルタ:デフォルト
        JMenuItem menuViewFilterDefault = new JMenuItem(Message.getString("mainmenu.view.filter.default"));//デフォルトに戻す
        menuViewFilter.add(menuViewFilterDefault);
        menuViewFilterDefault.addActionListener(new ViewLangugeFilterAction(this.controller, FILTER_TYPE.DEFAULT));

        // ウィンドウ
        menuWindow = new JMenu(Message.getString("mainmenu.window"));//ウィンドウ
        this.add(menuWindow);
        menuWindow.addMenuListener(this);

        // ウィンドウ:エクスプローラビュー
        menuWindowExplore = new JMenu(Message.getString("mainmenu.window.explore"));//エクスプローラビュー
        menuWindow.add(menuWindowExplore);
        // ウィンドウ:エクスプローラビュー:構造
        menuWindowExploreLanguage = new JMenuItem(Message.getString("mainmenu.window.explore.structure"));//構造
        menuWindowExplore.add(menuWindowExploreLanguage);
        menuWindowExploreLanguage.addActionListener(new WindowViewAction(this.controller, EXPLORE_PANEL.LANGUAGE));

        // ウィンドウ:エクスプローラビュー:モジュール
        JMenuItem menuWindowExploreModule = new JMenuItem(Message.getString("mainmenu.window.explore.module"));//モジュール
        menuWindowExplore.add(menuWindowExploreModule);
        menuWindowExploreModule.addActionListener(new WindowViewAction(this.controller, EXPLORE_PANEL.MODULE));

        // ウィンドウ:エクスプローラビュー:ソース
        JMenuItem menuWindowExploreSource = new JMenuItem(Message.getString("mainmenu.window.explore.source"));//ソース
        menuWindowExplore.add(menuWindowExploreSource);
        menuWindowExploreSource.addActionListener(new WindowViewAction(this.controller, EXPLORE_PANEL.SOURCE));

        // ウィンドウ:エクスプローラビュー:XML
        JMenuItem menuWindowExploreXml = new JMenuItem(Message.getString("mainmenu.window.explore.xml"));//XML
        menuWindowExplore.add(menuWindowExploreXml);
        menuWindowExploreXml.addActionListener(new WindowViewAction(this.controller, EXPLORE_PANEL.XML));

        // ウィンドウ:ソースビュー
        menuWindowSource = new JMenu(Message.getString("mainmenu.window.source"));//ソースビュー
        menuWindow.add(menuWindowSource);

        // ウィンドウ:ソースビュー:ソースファイル
        // menuSelectedイベントで開いているファイルを追加する。

        // ウィンドウ:分析ビュー
        menuWindowAnalysis = new JMenu(Message.getString("mainmenu.window.analysis"));//分析ビュー
        menuWindow.add(menuWindowAnalysis);
        // ウィンドウ:分析ビュー:付加情報
        JMenuItem menuWindowAnalysisInformation = new JMenuItem(Message.getString("mainmenu.window.analysis.information"));//付加情報
        menuWindowAnalysis.add(menuWindowAnalysisInformation);
        menuWindowAnalysisInformation.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.INFORMATION));

        // ウィンドウ:分析ビュー:検索結果
        JMenuItem menuWindowAnalysisSearch = new JMenuItem(Message.getString("mainmenu.window.analysis.search"));//検索結果
        menuWindowAnalysis.add(menuWindowAnalysisSearch);
        menuWindowAnalysisSearch.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.SEARCHRESULT));

        // ウィンドウ:分析ビュー:変数特性一覧
        JMenuItem menuWindowAnalysisVariable = new JMenuItem(Message.getString("mainmenu.analysis.valiableproperty"));//変数特性一覧
        menuWindowAnalysis.add(menuWindowAnalysisVariable);
        menuWindowAnalysisVariable.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.VALIABLE));

        // ウィンドウ:分析ビュー:演算カウント
        JMenuItem menuWindowAnalysisCount = new JMenuItem(Message.getString("mainmenu.analysis.operation"));//演算カウント
        menuWindowAnalysis.add(menuWindowAnalysisCount);
        menuWindowAnalysisCount.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.OPERAND));

        // ウィンドウ:分析ビュー:要求B/F算出結果
        JMenuItem menuWindowAnalysisRequired = new JMenuItem(Message.getString("mainmenu.window.analysis.byteflop"));//要求B/F算出結果
        menuWindowAnalysis.add(menuWindowAnalysisRequired);
        menuWindowAnalysisRequired.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.REQUIRED));

        // ウィンドウ:分析ビュー:参照一覧
        JMenuItem menuWindowAnalysisReference = new JMenuItem(Message.getString("mainmenu.analysis.dec-def-ref"));//参照一覧
        menuWindowAnalysis.add(menuWindowAnalysisReference);
        menuWindowAnalysisReference.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.REFERENCE));

        // ウィンドウ:分析ビュー:トレース
        menuWindowAnalysisTrace = new JMenuItem(Message.getString("mainmenu.window.analysis.trace"));//トレース
        menuWindowAnalysis.add(menuWindowAnalysisTrace);
        menuWindowAnalysisTrace.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.TRACE));

        // ウィンドウ:分析ビュー:変数有効域
        JMenuItem menuWindowAnalysisScope = new JMenuItem(Message.getString("mainmenu.analysis.valiablescope"));//変数有効域
        menuWindowAnalysis.add(menuWindowAnalysisScope);
        menuWindowAnalysisScope.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.SCOPE));

        // ウィンドウ:分析ビュー:構造情報差替え
        JMenuItem menuWindowReplace = new JMenuItem(Message.getString("mainmenu.window.analysis.structureinfo"));//構造情報差替え
        menuWindowAnalysis.add(menuWindowReplace);
        menuWindowReplace.addActionListener(new WindowViewAction(
                this.controller, ANALYSIS_PANEL.REPLACE));

        // ウィンドウ:分析ビュー:プロパティ
        JMenuItem menuWindowAnalysisProparty = new JMenuItem(Message.getString("mainmenu.project.property"));//分析プロパティ
        menuWindowAnalysis.add(menuWindowAnalysisProparty);
        menuWindowAnalysisProparty.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.PROPARTIES));

        // ウィンドウ:分析ビュー:エラー箇所
        JMenuItem menuWindowAnalysisError = new JMenuItem(Message.getString("mainmenu.window.analysis.error"));//エラー箇所
        menuWindowAnalysis.add(menuWindowAnalysisError);
        menuWindowAnalysisError.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.ERROR));

        // ウィンドウ:分析ビュー:コンソール
        JMenuItem menuWindowAnalysisConsole = new JMenuItem(Message.getString("mainmenu.window.analysis.console"));//コンソール
        menuWindowAnalysis.add(menuWindowAnalysisConsole);
        menuWindowAnalysisConsole.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.CONSOLE));

        // ウィンドウ:分析ビュー:コスト情報
        {
            JMenu menuViewProfilerInfo = new JMenu(Message.getString("mainmenu.window.analysis.profiler-info"));
            menuWindowAnalysis.add(menuViewProfilerInfo);
            // ウィンドウ:分析ビュー:コスト情報:手続
            JMenuItem menuWindowAnalysisCostProcedure = new JMenuItem(ANALYSIS_PANEL.COST_PROCEDURE.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisCostProcedure);
            menuWindowAnalysisCostProcedure.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.COST_PROCEDURE));
            // ウィンドウ:分析ビュー:コスト情報:ループ
            JMenuItem menuWindowAnalysisCostLoop = new JMenuItem(ANALYSIS_PANEL.COST_LOOP.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisCostLoop);
            menuWindowAnalysisCostLoop.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.COST_LOOP));
            // ウィンドウ:分析ビュー:コスト情報:ライン
            JMenuItem menuWindowAnalysisCostLine = new JMenuItem(ANALYSIS_PANEL.COST_LINE.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisCostLine);
            menuWindowAnalysisCostLine.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.COST_LINE));
            // ウィンドウ:分析ビュー:コールグラフ情報
            JMenuItem menuWindowAnalysisCallGraph = new JMenuItem(ANALYSIS_PANEL.CALLGRAPH.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisCallGraph);
            menuWindowAnalysisCallGraph.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.CALLGRAPH));
            // ウィンドウ:分析ビュー:プロファイラ:イベントカウンタ情報:Eprof:CACHE
            JMenuItem menuWindowAnalysisEprofCache = new JMenuItem(ANALYSIS_PANEL.EVENTCOUNTER_CACHE.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofCache);
            menuWindowAnalysisEprofCache.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EVENTCOUNTER_CACHE));
            // ウィンドウ:分析ビュー:プロファイラ:イベントカウンタ情報:Eprof:INSTRUCTIONS
            JMenuItem menuWindowAnalysisEprofInstructions = new JMenuItem(ANALYSIS_PANEL.EVENTCOUNTER_INSTRUCTIONS.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofInstructions);
            menuWindowAnalysisEprofInstructions.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EVENTCOUNTER_INSTRUCTIONS));
            // ウィンドウ:分析ビュー:プロファイラ:イベントカウンタ情報:Eprof:MEM_ACCESS
            JMenuItem menuWindowAnalysisEprofMemaccess = new JMenuItem(ANALYSIS_PANEL.EVENTCOUNTER_MEM_ACCESS.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofMemaccess);
            menuWindowAnalysisEprofMemaccess.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EVENTCOUNTER_MEM_ACCESS));
            // ウィンドウ:分析ビュー:プロファイラ:イベントカウンタ情報:Eprof:PERFORMANCE
            JMenuItem menuWindowAnalysisEprofPerformance = new JMenuItem(ANALYSIS_PANEL.EVENTCOUNTER_PERFORMANCE.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofPerformance);
            menuWindowAnalysisEprofPerformance.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EVENTCOUNTER_PERFORMANCE));
            // ウィンドウ:分析ビュー:プロファイラ:イベントカウンタ情報:Eprof:STATISTICS
            JMenuItem menuWindowAnalysisEprofStatistics = new JMenuItem(ANALYSIS_PANEL.EVENTCOUNTER_STATISTICS.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofStatistics);
            menuWindowAnalysisEprofStatistics.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EVENTCOUNTER_STATISTICS));
            // ウィンドウ:分析ビュー:タイマ情報
            JMenuItem menuWindowAnalysisEprofMeasure = new JMenuItem(ANALYSIS_PANEL.EPROF_MEASURE.getTabName());
            menuViewProfilerInfo.add(menuWindowAnalysisEprofMeasure);
            menuWindowAnalysisEprofMeasure.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.EPROF_MEASURE));
        }

        // ウィンドウ:進捗状況
        menuWindowProgress = new JMenuItem(Message.getString("mainmenu.window.analysis.progress"));//進捗状況
        menuWindow.add(menuWindowProgress);
        menuWindowProgress.addActionListener(new WindowProgressAction(this.controller));

        // ウィンドウ:プロファイラ凡例
        JMenuItem menuWindowSourcePreview = new JMenuItem(Message.getString("mainmenu.window.analysis.profiler-legend"));//プロファイラ凡例
        menuWindow.add(menuWindowSourcePreview);
        menuWindowSourcePreview.addActionListener(new WindowProfilerLegendAction(this.controller));

        // ヘルプ
        JMenu menuHelp = new JMenu(Message.getString("mainmenu.help"));//ヘルプ
        this.add(menuHelp);
        JMenuItem menuHelpVersion = new JMenuItem(Message.getString("mainmenu.help.about"));//バージョン情報...
        menuHelp.add(menuHelpVersion);
        menuHelpVersion.addActionListener(new HelpVersionAction(this.controller));

        // メニュー非表示
        // エラー箇所を開く
        actionErrorOpenFile = new ErrorOpenFileAction(this.controller);
        actionOpenAnalysisLine = new ViewOpenAnalysisLineAction(this.controller);

        // メニュー選択状態の初期化
        this.clearSelectedMenu();
    }

    /**
     * 分析情報エクスポートアクション
     * @return		分析情報エクスポートアクション
     */
    public FileExportAnalysisAction getActionExportAnalysis() {
        return actionExportAnalysis;
    }

    /**
     * メニュー選択アクション<br/>
     * メニュー表示、イネーブルの切替を行う。
     * @param event		イベント情報
     */
    @Override
    public void menuSelected(MenuEvent event) {

        // ウィンドウ:ソースビュー
        if (event.getSource() == this.menuWindow) {
            // 開いているファイルの一覧を取得する
            SourceFile[] list = this.controller.getMainframe().getPanelSourceView().getOpenedSourceFile();
            // ソースビューのイネーブルの切替
            menuWindowSource.setEnabled((list != null));

            // 表示ソースファイルのクリア
            menuWindowSource.removeAll();

            // ソースファイル名の追加
            if (list != null) {
                for (SourceFile file : list) {
                    // ウィンドウ:ソースビュー:ソースファイル
                    JMenuItem menuWindowSourceFile = new JMenuItem(file.getFile().getName());
                    WindowSourceAction action = new WindowSourceAction(this.controller, file);
                    menuWindowSourceFile.addActionListener(action);
                    menuWindowSource.add(menuWindowSourceFile);
                }
            }

            // 構造メニュー
            {
                int pos = getMenuItemPos(menuWindowExplore, menuWindowExploreLanguage);
                if (pos >= 0) {
                    // 開いている構造タブの一覧を取得する
                    LanguageTreeModel[] models = this.controller.getMainframe().getPanelExplorerView().getLanguageModels();
                    // 構造タブのプロシージャ名の追加
                    if (models != null && models.length > 0) {
                        menuWindowExplore.remove(menuWindowExploreLanguage);
                        menuWindowExploreLanguage = new JMenu(Message.getString("mainmenu.window.explore.structure"));//構造
                        menuWindowExplore.insert(menuWindowExploreLanguage, pos);
                        for (LanguageTreeModel model : models) {
                            // ウィンドウ:エクスプローラビュー:構造
                            DefaultMutableTreeNode root = model.getRootNode();
                            String menuname = EXPLORE_PANEL.LANGUAGE.getTabName();
                            if (root != null && root.getChildCount() > 0) {
                                menuname = root.toString();
                                DefaultMutableTreeNode child = (DefaultMutableTreeNode) root.getChildAt(0);
                                Object obj = child.getUserObject();
                                if (obj != null && obj instanceof Procedure) {
                                    menuname = ((Procedure)obj).get_name();
                                }
                            }

                            JMenuItem menuLanguage = new JMenuItem(menuname);
                            WindowViewAction action = new WindowViewAction(this.controller, model);
                            menuLanguage.addActionListener(action);
                            menuWindowExploreLanguage.add(menuLanguage);
                        }
                    }
                    else {
                        menuWindowExplore.remove(menuWindowExploreLanguage);
                        menuWindowExploreLanguage = new JMenuItem(Message.getString("mainmenu.window.explore.structure"));//構造
                        menuWindowExplore.insert(menuWindowExploreLanguage, pos);
                        menuWindowExploreLanguage.addActionListener(new WindowViewAction(this.controller, EXPLORE_PANEL.LANGUAGE));
                    }
                }
            }
            // トレースメニュー
            {
                int pos = getMenuItemPos(menuWindowAnalysis, menuWindowAnalysisTrace);
                if (pos >= 0) {
                    // 開いているトレースタブの一覧を取得する
                    TraceResultModel[] models = this.controller.getMainframe().getPanelAnalysisView().getTraceResultModels();
                    // トレースタブのプロシージャ名の追加
                    if (models != null && models.length > 0) {
                        menuWindowAnalysis.remove(menuWindowAnalysisTrace);
                        menuWindowAnalysisTrace = new JMenu(Message.getString("mainmenu.window.analysis.trace"));//トレース
                        menuWindowAnalysis.insert(menuWindowAnalysisTrace, pos);
                        for (TraceResultModel model : models) {
                            IBlock block = model.getRootBlock();
                            String word = model.getTraceWord();
                            String menuname = ANALYSIS_PANEL.TRACE.getTabName();
                            if (word != null && block != null) {
                                if (block instanceof Procedure) {
                                    menuname = word + " : " + ((Procedure)block).get_name();
                                }
                                else {
                                    menuname = word + " : " + block.toString();
                                }
                            }
                            JMenuItem menuTrace = new JMenuItem(menuname);
                            WindowViewAction action = new WindowViewAction(this.controller, model);
                            menuTrace.addActionListener(action);
                            menuWindowAnalysisTrace.add(menuTrace);
                        }
                    }
                    else {
                        menuWindowAnalysis.remove(menuWindowAnalysisTrace);
                        menuWindowAnalysisTrace = new JMenuItem(ANALYSIS_PANEL.TRACE.getTabName());
                        menuWindowAnalysis.insert(menuWindowAnalysisTrace, pos);
                        menuWindowAnalysisTrace.addActionListener(new WindowViewAction(this.controller, ANALYSIS_PANEL.TRACE));
                    }
                }
            }

        }
        // 表示:構造フィルタ
        if (event.getSource() == this.menuView) {
            // 構造ツリーフィルタ取得
            List<FILTER_TYPE> filters = this.controller.getListLanguageFilter();
            if (filters != null && filters.size() > 0) {
                int count = this.menuViewFilter.getMenuComponentCount();
                for (int i=0; i<count; i++) {
                    Object obj = this.menuViewFilter.getMenuComponent(i);
                    if (!(obj instanceof JCheckBoxMenuItem)) continue;
                    JCheckBoxMenuItem submenu = (JCheckBoxMenuItem)obj;
                    ActionListener[] actions = submenu.getActionListeners();
                    if (actions == null) continue;
                    for (ActionListener action : actions) {
                        if (action instanceof ViewLangugeFilterAction) {
                            FILTER_TYPE filter = ((ViewLangugeFilterAction)action).getFilter();
                            boolean checked = filters.contains(filter);
                            submenu.setSelected(checked);
                        }
                    }
                }
            }
        }

        // アクションが実行可能かチェックする
        JMenu menu = (JMenu) event.getSource();
        validateAction(menu);
    }

    /**
     * アクションが実行可能かチェックする
     * @param menu		チェックメニュー
     */
    private void validateAction(JMenu menu) {

        int count = menu.getMenuComponentCount();
        int disenabled = 0;
        for (int i=0; i<count; i++) {
            Object obj = menu.getMenuComponent(i);
            if (obj instanceof JMenu) {
                validateAction((JMenu)obj);
            }
            if (!(obj instanceof JMenuItem)) continue;
            JMenuItem submenu = (JMenuItem)obj;
            ActionListener[] actions = submenu.getActionListeners();
            if (actions == null) continue;
            for (ActionListener action : actions) {
                if (action instanceof ActionBase) {
                    boolean enabled = ((ActionBase)action).validateAction();
                    submenu.setEnabled(enabled);
                    if (!enabled) {
                        disenabled++;
                    }
                }
            }
        }
        // すべてディスイネーブルであれば、親メニューもディスイネーブルにする
        menu.setEnabled((count != disenabled));

    }

    /**
     * メニュー項目の位置を取得する.<br/>
     * メニュー項目が存在しない場合は、-1を返す.
     * @param menu		親メニュー
     * @param item		メニュー項目
     * @return			メニュー項目位置
     */
    private int getMenuItemPos(JMenu menu, JMenuItem item) {
        int count = menu.getMenuComponentCount();
        if (count <= 0) return -1;
        for (int i=0; i<count; i++) {
            if (menu.getMenuComponent(i) == item) {
                return i;
            }
        }
        return -1;
    }

    /**
     * メニュー選択解除アクション
     * @param event		イベント情報
     */
    @Override
    public void menuDeselected(MenuEvent event) { }

    /**
     * メニューキャンセルアクション
     * @param event		イベント情報
     */
    @Override
    public void menuCanceled(MenuEvent event) { }

    /**
     * エラー箇所を開くアクションを取得する
     * @return		エラー箇所を開くアクション
     */
    public EventListener getActionErrorOpenFile() {
        return this.actionErrorOpenFile;
    }

    /**
     * 分析結果該当個所を開くアクションを取得する
     * @return		分析結果該当個所を開くアクション
     */
    public EventListener getActionOpenAnalysisLine() {
        return this.actionOpenAnalysisLine;
    }

    /**
     * 付加情報編集アクションを取得する
     * @return		付加情報編集アクション
     */
    public EditInformationEditAction getActionEditInformation() {
        return actionEditInformation;
    }

    /**
     * 演算カウントアクションを取得する
     * @return		演算カウントアクション
     */
    public AnalysisOperandAction getActionAnalysisOperand() {
        return this.actionAnalysisOperand;
    }

    /**
     * トレースアクションを取得する
     * @param dir		トレース方向
     * @return			トレースアクション
     */
    public AnalysisTraceAction getActionAnalysisTrace(TRACE_DIR dir) {
        return new AnalysisTraceAction(this.controller, dir);
    }

    /**
     * 新規構造ツリーアクションを取得する
     * @return		新規構造ツリーアクション
     */
    public ViewOpenLanguageTreeAction getActionOpenLanguageTree() {
        return actionOpenLanguageTree;
    }

    /**
     * 検索結果アクションを取得する
     * @param dir		検索結果方向
     * @return			検索結果アクション
     */
    public SearchResultAction getActionSearchResult(TRACE_DIR dir) {
        return new SearchResultAction(this.controller, dir);
    }

    /**
     * メニュー表示(コンボボックス)を初期化する
     */
    public void clearSelectedMenu() {
        // プロファイラ:コスト表示
    	if (menuProfilerBarVisibled != null) {
	        boolean visibleBar = ProfilerProperties.INITIALIZE_VISIBLE_BARGRAPH;
	        menuProfilerBarVisibled.setSelected(visibleBar);
    	}
        // プロファイラ:コストルーラ表示
    	if (menuProfilerRulerVisibled != null) {
	        boolean visibleRuler = ProfilerProperties.INITIALIZE_VISIBLE_RULER;
	        menuProfilerRulerVisibled.setSelected(visibleRuler);
    	}
    }
}


text:
/**
 * JacobGen generated file --- do not edit
 *
 * (http://www.sourceforge.net/projects/jacob-project */
package com.pew.itunes;

import com.jacob.com.*;

public enum ITPlaylistKind {
	ITPlaylistKindUnknown,
	ITPlaylistKindLibrary,
	ITPlaylistKindUser,
	ITPlaylistKindCD,
	ITPlaylistKindDevice,
	ITPlaylistKindRadioTuner;
}

redpajama_set_name: RedPajamaGithub


text:
package main

import (
	"encoding/json"
	"errors"
	"os"
)

type Configuration struct {
	Searches                     []Search
	DatabaseFilepath             string
	SMTPUser                     SMTPUser
	MailFrom                     string
	MailTo                       string
	TimeBetweenRequestsInSeconds int
}

type Search struct {
	Name  string
	Terms string
}

type SMTPUser struct {
	Username string
	Password string
	Server   string
	Port     int
}

func ReadConfigFile(filename string) (Configuration, error) {
	file, _ := os.Open(filename)
	decoder := json.NewDecoder(file)
	configuration := Configuration{}
	err := decoder.Decode(&configuration)
	if err != nil {
		return configuration, err
	}
	return configuration, checkConfiguration(configuration)
}

func checkConfiguration(config Configuration) error {
	for _, search := range config.Searches {
		if search.Name == "" {
			return errors.New("Each search must have a field 'name'.")
		}
		if search.Terms == "" {
			return errors.New("Each search must have a field 'Terms'.")
		}
	}
	return nil
}


text:
define("modules/title",
["struct"],
function(struct){
	var slice = struct.slice();
	var first = struct.first();
	var trim  = struct.string("trim");

	var title = first(slice(document.getElementsByTagName("title")||[]));

	return function(content){
		title.innerText = trim(content);
	};
});


text:
HTTPServer is a Web framework written in C++. It is designed to rapid development in order to develop a website in few minutes. When I reading the *Unix Network Programming* and *HTTP: The Definitive Guide*, I sensed that if I don't make a practice of the knowledges which I have learning from the books, I will forget them quickly. This is why I decided to develop HTTPServer.

HTTPServer looks like Django, a Python Web framework, because I'm a fans of Django. With the help of Django, I developed [my blog](http://www.binss.me/) in a month and attracted by it MVC design. So like Django, the only thing you should do is defining views and models.

HTTPServer is still in the toy stage currently, so there are so many features to and so many bugs to fix. However, I will try my best to make it perfect.

Finally, please forgive my poor English.

##Usage

1. Define your view in view.h and implement it in view.cpp:
  ```
    void main_page(Request &request, Response &response);

    void main_page(Request &request, Response &response)
    {
        if(request.META.METHOD == "GET")
        {
            response.SetCookie("username", "binss", GetTime(60000));
            response.SetCookie("email", "i@binss.me", GetTime(60000));
            response.SetCode(200);
            response.SetFile("index.html");
        }
    }
  ```

2. Define the map between uri and view in Mapper.cpp
  ```
    void Mapper::InitViewMap()
    {
        view_map_["/"] = main_page;
    }
  ```

3. Add the index.html to templates folder

4. Build and run the server in bin folder

[Optional]

By defining models, you can access to mysql database.

1. use macro to define the model:
  ```
    DEFINE_MODEL(User, 3)(
        FIELD(1, Id, AutoField, true)
        FIELD(2, Name, StringField, false)
        FIELD(3, Price, IntField, false)
    )
  ```

2. define the database information in Constants.h
  ```
    #define DB_HOST "tcp://172.17.0.3:3306"
    #define DB_USER "binss"
    #define DB_PASSWORD "123456"
    #define DB_NAME "dudu"
  ```

3. use model in the view:
  ```
    UserModel user_model;
    if(user_model.Init() == 0)
    {
        LOG<<DEBUG<<"init ok"<<endl;
        vector<User> users = user_model.All();
        for(unsigned int i=0; i<users.size(); i++)
        {
            LOG<<DEBUG<<users[i].Id<<" "<<users[i].Name<<" "<<users[i].Price<<endl;
        }
        if(users.size() > 0)
        {
            User & user = users[0];
            user.Price = 1200;
            user_model.Save(user);
        }
    }
  ```

##Features to be implemented in next stage

1. [Model]define more fields of mysql

2. [Model]support conditional query

3. [View]support templates rendering

##License
Please see [LICENSE](LICENSE).


text:
module Graphics.Rendering.OpenGL.Raw.ARB.DepthTexture (
  -- * Enums
  gl_DEPTH_COMPONENT16_ARB,
  gl_DEPTH_COMPONENT24_ARB,
  gl_DEPTH_COMPONENT32_ARB,
  gl_DEPTH_TEXTURE_MODE_ARB,
  gl_TEXTURE_DEPTH_SIZE_ARB
) where

import Graphics.Rendering.OpenGL.Raw.Tokens


text:
layout: default
---

{% capture post_slug %}{{ page.title | slugify: "latin" | prepend:'t-' }}{% endcapture %}

{{ page.title | escape }}

    {{ content }}

  {% if page.comments == true %}
    {% include comments.html %}
  {% endif %}


text:
package org.digimead.digi.ctrl.lib

import scala.annotation.implicitNotFound

import org.digimead.digi.ctrl.lib.aop.Loggable
import org.digimead.digi.ctrl.lib.log.Logging

import android.app.Activity
import android.os.Bundle

class DigiLibTestActivity extends Activity with DActivity with Logging {
  implicit val dispatcher = org.digimead.digi.ctrl.lib.DigiLibTestDispatcher.dispatcher
  @Loggable
  override def onCreate(savedInstanceState: Bundle) {
    super.onCreate(savedInstanceState)
    onCreateExt(this)
  }
  @Loggable
  override def onStart() {
    super.onStart()
    onStartExt(this, super.registerReceiver)
  }
  @Loggable
  override def onResume() = {
    super.onResume()
    onResumeExt(this)
  }
  @Loggable
  override def onPause() {
    onPauseExt(this)
    super.onPause()
  }
  @Loggable
  override def onStop() {
    onStopExt(this, false, super.unregisterReceiver)
    super.onStop()
  }
  @Loggable
  override def onDestroy() {
    onDestroyExt(this)
    super.onDestroy()
  }
}


text:
layout: poem

title: >
    The Earth, the World and I.
source:
---

#                     THE EARTH, THE WORLD AND I.
                    BY CHARLOTTE PERKINS STETSON.

  - "CHILD," said the Earth to me,
 -     "What can you do?
 -      Why do you try?
 - Can you not see
 - That all you are and can ever be
 - Is the product of Heredity—
 -      Merely the outcome, sure and true,
 -      Of other lives gone by?
 - Because your ancestors were such,
 -      Back to primeval slime,
 - Therefore you ail and sin so much,
 -      Therefore 'tis waste of time
 - For you to seek to steer your course
 - Free of this cumulative force.
 - Beast, plant and rock, your story runs
 - Back to the power that swings the suns;
 - And can you disobey the laws
 - That move you from the primal cause?
 - Peace, fretful child!  Be still!
 - And do my will!"
  - "Child," said the World to me,
 -     "What can you do?
 -      Why do you try?
 - Can you not see
 - That all the effort you have spent
 - Is the product of Environment—
 -      That your surroundings govern you,
 -      And circumstances nigh?
 - Because you're born in such an age,
 - Because you're taught from such a page,
 - Because your friends are so and so—
 - Therefore you act and feel and know
 - Just as you do.  In vain you've tried
 - To throw this influence aside.
 - Fruit of your century and race,
 - Your family and dwelling-place,
 - Your education, work and friends—
 - You have no individual ends!
 - Peace, fretful child!  Be still!
 - And do my will!"
    - Said I to the Earth: "Dear Dirt,
 - Your remarks don't hurt,
 - Being peacefully, perfectly true—
 - But the fact of my coming from you
 - Does not alter another, my dear—
 - This fact—I am here!
 - Evolution's long effort to Be
 - Has resulted in me,
 - And I hark with respect to your tones
 - As I would to my bones
 - Should their feelings new utterance give,
 - Should they say, 'We allow you to live!'
 - Heredity?  Yes, I admit
 - All you're claiming for it.
 - The "first cause" is still running your ranch
 - But I'm a collateral branch!
 - In which the same power is set free,
 - To be handled by me.
 - You don't see it?  No matter, old friend,
 - It's all one in the end."
  - Said I to the World: "I can take
 - No offense at the statements you make.
 - They are truthful as far as they go—
 - But there's much you don't know.
 - Your power you correctly define,
 - But you fail to see mine.
 - You make me, in part, it is true—
 - But, my friend, who makes you?
 - The environment's force on our race
 - Is not climate or place
 - So much as each new demonstration
 - Of our social relation.
 - Our strongest impressions we take
 - From conditions we make;
 - And when we don't like the effect
 - We can change—can select;
 - Can unmake and remake and choose
 - The conditions we use!
 - Just think what the product will be
 - When I make you make me!"


text:
using Project.Models.Core.Entities;
using Project.Persistence.Core.Contexts.Base;
using Project.Persistence.Core.Interfaces;
using Project.Persistence.Core.Repositories.Base;

namespace Project.Persistence.Core.Repositories
{
    public class ClientMongoRepository : MongoRepositoryBase<Client>, IClientRepository
    {
        public ClientMongoRepository(MongoContextBase context)
            : base(context)
        {
        }
    }
}


text:
package fr.paris.lutece.util.jpa;

import java.util.Map;

import javax.persistence.Cache;
import javax.persistence.EntityGraph;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnitUtil;
import javax.persistence.Query;
import javax.persistence.SynchronizationType;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.metamodel.Metamodel;

final class TestEntityManagerFactory implements EntityManagerFactory
{
    @Override
    public boolean isOpen( )
    {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public Map<String, Object> getProperties( )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public PersistenceUnitUtil getPersistenceUnitUtil( )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Metamodel getMetamodel( )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public CriteriaBuilder getCriteriaBuilder( )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Cache getCache( )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public EntityManager createEntityManager( Map map )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public EntityManager createEntityManager( )
    {
        return new TestEntityManager( );
    }

    @Override
    public void close( )
    {
        // TODO Auto-generated method stub

    }

    @Override
    public EntityManager createEntityManager( SynchronizationType st )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public EntityManager createEntityManager( SynchronizationType st, Map map )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void addNamedQuery( String string, Query query )
    {
        // TODO Auto-generated method stub
    }

    @Override
    public <T> T unwrap( Class<T> type )
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public <T> void addNamedEntityGraph( String string, EntityGraph<T> eg )
    {
        // TODO Auto-generated method stub
    }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/osconfig/v1/os_policy.proto

namespace Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource;

use UnexpectedValueException;

/**
 * The desired state that the OS Config agent maintains on the VM.
 *
 * Protobuf type google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState
 */
class DesiredState
{
    /**
     * Unspecified is invalid.
     *
     * Generated from protobuf enum DESIRED_STATE_UNSPECIFIED = 0;
     */
    const DESIRED_STATE_UNSPECIFIED = 0;
    /**
     * Ensure that the package is installed.
     *
     * Generated from protobuf enum INSTALLED = 1;
     */
    const INSTALLED = 1;
    /**
     * The agent ensures that the package is not installed and
     * uninstalls it if detected.
     *
     * Generated from protobuf enum REMOVED = 2;
     */
    const REMOVED = 2;

    private static $valueToName = [
        self::DESIRED_STATE_UNSPECIFIED => 'DESIRED_STATE_UNSPECIFIED',
        self::INSTALLED => 'INSTALLED',
        self::REMOVED => 'REMOVED',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }

    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


text:
package com.streamsets.pipeline.stage.destination.redis;

import com.streamsets.pipeline.api.ConfigDef;
import com.streamsets.pipeline.api.ConfigDefBean;
import com.streamsets.pipeline.api.ListBeanModel;
import com.streamsets.pipeline.api.ValueChooserModel;
import com.streamsets.pipeline.config.DataFormat;
import com.streamsets.pipeline.lib.el.TimeEL;
import com.streamsets.pipeline.stage.destination.lib.DataGeneratorFormatConfig;

import java.util.List;

public class RedisTargetConfig {

  public static final String REDIS_TARGET_CONFIG_PREFIX = "RedisTargetConfig.";

  @ConfigDef(
      required = true,
      type = ConfigDef.Type.STRING,
      label = "URI",
      description = "Use format redis://[:password@]host:port[/[database]]",
      displayPosition = 10,
      group = "REDIS"
  )
  public String uri = "redis://:password@localhost:6379/0";

  @ConfigDef(
      type = ConfigDef.Type.NUMBER,
      label = "Connection Timeout (sec)",
      defaultValue = "60",
      required = true,
      min = 1,
      displayPosition = 20,
      group = "REDIS"
  )
  public int connectionTimeout = 60;

  @ConfigDef(
      type = ConfigDef.Type.NUMBER,
      label = "Retry Attempts",
      defaultValue = "0",
      required = true,
      min = 0,
      displayPosition = 21,
      group = "REDIS"
  )
  public int maxRetries = 0;

  @ConfigDef(
      type = ConfigDef.Type.NUMBER,
      label = "Max Batch Wait Time",
      defaultValue = "${5 * SECONDS}",
      required = true,
      elDefs = {TimeEL.class},
      evaluation = ConfigDef.Evaluation.IMPLICIT,
      displayPosition = 22,
      group = "REDIS"
  )
  public long maxBatchWaitTime;

  @ConfigDef(
      required = true,
      type = ConfigDef.Type.MODEL,
      label = "Mode",
      description = "Whether to write the data in batches as key-value pairs or to publish the data as messages",
      defaultValue = "BATCH",
      displayPosition = 30,
      group = "REDIS"
  )
  @ValueChooserModel(ModeTypeChooserValues.class)
  public ModeType mode = ModeType.BATCH;

  @ConfigDef(
      required = false,
      type = ConfigDef.Type.MODEL,
      defaultValue = "",
      label = "Fields",
      description = "Key names, their values and storage type",
      displayPosition = 40,
      group = "REDIS",
      dependsOn = "mode",
      triggeredByValue = {"BATCH"}
  )
  @ListBeanModel
  public List<RedisFieldMappingConfig> redisFieldMapping;

  @ConfigDef(
      required = true,
      type = ConfigDef.Type.MODEL,
      label = "Data Format",
      defaultValue = "JSON",
      displayPosition = 1,
      group = "DATA_FORMAT",
      dependsOn = "mode",
      triggeredByValue = {"PUBLISH"}
  )
  @ValueChooserModel(ProducerDataFormatChooserValues.class)
  public DataFormat dataFormat = DataFormat.JSON;

  @ConfigDef(
      required = false,
      type = ConfigDef.Type.LIST,
      defaultValue = "[]",
      label = "Channel",
      description = "Channel to publish the messages to",
      displayPosition = 50,
      group = "REDIS",
      dependsOn = "mode",
      triggeredByValue = {"PUBLISH"}
  )
  public List<String> channel;

  @ConfigDefBean(groups = "REDIS")
  public DataGeneratorFormatConfig dataFormatConfig = new DataGeneratorFormatConfig();

}


text:
<!--
  ~ Copyright (c) 2001-2009, TIBCO Software Inc.
  ~ Use, modification, and distribution subject to terms of license.
  -->
<serialization xmlns="urn:tibco.com/v3.0">
  <name><![CDATA[Button - Delete]]></name>
  <icon><![CDATA[images/prototypes/matrix-column.gif]]></icon>
  <description><![CDATA[Renders an image in each row that when clicked causes the CDF record to be deleted from the matrix.]]></description>
  <object type="jsx3.gui.Matrix.Column">
    <dynamics jsxborder="@Outset" jsxbg="@Bevel TopDown" jsxbgcolor="@Solid Disabled"/>
    <strings jsxname="imageButtonColumn" jsxwidth="100" jsxtext="Delete"
        jsxpadding="3" jsxcellpadding="1" jsxvaluetemplate="@empty"  jsxformathandler="function(objDiv, strCDFKey, objMatrix, objMatrixColumn, intRowNumber, objServer) { if(strCDFKey == "jsxautorow") { objDiv.innerHTML = '<div>&#160;</div>'; } }"/>
    <object type="jsx3.gui.ImageButton">
      <variants jsxwidth="16" jsxheight="16"/>
      <strings jsxname="imageButtonMask"
          jsximage="jsx:///images/list/delete.gif"/>
      <events jsxexecute="this.getParent().getParent().deleteRecord(this.emGetSession().recordId, true);"/>
    </object>
  </object>
</serialization>


text:
class Profile;

namespace history {

class ShortcutsDatabase;

// This class manages the shortcut provider backend - access to database on the
// db thread, etc.
class ShortcutsBackend : public RefcountedBrowserContextKeyedService,
                         public content::NotificationObserver {
 public:
  // The following struct encapsulates one previously selected omnibox shortcut.
  struct Shortcut {
    // The pieces of an AutocompleteMatch that we preserve in a shortcut.
    struct MatchCore {
      explicit MatchCore(const AutocompleteMatch& match);
      MatchCore(const base::string16& fill_into_edit,
                const GURL& destination_url,
                const base::string16& contents,
                const ACMatchClassifications& contents_class,
                const base::string16& description,
                const ACMatchClassifications& description_class,
                content::PageTransition transition,
                AutocompleteMatch::Type type,
                const base::string16& keyword);
      ~MatchCore();

      AutocompleteMatch ToMatch() const;

      base::string16 fill_into_edit;
      GURL destination_url;
      base::string16 contents;
      // For both contents_class and description_class, we strip MATCH
      // classifications; the ShortcutsProvider will re-mark MATCH regions based
      // on the user's current typing.
      ACMatchClassifications contents_class;
      base::string16 description;
      ACMatchClassifications description_class;
      content::PageTransition transition;
      AutocompleteMatch::Type type;
      base::string16 keyword;
    };

    Shortcut(const std::string& id,
             const base::string16& text,
             const MatchCore& match_core,
             const base::Time& last_access_time,
             int number_of_hits);
    // Required for STL, we don't use this directly.
    Shortcut();
    ~Shortcut();

    std::string id;  // Unique guid for the shortcut.
    base::string16 text;   // The user's original input string.
    MatchCore match_core;
    base::Time last_access_time;  // Last time shortcut was selected.
    int number_of_hits;           // How many times shortcut was selected.
  };

  typedef std::multimap<base::string16, const Shortcut> ShortcutMap;

  // |profile| is necessary for profile notifications only and can be NULL in
  // unit-tests. For unit testing, set |suppress_db| to true to prevent creation
  // of the database, in which case all operations are performed in memory only.
  ShortcutsBackend(Profile* profile, bool suppress_db);

  // The interface is guaranteed to be called on the thread AddObserver()
  // was called.
  class ShortcutsBackendObserver {
   public:
    // Called after the database is loaded and Init() completed.
    virtual void OnShortcutsLoaded() = 0;
    // Called when shortcuts changed (added/updated/removed) in the database.
    virtual void OnShortcutsChanged() {}

   protected:
    virtual ~ShortcutsBackendObserver() {}
  };

  // Asynchronously initializes the ShortcutsBackend, it is safe to call
  // multiple times - only the first call will be processed.
  bool Init();

  // All of the public functions *must* be called on UI thread only!

  bool initialized() const { return current_state_ == INITIALIZED; }
  const ShortcutMap& shortcuts_map() const { return shortcuts_map_; }

  // Deletes the Shortcuts with the url.
  bool DeleteShortcutsWithUrl(const GURL& shortcut_url);

  void AddObserver(ShortcutsBackendObserver* obs);
  void RemoveObserver(ShortcutsBackendObserver* obs);

  // Looks for an existing shortcut to match.destination_url that starts with
  // |text|.  Updates that shortcut if found, otherwise adds a new shortcut.
  void AddOrUpdateShortcut(const base::string16& text,
                           const AutocompleteMatch& match);

 private:
  friend class base::RefCountedThreadSafe<ShortcutsBackend>;
  friend class ShortcutsProviderTest;
  FRIEND_TEST_ALL_PREFIXES(ShortcutsBackendTest, AddAndUpdateShortcut);
  FRIEND_TEST_ALL_PREFIXES(ShortcutsBackendTest, DeleteShortcuts);

  enum CurrentState {
    NOT_INITIALIZED,  // Backend created but not initialized.
    INITIALIZING,     // Init() called, but not completed yet.
    INITIALIZED,      // Initialization completed, all accessors can be safely
                      // called.
  };

  typedef std::map<std::string, ShortcutMap::iterator> GuidMap;

  virtual ~ShortcutsBackend();

  // RefcountedBrowserContextKeyedService:
  virtual void ShutdownOnUIThread() OVERRIDE;

  // content::NotificationObserver:
  virtual void Observe(int type,
                       const content::NotificationSource& source,
                       const content::NotificationDetails& details) OVERRIDE;

  // Internal initialization of the back-end. Posted by Init() to the DB thread.
  // On completion posts InitCompleted() back to UI thread.
  void InitInternal();

  // Finishes initialization on UI thread, notifies all observers.
  void InitCompleted();

  // Adds the Shortcut to the database.
  bool AddShortcut(const Shortcut& shortcut);

  // Updates timing and selection count for the Shortcut.
  bool UpdateShortcut(const Shortcut& shortcut);

  // Deletes the Shortcuts with the id.
  bool DeleteShortcutsWithIds(const std::vector<std::string>& shortcut_ids);

  // Deletes all shortcuts whose URLs begin with |url|.  If |exact_match| is
  // true, only shortcuts from exactly |url| are deleted.
  bool DeleteShortcutsWithUrl(const GURL& url, bool exact_match);

  // Deletes all of the shortcuts.
  bool DeleteAllShortcuts();

  CurrentState current_state_;
  ObserverList<ShortcutsBackendObserver> observer_list_;
  scoped_refptr<ShortcutsDatabase> db_;

  // The |temp_shortcuts_map_| and |temp_guid_map_| used for temporary storage
  // between InitInternal() and InitComplete() to avoid doing a potentially huge
  // copy.
  scoped_ptr<ShortcutMap> temp_shortcuts_map_;
  scoped_ptr<GuidMap> temp_guid_map_;

  ShortcutMap shortcuts_map_;
  // This is a helper map for quick access to a shortcut by guid.
  GuidMap guid_map_;

  content::NotificationRegistrar notification_registrar_;

  // For some unit-test only.
  bool no_db_access_;

  DISALLOW_COPY_AND_ASSIGN(ShortcutsBackend);
};

}  // namespace history

#endif  // CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_H_


text:
<?xml version="1.0" encoding="utf-8"?>
<!--当前天气信息的布局也是放置了两个TextView,一个用于显示当前气温,一个用于显示天气概况-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="15dp">

    <TextView
        android:id="@+id/degree_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end"
        android:textColor="#fff"
        android:textSize="60sp"/>
    <TextView
        android:id="@+id/weather_info_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end"
        android:textColor="#fff"
        android:textSize="20sp"/>
</LinearLayout>


text:
class Feature < ActiveRecord::Base
  # validations
  validates_presence_of :name
  validates_uniqueness_of :name, scope: :product_id

  # associations
  has_many :feature_selections
  has_many :basket_items, through: :feature_selections, dependent: :destroy
  has_many :choices, dependent: :destroy
  belongs_to :product
  belongs_to :component, optional: true

  UI_TYPES = [
    TEXT_FIELD = 1,
    TEXT_AREA = 2,
    RADIO_BUTTONS = 3,
    DROP_DOWN = 4,
    CHECK_BOX = 5
  ]
  validates_inclusion_of :ui_type, in: UI_TYPES

  def to_s
    name
  end

  def class_name
    {
      TEXT_FIELD => "feature_text_field",
      TEXT_AREA => "feature_text_area",
      RADIO_BUTTONS => "feature_radio_buttons",
      DROP_DOWN => "feature_drop_down",
      CHECK_BOX => "feature_check_box"
    }[ui_type]
  end
end


text:
package org.jboss.weld.bootstrap;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CopyOnWriteArrayList;

import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.Decorator;
import jakarta.enterprise.inject.spi.InjectionPoint;
import jakarta.enterprise.inject.spi.Interceptor;
import jakarta.enterprise.inject.spi.Producer;

import org.jboss.weld.bean.CommonBean;
import org.jboss.weld.exceptions.DeploymentException;
import org.jboss.weld.executor.IterativeWorkerTaskFactory;
import org.jboss.weld.logging.ValidatorLogger;
import org.jboss.weld.manager.BeanManagerImpl;
import org.jboss.weld.manager.api.ExecutorServices;
import org.jboss.weld.module.PlugableValidator;
import org.jboss.weld.util.collections.SetMultimap;

/**
 * Processes validation of beans, decorators and interceptors in parallel.
 *
 * @author Jozef Hartinger
 *
 */
public class ConcurrentValidator extends Validator {

    private final ExecutorServices executor;

    public ConcurrentValidator(Set<PlugableValidator> plugableValidators, ExecutorServices executor, ConcurrentMap<Bean<?>, Boolean> resolvedInjectionPoints) {
        super(plugableValidators, resolvedInjectionPoints);
        this.executor = executor;
    }

    @Override
    public void validateBeans(Collection<? extends Bean<?>> beans, final BeanManagerImpl manager) {
        final List<RuntimeException> problems = new CopyOnWriteArrayList<RuntimeException>();
        final Set<CommonBean<?>> specializedBeans = Collections.newSetFromMap(new ConcurrentHashMap<CommonBean<?>, Boolean>());

        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<Bean<?>>(beans) {
            protected void doWork(Bean<?> bean) {
                validateBean(bean, specializedBeans, manager, problems);
            }
        });

        if (!problems.isEmpty()) {
            if (problems.size() == 1) {
                throw problems.get(0);
            } else {
                throw new DeploymentException(problems);
            }
        }
    }

    @Override
    public void validateInterceptors(Collection<? extends Interceptor<?>> interceptors, final BeanManagerImpl manager) {
        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<Interceptor<?>>(interceptors) {
            protected void doWork(Interceptor<?> interceptor) {
                validateInterceptor(interceptor, manager);
            }
        });
    }

    @Override
    public void validateDecorators(Collection<? extends Decorator<?>> decorators, final BeanManagerImpl manager) {
        final Set<CommonBean<?>> specializedBeans = Collections.newSetFromMap(new ConcurrentHashMap<CommonBean<?>, Boolean>());

        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<Decorator<?>>(decorators) {
            protected void doWork(Decorator<?> decorator) {
                validateDecorator(decorator, specializedBeans, manager);
            }
        });
    }

    @Override
    protected void validateObserverMethods(Iterable<ObserverInitializationContext<?, ?>> observers, final BeanManagerImpl beanManager) {
        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<ObserverInitializationContext<?, ?>>(observers) {
            protected void doWork(ObserverInitializationContext<?, ?> observerMethod) {
                for (InjectionPoint ip : observerMethod.getObserver().getInjectionPoints()) {
                    validateInjectionPointForDefinitionErrors(ip, ip.getBean(), beanManager);
                    validateMetadataInjectionPoint(ip, null, ValidatorLogger.INJECTION_INTO_NON_BEAN);
                    validateInjectionPointForDeploymentProblems(ip, ip.getBean(), beanManager);
                }
            }
        });
    }

    @Override
    public void validateBeanNames(final BeanManagerImpl beanManager) {
        final SetMultimap<String, Bean<?>> namedAccessibleBeans = SetMultimap.newConcurrentSetMultimap();
        for (Bean<?> bean : beanManager.getAccessibleBeans()) {
            if (bean.getName() != null) {
                namedAccessibleBeans.put(bean.getName(), bean);
            }
        }
        final List<String> accessibleNamespaces = beanManager.getAccessibleNamespaces();
        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<String>(namedAccessibleBeans.keySet()) {
            protected void doWork(String name) {
                validateBeanName(name, namedAccessibleBeans, accessibleNamespaces, beanManager);
            }
        });
    }

    @Override
    public void validateProducers(Collection<Producer<?>> producers, final BeanManagerImpl beanManager) {
        executor.invokeAllAndCheckForExceptions(new IterativeWorkerTaskFactory<Producer<?>>(producers) {
            protected void doWork(Producer<?> producer) {
                validateProducer(producer, beanManager);
            }
        });
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycologia 72(4): 717 (1980)

#### Original name
Typhula pteridicola Khurana, 1980

### Remarks
null


text:
package com.team2502.robot2017.command.teleop;

import com.team2502.robot2017.Robot;
import com.team2502.robot2017.subsystem.ShooterSubsystem;
import edu.wpi.first.wpilibj.command.Command;

public class FlywheelCommand extends Command
{
    private final ShooterSubsystem shooterSubsystem;

    public FlywheelCommand()
    {
        requires(Robot.SHOOTER);
        shooterSubsystem = Robot.SHOOTER;
    }

    @Override
    protected void initialize()
    {
        shooterSubsystem.isFlywheelActive = false;
        shooterSubsystem.isFeederActive = false;
    }

    @Override
    protected void execute() { shooterSubsystem.flywheelDrive(); }

    @Override
    protected boolean isFinished() { return false; }

    @Override
    protected void end() { shooterSubsystem.stop(); }

    @Override
    protected void interrupted() { end(); }
}


text:
HEADER_BEGIN

#include "../asm.h"
#include "flow_graph.h"
#include "move_resolver.h"

typedef struct _flow_graph_compiler{
  asm_buff code;
  flow_graph* graph;
  function* func;
  move_resolver resolver;
  array blocks; // block_entry_instr*
  block_entry_instr* block;
} flow_graph_compiler;

MUN_INLINE void
flow_graph_compiler_init(flow_graph_compiler* compiler, flow_graph* graph, function* func){
  compiler->func = func;
  compiler->graph = graph;
  compiler->blocks = graph->reverse_postorder;
  move_resolver_init(&compiler->resolver, compiler);
  asm_init(&compiler->code);
}

void flow_graph_compiler_emit_epilogue(flow_graph_compiler* compiler, instruction* instr);
void flow_graph_compiler_emit_prologue(flow_graph_compiler* compiler, instruction* instr);
void flow_graph_compiler_emit_entry(flow_graph_compiler* compiler);
void flow_graph_compiler_compile(flow_graph_compiler* compiler);
void flow_graph_compiler_visit_blocks(flow_graph_compiler* compiler);

HEADER_END

#endif


text:
"Evlang" is a heavily restricted version of Python intended to be used
by regular players to code simple functionality on supporting objects.
It's referred to as "evlang" or "evlang scripts" in order to
differentiate from Evennia's normal (and unrelated) "Scripts".

WARNING:
 Restricted python execution is a tricky art, and this module -is-
 partly based on blacklisting techniques, which might be vulnerable to
 new venues of attack opening up in the future (or existing ones we've
 missed). Whereas I/we know of no obvious exploits to this, it is no
 guarantee. If you are paranoid about security, consider also using
 secondary defences on the OS level such as a jail and highly
 restricted execution abilities for the twisted process. So in short,
 this should work fine, but use it at your own risk. You have been
 warned.

An Evennia server with Evlang will, once set up, minimally consist of
the following components:

  - The evlang parser (bottom of evlang.py). This combines
    regular removal of dangerous modules/builtins with AST-traversal.
    it implements a limited_exec() function.
  - The Evlang handler (top of evlang.py). This handler is the Evennia
    entry point. It should be added to objects that should support
    evlang-scripting.
  - A custom object typeclass. This must set up the Evlang handler
    and store a few critical Attributes on itself for book-keeping.
    The object will probably also overload some of its hooks to
    call the correct evlang script at the proper time
  - Command(s) for adding code to supporting objects
  - Optional expanded "safe" methods/objects to include in the
    execution environment. These are defined in settings (see
    header of evlang.py for more info).

You can set this up easily to try things out by using the included
examples:

Quick Example Install
---------------------

This is a quick test-setup using the example objects and commands.

1) If you haven't already, make sure you are able to overload the
   default cmdset: Copy game/gamesrc/commands/examples/cmdset.py up
   one level, then change settings.CMDSET_DEFAULT to point to
   DefaultCmdSet in your newly copied module.  Restart the server and
   check so the default commands still work.
2) Import and add
      contrib.evlang.command.CmdCode
      and
      contrib.evlang.examples.CmdCraftScriptable
   to your default command set. Reload server.

That's it, really. You should now have two new commands available,
@craftscriptable and @code. The first one is a simple "crafting-like"
command that will create an object of type
contrib.evlang.examples.CraftedScriptableObject while setting it up
with some basic scripting slots.

Try it now:

 @craftscriptable crate

You create a simple "crate" object in your current location. You can
use @code to see which "code types" it will accept.

 @code crate

You should see a list with "drop", "get" and "look", each without
anything assigned to them.  If you look at how CraftedScriptableObject
is defined you will find that these "command types" (you can think of
them as slots where custom code can be put) are tied to the at_get,
at_drop and at_desc hooks respecively - this means Evlang scripts put
in the respective slots will ttrigger at the appropriate time.

There are a few "safe" objects made available out of the box.

 self - reference to object the Evlang handler is defined on
 here - shortcut for self.location
 caller - reference back to the one triggering the script
 scripter - reference to the one creating the script (set by @code)

 There is also the 'evl' object that defines "safe" methods to use:

 evl.msg(string, obj=None)                 # default is the send to caller
 evl.msg_contents(string, obj=None)        # default is to send to all except caller
 evl.msg_home(string, obj=None)            # default is to send to self.location
 delay(delay, function, *args, **kwargs)
 attr(obj, attrname=None, attrvalue=None, delete=False)  # lock-checking attribute accesser
 list()  # display all available methods on evl, with docstrings (including your custom additions)

These all return True after successful execution, which makes
especially the msg* functions easier to use in a conditional. Let's
try it.

 @code crate/look = caller.key=='Superman' and evl.msg("Your gaze burns a small hole.") or evl.msg("Looks robust!")

Now look at the crate. :)

You can (in evlang) use evl.list() to get a list of all methods
currently stored on the evl object. For testing, let's use the same
look slot on the crate again. But this time we'll use the /debug mode
of @code, which means the script will be auto-run immediately and we
don't have to look at the create to get a result when developing.

@code/debug crate/look = evl.msg(evl.list())


text:
<?php

use oopapi\Invokation;

class ModelInvokation extends Invokation {
    protected function getClass() {
        if (empty($this->getTable())) {
            throw new InvalidArgumentException('Empty table argument');
        }
        return $this->getModel();
    }

    private function getModel() {
        return "Db{$this->getTable()}";
    }

    private function getTable() {
        return ucfirst(HttpGetRequest::getTable());
    }
}