Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jim Janney Newsgroups: comp.lang.java.programmer Subject: Re: Enum in Eclipse Scrapbook Date: Wed, 27 Feb 2013 09:53:35 -0700 Organization: decimal loadlifters Lines: 30 Message-ID: References: <515de149-3ee1-482d-a090-82ce264ed142@googlegroups.com> <4e2d049c-9a8b-420c-8dfd-293402e7bf95@googlegroups.com> <47939433-d698-4df5-8789-09c4d841fa88@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="c75a2e3068ccf6c98395286f3e40b97d"; logging-data="28045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nofCv6haPkasm6wiPl6BY" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:lJalAZzomi45vj9TpHi+UnckjoY= sha1:oy0rrirS+vKAzqjZRCjeSH/66/g= Xref: csiph.com comp.lang.java.programmer:22577 markspace writes: > On 2/26/2013 11:17 PM, Robert Mark Bram wrote: >> On Wednesday, 27 February 2013 18:04:20 UTC+11, Robert Mark Bram >> wrote: >>> It is an Eclipse Scrapbook page - a jpage file. There is no class >>> as such. >> >> Which most likely means that Eclipse shoves the code into a main >> method I guess.. which may simply mean I cannot declare an enum in a >> Scrapbook. >> > > No se hablo Eclipse Scapbook -- is that a plugin? Like some sort of > bean shell or copy-paste tool? > > I'm used to class names matching file names; when they don't you get > errors like missing top-level classes and whatnot. That's why I > focused in on the file name. I assumed you might have copied the code > to a new file but forgotten to change the file name. > > It does sound like a bug in whatever is doing the parsing here, or at > least a missing feature. The scrapbook is a special Eclipse buffer that lets you enter little code snippets and evaluate them. Since Java is not by nature a dynamic language, it's not surprising that this doesn't always work perfectly. -- Jim Janney