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.details;
 
 import  org.eclipse.swt.SWT;
 import  org.eclipse.swt.layout.GridData;
 import  org.eclipse.swt.widgets.Composite;
SimpleCSDetails
 
 public class SimpleCSDetails extends CSAbstractDetails {
 
 	private ISimpleCS fCheatSheet;
 
 	private FormEntry fTitle;
 
 	private Section fMainSection;

Parameters:
section
 
 	public SimpleCSDetails(ICSMaster section) {
 		super(section.);
 		 = null;
 
 		 = null;
 		 = null;
 	}

Parameters:
object
 
 	public void setData(ISimpleCS object) {
 		// Set data
 		 = object;
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.CSAbstractDetails#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
 	 */
 	public void selectionChanged(IFormPart partISelection selection) {
 		// Get the first selected object
 		Object object = getFirstSelectedObject(selection);
 		// Ensure we have the right type
 		if ((object == null) || (object instanceof ISimpleCS) == false) {
 			return;
 		}
 		// Set data
 		setData((ISimpleCSobject);
 		// Update the UI given the new data
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.SimpleCSAbstractDetails#createDetails(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createDetails(Composite parent) {
 
 		GridData data = null;
 
 		// Create main section
 		.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
 		data = new GridData(GridData.FILL_HORIZONTAL);
 		.setLayoutData(data);
 		// Align the master and details section headers (misalignment caused
 		// by section toolbar icons)
 
 		// Create container for main section
 		Composite mainSectionClient = toolkit.createComposite();
 		mainSectionClient.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
		// Attribute: title
		 = new FormEntry(mainSectionClienttoolkit., SWT.NONE);
		// Bind widgets
		toolkit.paintBordersFor(mainSectionClient);
		.setClient(mainSectionClient);
	}
	/* (non-Javadoc)
	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.SimpleCSAbstractDetails#hookListeners()
	 */
	public void hookListeners() {
		// Attribute: title
			public void textValueChanged(FormEntry entry) {
				// Ensure data object is defined
				if ( == null) {
					return;
				}
			}
		});
	}
	/* (non-Javadoc)
	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.SimpleCSAbstractDetails#updateFields()
	 */
	public void updateFields() {
		// Ensure data object is defined
		if ( == null) {
			return;
		}
		boolean editable = isEditableElement();
		// Attribute: title
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean)
	 */
	public void commit(boolean onSave) {
		super.commit(onSave);
		// Only required for form entries
		// No need to call for sub details, because they contain no form entries
	}
New to GrepCode? Check out our FAQ X