diff --git a/README.md b/README.md index 44edcfb2c..9942fdb80 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,7 @@ The Eclipse Integrated Computational Environment (ICE) Eclipse ICE Project Main Repository Build instructions available here: http://wiki.eclipse.org/ICE_Build_Instructions + +Contributions follow the standard Eclipse mechanisms. If you are looking at +this, then you are most likely using Git and can start the process by issuing +a pull request on our GitHub repo. diff --git a/org.eclipse.ice.target.kepler/kepler_rcp.target b/org.eclipse.ice.target.kepler/kepler_rcp.target index 9ced507cf..cf9c1e287 100644 --- a/org.eclipse.ice.target.kepler/kepler_rcp.target +++ b/org.eclipse.ice.target.kepler/kepler_rcp.target @@ -1,5 +1,5 @@ - + @@ -82,5 +82,14 @@ + + + + + + + + + diff --git a/repository/org.eclipse.ice.repository/ice.product.launch b/repository/org.eclipse.ice.repository/ice.product.launch index e4bcc03ba..be1de7f8e 100644 --- a/repository/org.eclipse.ice.repository/ice.product.launch +++ b/repository/org.eclipse.ice.repository/ice.product.launch @@ -1,33 +1,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java new file mode 100644 index 000000000..dc66131dd --- /dev/null +++ b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright (c) 2014 UT-Battelle, LLC. + * 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: + * Initial API and implementation and/or initial documentation - + * Jay Jay Billings + *******************************************************************************/ +package org.eclipse.ice.client.widgets; + +import org.eclipse.ice.datastructures.ICEObject.IElementSource; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Table; + +import ca.odell.glazedlists.EventList; +import ca.odell.glazedlists.swt.DefaultEventTableViewer; + +/** + * This class is a JFace Dialog for rendering IElementSources that are used by + * ListComponents. + * + * Only single selections are supported. + * + * @author Jay Jay Billings + * + */ +public class ElementSourceDialog extends Dialog { + + /** + * The source that should be drawn + */ + private IElementSource source; + + /** + * The SWT table that shows the list + */ + private Table listTable; + + /** + * The selection made by the user or null if the dialog was closed. + */ + private T selection; + + /** + * The list of elements rendered in the table + */ + private EventList elements; + + /** + * The constructor + * + * @param parentShell + * The shell in which the dialog should be drawn + * @param source + * The IElementSource that should be drawn + */ + public ElementSourceDialog(Shell parentShell, + IElementSource elementSource) { + super(parentShell); + source = elementSource; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets + * .Composite) + */ + @Override + protected Control createDialogArea(Composite parent) { + + Composite comp = (Composite) super.createDialogArea(parent); + + // Create the table to hold the ListComponent. + listTable = new Table(parent, SWT.FLAT); + elements = source.getElements(); + DefaultEventTableViewer listTableViewer = new DefaultEventTableViewer( + elements, listTable, source.getTableFormat()); + listTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, + 1)); + + return comp; + + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.Dialog#okPressed() + */ + @Override + protected void okPressed() { + // Set the selection if the OK button was pressed + int index = listTable.getSelectionIndex(); + selection = elements.get(index); + super.okPressed(); + } + + /** + * This operation returns the selection made in the dialog. + * + * @return The selection. If multiple items were selected, only the first is + * returned. + */ + public T getSelection() { + return selection; + } + +} diff --git a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/EntryComposite.java b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/EntryComposite.java index 967d99a41..2e22cd94e 100644 --- a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/EntryComposite.java +++ b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/EntryComposite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2014 UT-Battelle, LLC. + * Copyright (c) 2012, 2014- UT-Battelle, LLC. * 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 @@ -53,7 +53,6 @@ import org.eclipse.ui.forms.IMessageManager; /** - * *

* This is an subclass of SWT's Composite class made specifically to work with * ICE Entries. @@ -67,90 +66,43 @@ * The EntryComposite can post messages about its work with an Entry to a * IMessageManager if it is set by calling setMessageManager(). *

- * * * @author gqx - * @generated - * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)" */ public class EntryComposite extends Composite implements IUpdateableListener { /** - * - *

* A label that describes the Entry. - *

- * - * - * @generated - * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)" */ private Label label; + /** - * - *

* A text field that is used if the Entry type is unspecified. - *

- * - * - * @generated - * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)" */ private Text text; + /** - * - *

* A drop-down menu for the Entry. - *

- * - * - * @generated - * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)" */ private Combo dropDown; + /** - * - *

* A set of buttons for the Entry. - *

- * - * - * @generated - * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)" */ protected final List