From aa7507c4f3f5437d4b67afb1a995b7aa54f9a99d Mon Sep 17 00:00:00 2001 From: JP Moresmau Date: Wed, 27 Feb 2013 22:55:54 +0100 Subject: [PATCH] the ui test is not needed, simplify dependencies --- .../.classpath | 18 +++-- .../ui/SHConfigurationCompositeTest.java | 66 ------------------- 2 files changed, 8 insertions(+), 76 deletions(-) delete mode 100644 net.sf.eclipsefp.haskell.style.test/src/net/sf/eclipsefp/haskell/style/ui/SHConfigurationCompositeTest.java diff --git a/net.sf.eclipsefp.haskell.style.test/.classpath b/net.sf.eclipsefp.haskell.style.test/.classpath index c4eb96e0d..132dc3e33 100644 --- a/net.sf.eclipsefp.haskell.style.test/.classpath +++ b/net.sf.eclipsefp.haskell.style.test/.classpath @@ -1,10 +1,8 @@ - - - - - - - - - - + + + + + + + + diff --git a/net.sf.eclipsefp.haskell.style.test/src/net/sf/eclipsefp/haskell/style/ui/SHConfigurationCompositeTest.java b/net.sf.eclipsefp.haskell.style.test/src/net/sf/eclipsefp/haskell/style/ui/SHConfigurationCompositeTest.java deleted file mode 100644 index 9f58870ee..000000000 --- a/net.sf.eclipsefp.haskell.style.test/src/net/sf/eclipsefp/haskell/style/ui/SHConfigurationCompositeTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2012 by JP Moresmau - * This code is made available under the terms of the Eclipse Public License, - * version 1.0 (EPL). See http://www.eclipse.org/legal/epl-v10.html - */ -package net.sf.eclipsefp.haskell.style.ui; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import net.sf.eclipsefp.haskell.style.stylishhaskell.SHConfiguration; -import net.sf.eclipsefp.haskell.style.stylishhaskell.StylishHaskell; -import net.sf.eclipsefp.haskell.style.stylishhaskell.ui.SHConfigurationComposite; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -/** - * test composite - * @author JP Moresmau - * - */ -public class SHConfigurationCompositeTest { - - /** - * @param args - */ - public static void main(String[] args) { - Display display=new Display(); - - Shell shell=new Shell(display); - shell.setLayout(new GridLayout(1,true)); - final SHConfigurationComposite comp=new SHConfigurationComposite(shell, SWT.NONE); - comp.setConfiguration(new SHConfiguration()); - Button b=new Button(shell,SWT.PUSH); - b.setText("click"); - b.addSelectionListener(new SelectionAdapter() { - /* (non-Javadoc) - * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) - */ - @Override - public void widgetSelected(SelectionEvent e) { - SHConfiguration conf=comp.getConfiguration(); - ByteArrayOutputStream baos=new ByteArrayOutputStream(); - try { - StylishHaskell.save(conf, baos); - System.out.println(new String(baos.toByteArray())); - } catch (IOException ioe){ - ioe.printStackTrace(); - } - } - }); - shell.open(); - while (!shell.isDisposed ()) { - if (!display.readAndDispatch ()) - display.sleep (); - } - display.dispose (); - } - -}