Question

Je suis face à des difficultés à faire mon propre Eclipse Intro page ( comme indiqué ici ).

Il semble que j'ai quelques Probleme avec mon ID de produit, mais je ne sais pas comment obtenir un ID de produit, j'ai essayé d'étendre org.eclipse.core.runtime.products mais quand il me demande quelle application je veux inscrire Je ne sais pas quoi répondre et il semble faire partie du problème ... quelqu'un comme une idée?

Était-ce utile?

La solution

Avez-vous besoin de définir un nouvel identifiant, ou vous voulez juste une config minimale qui montrera que votre contenu?

Si c'est ce dernier, avez-vous vu la dernière section de la même aide? Définition d'un minimum configuration introduction , suggère d'utiliser org.eclipse.intro.minimal donc il montrera que votre contenu.

Autres conseils

Voici ce que j'ai finalement fait ...

public class IntroPart implements IIntroPart {

 //VITAL : you must implement
    public void createPartControl(Composite container) {
        Composite outerContainer = new Composite(container, SWT.NONE);
        GridLayout gridLayout = new GridLayout();
        outerContainer.setLayout(gridLayout);
        outerContainer.setBackground(outerContainer.getDisplay()
                .getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
        Label label = new Label(outerContainer, SWT.CENTER);
        label.setText("WELCOME TO ECLIPSE");
        GridData gd = new GridData(GridData.GRAB_HORIZONTAL
                | GridData.GRAB_VERTICAL);
        gd.horizontalAlignment = GridData.CENTER;
        gd.verticalAlignment = GridData.CENTER;
        label.setLayoutData(gd);
        label.setBackground(outerContainer.getDisplay().getSystemColor(
                SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
    }

 //VITAL : you must implement
    public String getTitle() {
        return "My Title";
    }

 //VITAL : you must implement
    public Image getTitleImage() {
        return new Image(Display.getCurrent(), this.getClass()
                .getResourceAsStream("splash.bmp"));
    }

    public void addPropertyListener(IPropertyListener listener) {
         //NON-VITAL : implement accordingly to your needs
    }

    public void dispose() {
         //NON-VITAL : implement accordingly to your needs
    }

    public IIntroSite getIntroSite() {
         //NON-VITAL : implement accordingly to your needs
        return null;
    }

    public void init(IIntroSite site, IMemento memento)
            throws PartInitException {
         //NON-VITAL : implement accordingly to your needs
    }

    public void removePropertyListener(IPropertyListener listener) {
         //NON-VITAL : implement accordingly to your needs
    }

    public void saveState(IMemento memento) {
         //NON-VITAL : implement accordingly to your needs
    }

    public void setFocus() {
         //NON-VITAL : implement accordingly to your needs
    }

    public void standbyStateChanged(boolean standby) {
         //NON-VITAL : implement accordingly to your needs
    }

    public Object getAdapter(Class adapter) {
         //NON-VITAL : implement accordingly to your needs
        return null;
    }
}

L'image utilisée est l'une de mes et il passe comme l'icône de l'onglet lorsque vous affichez votre page d'accueil ...

Il est étrange que le titre et l'image ne sont pas des valeurs par défaut ... mais ... heh qui est la vie.

Je espère que ça va aider ^^

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top