Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

IT IS ALIVE!

  • Loading branch information...
commit c2d0c4cb412aa2c24dd8cbc79026495d3a4c80a6 1 parent ee602b5
@gastaldi gastaldi authored
View
7 src/main/java/org/forgeide/forge/ui/IDEUIContext.java
@@ -7,6 +7,7 @@
package org.forgeide.forge.ui;
+import org.jboss.forge.addon.ui.UIProvider;
import org.jboss.forge.addon.ui.context.AbstractUIContext;
import org.jboss.forge.addon.ui.context.UISelection;
import org.jboss.forge.addon.ui.util.Selections;
@@ -23,4 +24,10 @@
// TODO: Change later
return Selections.emptySelection();
}
+
+ @Override
+ public UIProvider getProvider()
+ {
+ return IDEUIProvider.INSTANCE;
+ }
}
View
50 src/main/java/org/forgeide/forge/ui/IDEUIProvider.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright 2014 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Eclipse Public License version 1.0, available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.forgeide.forge.ui;
+
+import java.io.PrintStream;
+
+import org.jboss.forge.addon.ui.UIProvider;
+import org.jboss.forge.addon.ui.output.UIOutput;
+
+/**
+ *
+ * @author <a href="ggastald@redhat.com">George Gastaldi</a>
+ */
+public enum IDEUIProvider implements UIProvider
+{
+ INSTANCE;
+
+ @Override
+ public boolean isGUI()
+ {
+ return true;
+ }
+
+ @Override
+ public UIOutput getOutput()
+ {
+ // FIXME: Should write to an output area
+ return new UIOutput()
+ {
+
+ @Override
+ public PrintStream out()
+ {
+ return System.out;
+ }
+
+ @Override
+ public PrintStream err()
+ {
+ return System.err;
+ }
+ };
+ }
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.