0

ワークスペースやその他のEclipseのデフォルト機能なしでRCPプロジェクトを作成する方法は?

Eclipse RCP プロジェクトを作成するたびに、別のワークスペースで実行され、左側にパッケージ エクスプローラーが表示され、プロジェクトの作成などが可能になります。

特定のタイプのファイルを開き、特定のタイプのビューを含む XMind のようなスタンドアロン アプリケーションを作成することは可能ですか?

アップデート

たとえば、Eclipse ヘルプ内に Zest サンプルがあります。これは Eclipse で実行することを目的としていますが、次のメインが含まれています。

/*******************************************************************************
  * Copyright 2005-2007, CHISEL Group, University of Victoria, Victoria, BC,
  * Canada. All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors: The Chisel Group, University of Victoria
  ******************************************************************************/
 package org.eclipse.zest.examples.swt;

 import org.eclipse.zest.core.widgets.Graph;
 import org.eclipse.zest.core.widgets.GraphConnection;
 import org.eclipse.zest.core.widgets.GraphNode;
 import org.eclipse.zest.layouts.LayoutStyles;
 import org.eclipse.zest.layouts.algorithms.SpringLayoutAlgorithm;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;

 /**
  * This snippet creates a very simple graph where Rock is connected to Paper
  * which is connected to scissors which is connected to rock.
  * 
  * The nodes a layed out using a SpringLayout Algorithm, and they can be moved
  * around.
  * 
  * 
  * @author Ian Bull
  * 
  */
 public class GraphSnippet1 {
    /**
     * @param args
     */
    public static void main(String[] args) {
        // Create the shell
        Display d = new Display();
        Shell shell = new Shell(d);
        shell.setText("GraphSnippet1");
        shell.setLayout(new FillLayout());
        shell.setSize(400, 400);

        Graph g = new Graph(shell, SWT.NONE);
        GraphNode n = new GraphNode(g, SWT.NONE, "Paper");
        GraphNode n2 = new GraphNode(g, SWT.NONE, "Rock");
        GraphNode n3 = new GraphNode(g, SWT.NONE, "Scissors");
        new GraphConnection(g, SWT.NONE, n, n2);
        new GraphConnection(g, SWT.NONE, n2, n3);
        new GraphConnection(g, SWT.NONE, n3, n);
        g.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);

        shell.open();
        while (!shell.isDisposed()) {
            while (!d.readAndDispatch()) {
                d.sleep();
            }
        }
    }
 }

これをコンパイルする方法は?Java プロジェクトだけに入れると、多くの Eclipse ライブラリはありません。しかし、プラグイン プロジェクトを作成すると、main メソッドを挿入する場所が見つかりません。

4

1 に答える 1

1

To get the absolute minimum RCP code do File / New Project and select Plug-in Project. On the second step of the wizard deselect This plug-in will make contributions to the UI and select Yes for Would you like to create a 3.x rich client application. The final step of the wizard will then have a Headless Hello RCP which creates the absolute minimum code for a RCP.

If you leave This plug-in will make contributions to the UI checked some templates to create RCPs with a view etc. are shown.

The above is for Eclipse 3.x style RCPs, for Eclipse 4 pure e4 RCPs use Eclipse 4 / Eclipse 4 Application Project in New Project wizard.

于 2013-10-06T21:02:22.020 に答える