リモートエディット用ツールで使用するEclipseのRSEをセットアップできないので、Unisonをインストールしました。しかし、ファイルを保存するたびに Eclipse が自動的に unison を実行するようにするにはどうすればよいでしょうか? これに利用できるEclipseプラグインはありますか?
ティア
リモートエディット用ツールで使用するEclipseのRSEをセットアップできないので、Unisonをインストールしました。しかし、ファイルを保存するたびに Eclipse が自動的に unison を実行するようにするにはどうすればよいでしょうか? これに利用できるEclipseプラグインはありますか?
ティア
すべてのビルドで実行されるようにセットアップできます。すべてのビルドで任意の外部ツールを実行できます。プロジェクトの設定を開き、ビルダー ページに移動して、[新規…] をクリックするだけです。
重要性に応じて、これを処理するための簡単なプラグインを作成します。
編集:あなたが本当にする必要があるのはこれだけです:
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 ) {}
} );
}