2007-09-01から1ヶ月間の記事一覧

プラグインでテキストエディターの文字の色を取得

TextEditor editor; ... Method method = AbstractTextEditor.class.getDeclaredMethod("getSourceViewer", null); method.setAccessible(true); ISourceViewer viewer = method.invoke(editor, null); StyledText text = viewer.getTextWidget(); StyleRang…

プラグインでテキストエディターの内容を変更

TextEditor editor; ... editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("...");

プラグインからファイルの削除

IFile file; ... file.delete(true, false, null);

プラグインからプロジェクトの削除

IProject project; ... project.delete(true, true, null);

プラグインからプロジェクトのファイルを開く

IFile file; ... IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);

プラグインからプロジェクトにファイル作成

// プロジェクトに新しいファイルを作成する。 private IFile createFile(IProject project, String path, String content) throws CoreException { IFile file = project.getFile(path); InputStream io = new ByteArrayInputStream(content.getBytes()); f…

eclipseのプラグインからプロジェクトを作成するコード

import org.eclipse.core.resources.*; ... public IProject createProject(String name) throws CoreException { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); project.create(null); project.open(null); return proje…

暇な夏休み対策

Eclipseプラグイン開発作者: エリックガンマ,ケントベック,Erich Gamma,Kent Beck,小林健一郎出版社/メーカー: ソフトバンククリエイティブ発売日: 2004/12/22メディア: 単行本購入: 2人 クリック: 29回この商品を含むブログ (36件) を見る9月いっぱいまで夏…

Eclipse + Subversion

Eclipseとは? 汎用総合開発環境。おもにJavaの開発に使われるけど、ほかの言語用のプラグインもいくつかある。総合開発環境はGUIでプログラムの作成をサポートしてくれるもので、メソッドの一覧を表示したりボタンひとつでビルドしたり、エラーをダブルクリ…

MP3一つ追加農村