It is easy to customize the splash to use your own brand or logo during eclipse starts up. If you want to make your own welcome page, just follow these steps:
1. add extension point in your plugin
<extension
point="org.eclipse.ui.intro.config">
<config
introId="myeclipse.intro"
content="introContent.xml"
id="myeclipse.configId">
<presentation
home-page-id="root">
<implementation
kind="html"
os="win32,linux,macosx">
</implementation>
</presentation>
</config>
</extension>
2. use xml file to define your pages and contents
<?xml version="1.0" encoding="utf-8" ?>
<introContent>
<page id="root" content="content/root.xhtml"/>
<page id="concept1" content="content/concept1.xhtml"/>
<page id="concept2" content="content/concept2.xhtml"/>
</introContent>
3. how eclipse makes it work internally?
public class BaseExtensionPointManager {
protected static final String CONFIG = "org.eclipse.ui.intro.config";
protected BaseExtensionPointManager() {
registry = Platform.getExtensionRegistry();
}
protected IConfigurationElement getIntroConfig(String attrributeName,
String attributeValue) {
IConfigurationElement[] configElements = registry
.getConfigurationElementsFor(CONFIG);
IConfigurationElement config = getConfigurationFromAttribute(
configElements, attrributeName, attributeValue);
if (config == null)
// if there is no valid config, log the fact.
Log.warning("No Intro configuration found with " + attrributeName //$NON-NLS-1$
+ " of value = " + attributeValue); //$NON-NLS-1$
return config;
}
}
public class IntroModelRoot extends AbstractIntroContainer {
public void loadModel() {
getChildren();
determineHomePage();
}
protected void loadChildren() {
children = new Vector();
if (Log.logInfo)
Log.info("Creating Intro plugin model...."); //$NON-NLS-1$
// load presentation first and create the model class for it. If there
// is more than one presentation, load first one, and log rest.
IConfigurationElement presentationElement = loadPresentation();
if (presentationElement == null) {
// no presentations at all, exit.
setModelState(true, false);
Log.warning("Could not find presentation element in intro config."); //$NON-NLS-1$
return;
}
loadTheme();
loadConfigurer();
introPartPresentation = new IntroPartPresentation(presentationElement);
children.add(introPartPresentation);
// set parent.
introPartPresentation.setParent(this);
// now load all children of the config. There should only be pages and
// groups here. And order is not important. These elements are loaded
// from the content file DOM.
Document document = loadDOM(getCfgElement());
if (document == null) {
// we failed to parse the content file. Intro Parser would have
// logged the fact. Parser would also have checked to see if the
// content file has the correct root tag.
setModelState(true, false);
return;
}
// set base for this model.
this.base = getBase(getCfgElement());
// now load content.
loadPages(document, getBundle());
loadSharedGroups(document, getBundle());
// Attributes of root page decide if we have a static or dynamic case.
setModelState(true, true);
}
private void determineHomePage() {
String pid = Platform.getProduct().getId();
startPageId = getProcessPreference("INTRO_START_PAGE", pid); //$NON-NLS-1$
String homePagePreference = getProcessPreference("INTRO_HOME_PAGE", pid); //$NON-NLS-1$
homePage = rootPage; // Default, may be overridden
if (homePagePreference.length() != 0) {
AbstractIntroPage page = (AbstractIntroPage) findChild(homePagePreference,
ABSTRACT_PAGE);
if (page != null) {
homePage = page;
if(startPageId.length() == 0) {
startPageId = homePagePreference;
}
}
}
String standbyPagePreference = getProcessPreference("INTRO_STANDBY_PAGE", pid); //$NON-NLS-1$
modelStandbyPageId = getPresentation().getStandbyPageId();
if (standbyPagePreference.length() != 0) {
standbyPage = (AbstractIntroPage) findChild(standbyPagePreference,
ABSTRACT_PAGE);
}
if (standbyPage == null && modelStandbyPageId != null && modelStandbyPageId.length() != 0) {
standbyPage = (AbstractIntroPage) findChild(modelStandbyPageId,
ABSTRACT_PAGE);
}
if (standbyPage != null) {
standbyPage.setStandbyPage(true);
}
}
}