Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2007, 2009 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 EclipseSource Corporation - ongoing enhancements /
 
 package org.eclipse.pde.internal.ua.ui.editor.cheatsheet;
 
 import  org.eclipse.swt.SWT;
 import  org.eclipse.swt.widgets.Composite;
 import  org.eclipse.swt.widgets.Control;
 
 public abstract class CSAbstractEditor extends MultiSourceEditor {
 
 
 	public void contributeToToolbar(IToolBarManager manager) {
 		// Add the register cheat sheet link to the form title area
 		if (WorkspaceModelManager.isPluginProject(getCommonProject())
 	}

Returns:
 
 		return new ControlContribution("Register") { //$NON-NLS-1$
 			protected Control createControl(Composite parent) {
 				// Create UI
 				// Create Listener
 			}
 		};
 	}

Parameters:
parent
 
 	private void createUIImageHyperlinkRegisterCS(Composite parent) {
 		 = new ImageHyperlink(parent, SWT.NONE);
 	}

 
 					public void linkActivated(HyperlinkEvent e) {
 					}
 
 					public void linkEntered(HyperlinkEvent e) {
 					}
 
 					public void linkExited(HyperlinkEvent e) {
 					}
 				});
 	}

Parameters:
message
 
 	private void handleLinkEnteredRegisterCS(String message) {
 		// Update colour
 		// Update IDE status line
 				message);
 	}

	private void handleLinkExitedRegisterCS() {
		// Update colour
		// Update IDE status line
	}

		// Initialize the wizard
		wizard.init(PlatformUI.getWorkbench(), null);
		// Create the dialog for the wizard
		WizardDialog dialog = new WizardDialog(PDEUserAssistanceUIPlugin
		dialog.create();
		// Configure the dialogs size
		dialog.getShell().setSize(400, 370);
		// Check the result
		if (dialog.open() == .) {
			// TODO: MP: COMPCS: HIGH: Automatic save of editor after creating
			// simple cheat sheet?
		}
	}
New to GrepCode? Check out our FAQ X