Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2013-06-25 12:55:28 +0000
committerptessier2013-06-25 12:55:28 +0000
commit943c69e684fab50cf6c55f24879e94ae6c0a673e (patch)
treeaf04a60203a49372d096d29e43a98c215bcd0e03 /extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool
parenta6f2ca0276115a2f38f84fb2fc4c71495009514f (diff)
downloadorg.eclipse.papyrus-943c69e684fab50cf6c55f24879e94ae6c0a673e.tar.gz
org.eclipse.papyrus-943c69e684fab50cf6c55f24879e94ae6c0a673e.tar.xz
org.eclipse.papyrus-943c69e684fab50cf6c55f24879e94ae6c0a673e.zip
401703: Create adl4eclipse profile
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401703
Diffstat (limited to 'extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
index 5ea8111a044..b0f2fda31a0 100644
--- a/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.adl4eclipsetool/src/org/eclipse/papyrus/adltool/designer/wizard/BundleSelectionPage.java
@@ -17,15 +17,21 @@ package org.eclipse.papyrus.adltool.designer.wizard;
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.papyrus.adltool.designer.bundle.BundleLabelProvider;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.uml2.uml.Profile;
public class BundleSelectionPage extends WizardPage {
@@ -50,9 +56,36 @@ public class BundleSelectionPage extends WizardPage {
public void createControl(Composite parent) {
comp = new Composite(parent, SWT.NULL);
FillLayout layout = new FillLayout();
+ layout.type = SWT.VERTICAL;
comp.setLayout(layout);
elementTree = new Tree(comp, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL);
+ Composite buttons = new Composite(comp, SWT.NONE);
+ buttons.setLayout(new RowLayout());
+ Button selectAll = new Button(buttons, SWT.PUSH);
+ selectAll.setText("Select All");
+ selectAll.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ selectAll();
+ }
+ });
+
+ Button deselectAll = new Button(buttons, SWT.PUSH);
+ deselectAll.setText("Deselect All");
+ deselectAll.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ deselectAll();
+ }
+
+
+ });
+
+
+
if(bundleList != null) {
Iterator<?> it = bundleList.iterator();
@@ -89,6 +122,25 @@ public class BundleSelectionPage extends WizardPage {
}
+ protected void selectAll() {
+ selectedBundleList.clear();
+ for(int i = 0; i < elementTree.getItems().length; i++) {
+ elementTree.getItems()[i].setChecked(true);
+ selectedBundleList.add(elementTree.getItems()[i].getData());
+
+ }
+ setPageComplete(true);
+
+ }
+ protected void deselectAll() {
+ for(int i = 0; i < elementTree.getItems().length; i++) {
+ elementTree.getItems()[i].setChecked(false);
+ }
+
+ selectedBundleList.clear();
+ setPageComplete(false);
+ }
+
/**
* create an item that represent the bundle
* @param _package

Back to the top