Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into jordan/VisItVisService
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Deyton <deytonjh@ornl.gov>
  • Loading branch information
Jordan Deyton committed Apr 17, 2015
2 parents ee2d085 + 94856e1 commit a8f18a0
Show file tree
Hide file tree
Showing 59 changed files with 28,984 additions and 1,583 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -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.
11 changes: 10 additions & 1 deletion org.eclipse.ice.target.kepler/kepler_rcp.target
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="kepler_rcp" sequenceNumber="42">
<?pde version="3.8"?><target name="kepler_rcp" sequenceNumber="47">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.test.junit.feature.group" version="2.2.1.201402241301"/>
Expand Down Expand Up @@ -82,5 +82,14 @@
<unit id="org.codehaus.jackson.jaxrs" version="1.6.0.v20101005-1100"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.nebula.widgets.nattable.extension.poi.feature.feature.group" version="1.3.0.201503261201"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.3.0.201503261201"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.source.feature.feature.group" version="1.3.0.201503261201"/>
<unit id="org.eclipse.nebula.widgets.nattable.core.source.feature.feature.group" version="1.3.0.201503261201"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.poi.source.feature.feature.group" version="1.3.0.201503261201"/>
<unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.3.0.201503261201"/>
<repository location="http://download.eclipse.org/nattable/releases/1.3.0/repository/"/>
</location>
</locations>
</target>
66 changes: 33 additions & 33 deletions repository/org.eclipse.ice.repository/ice.product.launch

Large diffs are not rendered by default.

@@ -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<T> extends Dialog {

/**
* The source that should be drawn
*/
private IElementSource<T> 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<T> 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<T> 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;
}

}

0 comments on commit a8f18a0

Please sign in to comment.