Pattern Code template

This page has not been liked. Updated 3/29/13, 4:03 AM by MarianaAluTags: None

 

Patterns are Eclipse plug-ins packaged and stored as RAS assets. You import RAS pattern assets to install the pattern plug-in. Then you can apply the patterns contained in the RAS asset. You can import RAS pattern assets from a directory location or from a RAS repository.

 


Create a Developer's Corner Patterns code example

Welcome, authors! We hope you find this template easy to use, but if you have any questions at all, please contact: rsxapi

Thanks in advance for your contribution!

 

The easiest way to get familiar with the Patterns code example template is by optimizing a few simple functions in the Eclipse SWT Snippets UI.

Patterns code example template

You can add your title, description, problem and solution for your example here:
= Your Code Example Title = 
   Description (Your Code Example description....)
== Problem ==
   A "Hello World" program is a computer program which prints out "Hello, world!" on a display device.
It is used in many introductory tutorials for teaching a programming language.
Such a program is typically one of the simplest programs possible in most computer languages. 
*[1|http://en.wikipedia.org/wiki/Hello_world_program] 

== Solution ==
  Experienced programmers learning new languages can also gain a lot of information about 
a given language's syntax and structure from a hello world program.
  Configuring a complete programming toolchain from scratch to the point where even trivial
programs can be compiled and run can involve substantial amounts of work. For this reason,
a simple program is used first when testing a new tool chain.
 *[1|http://en.wikipedia.org/wiki/Hello_world_program]

== Code sample template ==
You can use the following template for your code samples:

You can add your code here:

{code:title=Hello World.java}
 
   /***************************************************************************
 * Copyright (c) 2000, 2004 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.swt.snippets;

/* 
 * example snippet: Hello World
 *
 * For a list of all SWT example snippets see
 * http://www.eclipse.org/swt/snippets/
 */
import org.eclipse.swt.widgets.*;

public class Snippet1 {

   public static void main (String [] args) {
	Display display = new Display ();
	Shell shell = new Shell(display);
	shell.open ();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	display.dispose ();
   }
}
{code}

You can add your See Also links here:

== See Also: ==
  * [SWT Snippets|http://www.eclipse.org/swt/snippets/]
  * ["Hello World"|http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/
              org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java] 

Add Attachments:

Add your Hello World.java and Hello World.zip to Attachments.

== Downloads [(?)|Import Snnipets|How to import snippet into Eclipse] ==
  * Eclipse:  http://www.ibm.com/developerworks/wikis/.../Hello World.zip  
  * Java file: [OnLine|http://www.ibm.com/developerworks/.../Hello World.java] 

Add your User Id, Name and information.

== Author: [xxx] ==
 
xxx is an Information Developer for IBM Rational Software. 


 

Added by: PHOTO rsxapi