Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2006, 2008 IBM Corporation and others. 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: IBM Corporation - initial API and implementation /
 
 
 package org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple;
 
 import  org.eclipse.swt.widgets.Composite;
SimpleCSBlock
 
 
 
 
 
 

Parameters:
page
 
 	public SimpleCSBlock(PDEFormPage page) {
 		super(page);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock#createMasterSection(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
 	 */
 	protected PDESection createMasterSection(IManagedForm managedForm, Composite parent) {
 		return ;
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart)
 	 */
 	protected void registerPages(DetailsPart detailsPart) {
 		// Only static pages to be defined.  Do not cache pages
 		detailsPart.setPageLimit(0);
 		// Register static page:  item
 		// Register static page:  subitem
 		// Register static page:  cheatsheet
 		// Register static page:  intro
 		// Set this class as the page provider
 		detailsPart.setPageProvider(this);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.forms.IDetailsPageProvider#getPageKey(java.lang.Object)
 	 */
 	public Object getPageKey(Object object) {
 		// Get static page key
 		if (object instanceof ISimpleCSItem) {
 			// Static page:  item
 			return SimpleCSItemDetails.class;
 		} else if (object instanceof ISimpleCSSubItem) {
 			// Static page:  subitem
 			return SimpleCSSubItemDetails.class;
 		} else if (object instanceof ISimpleCS) {
			// Static page:  cheatsheet
			return SimpleCSDetails.class;
else if (object instanceof ISimpleCSIntro) {
			// Static page:  intro
			return SimpleCSIntroDetails.class;
		}
		// Should never reach here
		return object.getClass();
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.forms.IDetailsPageProvider#getPage(java.lang.Object)
	 */
	public IDetailsPage getPage(Object key) {
		// No dynamic pages.  Static pages already registered
		return null;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
	 */
	public void modelChanged(IModelChangedEvent event) {
		// Inform the master section
		if ( != null) {
		}
		// Inform the details section
		// Unnecessary
		//if (fCurrentDetailsSection != null) {
		//	fCurrentDetailsSection.modelChanged(event);
		//}
	}

Returns:
	}

Returns:
		if ( != null) {
		}
		return null;
	}
New to GrepCode? Check out our FAQ X