4

リモートエディット用ツールで使用するEclipseのRSEをセットアップできないので、Unisonをインストールしました。しかし、ファイルを保存するたびに Eclipse が自動的に unison を実行するようにするにはどうすればよいでしょうか? これに利用できるEclipseプラグインはありますか?

ティア

4

2 に答える 2

6

すべてのビルドで実行されるようにセットアップできます。すべてのビルドで任意の外部ツールを実行できます。プロジェクトの設定を開き、ビルダー ページに移動して、[新規…] をクリックするだけです。

于 2009-03-11T04:57:56.187 に答える
5

重要性に応じて、これを処理するための簡単なプラグインを作成します。

編集:あなたが本当にする必要があるのはこれだけです:

1)RCP \ PDE Eclipseインストールを使用してテンプレートからプラグインを作成します
。2)アクティベーターに次のコードを追加します。

@Override
public void start( final BundleContext context ) throws Exception {
    super.start( context );
    plugin = this;

    ICommandService commandService = (ICommandService)plugin.getWorkbench().getService( ICommandService.class );
    commandService.addExecutionListener( new IExecutionListener() {

        public void notHandled( final String commandId, final NotHandledException exception ) {}

        public void postExecuteFailure( final String commandId, final ExecutionException exception ) {}

        public void postExecuteSuccess( final String commandId, final Object returnValue ) {
            if ( commandId.equals( "org.eclipse.ui.file.save" ) ) {
                // add in your action here...
                // personally, I would use a custom preference page, 
                // but hard coding would work ok too
            }
        }

        public void preExecute( final String commandId, final ExecutionEvent event ) {}

    } );
}
于 2008-11-07T09:46:11.333 に答える