Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] hello world headless demo need update

Hi,

Here's a patch for it, please check the attached file.

Cheers,
--Alex


Alex Chen wrote:
Hi,

I follow the wiki page http://wiki.eclipse.org/Adding_a_helloworld_headless_command_%28Buckminster%29 did the hello world headless demo, I use the address http://www.eclipse.org/buckminster/samples/queries/hwcommand.cquery let buckminter did all of things, but unfortunately I get a compile error, which because the org.eclipse.buckminster.cmdline.AbstractCommand has been changed, so far it need override a method like:

protected void getOptionDescriptors(List appendHere) throws Exception
    {
        appendHere.add(GOODBYE_DESCRIPTOR);
    }

but

 @Override
    protected OptionDescriptor[] getOptionDescriptors() throws Exception
    {
        return new OptionDescriptor[] { GOODBYE_DESCRIPTOR };
    }

Both wiki and source code need update.

Cheers,
--Alex
_______________________________________________
buckminster-dev mailing list
buckminster-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/buckminster-dev

Index: org.demo.hwcommand/src/org/demo/hwcommand/HWCommand.java
===================================================================
--- org.demo.hwcommand/src/org/demo/hwcommand/HWCommand.java	(revision 212)
+++ org.demo.hwcommand/src/org/demo/hwcommand/HWCommand.java	(working copy)
@@ -7,6 +7,8 @@
  *****************************************************************************/
 package org.demo.hwcommand;
 
+import java.util.List;
+
 import org.eclipse.buckminster.cmdline.AbstractCommand;
 import org.eclipse.buckminster.cmdline.Option;
 import org.eclipse.buckminster.cmdline.OptionDescriptor;
@@ -31,10 +33,15 @@
 		return 0;
 	}
 
-	@Override
-	protected OptionDescriptor[] getOptionDescriptors() throws Exception
+//	@Override
+//	protected OptionDescriptor[] getOptionDescriptors() throws Exception
+//	{
+//		return new OptionDescriptor[] { GOODBYE_DESCRIPTOR };
+//	}
+	
+	protected void getOptionDescriptors(List appendHere) throws Exception
 	{
-		return new OptionDescriptor[] { GOODBYE_DESCRIPTOR };
+		appendHere.add(GOODBYE_DESCRIPTOR);
 	}
 
 	@Override

Back to the top